Skip to content
← All posts

Taking a Network Apart: Reverse Engineering

How mechanistic interpretability tries to cut a network into parts, describe what each part does and check the description, from superposition to sparse autoencoders and their limits.

Contents

In Opening the Black Box we looked inside GPT-2 small with a handful of tools and found a story: “Eiffel Tower” is stored on the subject tokens, and a few attention heads carry it to the end of the sentence. But we quietly assumed that heads and MLP layers are the right parts to talk about. This post is about that assumption, and about one of the two big approaches to interpretability: Reverse engineeringInterpreting a network bottom-up: cut it into components, then work out what each one does. Read more in “Opening the Black Box” →.

The numbers in the figures are measured, mostly on GPT-2 small and a public sparse autoencoder for it by Joseph Bloom, using Wikipedia text from WikiText-2. A few diagrams are explicitly marked as illustrations.

Take it apart, describe, check

Reverse engineering has three steps:

  1. Decompose the network into components.
  2. Describe what each component does. This gives a hypothesis, not a conclusion.
  3. Validate the description. If it fails, go back and cut or describe differently.
1Decomposecut the networkinto components2Describehypothesize whateach component does3Validatetest whether thehypothesis holdsif validation fails: re-cut or re-describe
Figure 1. The reverse-engineering cycle.
Takeaway: A description only counts once it has survived validation; until then it is a hypothesis.

Each step has its own open problems, and the first one, where to cut, turns out to be the hardest.

Step 1: where do we cut?

Neurons are the wrong unit

The problem

We need parts small enough to understand one at a time. The obvious candidates are the ones the architecture already gives us: single neurons, attention heads, whole layers.

The proposed solution

Study each neuron on its own: collect the inputs that make it fire most strongly, and see what they have in common.

Where it breaks

Many neurons are PolysemanticA neuron or unit that responds to several unrelated things. Jump to the section →: they respond to several unrelated things. Attention heads are polysemantic too, layers are too coarse, and some representations seem to span several layers.

Here is a real example. These are the ten contexts in WikiText-2 where neuron 264 in GPT-2’s layer 4 MLP fires most strongly:

  1. … popular in his day for works such as Gulliver's Travels and…2.9
  2. … of ribbon candy, beach balls hitting the ground like hail, and a…2.8
  3. … into the endgame. If chess were scored like boxing, with drawn…2.8
  4. … them in a cornfield is a parody of Alfred Hitchcock's film North…2.5
  5. … The wolf is likened to a wicked man who oppresses others…2.4
  6. … 23) recalls Shakespeare's Ulysses in Troilus and Cress…2.3
  7. … a member of the choir, drama club, and tennis team, and…2.3
  8. … tell you, it is all very much like a medieval fairytale…2.3
  9. … a Villa supporter. When filming began on Dad's Army, Villa fan…2.2
  10. … that he used to spar in the boxing gym after football training without his…2.2
Figure 2. Top activating examples for MLP neuron 264 in layer 4 of GPT-2 small, from about 760,000 tokens of WikiText-2. The highlighted token is where it fires.Measured on GPT-2 small
Takeaway: One neuron, many unrelated triggers: similes, film and literary references, and sports.

Similes (“like hail”), Hitchcock, Shakespeare, a tennis team, a TV series. Maybe there is a single idea behind all of them, but it isn’t one a person would name. If neurons were the true parts of the network, we’d expect one clean concept per neuron, a MonosemanticA unit that responds to a single, coherent concept. Jump to the section → unit. Mostly we don’t get that.

Superposition, a hypothesis

Why would a network mix unrelated things in one neuron? The leading explanation is SuperpositionThe hypothesis that networks represent more features than they have dimensions, by storing sparse features as overlapping, nearly orthogonal directions. Jump to the section →. A layer with dd neurons can only hold dd completely independent (orthogonal) directions. But in high dimensions there are vastly more directions that are almost orthogonal. If each FeatureInformally, a property of the input that the network represents (e.g. “this is French”). There is no agreed formal definition yet. Jump to the section → is rarely active, the network can give each one its own almost-orthogonal direction and store many more features than it has neurons. The price is a little interference when two overlapping features happen to be active at once. Since features are stored as directions that cut across neurons, any single neuron ends up mixing several features.

