Beyond SAEs: Consistent Concept Discovery with Sparse Coding
Organizations: KAIST · Helmholtz Munich
Abstract
Sparse autoencoders (SAEs) explain foundation model representations by decomposing activations into sparse combinations of learned dictionary atoms. However, the learned dictionaries can vary across training runs, limiting the reliability and reproducibility of SAE-based analyses. We propose Consistent Sparse Dictionary Learning (ConSDL), which replaces the standard linear encoder with per-sample sparse coding. This is motivated by our synthetic analysis showing that coefficients from a single linear encoder pass are suboptimal compared with those obtained by per-sample optimization, suggesting that sparse coding is a reliable mechanism for dictionary learning. Across 16 synthetic settings, ConSDL achieves near-perfect dictionary and coefficient recovery. These gains translate to state-of-the-art cross-seed consistency across four vision and language settings, where ConSDL improves dictionary and coefficient consistency by 17.6% and 35.9%, respectively, over the average of six SAE baselines.
Figures & tables
| Architecture | # Atoms | DCS | MCC | Input | ||||
|---|---|---|---|---|---|---|---|---|
| Amortized | Re-optimized | Amortized | Re-optimized | Amortized | Re-optimized | |||
| ReLU | 3K | 0.983 | 67.4 | 63.8 | 0.833 | 0.975 | 0.659 | 0.885 |
| 6K | 0.970 | 76.5 | 75.6 | 0.780 | 0.962 | 0.633 | 0.872 | |
| 9K | 0.777 | 62.5 | 92.8 | 0.555 | 0.672 | 0.434 | 0.585 | |
| 12K | 0.367 | 86.9 | 70.6 | 0.157 | 0.168 | 0.268 | 0.249 | |
| TopK | 3K | 0.982 | 60.0 | 60.0 | 0.862 | 0.947 | 0.812 | 0.920 |
| Vision (AUPRC) | Language (AUROC) | |||||||
|---|---|---|---|---|---|---|---|---|
| CLIP ViT-B/16 | DINOv2-B/14 | Pythia-160M | GPT-2 Small | |||||
| Method | @1 | @5 | @1 | @5 | @1 | @5 | @1 | @5 |
| ReLU | 0.48 0.01 | 0.55 0.00 | 0.45 0.00 | 0.53 0.00 | 0.70 0.00 | 0.78 0.00 | 0.74 0.00 | 0.79 0.00 |
| TopK | 0.46 0.01 | 0.53 0.00 | 0.43 0.00 | 0.53 0.00 | 0.72 0.00 | 0.80 0.00 | 0.75 0.00 | 0.80 0.00 |
| BatchTopK | 0.45 0.00 | 0.52 0.00 | 0.43 0.00 | 0.53 0.00 | 0.73 0.00 | 0.80 0.00 | 0.75 0.00 | 0.80 0.00 |
| Matryoshka | 0.42 0.01 | 0.46 0.00 | 0.42 0.00 | 0.51 0.00 | 0.72 0.00 | 0.79 0.00 | 0.74 0.00 | 0.79 0.00 |
| Backbone | Variant | Sparsity | Reconstruction | Cross-seed Consistency | Dictionary Utilization | ||||
|---|---|---|---|---|---|---|---|---|---|
| DCS | MCC | Usable atom frac. | # Dup. | # Dead | |||||
| CLIP ViT-B/16 | Sparse coding | 1.2 | 116 5.36 | 0.87 0.00 | 0.84 0.00 | 0.72 0.00 | 0.25 0.00 | 9,270 35.3 | 0 0.00 |
| + Refitting | 0.8 | 116 1.88 | 0.92 0.00 | 0.85 0.00 | 0.70 0.00 | 0.55 0.00 | 5,564 74.9 | 0 0.00 | |
| + Similarity reg. | 1.0 | 110 2.56 | 0.89 0.00 | 0.70 0.00 | 0.49 0.00 | 1.00 0.00 | 56 1.76 | 0 0.00 | |
| Full | 0.75 | 130 2.13 | 0.92 0.00 | 0.78 0.00 | 0.66 0.00 | 1.00 0.00 | 1 0.90 | 0 0.00 | |
| Pythia-160M | Sparse coding | 3.0 | 113 2.45 | 0.69 0.00 | 0.29 0.00 | 0.17 0.00 | 0.03 0.01 | 2,144 52.4 | 9,767 103 |
Appendix figures & tables28 assets
Supplementary material from the paper’s appendix.
Appendix
| Architecture | ||||||
|---|---|---|---|---|---|---|
| Inference | Training | Inference | Training | Inference | Training | |
| Pythia-160M | ||||||
| ReLU | 0.04 (4.7) | 0.32 (28.3) | 0.08 (9.4) | 0.53 (56.6) | 0.14 (18.9) | 0.97 (113.2) |
| TopK | 0.12 (4.7) | 0.36 (28.3) | 0.21 (9.4) | 0.59 (56.6) | 0.37 (18.9) | 1.05 (113.2) |
| BatchTopK | 0.07 (4.7) | 0.48 (28.3) | 0.13 (9.4) | 0.75 (56.6) | 0.24 (18.9) | 1.40 (113.2) |
| Matryoshka | 0.07 (4.7) | 0.81 (33.0) | 0.13 (9.4) | 1.20 (66.1) | 0.24 (18.9) | 2.02 (132.1) |
| Backbone | Expansion | Sparse coding | Refitting | Similarity reg. | Other update | Total |
|---|---|---|---|---|---|---|
| Pythia-160M | 7.7 (62%) | 1.7 (14%) | 2.3 (19%) | 0.6 (5%) | 12.3 | |
| 14.3 (66%) | 3.2 (15%) | 3.5 (16%) | 0.7 (3%) | 21.7 | ||
| 27.6 (64%) | 6.1 (14%) | 8.0 (19%) | 1.2 (3%) | 42.8 | ||
| CLIP ViT-B/16 | 42.0 (74%) | 9.3 (16%) | 3.8 (7%) | 1.6 (3%) | 56.7 | |
| 82.6 (75%) | 18.2 (17%) | 6.6 (6%) | 2.3 (2%) | 109.7 | ||
| 166.2 (75%) | 36.6 (17%) | 13.9 (6%) | 4.4 (2%) | 221.1 |
| Architecture | Decoder cosine (DCS) | Footprint cosine (50k images) | Code Pearson (MCC) | |||
|---|---|---|---|---|---|---|
| ReLU | 0.525 | 0.496 | 0.595 | 0.615 | 0.417 | 0.416 |
| TopK | 0.558 | 0.525 | 0.696 | 0.715 | 0.499 | 0.498 |
| BatchTopK | 0.480 | 0.428 | 0.524 | 0.575 | 0.437 | 0.458 |
| Matryoshka | 0.271 | 0.189 | 0.243 | 0.290 | 0.184 | 0.199 |
| MP-SAE | 0.694 | 0.644 | 0.653 | 0.672 | 0.276 | 0.288 |
| Architecture | # Atoms | DCS | MCC | Input | |||||
|---|---|---|---|---|---|---|---|---|---|
| Amortized | Re-optimized | Amortized | Re-optimized | Amortized | Re-optimized | ||||
| ReLU | 0.0 | 3K | 0.983 | 67.4 | 63.8 | 0.833 | 0.975 | 0.659 | 0.885 |
| 0.0 | 6K | 0.970 | 76.5 | 75.6 | 0.780 | 0.962 | 0.633 | 0.872 | |
| 0.0 | 9K | 0.777 | 62.5 | 92.8 | 0.555 | 0.672 | 0.434 | 0.585 | |
| 0.0 | 12K | 0.367 | 86.9 | 70.6 | 0.157 | 0.168 | 0.268 | 0.249 | |
| 0.5 | 3K | 0.967 | 113 | 69.6 | 0.832 | 0.954 | 0.755 | 0.869 | |
| Backbone | Metric | ReLU | TopK | BatchTopK | Matryoshka | MP-SAE | iSAE | ConSDL | vs. Avg. | vs. Best |
|---|---|---|---|---|---|---|---|---|---|---|
| CLIP ViT-B/16 | DCS | 0.61 0.15 | 0.67 0.10 | 0.56 0.10 | 0.37 0.08 | 0.75 0.04 | 0.75 0.06 | 0.78 0.07 | +26.7% | +4.8% |
| MCC | 0.53 0.17 | 0.63 0.13 | 0.52 0.11 | 0.31 0.10 | 0.45 0.15 | 0.40 0.06 | 0.73 0.09 | +54.7% | +16.8% | |
| Usable atom frac. | 0.99 0.00 | 1.00 0.00 | 1.00 0.00 | 1.00 0.00 | 0.85 0.05 | 0.96 0.10 | 1.00 0.00 | +3.5% | +0.0% | |
| DINOv2-B/14 | DCS | 0.68 0.16 | 0.73 0.13 | 0.65 0.15 | 0.50 0.12 | 0.83 0.04 | 0.77 0.10 | 0.84 0.05 | +21.4% | +1.6% |
| MCC | 0.61 0.19 | 0.69 0.17 | 0.61 0.19 | 0.47 0.16 | 0.49 0.16 | 0.44 0.07 | 0.78 0.06 | +42.3% | +14.1% | |
| Usable atom frac. | 0.98 0.01 | 0.98 0.04 | 1.00 0.00 | 0.99 0.01 | 0.75 0.11 | 0.99 0.01 | 0.99 0.02 | +4.5% | -0.6% |
| Backbone | Cell | Method | ImageNet Object | SUN397 Scene | Food101 Food | DTD Texture | Caltech256 Object | RAF-DB Emotion | Avg. | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @1 | @5 | @1 | @5 | @1 | @5 | @1 | @5 | @1 | @5 | @1 | @5 | @1 | @5 | |||
| CLIP ViT-B/16 | ReLU | 0.33 0.00 | 0.39 0.00 | 0.35 0.00 | 0.43 0.00 | 0.42 0.01 | 0.46 0.00 | 0.51 0.01 | 0.61 0.01 | 0.70 0.00 | 0.77 0.00 | 0.45 0.04 | 0.51 0.01 | 0.46 0.01 | 0.53 0.00 | |
| TopK | 0.28 0.00 | 0.36 0.00 | 0.34 0.00 | 0.45 0.00 | 0.42 0.00 | 0.50 0.00 | 0.49 0.01 | 0.61 0.00 | 0.67 0.00 | 0.76 0.00 | 0.48 0.00 | 0.52 0.01 | 0.45 0.00 | 0.54 0.00 | ||
| BatchTopK | 0.28 0.00 | 0.36 0.00 | 0.34 0.00 | 0.45 0.00 | 0.42 0.01 | 0.50 0.00 | 0.49 0.01 | 0.61 0.00 | 0.67 0.00 | 0.76 0.00 | 0.46 0.04 | 0.51 0.01 | 0.44 0.01 | 0.53 0.00 | ||
| Matryoshka | 0.26 0.00 | 0.33 0.00 | 0.31 0.00 | 0.42 0.00 | 0.39 0.01 | 0.46 0.01 | 0.48 0.01 | 0.59 0.00 | 0.61 0.01 | 0.71 0.01 | 0.42 0.04 | 0.49 0.00 | 0.41 0.01 | 0.50 0.00 | ||
| MP-SAE | 0.28 0.00 | 0.36 0.00 | 0.34 0.00 | 0.45 0.00 | 0.42 0.00 | 0.50 0.01 | 0.51 0.01 | 0.60 0.01 | 0.67 0.00 | 0.76 0.00 | 0.42 0.03 | 0.50 0.02 | 0.44 0.00 | 0.53 0.00 | ||
| Backbone | Method | , | , | , | |||
|---|---|---|---|---|---|---|---|
| @1 | @5 | @1 | @5 | @1 | @5 | ||
| Pythia-160M | ReLU | 0.69 0.00 | 0.75 0.00 | 0.70 0.00 | 0.77 0.00 | 0.70 0.00 | 0.78 0.00 |
| TopK | 0.70 0.00 | 0.77 0.00 | 0.71 0.00 | 0.78 0.00 | 0.72 0.00 | 0.80 0.00 | |
| BatchTopK | 0.70 0.00 | 0.77 0.00 | 0.72 0.01 | 0.79 0.00 | 0.73 0.00 | 0.80 0.00 | |
| Matryoshka | 0.71 0.00 | 0.77 0.00 | 0.72 0.01 | 0.79 0.00 | 0.72 0.00 | 0.79 0.00 | |
| MP-SAE | 0.70 0.00 | 0.78 0.00 | 0.68 0.00 | 0.76 0.00 | 0.67 0.00 | 0.74 0.00 | |
| Setting | Architecture | Sparsity | Reconstruction | Ground-truth Recovery | Cross-seed Consistency | Dictionary Utilization | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| DCS | MCC | DCS | MCC | # Dup | # Dead | Usable atom frac. | ||||
| ReLU | 67.0 0.1 | 0.67 0.00 | 0.98 0.00 | 0.83 0.00 | 0.97 0.00 | 0.97 0.00 | 10 2 | 0 0 | 1.00 0.00 | |
| TopK | 60.0 0.0 | 0.82 0.00 | 0.98 0.00 | 0.86 0.00 | 0.97 0.00 | 0.93 0.00 | 1 1 | 0 0 | 1.00 0.00 | |
| BatchTopK | 61.0 0.0 | 0.81 0.00 | 0.98 0.00 | 0.86 0.00 | 0.96 0.00 | 0.93 0.00 | 1 1 | 0 0 | 1.00 0.00 | |
| Matryoshka | 64.0 0.0 | 0.69 0.00 | 0.82 0.00 | 0.67 0.00 | 0.69 0.00 | 0.58 0.00 | 1 1 | 0 0 | 1.00 0.00 | |
| MP-SAE | 57.7 0.0 | 0.95 0.00 | 0.99 0.00 | 0.89 0.00 | 0.99 0.00 | 0.95 0.00 | 20 4 | 0 0 | 1.00 0.00 | |
| Setting | Architecture | Sparsity | Reconstruction | Ground-truth Recovery | Cross-seed Consistency | Dictionary Utilization | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| DCS | MCC | DCS | MCC | # Dup | # Dead | Usable atom frac. | ||||
| ReLU | 76.0 0.3 | 0.64 0.00 | 0.97 0.00 | 0.78 0.00 | 0.94 0.00 | 0.94 0.00 | 44 5 | 0 0 | 1.00 0.00 | |
| TopK | 60.0 0.0 | 0.65 0.00 | 0.81 0.00 | 0.61 0.00 | 0.67 0.00 | 0.53 0.00 | 2 1 | 0 0 | 1.00 0.00 | |
| BatchTopK | 71.0 0.0 | 0.63 0.00 | 0.76 0.00 | 0.55 0.00 | 0.59 0.00 | 0.44 0.00 | 1 1 | 0 0 | 1.00 0.00 | |
| Matryoshka | 75.0 0.0 | 0.48 0.00 | 0.35 0.00 | 0.17 0.00 | 0.20 0.00 | 0.05 0.00 | 0 0 | 0 0 | 1.00 0.00 | |
| MP-SAE | 58.0 0.0 | 0.95 0.00 | 0.99 0.00 | 0.98 0.00 | 0.98 0.00 | 0.98 0.00 | 51 12 | 0 0 | 1.00 0.00 | |
| Setting | Architecture | Sparsity | Reconstruction | Ground-truth Recovery | Cross-seed Consistency | Dictionary Utilization | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| DCS | MCC | DCS | MCC | # Dup | # Dead | Usable atom frac. | ||||
| ReLU | 63.0 0.0 | 0.44 0.00 | 0.78 0.00 | 0.55 0.00 | 0.62 0.00 | 0.53 0.00 | 66 5 | 0 0 | 1.00 0.00 | |
| TopK | 60.0 0.0 | 0.41 0.00 | 0.23 0.00 | 0.05 0.00 | 0.15 0.00 | 0.01 0.00 | 0 0 | 0 0 | 1.00 0.00 | |
| BatchTopK | 89.0 0.0 | 0.45 0.00 | 0.22 0.00 | 0.05 0.00 | 0.15 0.00 | 0.02 0.00 | 0 0 | 0 0 | 1.00 0.00 | |
| Matryoshka | 80.0 0.4 | 0.44 0.00 | 0.19 0.00 | 0.03 0.00 | 0.14 0.00 | 0.01 0.00 | 0 0 | 0 0 | 1.00 0.00 | |
| MP-SAE | 60.0 0.0 | 0.47 0.00 | 0.17 0.00 | 0.01 0.00 | 0.18 0.00 | 0.00 0.00 | 0 0 | 0 0 | 1.00 0.00 | |
| Setting | Architecture | Sparsity | Reconstruction | Ground-truth Recovery | Cross-seed Consistency | Dictionary Utilization | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| DCS | MCC | DCS | MCC | # Dup | # Dead | Usable atom frac. | ||||
| ReLU | 87.0 0.0 | 0.27 0.00 | 0.37 0.00 | 0.16 0.00 | 0.22 0.00 | 0.05 0.00 | 1 1 | 0 0 | 1.00 0.00 | |
| TopK | 60.0 0.0 | 0.40 0.00 | 0.18 0.00 | 0.02 0.00 | 0.15 0.00 | 0.01 0.00 | 0 0 | 0 0 | 1.00 0.00 | |
| BatchTopK | 88.0 0.6 | 0.45 0.00 | 0.17 0.00 | 0.02 0.00 | 0.15 0.00 | 0.02 0.00 | 0 0 | 0 0 | 1.00 0.00 | |
| Matryoshka | 85.0 0.0 | 0.44 0.00 | 0.17 0.00 | 0.02 0.00 | 0.14 0.00 | 0.01 0.00 | 0 0 | 0 0 | 1.00 0.00 | |
| MP-SAE | 60.0 0.0 | 0.57 0.00 | 0.18 0.00 | 0.02 0.00 | 0.15 0.00 | 0.01 0.00 | 0 0 | 0 0 | 1.00 0.00 | |
| Expansion | band | Method | Sparsity | Reconstruction | Consistency | Dictionary Utilization | |||
|---|---|---|---|---|---|---|---|---|---|
| DCS | MCC | Usable atom frac. | # Dup. | # Dead | |||||
| ReLU | 34 0.4 | 0.89 0.00 | 0.74 0.00 | 0.68 0.00 | 0.99 0.00 | 36 4.1 | 0 0.00 | ||
| TopK | 32 0.0 | 0.93 0.00 | 0.80 0.00 | 0.77 0.00 | 1.00 0.00 | 1 0.58 | 0 0.00 | ||
| BatchTopK | 32 0.0 | 0.93 0.00 | 0.72 0.00 | 0.70 0.00 | 1.00 0.00 | 1 0.29 | 0 0.00 | ||
| Matryoshka | 32 0.0 | 0.92 0.00 | 0.51 0.00 | 0.47 0.01 | 1.00 0.00 | 6 0.87 | 0 0.00 | ||
| MP-SAE | 32 0.0 | 0.93 0.00 | 0.79 0.01 | 0.63 0.00 | 0.91 0.00 | 275 9 | 0 0.00 | ||
| Expansion | band | Method | Sparsity | Reconstruction | Consistency | Dictionary Utilization | |||
|---|---|---|---|---|---|---|---|---|---|
| DCS | MCC | Usable atom frac. | # Dup. | # Dead | |||||
| ReLU | 29 0.0 | 0.93 0.00 | 0.79 0.00 | 0.75 0.00 | 0.99 0.00 | 26 2.6 | 0 0.00 | ||
| TopK | 32 0.0 | 0.96 0.00 | 0.90 0.00 | 0.88 0.00 | 1.00 0.00 | 3 2.02 | 0 0.00 | ||
| BatchTopK | 32 0.0 | 0.96 0.00 | 0.83 0.00 | 0.81 0.00 | 1.00 0.00 | 0 0.29 | 0 0.00 | ||
| Matryoshka | 32 0.0 | 0.95 0.00 | 0.67 0.00 | 0.67 0.00 | 1.00 0.00 | 9 2.84 | 0 0.00 | ||
| MP-SAE | 32 0.0 | 0.96 0.00 | 0.87 0.02 | 0.69 0.01 | 0.89 0.01 | 352 28 | 0 0.00 | ||
| Expansion | band | Method | Sparsity | Reconstruction | Consistency | Dictionary Utilization | |||
|---|---|---|---|---|---|---|---|---|---|
| DCS | MCC | Usable atom frac. | # Dup. | # Dead | |||||
| ReLU | 31 0.2 | 0.87 0.02 | 0.91 0.00 | 0.86 0.00 | 0.95 0.00 | 161 8 | 6 3.00 | ||
| TopK | 32 0.0 | 0.89 0.00 | 0.83 0.00 | 0.79 0.00 | 0.99 0.00 | 27 3.4 | 0 0.00 | ||
| BatchTopK | 32 0.1 | 0.90 0.00 | 0.83 0.00 | 0.79 0.00 | 0.99 0.00 | 17 3.6 | 0 0.00 | ||
| Matryoshka | 32 0.1 | 0.88 0.00 | 0.71 0.00 | 0.69 0.00 | 1.00 0.00 | 0 0.00 | 0 0.00 | ||
| MP-SAE | 32 0.0 | 0.98 0.00 | 0.87 0.00 | 0.64 0.01 | 0.83 0.00 | 517 13 | 0 0.00 | ||
| Expansion | band | Method | Sparsity | Reconstruction | Consistency | Dictionary Utilization | |||
|---|---|---|---|---|---|---|---|---|---|
| DCS | MCC | Usable atom frac. | # Dup. | # Dead | |||||
| ReLU | 31 0.3 | 0.84 0.00 | 0.90 0.00 | 0.82 0.01 | 0.92 0.00 | 247 5 | 1 1.15 | ||
| TopK | 32 0.0 | 0.90 0.00 | 0.84 0.00 | 0.78 0.00 | 1.00 0.00 | 15 1.8 | 0 0.00 | ||
| BatchTopK | 32 0.1 | 0.91 0.02 | 0.83 0.00 | 0.78 0.00 | 1.00 0.00 | 13 1.0 | 0 0.00 | ||
| Matryoshka | 32 0.0 | 0.90 0.02 | 0.71 0.00 | 0.67 0.00 | 1.00 0.00 | 0 0.29 | 0 0.00 | ||
| MP-SAE | 32 0.0 | 0.96 0.00 | 0.84 0.01 | 0.51 0.00 | 0.72 0.00 | 874 7 | 0 0.00 | ||
| Backbone | Expansion | ReLU | ConSDL | |||||||||||||
| CLIP ViT-B/16 | 1.4e-4 | 1.0e-4 | 7.5e-5 | 1e-3 | 1e-3 | 1e-3 | ||||||||||
| 1.5e-4 | 1.2e-4 | 8.4e-5 | 5e-3 | 1e-3 | 1e-3 | |||||||||||
| 1.6e-4 | 1.3e-4 | 1.0e-4 | 5e-3 | 5e-3 | 2e-3 | |||||||||||
| DINOv2-B/14 | 1.5e-4 | 8.5e-5 | 5.6e-5 | 5e-3 | 5e-3 | 1e-3 | ||||||||||
| 3K | 6K | 9K | 12K | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ReLU | Ours | Ours | ReLU | Ours | Ours | ReLU | Ours | Ours | ReLU | Ours | Ours | |
| 0.0 | 1.5e-4 | 0.3 | 30 | 1.4e-4 | 0.5 | 10 | 1.8e-4 | 0.4 | 10 | 1.8e-4 | 0.5 | 5 |
| 0.5 | 1e-4 | 0.3 | 30 | 1.2e-4 | 0.4 | 10 | 1.8e-4 | 0.3 | 10 | 1.6e-4 | 0.4 | 10 |
| 0.7 | 1.5e-4 | 0.35 | 20 | 2.1e-4 | 0.25 | 30 | 1.8e-4 | 0.35 | 30 | 2e-4 | 0.3 | 10 |
| 1.0 | 2.1e-4 | 0.15 | 30 | 2.3e-4 | 0.15 | 20 | 2.1e-4 | 0.25 | 30 | 2.1e-4 | 0.3 | 20 |
Sparse Autoencoders
Sparse autoencoders decompose neural network activations into sparse features to study, interpret, and control learned representations.
See all 217 papers