Interpretable
Module 3.4 · ~3.5h

Sparse Autoencoders & Dictionary Learning

Decomposing superposition into monosemantic features — from Towards to Scaling Monosemanticity.

You'll be able to
  • Explain SAE architecture and the reconstruction–sparsity tradeoff
  • Describe feature splitting and known SAE limitations
  • Train a small SAE and characterize features on Neuronpedia
Learn

The problem: you cannot audit a basis you cannot read

Module 3.3 left you with a diagnosis and no cure. Models pack more features than they have dimensions, each feature living along its own direction, all of them interfering slightly. The consequence is that individual neurons are polysemantic: in the one-layer model Anthropic studied, a single neuron fires on academic citations, English dialogue, HTTP requests, and Korean text. Reading the model neuron by neuron is reading it in the wrong basis.

That is not just an aesthetic complaint. If you want to answer “is this model about to deceive the user?” you need a handle on the concept “deception” inside the model. If deception is smeared across four thousand neurons that each also do nine other things, you have no handle.

Key idea
Superposition says the activation vector is a sparse combination of many more directions than there are dimensions. That is precisely the setting of a classical problem — dictionary learning. Find an overcomplete set of directions (the dictionary) such that every activation is a sparse non-negative combination of them, and you have recovered the model's own vocabulary.
feature
A direction in activation space that the model uses to represent one thing. The working hypothesis (the linear representation hypothesis) is that concepts are directions and that their strengths add. Everything in this module rests on it.
dictionary
The set of feature directions you are trying to recover. It is overcomplete: many more entries than the activation has dimensions. That is the whole point — otherwise you are just doing a change of basis and superposition is untouched.

Why is this solvable at all? Because of sparsity. If a token's activation is a mixture of five features out of a hundred thousand, the mixture is heavily constrained, and — exactly as in compressed sensing — the sparse decomposition is essentially unique. Sparsity is what makes superposition possible and what makes it reversible.

neuron basis (dense)feature basis (sparse)
Left: the model's own basis. Every neuron is a mixture, so no axis means anything. Right: the dictionary basis. Same activation, expressed as three of many possible feature directions. Dictionary learning is the change of coordinates between them.
Learn

The machine: a deliberately bad autoencoder

A sparse autoencoder (SAE) is the crudest possible approximation to dictionary learning, and it works. Take activations xRdx \in \mathbb{R}^{d} harvested from one site in the model — a residual stream layer, or an MLP's hidden activations. Encode them into a much wider vector, then decode back:

f(x)=ReLU ⁣(Wenc(xbdec)+benc),x^=Wdecf(x)+bdecf(x) = \mathrm{ReLU}\!\left(W_{\text{enc}}(x - b_{\text{dec}}) + b_{\text{enc}}\right), \qquad \hat{x} = W_{\text{dec}}\, f(x) + b_{\text{dec}}

Term by term: WencW_{\text{enc}} is h×dh \times d with hdh \gg d — the expansion factor h/dh/d is typically 8× to 256×. The ReLU forces every feature activation to be zero or positive, which is what lets you say “this feature is off here.” The columns of WdecW_{\text{dec}} are the dictionary: each one is the direction the model writes when that feature fires.

An ordinary autoencoder with a wider middle layer would learn the identity map and tell you nothing. The sparsity penalty is what makes it informative:

L=xx^22reconstruct  +  λifi(x)Wdec,i2be sparse\mathcal{L} = \underbrace{\lVert x - \hat{x} \rVert_2^2}_{\text{reconstruct}} \; + \; \lambda \underbrace{\sum_i f_i(x) \lVert W_{\text{dec},\,i} \rVert_2}_{\text{be sparse}}

The second term is an L1 penalty on feature activations. L1 is a convex stand-in for what you actually want, which is L0 — the raw count of nonzero features — and L0 is not differentiable. Scaling each term by the decoder column norm stops the network from cheating by shrinking activations and growing the corresponding dictionary vector.

Key idea
λ\lambda is the only interesting hyperparameter, and it buys sparsity with accuracy. There is no free lunch and no “correct” setting: an SAE is a point on a reconstruction–sparsity frontier, and every paper you read has chosen a point on that frontier for you.
L0
The average number of features active on a token. Anthropic's Claude 3 Sonnet SAEs ran under 300 active features per token out of a million or more; small research SAEs typically target L0 of 20–100. Low L0 with high reconstruction is the goal; the two fight.
loss recovered
The honest quality metric. Splice the SAE into the model (reconstruct the activation, continue the forward pass) and measure the model's cross-entropy loss. Compare against the unmodified model and against a zero-ablated one. “95% loss recovered” means the SAE gave back 95% of the damage that deleting the activation would have done.