You can watch this happen in a tiny model, the toy model from Elhage et al.[ref], trained here on synthetic data: five features squeezed through just two hidden dimensions and back. The only thing the slider changes is how often each feature is active.

dense (always on)sparse (rarely on)
f1f2f3f4f5

Features with their own direction: 5 of 5

Largest overlap between two features (cosine): 0.31

All five fit, as a pentagon. Neighbors overlap, but they are rarely active at the same time, so the interference is cheap.

Figure 3. A toy model storing five features in two dimensions, trained at five sparsity levels. Arrows show the direction each feature gets.Measured on a trained toy model
Takeaway: When features are dense, the model keeps only two; when they are sparse, it packs all five into a pentagon and accepts some overlap.

This is important to state carefully: superposition is a hypothesis. It is demonstrated in toy models like this one, and there is indirect evidence for it in large models, but it hasn’t been proven there. Whether it is how networks really work, or just a useful way to think about them, is an open question.

Learning the cuts

If features are directions that cut across neurons, we have to learn where those directions are from the activations themselves.

Dimensionality reduction

The classic tools for finding important directions are PCA (or SVD) and non-negative matrix factorization. They have a basic limit: they can find at most as many directions as there are dimensions. That’s exactly what superposition breaks.

PC1PC2f1f2f3f4f5
Figure 4. Hidden activations of the toy model at 90% sparsity. Each dot is one input, colored by its active feature (gray: several active). Dashed lines: the two axes PCA finds.Measured on a trained toy model
Takeaway: The data lies along five spokes, but PCA can only offer two perpendicular axes, so it can't recover the features.

Sparse autoencoders

The problem

We want more directions than dimensions, chosen so that each one is a single, meaningful feature.

The proposed solution

Sparse dictionary learningLearning a large set of directions (a dictionary) such that each activation can be rebuilt from only a few of them. Jump to the section → (SDL) learns a large dictionary of directions, so that any one activation can be rebuilt from only a few of them. The headline method is the Sparse autoencoder (SAE)A network that encodes an activation into a much wider, sparse set of latents and decodes it back, so that each latent ideally captures one feature. Jump to the section → (SAE): a two-layer network with an encoder, a very wide hidden layer of Latent (SAE)One unit in an SAE’s wide hidden layer, ideally corresponding to one feature. Jump to the section →, and a decoder.

Where it breaks

Quite a few ways, which get their own section below.

activation x768 numbers,all non-zeroencoderlatents f24,576 latents, ~70 activedecoderrebuilt x̂should match x
Figure 5. A sparse autoencoder, with the numbers of the public GPT-2 small SAE used in this post (layer 8 residual stream).Measured on GPT-2 small
Takeaway: The hidden layer is 32 times wider than the activation, yet only about 70 of its 24,576 latents are active for a typical token.

It is trained with two goals at once. Rebuild the activation xx as well as possible, and keep the latents ff sparse:

L=∥x−x^∥2⏟reconstruction error  +  λ ∥f∥1⏟sparsity penalty\mathcal{L} = \underbrace{\lVert x - \hat{x} \rVert^2}_{\text{reconstruction error}} \;+\; \lambda\, \underbrace{\lVert f \rVert_1}_{\text{sparsity penalty}}

A few points that are easy to get wrong:

  • Sparse doesn’t mean small. The hidden layer is wider than the input (here 24,576 latents for a 768-dimensional activation). Sparsity means that for any one input, only a few latents are active. The analogy I like: describe every sentence using at most 50 words, from a dictionary of 16 million.
  • Which latents fire is not random. The encoder computes them from the input, deterministically. The same input always activates the same latents. This is nothing like dropout, which switches units off at random during training.
  • Why sparsity is needed at all. Without it, a wide layer can rebuild the input perfectly with dense, arbitrary mixtures: every latent becomes “a bit of everything”, which is the neuron problem again. The penalty forces the SAE to find reusable, specialized building blocks.
  • L0 versus L1. What we really want to limit is the L0 normThe number of non-zero entries in a vector, i.e. how many latents are active. Jump to the section →, the number of active latents. It can’t be optimized directly by gradient descent, so many SAEs penalize the L1 normThe sum of absolute values in a vector. Used as a smooth stand-in for L0 to encourage sparsity. Jump to the section → (the sum of activations) as a smooth stand-in. Another option is a TopK SAE, which needs no penalty: for each input it keeps only the kk most active latents, for example 32, and sets all the others to zero.
  • Nobody labels the latents. Training never sees a concept name. We only find out what a latent means afterwards, by looking at what it fires on (Step 2).

