Towards Monosemanticity: Decomposing Language Models With Dictionary Learning
Read first: Toy Models of Superposition
TL;DR. Neurons are polysemantic because of superposition. This Anthropic paper trains a sparse autoencoder (SAE) on the 512-neuron MLP layer of a one-layer transformer and recovers thousands of features, most of them far more monosemantic than any neuron. Examples include Arabic script, DNA and base64. It also documents the two big practical issues of L1 SAEs: the choice of dictionary size, which causes feature splitting, and dead latents. Read it together with Gao et al. (2024), whose TopK SAE drops the L1 penalty and scales to 16M latents on GPT-4.
Why it matters now. SAEs became the default decomposition for mechanistic interpretability. Scaling Monosemanticity, Gemma Scope and the transcoders behind attribution graphs all build on them. Any plan to use model internals to monitor reward hacking, detect harmful intent, or explain a retriever or reranker has to understand what SAE objectives optimise and where they fail.
Key idea
Section titled “Key idea”The SAE subtracts a decoder bias, encodes into a wide ReLU layer, and decodes with a dictionary of unit-norm directions:
The decoder is untied from the encoder, and its columns are kept at unit norm. Without that, the L1 term could be shrunk for free by scaling the decoder up and the activations down. The pre-encoder bias is initialised to the geometric median of the data. The dictionary is overcomplete: from 512 (1×) to 131,072 (256×) features. The main run A/1 uses 4,096 (8×).
The L1 term has a known cost. Take one active feature with unit-norm decoder direction , no interference from other features, and residual along it. The loss along is for ; setting the derivative to zero gives . Every active feature is therefore shrunk by . Worked example: with and , the SAE outputs , so the reconstruction along is 20% too small; a weaker true activation is zeroed out entirely.
TopK variant (Gao et al., 2024; code):
TopK sets the sparsity directly as , removes λ and the shrinkage it causes, and trains only on MSE. The auxiliary term (AuxK) reconstructs the error using only the top dead latents. Its settings are and .
Key results
Section titled “Key results”Setup. One-layer transformer with a 512-neuron MLP, trained on 100B tokens of the Pile. SAEs are trained on 8B MLP activation samples.
Interpretability. Features such as Arabic script, DNA, base64 and Hebrew are much more specific than any neuron. Activating a feature steers generation, for example base64 text or Arabic text.
Loss recovered. A/1 recovers 79% of the log-likelihood loss reduction provided by the MLP. A/5 (131,072 features, λ = 0.004) recovers 94.5%.
TopK (Gao et al.).
- Without mitigations, ablations show up to 90% dead latents. A latent counts as dead if it has not fired in 10M tokens. For comparison, Templeton et al.’s 34M SAE had only 12M alive.
- With the mitigations, the 16M-latent GPT-4 SAE has 7% dead.
- Refining the nonzero activations after encoding improves reconstruction MSE and downstream cross-entropy for both ReLU and TopK SAEs. ReLU refinements tend to increase activations, consistent with L1 shrinkage; TopK refinements are smaller and not systematically positive (§5.1, Fig. 9).
Advanced: resampling schedule and scaling fit
Section titled “Advanced: resampling schedule and scaling fit”These details matter when you train an SAE yourself; skip them on a first read.
Dead latents. Resampling procedure:
- At steps 25k, 50k, 75k and 100k, find latents dead for the last 12,500 steps.
- Compute the loss on 819,200 inputs and sample inputs with probability ∝ loss².
- Set each dead latent’s dictionary vector to a sampled input, unit-normalised.
- Set its encoder row to 0.2 × the average alive encoder norm, with zero bias.
- Reset the Adam state.
TopK scaling fit (Gao et al.). Joint fit: , with , valid for small k.
Limitations & open questions
Section titled “Limitations & open questions”- The model is a one-layer toy, and 21% of the MLP’s loss reduction is unexplained at A/1.
- There is no canonical dictionary size, so feature splitting makes “the features” depend on a hyperparameter.
- Sparsity is a proxy for interpretability, not the goal itself.
- TopK fixes shrinkage, but not the question of whether SAE latents capture the concepts you need. The GDM negative results suggest they often do not.
- Open questions: how to evaluate SAEs by downstream use rather than MSE and L0, and whether features compose across layers.
Connections
Section titled “Connections”- Toy Models of Superposition: the theory SAEs try to invert.
- Sparse Autoencoders Find Highly Interpretable Features: concurrent SAE work on Pythia’s residual stream.
- Scaling Monosemanticity: the same recipe at Claude 3 Sonnet scale.
- Gemma Scope: JumpReLU, another fix for L1 shrinkage, released as open SAEs.
- Negative results for SAEs: SAE probes versus dense probes on a real task.
- Circuit Tracing: cross-layer transcoders built on the same ideas.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
Take the SAE loss ‖x − x̂‖² + λ‖f‖₁ and consider one active feature with a unit-norm decoder direction d and no interference, so the residual along d is r = d · (x − b_d). Solve for the loss-minimising activation f ≥ 0 and show that L1 systematically underestimates active features. How does TopK avoid this?
What a strong answer covers
- Along d the loss is (r − f)² + λf for f ≥ 0. Setting the derivative −2(r − f) + λ to zero gives f* = max(0, r − λ/2): soft thresholding.
- Every active feature is shrunk by λ/2 relative to the value that reconstructs best; small true activations are zeroed out entirely. This is activation shrinkage.
- Raising λ to get sparser codes makes shrinkage worse, so L1 trades reconstruction against sparsity through the same knob.
- TopK sets sparsity by keeping the k largest pre-activations and has no L1 term, so the kept activations are fit only by MSE. Gao et al. show that refining the nonzero activations improves reconstruction MSE and downstream cross-entropy for both ReLU and TopK SAEs; ReLU refinements tend to increase activations (consistent with L1 shrinkage), while TopK refinements are smaller and not systematically positive.
- Mechanism
Why must the decoder columns be constrained to unit norm when the sparsity penalty is λ‖f‖₁? What would gradient descent do without the constraint?
What a strong answer covers
- The reconstruction depends on the product W_d f, so scaling a decoder column by c and its activation by 1/c leaves x̂ unchanged.
- The L1 term would fall by a factor c, so without a constraint the optimiser can make the penalty arbitrarily small by growing decoder norms and shrinking activations.
- Then the code is not really sparse in any useful sense; the unit-norm constraint fixes the scale so λ‖f‖₁ is meaningful.
- TopK does not need this argument for sparsity (L0 = k is fixed), though fixing decoder norms still makes activation magnitudes comparable across latents.
- Mechanism
Explain how dead latents arise and compare the two fixes: Bricken et al.'s resampling procedure and Gao et al.'s encoder-transpose initialisation plus AuxK loss. What does each one do to a dead latent's parameters or gradients?
What a strong answer covers
- A latent whose pre-activation is negative on all inputs gets zero gradient through the ReLU or TopK, so it can never recover; causes include a high learning rate, small batches and redundant data. A/1 had 168 of 4,096 latents dead on 100M examples.
- Resampling: at steps 25k, 50k, 75k and 100k, find latents dead for the last 12,500 steps, sample inputs with probability proportional to their squared loss, set the dictionary vector to the normalised input, set the encoder row to 0.2 × the average alive encoder norm with zero bias, and reset Adam state.
- AuxK: add α‖e − ê‖², where e = x − x̂ and ê is reconstructed from the top k_aux dead latents only (k_aux = 512, α = 1/32), so dead latents get gradient toward explaining what the main SAE misses.
- With encoder = decoder transpose at initialisation and AuxK, Gao et al.'s 16M-latent GPT-4 SAE has only 7% dead latents, compared with up to 90% in ablations without them.
- What if…
The paper trains dictionaries from 512 (1×) up to 131,072 (256×) features on the same 512-neuron MLP. Describe feature splitting and explain whether it is a problem, a feature, or both for using SAEs as an analysis tool.
What a strong answer covers
- As the dictionary grows, one feature (for example a base64 feature) splits into several finer, still interpretable features, forming families that look like the same concept at different resolutions.
- Feature: dictionary size acts as a resolution knob, and families show structure in the concept space.
- Problem: there is no single canonical set of features; which concepts you find depends on an arbitrary size, and finer features may absorb parts of coarser ones.
- Loss recovered also changes with size and λ: A/1 (4,096 features) recovers 79% of the MLP's loss reduction, A/5 (131,072 features, λ = 0.004) recovers 94.5%.
- Critique
A/1 recovers 79% of the log-likelihood loss reduction that the MLP provides. Explain exactly what this metric measures and give two reasons it can overstate or understate how well the SAE explains the model.
What a strong answer covers
- Replace the MLP activations with the SAE reconstruction and measure the extra loss; the metric is 1 minus that extra loss divided by the extra loss from zero-ablating the MLP (here the extra loss is 21% of the zero-ablation loss).
- Overstate: the reconstruction can preserve the loss through directions that are not interpretable, or through a few dense features.
- Understate: small reconstruction errors can compound downstream even if every feature is interpretable; and the leftover 21% may contain rare but important features.
- It does not measure interpretability itself, which the paper assesses separately (feature specificity, sensitivity, steering).
- Design
You want SAE features on the final hidden states of a dense retriever to explain why it ranks some irrelevant documents highly. Choose between an L1 SAE and a TopK SAE, choose a dictionary size and k, and say how you will evaluate whether the features are useful for this goal.
What a strong answer covers
- TopK: sparsity is set directly by k, there is no shrinkage to distort similarity scores, and dead latents are controlled with AuxK; set k well below the embedding dimension.
- Size: sweep the number of latents (for example 8× to 64× the dimension) and use the Gao et al. scaling-law view (MSE falls with n and k) to pick a point before returns flatten; expect feature splitting as size grows.
- Check reconstruction in the downstream metric: ranking quality (for example nDCG) when replacing embeddings with reconstructions, not just MSE.
- Usefulness: find features over-active on false positives, ablate or steer them, and measure ranking changes; compare with a dense linear probe as a baseline.