Two later variants matter. TopK SAEs (Gao et al., OpenAI, 2024) throw out the L1 penalty and simply keep the kk largest pre-activations, zeroing the rest. This fixes L0 exactly to kk, removes the tuning problem, and sidesteps shrinkage — see below. Gated and JumpReLU SAEs (DeepMind, 2024) separate the decision whether a feature is active from the estimate of how active, for the same reason.

Where the L1 penalty leaks
An L1 penalty does not only kill features that should be off. It also shrinks the ones that should be on, because every unit of activation costs λ\lambda. This is called shrinkage, it is a known pathology of L1 in statistics, and Anthropic call it out as significantly harming SAE performance regardless of scale. You will watch it happen in the widget below.
Learn

What it found: from a toy model to Claude 3 Sonnet

Towards Monosemanticity (Bricken et al., 2023) was the existence proof. One-layer transformer, 512-neuron MLP, sparse autoencoders from 512 up to 131,072 features trained on 8 billion activation samples, with detailed analysis of a 4,096-feature run they call A/1. They found features that are specific in a way no neuron was: an Arabic-script feature that fires on 0.13%-of-corpus Arabic text and accounts for 81% of that text's tokens; base64 features; DNA features. Crucially, the features have causal downstream effects consistent with their interpretation, which is what separates a feature from a correlation.

Scaling Monosemanticity (Templeton et al., 2024) answered the question everyone had: does this survive contact with a real production model? They trained SAEs on the residual stream halfway through Claude 3 Sonnet at three sizes — roughly 1M, 4M and 34M features — using scaling laws to allocate compute. Under 300 features fired per token, and reconstruction explained at least 65% of activation variance.

feature splitting
Widen the dictionary and a coarse feature fragments into finer, related ones. Bricken et al. watched base64 features go 1 → 3 → many across 512, 4,096 and 16,384-feature runs. Templeton et al. found a single “San Francisco” feature in the 1M SAE splitting into 2 at 4M and 11 at 34M. There is no privileged width — a small dictionary is a useful summary of a large one.
Key idea
The 2024 result that matters is not any single feature. It is that the method scaled: the same crude autoencoder that worked on a one-layer toy worked on a deployed frontier model, and the features it found were more abstract, not less. Whatever is going on inside large models, it is not so alien that dictionary learning bounces off it.

The features are also abstract in ways that a shallow “this fires on this word” story cannot explain. They are multilingual (the same feature for the same concept across languages), multimodal (text and images), and they bridge concrete and abstract — one feature covers both actual code containing a security vulnerability and English prose discussing security vulnerabilities.

Safety tie-in
The paper's headline for safety people is a catalogue of features that are plausibly safety-relevant, all of which were shown to be causal by clamping them and watching behavior change: unsafe code (clamp it and Claude writes a buffer overflow), backdoors in code, bias and slurs, sycophantic praise (clamp it and Claude fawns over an invented achievement), secrecy and discreetness (clamp it and Claude plans in its scratchpad to lie to the user), treacherous turns, biding time and hiding strength, self-improving AI, and bioweapon development. In one case study they used an “internal conflicts and dilemmas” feature to catch the model claiming to have forgotten something it had not, and clamping an “openness and honesty” feature was enough to get a true answer.

The authors are careful, and you should copy their care: “there's a difference between knowing about lies, being capable of lying, and actually lying in the real world.” The interesting result is not that a deception feature exists — of course it does — but that it can be found at scale and intervened on.

Then they turned the demo into a public one. Clamping the Golden Gate Bridge feature (34M/31164353) to ten times its maximum observed activation produced Golden Gate Claude, a model that steers every conversation toward the bridge and at times identifies itself as the bridge. It ran as a public demo for a day in May 2024. As a party trick it is delightful; as evidence it is the cleanest available demonstration that these dictionary directions are the real causal handles the model uses, not a post-hoc story about correlations. Module 5.1 picks up steering as a technique in its own right.

Learn

The honest ledger

SAEs are the most productive idea in interpretability since attention heads, and it is entirely possible they are the wrong abstraction. Hold both.