How sparse is sparse enough? To see the trade-off, here are eight small SAEs (4,096 latents each), trained on a million activations from GPT-2’s layer 8, changing only the penalty λ\lambda:

0%20%40%60%1101001,0004,096active latents per token (L0, log scale)unexplained variance

On average 25 of 4,096 latents are active per token.

29% of the activation’s variance is left unexplained.

The usual working range: tens of active latents, a fifth to a third of the variance unexplained.

Figure 6. Eight SAEs trained on GPT-2 small's layer-8 residual stream, one per sparsity penalty λ. Measured on held-out text.Measured on GPT-2 small
Takeaway: There is no free lunch: every reduction in active latents costs reconstruction quality.

With no penalty, 3,493 of the 4,096 latents fire on an average token and only 1.6% of the variance is left unexplained: almost perfect, and useless. At λ=3\lambda = 3, about 25 latents fire and 29% is unexplained.

Transcoders and crosscoders

The same idea comes in variants, which differ in what they read and what they rebuild:

Sparse autoencoderreads: layer Lwrites: layer Lrebuild the same activationTranscoderreads: MLP inputwrites: MLP outputstand in for the MLP’s computationCrosscoderreads: layers 1…nwrites: layers 1…none shared dictionary
Figure 7. Three members of the sparse dictionary family.
Takeaway: SAEs rebuild an activation, transcoders imitate a computation, crosscoders share one dictionary across layers or models.
  • A TranscoderAn SAE variant that reads an MLP’s input and predicts its output, standing in for the MLP’s computation. Jump to the section → reads the MLP’s input and predicts the MLP’s output, so it stands in for the MLP’s computation, not just its activations.
  • A CrosscoderAn SAE variant with one shared dictionary that reads and reconstructs activations across several layers, or several models. Jump to the section → uses one shared dictionary to read and write several layers at once, or two different models. That helps with features that persist across layers, and with “model diffing”: finding out what changed inside a model, for example between a base model and its chat version.

Where sparse dictionary learning breaks

SAEs are one of the most popular decomposition methods, and they find many latents that look clean. But they have a long list of practical and conceptual problems. Here they are, with measurements where possible.

1. The reconstruction error is too large. The test is to splice the reconstruction into the model in place of the real activation and see how much worse the model gets. Here is the public SAE on our running example:

0.98

cosine similarity between the real activation and its reconstruction, at the last token of the Eiffel Tower prompt

7.0% → 1.2%

P(“Paris”) before and after splicing the reconstruction in at layer 8

3.71 → 3.93

next-token loss on WikiText-2, real vs spliced (feeding in the average activation instead, the same for every token: 7.91)

42%

of the error vector can be predicted by a linear map of the input (81% of its size): the error is not random noise

Figure 8. Splicing the layer-8 SAE's reconstruction into GPT-2 small.Measured on GPT-2 small
Takeaway: The reconstruction looks almost identical to the real activation, but the model is sensitive to exactly the part that's missing.

The reconstruction points almost exactly the same way as the real activation (cosine similarity 0.98), yet P(“Paris”) drops from 7.0% to 1.2%. Averaged over WikiText, the loss rises from 3.71 to 3.93. That’s far better than replacing the activation with its average (7.91), but it isn’t the original model any more. Whatever is in the error is simply unexplained, the SAE’s “dark matter”. And it isn’t random noise: on this SAE a plain linear map from the input predicts 42% of the error vector and 81% of its size.

2. Cost. We need a dictionary for every layer we want to interpret, and each dictionary can have more parameters than the layer it explains. For frontier models that adds up.

3. Sparsity isn’t the same as interpretability. Sparsity is a proxy for “one latent, one concept”, and under enough pressure the proxy breaks:

