Before you move a control in the demo, say what you expect to change.
Foundation reference
Sparse Autoencoders at Scale: Feature Dictionaries for Mechanistic Interpretability
A sparse autoencoder reconstructs an activation vector using a few learned feature directions. These features can be more interpretable individually than neurons, which often respond to several unrelated concepts (Bricken et al., 2023).
Study guide
Where to start
Why is it useful to think of an SAE as learning a dictionary of parts for the residual stream, with each decoder column a candidate feature and the sparse code saying which parts are present?
How to study this pagePredict · Check · Generalize · Continue
Compare what the demo shows with the key equation and with the papers cited below.
Identify the part of the idea that survives a change of notation or model, so you can recognize it in another paper or system.
The newer notebook covers the same concept and has an interactive demo.
Why It Matters for Modern Models
- A sparse autoencoder reconstructs an activation vector using a few learned feature directions. These features can be more interpretable individually than neurons, which often respond to several unrelated concepts (Bricken et al., 2023).
- The method has been scaled to large production models: Gao et al. (2025) trained a 16-million-latent autoencoder on GPT-4 activations, and Templeton et al. (2024) extracted interpretable features from Claude 3 Sonnet.
- It turns the idea of superposition into a practical procedure for recovering features from real models.
- Features found this way can be the units of circuit analysis, giving causal graphs over interpretable features rather than over attention heads and neurons (Marks et al., 2025).
- Once a feature can be named, it can be measured, audited and intervened on, which links interpretability to alignment work such as activation steering.
Questions to Think About
- A dense code can represent anything but names nothing; how does sparsity force the same direction to be reused across similar contexts?
- In a TopK SAE, sets how many features may explain one activation; what is lost when is too small, and what when it is too large?
- What causes the L1 penalty's shrinkage bias and dead latents, and how do gated and TopK SAEs address them?
- What evidence shows that an SAE feature is used by the model, rather than only correlated with a concept, and how do ablation and steering provide it?
Interactive Demo
Core Math
If you prefer intuition first, try the demo above, then come back for the math.
A sparse autoencoder (SAE) learns a dictionary of directions in a model's activation space so that each activation is explained by a few of them. The motivation is superposition: a network can represent more features than it has dimensions by storing them as overlapping directions, so individual neurons often respond to several unrelated things.
Let be an activation vector, for example the residual stream at one layer.
Encode to sparse latents, decode to a reconstruction:
Each column of is a unit-norm candidate feature direction, and the sparse code says which features are present and how strongly.
Standard objective (reconstruction plus an L1 sparsity penalty):
Sparsity is the assumption that makes latents more likely to be interpretable: if only a few latents can be active at once, each tends to specialize. The L1 penalty also shrinks active values toward zero, a bias that gated SAEs were designed to remove (Rajamanoharan et al., 2024).
TopK variant (set the sparsity directly):
Only the largest pre-activations are kept, so fixes the number of active latents per token instead of being tuned indirectly through . Gao et al. (2025) report that this improves the trade-off between reconstruction error and sparsity and leaves few dead latents even at large scale.