the reconstruction gap (“dark matter”)
The SAE never reconstructs the activation exactly. Whatever is left over — xx^x - \hat{x} — is computation you have no account of. On Claude 3 Sonnet reconstruction explained at least 65% of variance, which means up to a third of the activation was unexplained. Engels, Riggs & Tegmark (2024) went looking for structure in that residual and found it is not just noise: part of it is predictable from the activation, suggesting real features the dictionary missed rather than irreducible error.
shrinkage
L1 systematically underestimates the activations of features that are genuinely present. Anthropic state plainly that they believe this “significantly harms sparse autoencoder performance, independent of whether we've learned all the features.” TopK, Gated and JumpReLU SAEs all exist to attack this.
atomicity
Is a feature a unit of anything? Feature splitting says the answer depends on your dictionary width. Worse, feature absorption (Chanin et al., 2024) shows a general feature can quietly stop firing on cases covered by a more specific one, so “starts with S” ends up not firing on “short” because a “short” feature absorbed it. Leask et al. (2025) argue directly that SAEs do not find canonical units of analysis. This is a live, contested question.

Two more you should know. Cross-layer superposition: gradient descent does not care which layer a feature lives in, so features get smeared across layers, and an SAE fitted to one layer can only ever see a slice. Anthropic call this “very fundamental” and do not claim to have solved it — it is exactly what the cross-layer transcoders of Module 4.1 are built to attack. Completeness: they do not believe they found anything near all the features in Sonnet, and estimate they may be orders of magnitude short.

The usefulness question is still open
Kantamneni et al. (2025) benchmarked SAEs against plain linear probes on sparse-probing tasks and found SAEs did not reliably win. A technique can produce beautiful, causally-verified features and still lose to a baseline on the task you care about. When you read an SAE paper, ask what it is being compared against.
Key idea
The strongest current case for SAEs is not “they decompose models correctly.” It is “they give us a vocabulary specific enough to build circuits out of, and to steer with.” Module 4.1 is what happens when you take that vocabulary seriously enough to draw the wiring diagram.
Explore

Feel it: the frontier and the fragments

Two toys. The first is a working sparse-coding solve on a synthetic activation whose true features you know, so you can catch the SAE being wrong. The second lets you walk a coarse feature down into its fragments as the dictionary widens.

SAE anatomy: encode → sparsify → decode
A five-dimensional activation built from a known set of true features, run through a real sparse-coding solve. The L1 coefficient is the only knob that matters, and it buys sparsity with reconstruction error.
Input token
Walk the pipeline

The residual stream at one token: five dense numbers. Every coordinate is nonzero, and no single coordinate means anything on its own — this is superposition.

x1.062.101.21-1.211.86W_enc · x + bReLU + L1 pressuref — feature activations (12 dictionary entries)Golden Gate Bridge2.47Python code0.00Arabic script0.00legal boilerplate0.00sycophantic praise0.00immunology0.00DNA sequences0.00sadness / grief0.00chess notation0.00recipe steps0.78hex color codes0.00sarcasm0.00W_dec · fsum of feature directions1.001.941.12-1.121.72

“…drove across the Golden Gate Bridge before brunch.” Two true features are on. Aqua bars are features that really are present; orange bars are false positives the solver invented to patch the residual.

Active features (L0): 2 of 12 · reconstruction error 7.4% of the activation norm · recovered magnitude of the true features 91% of their real size. That last number is shrinkage: the L1 penalty taxes every unit of activation, so once λ > 0 even correctly identified features come back systematically too small.

The solver minimizes 12xDf2+λf1\tfrac{1}{2}\lVert x - Df \rVert^2 + \lambda \lVert f \rVert_1 with f0f \ge 0 — the same objective an SAE's training loss asks its encoder to approximate — so what you see is the real tradeoff, not a mock-up.

Feature splitting: one feature, three dictionary widths
Widen the dictionary and coarse features fragment into finer ones. Click any feature to see what it fires on and what it predicts.
Dictionary width
1× · 512 features8× · 4,096 features32× · 16,384 featuresbirdbirds in flight & flockssongbirds & birdsongwaterfowl & seabirdspoultry as foodraptors: hawks, eagles, falconsowls & nocturnal birdshummingbirds & nectar feedingdawn chorus & seasonal songparrots & talking birdspenguins & polar coloniesducks, geese & migrationseabirds & coastal cliffschicken as ingredienteggs, laying hens & farming“bird” in idiom & metaphor
bird

One feature covering everything avian. It fires on sparrows, on roast chicken, on “free as a bird”, and on a paragraph about penguin colonies — all at roughly the same strength.