Feature splitting“dog”puppybreedpet dogterrierpoodlebigger SAE → finer pieces.Which level is “the” feature?Absorption“sun”starts with S“sea”starts with S“snake”starts with S“snake”the general latent has a holeCompositionwhat we'd like:red+trianglewhat a sparse SAE may learn:red triangleone latent fires instead of two,so it counts as “sparser”
Figure 9. Feature splitting, absorption and composition.Illustrative values, not measured
Takeaway: An SAE can make its code sparser in ways that make it harder, not easier, to read.
  • Feature splittingAs an SAE grows, one feature breaks into many finer-grained latents. Jump to the section →: as the SAE grows, a “dog” latent splits into finer ones (puppies, breeds, pet dogs). Which level is the feature?
  • Feature absorptionA general latent fails to fire on some cases because a more specific latent has “absorbed” them. Jump to the section →: a latent for “starts with S” stays silent on “snake”, because a separate “snake” latent has absorbed that case, leaving a hole in the general latent.
  • Composition: instead of “red” and “triangle” firing together, a single “red triangle” latent fires, because one active latent is sparser than two.

One proposed alternative is to optimize for minimum description length, the shortest total description of the activations, instead of raw sparsity.

4. Feature geometry is ignored. An SAE treats features as an unordered “bag of features”. But the arrangement of features can carry meaning. Here are GPT-2’s activations for the seven day names in twelve synthetic sentence templates, projected onto their two main directions:

MonTueWedThuFriSatSun
Figure 10. Day names in GPT-2 small's residual stream (layer 7), after removing what each sentence template contributes. Small dots: single sentences; large dots: averages.Measured on GPT-2 small
Takeaway: The days sit in order around a circle; that structure is part of the representation, and a bag of separate latents can't express it.

The days line up in order around a circle, Monday to Sunday and back. An SAE could chop this circle into arbitrary pieces, and the pieces wouldn’t tell us that Sunday comes right before Monday.

5. Not every architecture fits. SDL was built for vectors at one location. Attention combines information across pairs of token positions and across many heads, and some representations are spread across layers. It isn’t obvious how to decompose those.

6. Activations, not mechanisms. An SAE tells us the variables at one point in the network, not the code that computes the next variables from them. It’s like knowing what’s stored in every variable at line L of a program, but not the code between line L and line L+1. Getting from latents to mechanisms still takes a lot of extra work.

7. It assumes the Linear representation hypothesisThe idea that concepts are represented as directions in activation space. Jump to the section →. SDL assumes concepts are directions. A weak version (some concepts are linear) has good support from probes, steering and SAEs themselves. A strong version (all concepts are linear) is doubtful: the circle above is a mild example of richer structure.

8. Coverage depends on the data. The concept we care about may not appear as a single latent at all. And the latents depend on the data the SAE was trained on: an SAE that never saw a kind of text has no reason to learn latents for it. That’s awkward for a method that was hoped to find a model’s fundamental units.

No solid theory yet

The problem

All of this rests on concepts that aren’t well defined. What exactly is a feature?

The proposed solution

There isn’t one yet. The field has made progress anyway, because even fuzzy concepts can be useful. Proposed foundations include causality, and theories of why networks generalize.

Where it breaks

There is no formal definition of a feature. It’s unclear whether superposition is fundamentally right or just a useful lens. Computation done in superposition is barely studied. Causal approaches haven’t yet produced canonical variables to decompose into. And theories of generalization haven’t yet produced tools that interpretability can use.

Building models that are easier to take apart

Everything so far is post hoc: train a model for performance, then try to dissect it. The alternative is Intrinsic interpretabilityDesigning or training models to be easier to interpret, instead of interpreting them afterwards. Jump to the section →: design or train models so that they come “pre-carved”.

Train, then dissect

Train for performance only, then decompose with SAEs and friends. Today’s standard, and it inherits every problem above.

Design to be dissectable

Build the parts in from the start: sparse activations, modules, simpler layers. The model comes “pre-carved”.

Figure 11. Two strategies for getting interpretable parts.
Takeaway: Instead of fighting superposition after training, we could discourage it during training.

Ideas being explored:

  • sparser activation functions, such as TopK or SoLU;
  • forcing activations into a discrete code;
  • limiting how many heads can attend to the same pair of tokens, against superposition in attention;
  • Mixture of expertsAn architecture where each input is routed to a few specialized sub-networks (“experts”). Jump to the section → models, whose many small experts might be individually readable;
  • sparse weights, by L0 regularization or pruning;
  • modular training that encourages local connections;
  • simpler architectures, for example without layer norm, or with bilinear MLPs that can be analyzed exactly.

The catch: most of these haven’t been competitive in performance, and superposition tends to sneak back in.

Step 2: describing what a component does

