Improving Dictionary Learning with Gated Sparse Autoencoders
Open accessAbstract
Recent work has found that sparse autoencoders (SAEs) are an effective technique for unsupervised discovery of interpretable features in language models' (LMs) activations, by finding sparse, linear reconstructions of LM activations. We introduce the Gated Sparse Autoencoder (Gated SAE), which achieves a Pareto improvement over training with prevailing methods. In SAEs, the L1 penalty used to encourage sparsity introduces many undesirable biases, such as shrinkage -- systematic underestimation of feature activations. The key insight of Gated SAEs is to separate the functionality of (a) determining which directions to use and (b) estimating the magnitudes of those directions: this enables us to apply the L1 penalty only to the former, limiting the scope of undesirable side effects. Through training SAEs on LMs of up to 7B parameters we find that, in typical hyper-parameter ranges, Gated SAEs solve shrinkage, are similarly interpretable, and require half as many firing features to achieve comparable reconstruction fidelity.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
Some studies hypothesize that this superposition phenomenon also exists in language models and propose sparse autoencoder (SAE) and variants to disentangle superposition from activation space.
“Some studies hypothesize that this superposition phenomenon also exists in language models and propose sparse autoencoder (SAE) (Cunningham et al. 2023) and its various variants (Rajamanoharan et al. 2024; Gao et al. 2024) to attempt to disentangle superposition from the activation space of language models (Bricken et al. 2023; Templeton et al. 2024).”
From Knowledge in Superposition: Unveiling the Failures of Lifelong Knowledge Editing for Large Language Models (2024) · cites this paper as Rajamanoharan et al. 2024
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
Regression shrinkage and selection via the lasso
Tibshirani, R. (1996) · Journal of the Royal Statistical Society Series B: Statistical Methodology · doi:10.1111/j.2517-6161.1996.tb02080.x · Cited by 51,482 · cited 1× · see citing works
“Further, shrinkage (Section 4.2) is built into the Lasso (Tibshirani, 1996) and well-studied in statistical learning (Hastie et al., 2015).”
BackgroundInfluential$rm K$-SVD: An Algorithm for Designing Overcomplete Dictionaries for Sparse Representation
Aharon, M., Elad, M., & Bruckstein, A. M. (2006) · IEEE Transactions on Signal Processing · doi:10.1109/tsp.2006.881199 · Cited by 9,464 · see citing works
Matching pursuits with time-frequency dictionaries
Mallat, S., & Zhang, Z. (1993) · IEEE Transactions on Signal Processing · doi:10.1109/78.258082 · Cited by 9,023 · cited 1× · see citing works
“Motivated by the superposition hypothesis, Bricken et al. (2023) and Cunningham et al. (2023) recently used sparse autoencoders (SAEs; Ng (2011)) to find sparse decompositions of model activations in terms of an overcomplete basis, or dictionary (Mallat and Zhang, 1993).”
MethodPati, Y., Rezaiifar, R., & Krishnaprasad, P. (1993) · Proceedings of 27th Asilomar Conference on Signals, Systems and Computers · doi:10.1109/acssc.1993.342465 · Cited by 4,928 · cited 1× · see citing works
“This algorithm is a variant of orthogonal matching pursuit (Pati et al., 1993) which solves the orgothonalisation of the residual to the span of chosen dictionary elements approximately at every step rather than exactly, but which only requires matrix multiplies rather than matrix solves and is…”
BackgroundAxiomatic attribution for deep networks
Sundararajan, M., Taly, A., & Yan, Q. (2017) · arXiv · doi:10.48550/arxiv.1703.01365 · Cited by 4,087 · cited 1× · see citing works
“The discontinuity in particular introduces issues with methods like integrated gradients (Sundararajan et al., 2017) that discretely approximate a path integral, as applied to SAEs by Marks et al. (2024).”
MethodSparse coding with an overcomplete basis set: A strategy employed by V1?
Olshausen, B. A., & Field, D. J. (1997) · Vision Research · doi:10.1016/s0042-6989(97)00169-7 · Cited by 3,642 · cited 1× · see citing works
“For example, sparse coding (Elad, 2010) studies how discrete and continuous representations can involve more representations than basis vectors, like our setup in Section 1, and sparse representations are also studied in neuroscience (Olshausen and Field, 1997; Thorpe, 1989).”
BackgroundInfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial NetsPreprint
Chen, X., Duan, Y., Houthooft, R., Schulman, J., Sutskever, I., & Abbeel, P. (2016) · arXiv (Cornell University) · doi:10.48550/arxiv.1606.03657 · Cited by 3,379 · cited 1× · see citing works
“Methods explicitly motivated by learning a disentangled representation typically enforce a prior structure on the learned representation, typically that features are aligned with the basis of a latent space (Chen et al., 2018, 2016; Kim and Mnih, 2018; Mathieu et al., 2019).”
BackgroundLanguage Modeling with Gated Convolutional NetworksPreprint
Dauphin, Y., Fan, A., Auli, M., & Grangier, D. (2016) · International Conference on Machine Learning · doi:10.48550/arxiv.1612.08083 · Cited by 3,097 · cited 1× · see citing works
“Taking inspiration from Gated Linear Units (Dauphin et al., 2017; Shazeer, 2020), we define the gated encoder as follows: where 𝟙 [• > 0 ] is the (pointwise) Heaviside step function and ⊙ denotes elementwise multiplication.”
MethodStatistical Learning with Sparsity
Hastie, T. J., Tibshirani, R. J., & Wainwright, M. J. (2015) · Chapman & Hall/CRC eBooks · doi:10.1201/b18401 · Cited by 2,529 · see citing works
Statistical Learning with Sparsity: The Lasso and Generalizations
Hastie, T., Tibshirani, R., & Wainwright, M. (2015) · International Statistical Review · doi:10.1111/insr.12167 · Cited by 2,489 · cited 1× · see citing works
“Further, shrinkage (Section 4.2) is built into the Lasso (Tibshirani, 1996) and well-studied in statistical learning (Hastie et al., 2015).”
BackgroundInfluentialSparse and Redundant Representations
Elad, M. (2010) · Springer eBooks · doi:10.1007/978-1-4419-7011-4 · Cited by 2,198 · cited 1× · see citing works
“For example, sparse coding (Elad, 2010) studies how discrete and continuous representations can involve more representations than basis vectors, like our setup in Section 1, and sparse representations are also studied in neuroscience (Olshausen and Field, 1997; Thorpe, 1989).”
BackgroundLesser, L. (1919) · Philosophy · doi:10.1017/s0031819100032368 · Cited by 1,084 · cited 1×
“Much work makes use of the fact that many concept representations appear to be linear (Elhage et al., 2021; Gurnee et al., 2023; Olah et al., 2020; Park et al., 2023).”
BackgroundDisentangling by FactorisingPreprint
Kim, H., & Mnih, A. (2018) · arXiv (Cornell University) · doi:10.48550/arxiv.1802.05983 · Cited by 833 · cited 1× · see citing works
“Methods explicitly motivated by learning a disentangled representation typically enforce a prior structure on the learned representation, typically that features are aligned with the basis of a latent space (Chen et al., 2018, 2016; Kim and Mnih, 2018; Mathieu et al., 2019).”
BackgroundDeep Learning of Representations: Looking Forward
Bengio, Y. (2013) · Lecture notes in computer science · doi:10.1007/978-3-642-39593-2_1 · Cited by 558 · cited 1× · see citing works
“Disentanglement (Bengio, 2013) aims to learn representations that separate out distinct, independent ‘factors of variation’ of the underlying data generating process.”
BackgroundBlumensath, T., & Davies, M. E. (2008) · IEEE Transactions on Signal Processing · doi:10.1109/tsp.2007.916124 · Cited by 466 · cited 1× · see citing works
“For all results in this section, we use gradient pursuit, as described in Blumensath and Davies (2008), as our inference time optimisation (ITO) algorithm.”
MethodGLU Variants Improve Transformer
Shazeer, N. (2020) · arXiv · doi:10.48550/arxiv.2002.05202 · Cited by 303 · cited 1× · see citing works
“Taking inspiration from Gated Linear Units (Dauphin et al., 2017; Shazeer, 2020), we define the gated encoder as follows: where 𝟙 [• > 0 ] is the (pointwise) Heaviside step function and ⊙ denotes elementwise multiplication.”
MethodZoom In: An Introduction to Circuits
Olah, C., Cammarata, N., Schubert, L., Goh, G., Petrov, M., & Carter, S. (2020) · Distill · doi:10.23915/distill.00024.001 · Cited by 288 · see citing works
Linear Representations of Sentiment in Large Language Models
Tigges, C., Hollinsworth, O., Geiger, A., et al. (2023) · arXiv.org · doi:10.48550/arxiv.2310.15154 · Cited by 193 · cited 1×
“Indeed, a common problem when studying SAE features/other interpretable directions is that, while the tails are monosemantic, activations near zero are very noisy (see e.g. the Arabic feature in Bricken et al. (2023) or the sentiment feature in Tigges et al. (2023)).”
BackgroundSelf-citationPythia: A Suite for Analyzing Large Language Models Across Training and Scaling
Biderman, S., Schoelkopf, H., Anthony, Q., Bradley, H., O'Brien, K., Hallahan, E., Khan, M. A., Purohit, S., Prashanth, U. S., Raff, E., et al. (2023) · arXiv · doi:10.48550/arxiv.2304.01373 · Cited by 160 · cited 1× · see citing works
“8B (Biderman et al., 2023) and Gemma-7B (Gemma Team et al., 2024), and on multiple sites within models: MLP layer outputs, attention layer outputs, and residual stream activations.”
BackgroundCopy Suppression: Comprehensively Understanding an Attention Head
McDougall, C., Conmy, A., Rushing, C., et al. (2023) · arXiv.org · doi:10.48550/arxiv.2310.04625 · Cited by 78 · cited 1×
“Methods explicitly motivated by learning a disentangled representation typically enforce a prior structure on the learned representation, typically that features are aligned with the basis of a latent space (Chen et al., 2018, 2016; Kim and Mnih, 2018; Mathieu et al., 2019).”
BackgroundSelf-citationSparse Autoencoders Find Highly Interpretable Features in Language Models
Cunningham, H., Ewart, A., Riggs, L., Huben, R., & Sharkey, L. (2023) · arXiv · doi:10.48550/arxiv.2309.08600 · Cited by 61 · cited 1× · see citing works
“Motivated by the superposition hypothesis, Bricken et al. (2023) and Cunningham et al. (2023) recently used sparse autoencoders (SAEs; Ng (2011)) to find sparse decompositions of model activations in terms of an overcomplete basis, or dictionary (Mallat and Zhang, 1993).”
MethodSelf-citationSparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language ModelsPreprint
Marks, S., Rager, C., Michaud, E. J., Belinkov, Y., Bau, D., & Mueller, A. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2403.19647 · Cited by 54 · cited 4× · see citing works
“Marks et al. (2024) stress-test how useful SAEs are, and find success but also rely on methods that leave many error nodes in their computational subgraphs, which represent the difference between SAE reconstructions and the ground truth.”
BackgroundMethodInfluentialCodebook Features: Sparse and Discrete Interpretability for Neural Networks
Tamkin, A., Taufeeque, M., & Goodman, N. D. (2023) · International Conference on Machine Learning · doi:10.48550/arxiv.2310.17230 · Cited by 53
Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small
Wang, K., Variengien, A., Conmy, A., Shlegeris, B., & Steinhardt, J. (2022) · arXiv · doi:10.48550/arxiv.2211.00593 · Cited by 52 · cited 1× · see citing works
“…components in small and large LMs (Olsson et al., 2022), identified computational subgraphs that carry out specific tasks in small LMs (circuits; Wang et al. (2023)) and reverse-engineered how toy 11 Concretely, we do this by training baseline SAEs, freezing their weights, and then learning…”
BackgroundSelf-citationElhage, N., Hume, T., Olsson, C., Schiefer, N., Henighan, T., Kravec, S., Hatfield-Dodds, Z., Lasenby, R., Drain, D., Chen, C., et al. (2022) · arXiv · doi:10.48550/arxiv.2209.10652 · Cited by 51 · cited 1× · see citing works
“The superposition hypothesis (Elhage et al., 2022b, Definitions and Motivation) posits a mechanistic explanation for these observations: in an intermediate representation of dimension 𝑛 , a model will encode 𝑀 ≫ 𝑛 concepts as linear directions, where the set of concepts and their directions is…”
BackgroundProgress measures for grokking via mechanistic interpretability
Nanda, N., Chan, L., Lieberum, T., Smith, J., & Steinhardt, J. (2023) · arXiv · doi:10.48550/arxiv.2301.05217 · Cited by 51 · see citing works
Self-citationAn Interpretability Illusion for BERTPreprint
Bolukbasi, T., Pearce, A., Yuan, A., Coenen, A., Reif, E., Viégas, F. B., & WATTENBERG, M. P. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2104.07143 · Cited by 32 · cited 1× · see citing works
“Classic approaches, like interpreting neurons (i.e. directions in the standard basis) are insufficient, as many are polysemantic and tend to activate for a range of different seemingly unrelated concepts (Bolukbasi et al., 2021; Elhage et al., 2022a,b, Empirical Phenomena).”
BackgroundJumpReLU: A Retrofit Defense Strategy for Adversarial Attacks
Erichson, N. B., Yao, Z., & Mahoney, M. W. (2019) · International Conference on Pattern Recognition Applications and Methods · doi:10.5220/0009316401030114 · Cited by 29 · cited 5×
“In parallel to our work, Taggart (2024) finds early improvements with a similar Jump ReLU (Erichson et al., 2019) architecture change to SAEs, but with a different loss function, and without addressing the problems of L1.”
BackgroundMethodInfluentialThorpe, S. (1989) · doi:10.3406/intel.1989.873 · Cited by 27 · cited 1×
“For example, sparse coding (Elad, 2010) studies how discrete and continuous representations can involve more representations than basis vectors, like our setup in Section 1, and sparse representations are also studied in neuroscience (Olshausen and Field, 1997; Thorpe, 1989).”
BackgroundFinding Neurons in a Haystack: Case Studies with Sparse Probing
Gurnee, W., Nanda, N., Pauly, M., Harvey, K., Troitskii, D., & Bertsimas, D. (2023) · arXiv · doi:10.48550/arxiv.2305.01610 · Cited by 15 · cited 2× · see citing works
“…as linear directions, where the set of concepts and their directions is fixed across all inputs, but on a given input only a sparse subset of concepts are active, ensuring that there is not much simultaneous interference (Gurnee et al., 2023, Appendix A) between these (non-orthogonal) concepts.”
BackgroundSelf-citationThe Linear Representation Hypothesis and the Geometry of Large Language Models
Park, K., Choe, Y. J., & Veitch, V. (2023) · arXiv · doi:10.48550/arxiv.2311.03658 · Cited by 11 · cited 1× · see citing works
“Much work makes use of the fact that many concept representations appear to be linear (Elhage et al., 2021; Gurnee et al., 2023; Olah et al., 2020; Park et al., 2023).”
Background
Flagged first, then by citations
20 of the 51 references couldn’t be matched to a known paper.
Research works printed but not linked: 3
- S. Bills, N. Cammarata, D. Mossing, H. Tillman, L. Gao, G. Goh, I. Sutskever, J. Leike, J. Wu, and W. Saunders. Language models can explain neurons in language models. https: //openaipublic.blob.core.windows.net/neuron-explainer/paper/index.html, 2023.
- R. T. Chen, X. Li, R. B. Grosse, and D. K. Duvenaud. Isolating sources of disentanglement in variational autoencoders. Advances in neural information processing systems, 31, 2018.
- E. Mathieu, T. Rainforth, N. Siddharth, and Y. W. Teh. Disentangling disentanglement in variational autoencoders. In International conference on machine learning, pages 4402-4412. PMLR, 2019.
Cited by
Sorted by citations
Explaining AI through mechanistic interpretability
Kästner, L., & Crook, B. (2024) · European Journal for Philosophy of Science · doi:10.1007/s13194-024-00614-4 · Cited by 48 · see citing works
“…ANN InceptionV1 (Cammarata et al., 2020; Olah et al., 2018), Chris Olah and colleagues explicitly endorse applying life science research strategies to ANNs, suggesting that “neural networks are an object of empirical investigation, perhaps similar to an organism in biology” (Olah et al., 2020).”
Gujral, O. S., Bafna, M., Alm, E. J., & Berger, B. (2025) · Proceedings of the National Academy of Sciences · doi:10.1073/pnas.2506316122 · Cited by 33 · see citing works
Hu, C., Cao, P., Chen, Y., Liu, K., & Zhao, J. (2024) · arXiv · doi:10.48550/arxiv.2408.07413 · Cited by 3 · see citing works
- Authors
- Rajamanoharan, S., Conmy, A., Smith, L., Lieberum, T., Varma, V., Kramár, J., Shah, R., & Nanda, N.
- ORCID
- Shah, Rohin
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2024
- ISSN
- 2331-8422 (ISSN-L)
- arXiv
- 2404.16014
- OpenAlex
- W4395484123
- Cited by
- 3
- References
- 51
- Citations by year
- 2026: 1 · 2025: 1 · 2024: 1
- Type
- posted content
- Language
- en
- Open access
- green
- arxiv.org
- Licence
- Locations
- arXiv (Cornell University) (submittedVersion, cc-by)
- arXiv (Cornell University) (cc-by)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Explainable Artificial Intelligence (XAI)
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
- Keywords
- sparse autoencoders, dictionary learning, interpretability, l1 penalty, feature sparsity
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review