Top activating contexts
  • a small brown bird landed on the rail
  • the bird flu outbreak spread to poultry farms
  • she felt free as a bird that summer
Top positive logits
generic continuations: “ species”, “ feeder”, “ watching”
Illustrative example, real phenomenon. Bricken et al. report base64 features going from 1 → 3 → many as the dictionary grows 512 → 4,096 → 16,384, and a coarse the-in-mathematics feature splitting into machine-learning, abstract-algebra and field-theory versions with correspondingly specific top predictions. Templeton et al. report a single “San Francisco” feature in the 1M SAE splitting into 2 features at 4M and 11 at 34M.

Things to try: (1) Drive λ\lambda to 0 on Token D and count the active features — seven light up where only four are real, reconstruction is perfect, and the code is no more readable than the neurons were. That is the failure mode a plain autoencoder has, and it is what the sparsity penalty exists to prevent. (2) Now walk λ\lambda up on Token D: at around 0.9 the weakest true feature dies and reconstruction error passes 60%. Rare, weak features are the first thing sparsity costs you. (3) Switch to Token C and look for the orange bar — the solver reports a Golden Gate Bridge feature that is not there, because that direction happens to patch the residual cheaply. False positives are not a bug in this toy; they are what interference looks like from the inside. (4) Watch the “recovered magnitude” readout as you raise λ\lambda: that is shrinkage, and it is why a feature's activation value is a much less trustworthy number than its identity. (5) In the tree, click ducks, geese & migration and note it has two parents — splitting produces a graph, not a tree, exactly as Bricken et al. report.

Practice

Problem set

Do the two pencil problems before the notebook — they are the difference between running an SAE and understanding its output. The Neuronpedia problem is the one to do if you only do one.

1.Derive shrinkagepencil & paper

Take the simplest possible case: one feature, one dimension, dictionary vector of norm 1. The SAE must choose an activation a0a \ge 0 minimizing

L(a)=(xa)2+λa\mathcal{L}(a) = (x - a)^2 + \lambda a

where the true activation is x>0x > 0. Solve for the optimal aa. Then state, in one sentence, what this implies about comparing feature activation values across two SAEs trained with different λ\lambda.

2.How wide does the dictionary need to be?pencil & paper

Suppose a residual stream of width d=4096d = 4096 carries NN features, of which on average LL are active per token. Reconstruction requires the active set to be identifiable from a dd-dimensional vector.

(a) Argue informally why LdL \ll d is the binding constraint rather than NdN \le d. (b) Anthropic's Sonnet SAEs had L0 under 300 with dictionaries up to 34M. Given they also believe they are “orders of magnitude short” of all the features, what does that tell you about the frequency distribution of features?

3.Characterize a real feature on Neuronpediaexplore

Go to neuronpedia.org and pick a model with public SAEs — the GPT-2 small residual stream sets, or Gemma Scope on Gemma 2. Search for a concept you actually care about (try something safety-flavored: “refusal”, “flattery”, “lying”, “urgency”) and choose one feature.

Write up half a page covering, in order:

  1. Your one-sentence hypothesis for what the feature represents, written before you scroll past the top activations.
  2. Activation distribution. Look at the density histogram and the logarithm of the feature's firing frequency. Is it a common feature or a rare one? Do the top activations look qualitatively different from the ones at 20% of max?
  3. Specificity check. Find the weakest activations shown. Do they still match your hypothesis? If not, revise it — this is where most naive interpretations die.
  4. Causal check. Use the feature dashboard's top positive and negative logits, and if the model has a steering interface, steer on it. Does the effect on output match your hypothesis, or only the activations?
4.Train a small SAE on GPT-2 activationscode

In a Colab GPU notebook, use TransformerLens to cache blocks.6.hook_resid_pre activations from GPT-2 small over ~10M tokens of OpenWebText, then train a 16×-expansion SAE (d=768d = 768, h=12,288h = 12{,}288) with the loss from the lesson. Normalize decoder columns to unit norm after every step, and resample dead features periodically.

Success check: L0 between 20 and 60, and loss recovered above 80% when you splice the reconstruction back into the forward pass. Then hand-inspect 10 random live features and record how many you can write a one-sentence description for.

5.Reproduce feature splittingcode

Train three SAEs on the same activations at 4×, 16× and 64× expansion, holding L0 roughly constant by tuning λ\lambda per run. Pick a clearly interpretable feature in the 4× run. For every feature in the 64× run, compute the cosine similarity of decoder directions, and separately the correlation of activations over a held-out token set.