Say we have a component: a neuron, a head, an SAE latent. A description can say what makes it fire, what it causes, or (best) both. Every description at this stage is a hypothesis.

What makes it fire?top activating examplesattribution methodsfeature synthesisthecomponentWhat does it cause?direct effects (logit lens, DLA)causal interventionssteering, patchscopes
Figure 12. Two sides of a component's role.
Takeaway: Looking only at what makes a component fire tells half the story; we also need to know what it does downstream.

What makes it fire?

The problem

We want a quick, human-readable idea of what a component responds to.

The proposed solution

Find the inputs where it is most active, its Top activating examplesThe inputs on which a component fires most strongly. A common but correlational way to guess its role. Jump to the section →, and see what they have in common. Here are two SAE latents from the layer-8 SAE:

Where it breaks

It’s correlational and relies on human intuition. We tend to project our own concepts onto whatever we see, and the dataset shapes the story: examples from another dataset can suggest another meaning. Worse, you can usually tell a convincing story even about a random direction. Such a convincing but wrong explanation is an Interpretability illusionA convincing but wrong explanation of a component, often from looking only at its top examples. Jump to the section →.

  1. …, he can do anything he wants, except for dog fighting. Jack…58.4
  2. …, commonly known as the elegant stinkhorn, the dog stinkhorn,…55.7
  3. …: the name ' Guy Incognito ', the dog with the p…55.3
  4. …y holding a scroll in his hand and with a dog at his feet…54.8
  5. … Anubis is commonly shown in Egyptian art as a dog or jackal…51.8
  6. … ", the " headless stinkhorn ", the " dog stinkhorn ",…51.7
  7. … and defensibility the tunnel was built with a dogleg. The…51.7
  8. … such as Mega Man's ability to call on his dog Rush to search…51.1
  9. … of the Great Depression. His business involved braiding dog hairs around fish…50.6
  10. … Shoes ", " One of Those Days ", and " Dog Eat Dog ".…50.4
  11. …, rowan, yew, juniper, dog rose, Cot…49.8
  12. … tells of young Belgian reporter Tintin and his dog Snowy,…49.6
  1. … koala is hanging onto…25.2
  2. … to western lowland gorilla parents Lulu…23.6
  3. … baby who was killed by dingoes. The bullfrogs taking over…23.4
  4. … fixed with a crescent, seen carrying a cobra in the left…23.0
  5. … In Lithuania, the introduced raccoon dog has also…23.0
  6. …ou Qiu complex. Another important large tortoise-borne ste…22.9
  7. …land gorilla (Gor…22.8
  8. … the Wildlife Conservation Society's $ 43 million Congo Gorilla Forest exhibit.…22.5
  9. …land gorillas and introducing new genes into the captive gorilla gene pool.…22.4
  10. … with " few close friends " in the Congo Gorilla Forest. "…22.4
  11. … was situated in, remain intact. Two giant tortoise-borne st…22.3
  12. … and destroy the Australian ecosystem, due to a bullfrog Bart left earlier…21.7
Figure 13. Top activating examples for SAE latent 13344 (left) and latent 22625 (right), from the same WikiText sample.Measured on GPT-2 small
Takeaway: Latent 13344 looks like a “dog” latent and 22625 like an “animal name” latent, but these are guesses so far.

Latent 13344 looks like a clean “dog” detector. Look closer, though: it also fires on “dog rose” (a plant), “dogleg” (a bend) and the “dog stinkhorn” (a fungus). So is it about dogs, or about the word “dog”? We’ll test that in Step 3.

Reading tokens without their context can mislead in the other direction too. Neuron 1189 in layer 1 has top tokens that look completely unrelated: fishing, priests, motor, bulls, tennis, Italy, bankers. In context, every one of them is an item in a comma-separated list:

  1. … and followed, including basketball, boxing, cricket, fishing, greyhound…2.0
  2. …lists, Red Cross workers, refugees, smugglers, priests and members of…2.0
  3. … racing, handball, hockey, horse racing, motor sport, show…1.9
  4. … the " sun, moon, stars, trees, bulls, e…1.9
  5. …, horse racing, motor sport, show jumping and tennis. …1.9
  6. …, greyhound racing, handball, hockey, horse racing, motor…1.8
  7. … merchants, bankers, industrialists, and hotel and restaurant owners. Stalin…1.8
  8. … unhealthy behavior, the abuse of food, alcohol, medicines, illegal drugs…1.8
  9. …, including Austria, Belgium, Denmark, Finland, Italy, the Netherlands…1.8
  10. … sports are also played and followed, including basketball, boxing, cricket,…1.8
  11. … to the newest sources of industrial power, electricity, oil and steel.…1.8
  12. …ations, the nobility, landowners, wealthy merchants, bankers, industrialists…1.8
Figure 14. Top activating examples for MLP neuron 1189 in layer 1.Measured on GPT-2 small
Takeaway: What looked polysemantic from the tokens alone is a coherent “item in a list” pattern once you read the context.
The problem

Top examples are correlational. We want to know which parts of the input actually cause the activation or output.

The proposed solution

Attribution methodA technique that assigns each input or component a score for how much it contributed to an output. Jump to the section → give every input token a score. Some are gradient-based (gradient × input, integrated gradients); others are PerturbationChanging part of an input or activation (masking, noise, removal) and observing how the output changes. Jump to the section →-based (change part of the input and watch the output, as in ablation, SHAP or LIME).

Where it breaks

Gradients are only a First-order approximationEstimating a change using only the local slope (gradient). Accurate for tiny changes, often wrong for large ones. Jump to the section →: the slope where you stand says little about what happens after a big step. Perturbations can push the model off-distribution.

The Eiffel Tower is in the city of
Occlusion (perturbation)replace one token with an average token and rerun-0.12.42.71.41.11.00.90.60.2-0.0
Gradient × inputone gradient, first-order estimate-0.6-0.50.60.20.3-0.4-0.2-0.5-0.1-0.1
Integrated gradientsgradients averaged along a path0.42.10.8-0.4-0.0-0.50.1-0.7-1.0-0.7
Figure 15. Three attributions for the Paris-vs-Rome logit difference on “The Eiffel Tower is in the city of”. Green: pushes towards Paris, red: towards Rome.Measured on GPT-2 small
Takeaway: The methods disagree: gradient × input gives “ E” a negative score, although removing it costs Paris a lot.

Occlusion, which actually reruns the model, says “iff” and “ E” matter most. Integrated gradients agrees about “ E”, but not about later tokens such as “ city”. Plain gradient × input says “ E” pushes against Paris. Why they differ here is not tested, but one well-known way a single gradient misleads is saturation:

slope ≈ 0 hereinput switched off:output halvesinputoutput
Figure 16. Why a single gradient can mislead.Illustrative values, not measured
Takeaway: A saturated unit has a slope near zero, so its gradient says it doesn't matter, but switching it off changes the output a lot.

A third family, feature synthesis, optimizes an input from scratch to maximize the component’s activation (the psychedelic images of “feature visualization” in vision models). It has its own problems: natural examples are often more informative, and synthesis struggles to reveal deliberately hidden behaviors.

What does it cause?

The other half of a description is the component’s downstream effect.

  • Direct effects: the logit lens and direct logit attribution read what a component writes straight to the output.
  • Causal interventionChanging something inside the model and measuring the effect, which shows cause rather than just correlation. Jump to the section →: activation patching and ablation, plus finer versions. Path patchingActivation patching restricted to specific connections between components. Jump to the section → patches only specific connections between components. Causal scrubbingTesting a hypothesized circuit by resampling every activation the hypothesis says shouldn’t matter, and checking performance holds. Jump to the section → tests a whole hypothesized circuit at once. Distributed alignment searchLearning a subspace of activations that behaves like a hypothesized causal variable under interventions. Jump to the section → learns the subspace that behaves like a hypothesized variable. Because each intervention costs a forward pass, gradient approximations such as attribution patching and AtP* make them cheaper.
  • Behavior over longer outputs: SteeringAdding a direction to activations during generation to push the model’s behavior (e.g. more positive tone). Read more in “Looking for What We Already Know” → (adding a direction during generation), patchscopes, where a model decodes its own activations in a new context, and reading chain-of-thought. The last one doesn’t use internals at all and isn’t fully faithful to the model’s actual reasoning.

The difference between direct and causal effects matters here too:

direct effect (DLA)total effect (patching)Layer 9, head 832%37%Layer 8, head 1114%27%Layer 10, head 012%13%Layer 6, head 42%18%Layer 3, head 30%9%
Figure 17. Direct effect (DLA) vs. total effect (patching) for five heads in the Eiffel Tower example.Measured on GPT-2 small
Takeaway: A description built only from direct effects would miss layer 6 head 4, which matters almost entirely through later layers.

Step 3: validation

A description is a hypothesis until it has been tested, and it’s easy to mistake one for a conclusion. Validation means asking one question: does the description make good predictions?

Hypothesis“latent 13344 is a dog detector”Predictionfires on dogs, silent on catsTestrun it on new sentencesComparematch? keep. mismatch? revise
Figure 18. Validation as a loop.
Takeaway: Every description is a prediction machine; if its predictions fail, it goes back to step one.

Let’s validate latent 13344. If it’s a dog detector, it should fire on dogs in new sentences, and stay quiet elsewhere:

  • The dog wagged its tail.47.9
  • Dogs are loyal pets.19.5
  • A puppy slept on the sofa.22.7
  • The wolf howled at the moon.4.5
  • The cat sat on the mat.0.0
  • He ate a hot dog at the game.27.3
  • She dogged him with questions for years.0.0
  • The car would not start.0.0
Figure 19. Latent 13344 on eight new, synthetic sentences. Shading: activation strength; number: maximum activation.Measured on GPT-2 small
Takeaway: It fires on “dog” and “puppy”, weakly on “wolf”, not on “cat”, but also on a hot dog, so neither “the animal” nor “the word dog” describes it fully.

The results partly confirm and partly correct the hypothesis. It fires strongly on “dog”, decently on “puppy” and “Dogs”, and not on “cat” or “car”, so it’s fairly specific. But it fires on “hot dog”, which isn’t an animal at all, and not on the verb “dogged”. So “detects dogs” is too broad, but “detects the word dog” doesn’t fit either, because it fires on “puppy” and, more weakly, on “pets”. Eight sentences can reject a simple description; they aren’t enough to settle the right one.

The ways to validate, from weakest to strongest:

  1. Predict activations on new inputs, checking both that it fires where expected and stays quiet elsewhere, as above. This can be automated, which is called Automated interpretabilityUsing language models to write explanations of features and to score them by predicting activations from the explanation. Jump to the section →:

    top activatingexamplesExplainerlanguage modelexplanation:“fires on the word dog”Simulatorsees only the explanationnew textpredicted activationscompare with real onescorrelation = explanation score
    Figure 20. Automated interpretability: one model explains, another model predicts from the explanation alone.
    Takeaway: An explanation is scored by how well someone who only reads it can predict the real activations.
  2. Predict what interventions do: if we switch the latent off or turn it up, what should happen downstream?

  3. Predict failures: a good explanation should predict where the model goes wrong, and let us craft adversarial inputs.

  4. Rebuild it by hand: replace the component with a hand-written version and see if the network still works.

  5. Test on models where we know the answer: toy models, or models compiled from a known program, where the ground truth is available.

  6. Use it for something: editing, unlearning, or debugging a classifier.

  7. Use it competitively: compare against simple baselines on realistic, non-cherry-picked tasks. This is the highest bar.

Model organisms and benchmarks

Biology studies a few Model organismA standard, well-studied model used across studies to cross-check interpretability findings. Jump to the section → (fruit flies, mice) in great depth so that results can be cross-checked. Interpretability is doing the same with a few shared models, such as GPT-2 or small transformers trained on modular addition. An ideal model organism is open, cheap, representative, reproducible, and comes in several random seeds. GPT-2 small, used throughout my notes, ticks some but not all of these boxes.

Benchmarks test the method instead of a single description. You take a model whose inner workings you already know, for example because you built it from a simple program, run the method on it, and check how much it gets right.

Wrap-up

Reverse engineering is a loop: decompose → describe → validate. Each step is still an open problem:

  • Decompose: neurons are polysemantic, probably because of superposition. Sparse autoencoders learn better cuts, but leave unexplained error, cost a lot, can trade meaning for sparsity, and ignore geometry.
  • Describe: top activating examples are correlational and easy to over-read; attributions disagree; causal methods are expensive.
  • Validate: necessary, but often skipped. Our “dog” latent didn’t fit the simple description after one small test.
  • Theory: we still lack a definition of the thing we’re looking for, a feature.

The other way around, starting from a concept we care about and asking where it lives, is the topic of Looking for What We Already Know.

Further reading