Views
No views yet
facebook/hubert-base-ls960,
from the paper
AudioSAE: Towards Understanding of Audio-Processing Models with Sparse AutoEncoders
(EACL 2026).| Backbone | Activation dim | Dict size | Expansion | k | Layers |
|---|---|---|---|---|---|
| HuBERT-base | 768 | 6144 | 8× | 50 | 12 |
layer_1 … layer_12). Layer indices are 1-based and
correspond to the output of the n-th transformer block.layer_1/
ae.pt # BatchTopKSAE state_dict
config.json # training config (activation_dim, dict_size, k, …)
layer_2/
…
layer_12/ae.pt contains encoder.{weight,bias}, decoder.weight, b_dec, k.1import torch
2from huggingface_hub import hf_hub_download
3from audio_sae import BatchTopKSAE
4from audio_sae.models.hubert import MyHubert
5
6device = "cuda" if torch.cuda.is_available() else "cpu"
7layer = 3
8
9# 1. HuBERT-base encoder, tapped after `layer`
10hubert = MyHubert("facebook/hubert-base-ls960", sae_after_layer=layer).to(device).eval()
11
12# 2. Matching SAE
13ckpt = hf_hub_download(
14 repo_id="Egorgij21/Audio-SAE-hubert-base",
15 filename=f"layer_{layer}/ae.pt",
16)
17sae = BatchTopKSAE.from_pretrained(ckpt, device=device)
18
19# 3. Run on audio
20import librosa
21wav, _ = librosa.load("example.wav", sr=16000, mono=True)
22wav = torch.from_numpy(wav).unsqueeze(0).to(device)
23
24with torch.no_grad():
25 acts = hubert(wav) # (1, T, 768)
26 features = sae.encode(acts, use_threshold=True) # (1, T, 6144), sparsek=50)1@inproceedings{aparin2026audiosae,
2 title = {AudioSAE: Towards Understanding of Audio-Processing Models with Sparse AutoEncoders},
3 author = {Aparin, Georgii and Sadekova, Tasnima and Rukhovich, Alexey and Yermekova, Assel and Kushnareva, Laida and Popov, Vadim and Kuznetsov, Kristian and Piontkovskaya, Irina},
4 booktitle = {Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers)},
5 year = {2026},
6 address = {Rabat, Morocco},
7}