Success check: produce a bipartite graph linking the coarse feature to its fine descendants and confirm the two similarity measures broadly agree. Then answer: is the relationship a tree?

0 of 5 problems marked done
Check

Check yourself

1.
Why does a sparse autoencoder need its hidden layer to be wider than its input, when an ordinary autoencoder makes it narrower?
2.
You train two SAEs on the same activations and observe: SAE-A has L0 = 15 and recovers 62% of loss; SAE-B has L0 = 80 and recovers 94%. Which is better?
3.
A feature you found fires strongly on text about the Golden Gate Bridge. What would convince you it is a real component of the model's computation rather than a description of the data?
4.
Feature splitting is best described as…
5.
Anthropic found a “treacherous turns” feature in Claude 3 Sonnet. The correct safety inference is:
6.
You raise the L1 coefficient and observe that a feature you trust still fires on the right tokens, but its activation values drop by 30%. What happened?
7.
What is the “dark matter” problem, and why does it matter for using SAEs as a safety tool?
Answer all 7 questions to submit.
Submit your answers to complete this check.
Go deeper

Go deeper

Two Anthropic papers carry this module. Read them in order — the 2023 one teaches you the method on a model small enough to fully understand, the 2024 one shows what it buys on a model you actually use.

EssentialTowards Monosemanticity: Decomposing Language Models With Dictionary Learningpaper
Bricken, Templeton, Batson, Chen, Jermyn, et al. (Anthropic) · 2023 · 3h, 2 sittings
Sitting 1: Problem Setup and Detailed Investigations of Individual Features — the Arabic-script feature walkthrough is the template for every feature analysis you will ever do, so follow its four moves (specificity, sensitivity, downstream effect, comparison to neurons). Sitting 2: Phenomenology, especially Feature Splitting, then the 'Advice for Training Sparse Autoencoders' appendix before you touch code. You can skip Finite State Automata on a first pass.
EssentialScaling Monosemanticity: Extracting Interpretable Features from Claude 3 Sonnetpaper
Templeton, Conerly, Marcus, Lindsey, Bricken, et al. (Anthropic) · 2024 · 3h, 2 sittings
Read Safety-Relevant Features first — it is why this module exists, and the deception case study is the clearest published picture of what an interp-based audit could look like. Then Feature Survey (Exploring Feature Neighborhoods for splitting, Feature Completeness for how much is missing). Then read Discussion → Limitations twice: shrinkage, cross-layer superposition, and 'we are orders of magnitude short' are the three caveats you should be able to recite.
Scaling and evaluating sparse autoencoderspaper
Gao, Dupré la Tour, Tillman, Goh, Troll, Radford, Sutskever, et al. (OpenAI) · 2024 · 1h (skim)
Skim for two things: the TopK architecture (§2–3) and why fixing L0 directly removes both the λ-tuning problem and shrinkage; and the evaluation section, which is the field's most serious attempt to say what 'a good SAE' means beyond the loss. Skip the scaling-law fits unless you are training at scale.
Sparse Autoencoders Find Highly Interpretable Features in Language Modelspaper
Cunningham, Ewart, Riggs, Huben & Sharkey · 2023 · 45 min
The independent, concurrent discovery — useful precisely because it is not from Anthropic. Read §4 for the causal evaluation: they show SAE features localize behavior better than neurons under intervention, which is the strongest early evidence the features are real.
Decomposing the Dark Matter of Sparse Autoencoderspaper
Engels, Riggs & Tegmark · 2024 · 45 min
Read this the moment you catch yourself trusting an SAE decomposition. It dissects the reconstruction residual and shows a substantial part of it is linearly predictable from the input — i.e. structure the dictionary missed, not noise. Figures 1–3 carry the argument.
Golden Gate Claudeblog
Anthropic · 2024 · 10 min
Short and worth it for the framing: the demo exists to make the causal claim tangible to non-specialists. Read it alongside the steering section of Scaling Monosemanticity, then hold the question 'what would a misuse of this look like?' — Module 5.1 answers it.
Neuronpediatool
Johnny Lin, Joseph Bloom, et al. · ongoing · reference
The feature browser you will actually use: dashboards for public SAEs on GPT-2 small, Gemma 2 (Gemma Scope) and more, with activation histograms, top logits, autointerp explanations, and steering. Required for the explore problem; keep the tab open for the rest of Part 3 and 4.