Mechanistic Interpretability: Superposition, Sparse Autoencoders and Circuits
Mechanistic interpretability reverse-engineers a trained network into a readable algorithm. Three CPU experiments cover superposition and sparse autoencoders for finding features, the logit lens and activation patching for locating causes, and why the choice of ablation changes the answer.
After this page you will be able to
- Explain the residual-stream view: every attention head and MLP reads the same residual stream and adds its result back, so components can be read, replaced and attributed one at a time.
- Explain superposition and polysemantic neurons: why a neuron is not the natural unit of a feature, how sparsity lets a model pack more features than dimensions, and what it costs.
- Write the objective of a sparse autoencoder (L1 and TopK sparsity) and show with an experiment that low reconstruction error does not mean the true features were found, and that the sparsity setting must match the data.
- Tell reading (the logit lens) from intervening (activation patching, ablation) and say what each can answer, and why the first cannot prove causation.
- Locate a circuit on the IOI task in GPT-2 small with activation patching and head ablation, and explain why mean, patch and zero ablation rank the heads differently.
- Ask the right questions when reading an interpretability paper: what is the baseline, how sensitive is the claim to the method, and which results failed to replicate.
On this page
- The residual stream: a Transformer as shared memory
- Experiment 1: a toy model of superposition
- Experiment 2: sparse autoencoders
- Experiment 3: finding a circuit in GPT-2 small
- Task, data and metric
- The logit lens: what each layer “thinks” the answer is
- Activation patching: which layer, which position
- Head ablation: who does the carrying
- What interpretability can and cannot show
- Summary and exercises
- Quick self-check
- Exercises
- Further reading
- FAQ
Mechanistic interpretability is the effort to reverse-engineer a trained neural network into an algorithm a person can read: which features the network represents internally, which components read and write them, what circuit they form, and how that circuit produces the output. It differs from drawing a saliency map over the input in what it claims. It offers a causal account of the network’s internal structure and tests that account by intervening on it. Three difficulties keep coming up, and this page takes each with an experiment that finishes on a laptop CPU:
- Neurons are not the natural unit of a feature. A model has to represent far more concepts than it has neurons, so it stacks several features on the same neurons. This is superposition, and it makes single neurons “polysemantic”. Experiment 1 shows it in a two-dimensional toy model.
- Finding candidate features is not enough; they have to be pulled apart. The sparse autoencoder (SAE) is the main method today. Experiment 2 tests on synthetic data with a known answer when it recovers the true features and when it does not.
- Reading is not causation, and the way you intervene changes the answer. Experiment 3 takes the indirect object identification (IOI) task in GPT-2 small, and uses the logit lens to read, activation patching to locate and head ablation to attribute, comparing three kinds of ablation.
Environment: Apple M2 Max (64 GB), Python 3.14.3, NumPy 2.4.2, PyTorch 2.10.0 (CPU, 4 threads), transformers 5.3.0; GPT-2 small is openai-community/gpt2 (MIT license). Seeds are fixed; on another machine individual numbers may differ slightly. The datasets are small and the seed counts modest, so each conclusion says how much weight it can bear.
The residual stream: a Transformer as shared memory
Everything below rests on one view: the layers read from and write to a shared memory. In a pre-LN Transformer such as GPT-2, each block makes two additive updates to the residual stream (the vector at one position):
where is the output of head in block (already multiplied by that head’s slice of the output projection ). The logits are , with the unembedding matrix. Three consequences follow:
- The output splits into per-component contributions. Each head and each MLP only adds a vector to the residual stream, so you can ask how much a given head adds to a final logit (up to the scaling of the final norm).
- Every layer boundary at every position is a place to read or write. The GPT-2 small used here has 12 blocks and therefore 13 such points: before each of blocks 0 to 11, and before the final norm.
- Reading and writing are different acts. Reading (probes, the logit lens, SAEs) does not change what the model computes. Writing (ablation, patching, steering) is an intervention, and only interventions can support a causal claim.
| Method | Question it answers | How | Kind of evidence |
|---|---|---|---|
| Probe | Can a concept be read linearly here? | Train a linear classifier on activations | Correlational |
| Logit lens | Which token does the residual stream favour now? | Apply the final norm and unembedding early | Reading, correlational |
| SAE | Which sparse directions make up the activation? | Train a sparse dictionary | Description; causation needs a separate test |
| Ablation | What happens without this component? | Replace its output by 0, a mean or another run’s value | Causal, but depends on the replacement |
| Activation patching | Is this information at this place a cause of the behaviour? | Put one run’s activation into another run | Causal |
One of the first circuits verified this way is the induction head (Olsson et al., 2022): once [A][B] has appeared in a sequence, a later [A] makes the head look at the [B] that followed the earlier [A] and copy it.
The code of the three experiments is one program and shares a single setup.
import random
import numpy as np
import torch
import transformers
torch.set_num_threads(4)
print(f"torch {torch.__version__}, numpy {np.__version__}, "
f"transformers {transformers.__version__}")
Experiment 1: a toy model of superposition
Intuition. Say the model must represent features but the hidden layer has only dimensions. If the feature directions must be orthogonal, two dimensions hold two features. If features rarely occur together, the model can instead give all five non-orthogonal directions, at the price of interference when reading any one of them. In the analysis of Elhage et al. (2022), a ReLU and a negative bias can cut the small interference away, and the sparser the features, the fewer are active together and the less interference there is. Below is the toy model they used to make this concrete.
Each component of the input is 0 with probability (the sparsity) and otherwise drawn from . The model compresses to dimensions and reconstructs:
Let be column of (the direction of feature in the hidden layer). The reconstructed component is , and the terms with are the interference.
A prediction first. When every feature is always present (), interference is heavy and superposition does not pay, so the best solution should store two features and predict the means of the other three. That “store two features” baseline can be computed. The best prediction for a dropped component is its mean, which costs its variance , where is the probability that the feature is present, so the baseline is . If the trained model’s loss is clearly below this line, it is using superposition.
def make_batch(S, n, bs, g):
on = (torch.rand(bs, n, generator=g) > S).float()
return on * torch.rand(bs, n, generator=g) # present: uniform(0, 1)
def train_toy(S, n=5, m=2, seed=0, steps=4000, bs=1024):
g = torch.Generator().manual_seed(seed) # initialization
gd = torch.Generator().manual_seed(1000 + seed) # data stream
W = torch.nn.Parameter(0.5 * torch.randn(m, n, generator=g))
b = torch.nn.Parameter(torch.zeros(n))
opt = torch.optim.Adam([W, b], lr=5e-3)
sched = torch.optim.lr_scheduler.CosineAnnealingLR(opt, steps)
for _ in range(steps):
x = make_batch(S, n, bs, gd)
# hidden h = W x (m numbers), reconstruction ReLU(W^T h + b)
xh = torch.relu(x @ W.T @ W + b)
loss = ((x - xh) ** 2).sum(1).mean()
opt.zero_grad()
loss.backward()
opt.step()
sched.step()
xe = make_batch(S, n, 50000, torch.Generator().manual_seed(7))
with torch.no_grad():
le = ((xe - torch.relu(xe @ W.T @ W + b)) ** 2).sum(1).mean()
return W.detach(), le.item()
Train 5 seeds for each and list the number of features kept (columns of with norm above 0.5), the test loss and the baseline; then look at the lengths and angles of the five vectors at .
print(" S features kept (5 seeds) loss mean+-std 2-feature baseline")
toy = {}
for S in [0.0, 0.5, 0.7, 0.8, 0.9, 0.95, 0.99]:
runs = [train_toy(S, seed=k) for k in range(5)]
toy[S] = runs
kept = [int((W.norm(dim=0) > 0.5).sum()) for W, _ in runs]
ls = torch.tensor([le for _, le in runs])
d = 1 - S # a dropped feature costs its variance
base = 3 * (d / 3 - d * d / 4)
print(f"{S:4.2f} {str(kept):22s} {ls.mean():.4f}+-{ls.std():.4f}"
f" {base:.4f}")
W = toy[0.95][0][0]
ang = torch.atan2(W[1], W[0]).rad2deg().sort().values
gaps = torch.cat([ang[1:] - ang[:-1], ang[:1] - ang[-1:] + 360])
norms = [round(v, 3) for v in W.norm(dim=0).tolist()]
print("S=0.95, seed 0: feature norms", norms)
print("angle gaps in degrees:", [round(v, 1) for v in gaps.tolist()])
S features kept (5 seeds) loss mean+-std 2-feature baseline
0.00 [3, 2, 2, 4, 2] 0.2496+-0.0003 0.2500
0.50 [3, 3, 4, 4, 4] 0.2695+-0.0132 0.3125
0.70 [4, 4, 4, 4, 4] 0.1371+-0.0009 0.2325
0.80 [5, 5, 5, 4, 4] 0.0818+-0.0021 0.1700
0.90 [5, 5, 5, 4, 4] 0.0314+-0.0061 0.0925
0.95 [5, 5, 5, 5, 5] 0.0093+-0.0001 0.0481
0.99 [5, 5, 5, 5, 5] 0.0010+-0.0000 0.0099
S=0.95, seed 0: feature norms [1.133, 1.134, 1.132, 1.134, 1.136]
angle gaps in degrees: [71.9, 72.0, 72.0, 72.1, 72.0]
The widget below makes this table switchable: the model loss and the baseline (dashed, drawn exactly from the closed form) against S on a log scale — pick an S to see the kept features, the loss and the loss-to-baseline ratio. From S≥0.7 on the model starts superposing and its loss falls below the baseline.
How to read the table:
- : no superposition. The mean loss over 5 seeds is 0.2496 (standard deviation 0.0003), the same as the 0.2500 baseline, so the model stored one two-dimensional subspace. The “kept” count reads 2 to 4 on this row because with dense, isotropic data any two-dimensional subspace is equally good, and which columns exceed norm 0.5 depends on the seed. Read the loss on this row, not the count.
- : the model superposes. At the loss is 0.0818 against a baseline of 0.1700. At all 5 seeds keep all 5 features, and the loss of 0.0093 is less than a fifth of the 0.0481 baseline.
- The geometry at : a regular pentagon. For seed 0 the five vectors all have length about 1.13 and adjacent angles between 71.9 and 72.1 degrees. Five features share two dimensions, so each takes of a dimension on average. Elhage et al. point out that superposition organizes features into geometric structures such as digons, triangles, pentagons and tetrahedra, and this pentagon is one of them.
- is a transition zone. The standard deviation across seeds on this row is 0.0132, more than twice that of any row with (at most 0.0061), so solutions in the transition zone are unstable, and conclusions drawn there need many seeds.
Where polysemantic neurons come from. In the pentagon solution, each of the two hidden “neurons” (the two components of ) has a non-zero weight on all five features. Every neuron fires for several unrelated features, even though each feature is a clean direction. The unit to analyse is therefore the direction, not the neuron.
This experiment shows only that when features are sparse, superposition is the lower-loss solution, so gradient descent finds it. It does not show that features in language models are organized this way; that takes the next experiment and larger studies (Anthropic’s SAE work). All features here are equally important and uniformly distributed in amplitude, which real models are not.
Experiment 2: sparse autoencoders
The objective. If features are directions that outnumber the dimensions, we have to recover that set of directions from activations. A sparse autoencoder encodes an activation into a wider (), sparser vector and reconstructs it with a decoder:
There are two ways to make sparse. The L1 version (Cunningham et al., 2023; Bricken et al., 2023) adds a penalty to the loss. The TopK version (Gao et al., 2024, using the k-sparse autoencoder of Makhzani and Frey, 2013) simply keeps the largest activations:
Each column of the decoder is normalized to unit length; otherwise the network could shrink and grow to dodge the L1 penalty.
Why start with synthetic data. A real model has no answer key of “true features”, so evaluation relies on indirect metrics. Here we build a dataset whose answer we know: 32 random unit directions in dimensions (many more features than dimensions). Each sample turns each feature on with probability (1.6 on average at once) with amplitude , and is the weighted sum of the active directions. The dictionary has 32 entries. A true feature counts as “recovered” if some dictionary column has cosine similarity above 0.9 with it. Each setting is trained with 3 seeds; the table reports the mean and standard deviation.
def make_features(n, d, seed):
F = torch.randn(n, d, generator=torch.Generator().manual_seed(seed))
return F / F.norm(dim=1, keepdim=True) # n unit directions in R^d
def sample(F, p, bs, g):
on = (torch.rand(bs, F.shape[0], generator=g) < p).float()
a = on * (0.5 + torch.rand(bs, F.shape[0], generator=g))
return a @ F # sparse mix of features
def train_sae(F, p, lam=0.0, k=None, steps=6000, bs=4096, seed=0):
n, d = F.shape
g = torch.Generator().manual_seed(seed) # initialization
gd = torch.Generator().manual_seed(100 + seed) # data stream
Wd = torch.nn.Parameter(torch.randn(d, n, generator=g))
We = torch.nn.Parameter((Wd / Wd.norm(dim=0)).T.detach().clone())
be = torch.nn.Parameter(torch.zeros(n))
bd = torch.nn.Parameter(torch.zeros(d))
opt = torch.optim.Adam([Wd, We, be, bd], lr=3e-3)
sched = torch.optim.lr_scheduler.CosineAnnealingLR(opt, steps)
def encode(x):
z = torch.relu((x - bd) @ We.T + be)
if k is not None: # TopK: keep k largest
v, i = z.topk(k, dim=1)
z = torch.zeros_like(z).scatter(1, i, v)
return z
for _ in range(steps):
x = sample(F, p, bs, gd)
z = encode(x)
xh = z @ (Wd / Wd.norm(dim=0)).T + bd # unit-norm decoder
loss = ((x - xh) ** 2).sum(1).mean() + lam * z.sum(1).mean()
opt.zero_grad()
loss.backward()
opt.step()
sched.step()
with torch.no_grad():
Wn = Wd / Wd.norm(dim=0)
x = sample(F, p, 20000, torch.Generator().manual_seed(999))
z = encode(x)
sse = ((x - (z @ Wn.T + bd)) ** 2).sum()
r2 = 1 - sse / ((x - x.mean(0)) ** 2).sum()
found = int(((F @ Wn).max(1).values > 0.9).sum())
return dict(r2=r2.item(), found=found,
l0=(z > 1e-3).sum(1).float().mean().item(),
alive=int((z.max(0).values > 1e-3).sum()))
F = make_features(32, 8, seed=0)
print("32 true features in 8 dimensions, each active with probability 0.05")
print("method setting R2 L0 alive recovered (3 seeds)")
cfgs = [("L1", dict(lam=v)) for v in (0.0, 0.1, 0.3, 0.6, 1.0)]
cfgs += [("TopK", dict(k=v)) for v in (1, 2, 4, 8)]
for name, kw in cfgs:
rs = [train_sae(F, 0.05, seed=s, **kw) for s in range(3)]
f = torch.tensor([float(r["found"]) for r in rs])
avg = {key: sum(r[key] for r in rs) / 3 for key in ("r2", "l0", "alive")}
print(f"{name:6s} {str(list(kw.values())[0]):>7s} {avg['r2']:.3f}"
f" {avg['l0']:5.2f} {avg['alive']:5.1f} "
f"{f.mean():4.1f}+-{f.std():.1f} of 32")
32 true features in 8 dimensions, each active with probability 0.05
method setting R2 L0 alive recovered (3 seeds)
L1 0.0 1.000 14.02 32.0 0.3+-0.6 of 32
L1 0.1 0.987 8.85 32.0 4.3+-0.6 of 32
L1 0.3 0.924 5.81 32.0 13.3+-3.2 of 32
L1 0.6 0.814 3.62 32.0 25.0+-2.6 of 32
L1 1.0 0.665 2.36 32.0 27.7+-3.2 of 32
TopK 1 0.734 1.00 32.0 22.3+-6.8 of 32
TopK 2 0.854 1.80 32.0 28.0+-0.0 of 32
TopK 4 0.932 3.80 29.3 11.7+-3.2 of 32
TopK 8 1.000 7.99 27.0 0.3+-0.6 of 32
- Reconstruction alone does not find features. At the is 1.000 yet only 0.3 of 32 features are recovered. The dictionary is larger than the dimension, so any mixture of directions can rebuild the input; without sparsity pressure nothing makes the dictionary line up with the true features.
- L1 trades reconstruction against features. As grows from 0.1 to 1.0, falls from 0.987 to 0.665 and the number of active dictionary entries () from 8.85 to 2.36, while the recovered features rise from 4.3 to 27.7.
- The of TopK must match the sparsity of the data. On average 1.6 features are active at once, and recovers 28.0 of 32 in all three seeds with 0.854. is too tight (22.3 ± 6.8). recovers only 11.7 of 32 and leaves dictionary entries that never fire (29.3 alive out of 32). equals the dimension and falls back to 0.3 of 32.
- The best SAE is not the one that reconstructs best. The setting that recovers the most features has an of 0.854, not the highest. In a real model there is no answer key, so be careful about picking hyperparameters by reconstruction error alone.
A second question: does an SAE still work when the data gets denser? Let follow the sparsity of the data and vary :
print("TopK with k = round(32 p): features recovered as the data gets denser")
print(" p k true active R2 recovered (3 seeds)")
for p in [0.02, 0.05, 0.1, 0.2, 0.4]:
k = max(1, round(32 * p))
rs = [train_sae(F, p, k=k, seed=s) for s in range(3)]
f = torch.tensor([float(r["found"]) for r in rs])
r2 = sum(r["r2"] for r in rs) / 3
print(f"{p:5.2f} {k:3d} {32 * p:7.2f} {r2:.3f} "
f"{f.mean():4.1f}+-{f.std():.1f} of 32")
TopK with k = round(32 p): features recovered as the data gets denser
p k true active R2 recovered (3 seeds)
0.02 1 0.64 0.839 30.7+-1.5 of 32
0.05 2 1.60 0.854 28.0+-0.0 of 32
0.10 3 3.20 0.867 15.7+-1.5 of 32
0.20 6 6.40 0.982 0.3+-0.6 of 32
0.40 13 12.80 1.000 0.7+-0.6 of 32
At and the SAE recovers 30.7 and 28.0 features. At (3.2 active on average) this falls to 15.7, and at (6.4 on average, close to the 8 dimensions) it is only 0.3, with 0.7 at . This matches the intuition from compressed sensing: a sparse signal can be recovered uniquely only when the number of active features is much smaller than the dimension. In a real language model, the ratio of simultaneously active features per token to the activation dimension decides whether an SAE can separate the features, which is also the ceiling of the method.
SAEs in real models. The scale and the problems are far larger than in the toy:
| Work | Model and site | Scale |
|---|---|---|
| Bricken et al. (2023, Towards Monosemanticity) | The 512-neuron MLP of a one-layer Transformer | Trained on 8 billion activation samples, dictionaries from 512 to 131,072 features |
| Templeton et al. (2024, Scaling Monosemanticity) | The middle-layer residual stream of Claude 3 Sonnet | Three SAEs with 1,048,576, 4,194,304 and 33,554,432 features; about 2%, 35% and 65% of the features were “dead” at the end of training |
| Gao et al. (2024, OpenAI) | GPT-4 activations | TopK SAE with 16 million latents trained on 40 billion tokens; the abstract reports modifications that leave few dead latents |
They agree that when the dictionary is made larger, a good share of the learned directions can be described in human terms. One example from Templeton et al. is a “Golden Gate Bridge” feature whose strongest activations are essentially all references to the bridge. But SAEs are not a solved problem:
- Feature splitting and absorption. Chanin et al. (2024) found that as the dictionary grows, hierarchical features split into finer ones, and that seemingly monosemantic features fail to fire where they should because they get “absorbed” into their child features. They argue this follows from optimizing for sparsity itself, and that changing the dictionary size or the sparsity does not cure it.
- The metrics may not be valid. Heap et al. (2025) trained SAEs on randomly initialized transformers and, in many settings, got automated interpretability scores and reconstruction metrics similar to those of trained models. A high score alone does not show that the features the model actually computes with were found, and they recommend routine random baselines.
- No edge on downstream tasks. AxBench (Wu et al., 2025) compares steering and concept detection on Gemma-2-2B and 9B. For steering, prompting is best followed by fine-tuning, and SAEs are not competitive; for concept detection, simple difference-in-means methods do best.
Experiment 3: finding a circuit in GPT-2 small
Now take these tools to a real behaviour. Wang et al. (2022) analysed indirect object identification (IOI): given “When Mark and Kate went to the beach, Kate gave a drink to”, the model should complete “Mark”, the indirect object (IO) rather than the repeated subject (S). Using path patching and other causal interventions they found 26 attention heads in GPT-2 small that carry out the task, in 7 classes, and the paper calls this the largest end-to-end attempt it knows of to reverse-engineer a natural behaviour in a language model. This section re-checks, on a CPU, the classes closest to the output: the name movers, the negative name movers and the S-inhibition heads.
Task, data and metric
The metric is at the last position. Below, “layer ” always means the residual stream before block (layer 12 is before the final norm). We generate 60 prompts from one template with 16 names, 10 places and 10 objects (IO first in half of them and second in the other half). The corrupted version replaces the second mention of the subject name (call it S2) with the IO name, which flips the answer: the two versions differ in exactly one token. Note that Wang et al. used 15 templates and 100 names and corrupted differently (replacing the names by three unrelated random names, called ABC, and mean-ablating over the ABC distribution), so the numbers here are not directly comparable with the paper’s.
from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers import logging as hf_logging
hf_logging.set_verbosity_error()
hf_logging.disable_progress_bar()
torch.set_grad_enabled(False) # no training from here
tok = AutoTokenizer.from_pretrained("openai-community/gpt2")
model = AutoModelForCausalLM.from_pretrained("openai-community/gpt2")
model.eval()
blocks = model.transformer.h
points = list(blocks) + [model.transformer.ln_f] # 13 places to read/write
n_par = sum(p.numel() for p in model.parameters())
print(f"GPT-2 small: {n_par} parameters, {len(blocks)} blocks, "
f"{blocks[0].attn.num_heads} heads per block")
def run(ids, hooks=()):
"""Logits at every position, with forward pre-hooks [(module, fn)]."""
handles = [m.register_forward_pre_hook(f) for m, f in hooks]
logits = model(ids).logits
for h in handles:
h.remove()
return logits
def residuals(ids):
"""Residual stream entering each of the 13 points: (13, batch, T, 768)."""
out = []
run(ids, [(p, lambda m, a: out.append(a[0].clone())) for p in points])
return torch.stack(out)
names = ["Mary", "John", "Tom", "Anna", "David", "Sarah", "James", "Emma",
"Michael", "Lisa", "Peter", "Susan", "Mark", "Laura", "Paul", "Kate"]
places = ["store", "park", "school", "garden", "office", "market", "beach",
"library", "station", "hospital"]
things = ["drink", "bone", "kiss", "letter", "ring", "necklace", "book",
"ball", "gift", "snack"]
assert all(len(tok(" " + w)["input_ids"]) == 1 for w in names + places + things)
rng = random.Random(0)
clean, corrupt, io_tok, s_tok = [], [], [], []
for _ in range(60):
a, b = rng.sample(names, 2) # a: indirect object (IO), b: subject (S)
place, thing = rng.choice(places), rng.choice(things)
first, second = (a, b) if rng.random() < 0.5 else (b, a)
text = (f"When {first} and {second} went to the {place}, "
f"%s gave a {thing} to")
clean.append(text % b) # "S gave a thing to" -> IO
corrupt.append(text % a) # second mention swapped: answer flips
io_tok.append(tok(" " + a)["input_ids"][0])
s_tok.append(tok(" " + b)["input_ids"][0])
ids_c = tok(clean, return_tensors="pt")["input_ids"]
ids_x = tok(corrupt, return_tensors="pt")["input_ids"]
io_tok, s_tok = torch.tensor(io_tok), torch.tensor(s_tok)
s2 = int((ids_c[0] != ids_x[0]).nonzero()[0])
assert ids_c.shape == ids_x.shape
assert all(int((ids_c[i] != ids_x[i]).nonzero()[0]) == s2 for i in range(60))
def logit_diff(logits): # logit(IO) - logit(S), last position
last = logits[:, -1]
io = last.gather(1, io_tok[:, None])[:, 0]
return io - last.gather(1, s_tok[:, None])[:, 0]
ld_c, ld_x = logit_diff(run(ids_c)), logit_diff(run(ids_x))
print(clean[0])
print(corrupt[0])
print(tok.convert_ids_to_tokens(ids_c[0]), "-> S2 at position", s2)
print(f"clean: mean logit diff {ld_c.mean():+.2f}, "
f"IO ahead of S in {int((ld_c > 0).sum())}/60 prompts")
print(f"corrupt: mean logit diff {ld_x.mean():+.2f}, "
f"answer flipped in {int((ld_x < 0).sum())}/60 prompts")
When Mark and Kate went to the beach, Kate gave a drink to
When Mark and Kate went to the beach, Mark gave a drink to
['When', 'ĠMark', 'Ġand', 'ĠKate', 'Ġwent', 'Ġto', 'Ġthe', 'Ġbeach', ',', 'ĠKate', 'Ġgave', 'Ġa', 'Ġdrink', 'Ġto'] -> S2 at position 9
clean: mean logit diff +2.64, IO ahead of S in 60/60 prompts
corrupt: mean logit diff -2.63, answer flipped in 60/60 prompts
In all 60 clean prompts IO ranks ahead of S (mean logit difference +2.64), and in all 60 corrupted prompts the answer flips (−2.63). The model does the task, and the difference between the two versions comes entirely from the S2 position.
The logit lens: what each layer “thinks” the answer is
The logit lens (nostalgebraist, 2020) decodes the residual stream of layer as if it were the last layer: . It is a read-only operation. Belrose et al. (2023) write that it works reasonably well on GPT-2 but that nostalgebraist later found it fails to extract useful information from the GPT-Neo family; they train an affine map for each layer instead, called the tuned lens. First, the logit difference it reads at each layer on the IOI prompts:
res_c = residuals(ids_c)
def lens(h): # final norm + unembedding, applied early
return model.lm_head(model.transformer.ln_f(h))
lens_ld = [logit_diff(lens(r)).mean().item() for r in res_c]
print("logit lens on the IOI prompts: logit diff at the last token")
print("layer: " + " ".join(f"{l:5d}" for l in range(13)))
print("diff: " + " ".join(f"{v:5.2f}" for v in lens_ld))
logit lens on the IOI prompts: logit diff at the last token
layer: 0 1 2 3 4 5 6 7 8 9 10 11 12
diff: 0.17 0.18 0.25 0.24 0.39 0.46 0.46 0.45 1.93 2.05 8.95 5.62 2.64
Through layer 7 the logit difference read out stays below 0.5. The answer appears from layer 8 and 9 (1.93, 2.05), reaches 8.95 before block 10 and then falls back to the final 2.64. The fall happens across blocks 10 and 11, where the negative name movers 10.7 and 11.10 found in the head experiment below sit. Whether that is coincidence or cause has to be answered by intervention.
How reliable is the lens on ordinary text? On 5,120 tokens of the WikiText-2 test set, compare each layer’s readout with the final prediction:
import pandas as pd
from huggingface_hub import hf_hub_download
path = hf_hub_download("Salesforce/wikitext",
"wikitext-2-raw-v1/test-00000-of-00001.parquet",
repo_type="dataset")
words = "\n".join(t for t in pd.read_parquet(path)["text"] if t.strip())
chunks = torch.tensor(tok(words)["input_ids"][: 40 * 128]).view(40, 128)
agree, kl = torch.zeros(13), torch.zeros(13)
for c in chunks.split(8):
res = residuals(c)
final = run(c).log_softmax(-1)
for l in range(13):
lp = lens(res[l]).log_softmax(-1)
agree[l] += (lp.argmax(-1) == final.argmax(-1)).sum()
kl[l] += (final.exp() * (final - lp)).sum()
agree, kl = agree / chunks.numel(), kl / chunks.numel()
print("logit lens on 5,120 WikiText-2 test tokens (40 x 128)")
print("layer: " + " ".join(f"{l:5d}" for l in range(13)))
print("top-1 agrees: " + " ".join(f"{v:5.2f}" for v in agree))
print("KL (nats): " + " ".join(f"{v:5.2f}" for v in kl))
logit lens on 5,120 WikiText-2 test tokens (40 x 128)
layer: 0 1 2 3 4 5 6 7 8 9 10 11 12
top-1 agrees: 0.02 0.07 0.08 0.08 0.10 0.12 0.14 0.17 0.23 0.31 0.41 0.55 1.00
KL (nats): 48.22 6.85 6.05 5.74 5.60 5.31 4.95 4.61 3.96 3.52 2.92 1.52 0.00
The top-1 agreement with the final prediction rises, nearly monotonically, from 0.02 at layer 0 to 0.55 at layer 11, and the KL divergence falls monotonically from 48.22 nats to 1.52 (layer 12 is the final layer itself, so 1.00 and 0.00 are trivial). So the lens is a usable window in the middle and late layers, while in early layers the readout is far from the model’s final distribution. It only reads: not seeing the answer through layer 7 does not mean the information is absent.
Activation patching: which layer, which position
Activation patching (also called causal tracing or interchange intervention; Meng et al. 2022 used it to find that factual recall runs through middle-layer MLPs) intervenes directly. Run the corrupted prompt, but at one layer and position replace the residual stream with its value from the clean run, and see how much of the output is restored. Define the recovered share as
where 0 means the patch did nothing and 1 means the clean result is fully restored. We patch all 13 points at all 14 positions, 182 cells in total, averaging over the 60 prompts (the ratio uses the mean logit differences).
T = ids_c.shape[1]
def patch_at(layer, pos):
"""Overwrite the residual stream at (layer, pos) with the clean run's."""
def hook(mod, args):
h = args[0].clone()
h[:, pos] = res_c[layer][:, pos]
return (h,) + args[1:]
return points[layer], hook
ld_p = torch.zeros(13, T, 60) # patched logit diff, per prompt
for layer in range(13):
for pos in range(T):
ld_p[layer, pos] = logit_diff(run(ids_x, [patch_at(layer, pos)]))
def recovery(idx): # 0 = corrupt run, 1 = clean run
gap = ld_c[idx].mean() - ld_x[idx].mean()
return (ld_p[:, :, idx].mean(-1) - ld_x[idx].mean()) / gap
rec = recovery(slice(None))
others = [p for p in range(T) if p not in (s2, T - 1)]
print("share of the clean-corrupt logit-diff gap restored by patching")
print("layer S2 last best of the other 12 positions")
for layer in range(13):
print(f"{layer:5d} {rec[layer, s2]:5.2f} {rec[layer, -1]:5.2f} "
f"{rec[layer, others].max():5.2f}")
half = (recovery(slice(0, 30)) - recovery(slice(30, 60))).abs().max()
print(f"the two halves of the prompts differ by at most {half:.2f}")
share of the clean-corrupt logit-diff gap restored by patching
layer S2 last best of the other 12 positions
0 1.00 0.00 0.00
1 1.00 -0.00 0.00
2 1.00 -0.00 0.00
3 1.00 -0.00 0.00
4 1.00 -0.00 0.00
5 0.97 -0.00 0.03
6 0.97 -0.00 0.03
7 0.92 0.02 0.06
8 0.61 0.37 0.03
9 0.05 0.94 0.03
10 0.02 0.98 0.02
11 0.03 0.96 0.01
12 0.00 1.00 0.00
the two halves of the prompts differ by at most 0.02
- First half: the information is at S2. At layer 0, patching at S2 recovers exactly 1.00. That is built into the setup: the two prompts differ only in the S2 token, so swapping it back undoes the corruption. The share stays at 1.00 through layer 4, which says only that restoring S2 alone is enough, whatever the later positions had picked up from the corrupted S2 in the first blocks. The informative rows are layers 5 to 7, where S2 still holds 0.97, 0.97 and 0.92: the information the answer needs stays at this position until layer 7.
- Middle: the hand-off happens between layers 7 and 9. At layer 8, S2 holds 0.61 and the last position already has 0.37; at layer 9, S2 is down to 0.05 and the last position is at 0.94. So during the processing of blocks 7 and 8 the information moves from S2 to the last position.
- Second half: the information is at the last position. From layer 9 to 12 the last position recovers 0.94, 0.98, 0.96 and 1.00.
- No other position matters. Among the other 12 positions the largest recovered share at any layer is 0.06.
- Robustness. Splitting the 60 prompts into two halves, the recovered shares differ by at most 0.02, so the pattern does not come from a few prompts.
This settles where and when: the computation is concentrated at S2 and at the last position, with the hand-off between layers 7 and 9, which means during blocks 7 and 8, exactly where the paper’s S-inhibition heads 7.3, 7.9, 8.6 and 8.10 sit. It does not say which component does it. The next step goes down to single attention heads.
Head ablation: who does the carrying
For each of the 144 heads (12 by 12), replace that head’s output at the last position on the clean prompts and measure the change in (the S-inhibition, name mover and negative name mover heads of Wang et al. all act at the last position). What to replace it with is a key choice, so we compare three side by side:
- Mean-ablation: replace it with the head’s average output over the 60 clean prompts, removing what varies with the prompt and keeping what the head does on average.
- Patching: replace it with the head’s output on the matching corrupted prompt, which hands the head information with the opposite answer.
- Zero-ablation: replace it with the zero vector.
def head_out(ids):
"""Output of every head at the last position, before W_O: (12, B, 768)."""
out = []
run(ids, [(b.attn.c_proj, lambda m, a: out.append(a[0][:, -1].clone()))
for b in blocks])
return torch.stack(out)
def head_hook(layer, head, new):
sl = slice(64 * head, 64 * (head + 1))
def hook(mod, args):
x = args[0].clone()
x[:, -1, sl] = new[:, sl] # new: (batch, 768)
return (x,)
return blocks[layer].attn.c_proj, hook
h_c, h_x = head_out(ids_c), head_out(ids_x)
srcs = {"mean": h_c.mean(1, keepdim=True).expand(-1, 60, -1),
"patch": h_x, "zero": torch.zeros_like(h_c)}
delta = {k: torch.zeros(12, 12, 60) for k in srcs}
for layer in range(12):
for head in range(12):
for k, src in srcs.items():
logits = run(ids_c, [head_hook(layer, head, src[layer])])
delta[k][layer, head] = logit_diff(logits) - ld_c
mean_d = {k: v.mean(-1) for k, v in delta.items()}
def rank_corr(u, v):
rank = lambda t: t.flatten().argsort().argsort().float()
return torch.corrcoef(torch.stack([rank(u), rank(v)]))[0, 1].item()
print("rank correlation of the effects over 144 heads: "
f"mean vs patch {rank_corr(mean_d['mean'], mean_d['patch']):.2f}, "
f"mean vs zero {rank_corr(mean_d['mean'], mean_d['zero']):.2f}")
for k in srcs:
flat = sorted((mean_d[k][i, j].item(), f"{i}.{j}")
for i in range(12) for j in range(12))
down = " | ".join(f"{n} {v:+.2f}" for v, n in flat[:5])
up = " | ".join(f"{n} {v:+.2f}" for v, n in flat[-3:][::-1])
print(f"{k:5s} largest drops: {down}")
print(f"{'':5s} largest rises: {up}")
roles = {"7.3": "S-inhibition", "7.9": "S-inhibition", "8.6": "S-inhibition",
"8.10": "S-inhibition", "9.6": "name mover", "9.9": "name mover",
"10.0": "name mover", "10.7": "negative name mover",
"11.10": "negative name mover"}
print("head role (Wang et al.) mean-ablate patch-from-corrupt")
for name, role in roles.items():
i, j = map(int, name.split("."))
d = {k: delta[k][i, j] for k in ("mean", "patch")}
cells = [f"{v.mean():+.2f}+-{v.std() / 60 ** 0.5:.2f}" for v in d.values()]
print(f"{name:5s} {role:19s} {cells[0]} {cells[1]}")
rank correlation of the effects over 144 heads: mean vs patch 0.62, mean vs zero 0.35
mean largest drops: 8.10 -0.65 | 8.6 -0.57 | 7.9 -0.51 | 9.9 -0.35 | 7.3 -0.34
largest rises: 10.7 +0.78 | 11.10 +0.36 | 9.6 +0.24
patch largest drops: 8.10 -1.26 | 8.6 -1.13 | 9.9 -1.11 | 7.9 -1.10 | 7.3 -0.74
largest rises: 10.7 +1.80 | 11.10 +0.69 | 11.2 +0.30
zero largest drops: 1.10 -2.61 | 2.0 -0.80 | 0.10 -0.79 | 8.6 -0.69 | 8.10 -0.65
largest rises: 10.7 +0.78 | 11.10 +0.36 | 9.6 +0.34
head role (Wang et al.) mean-ablate patch-from-corrupt
7.3 S-inhibition -0.34+-0.03 -0.74+-0.06
7.9 S-inhibition -0.51+-0.03 -1.10+-0.06
8.6 S-inhibition -0.57+-0.05 -1.13+-0.07
8.10 S-inhibition -0.65+-0.05 -1.26+-0.07
9.6 name mover +0.24+-0.03 +0.22+-0.04
9.9 name mover -0.35+-0.05 -1.11+-0.07
10.0 name mover -0.22+-0.05 -0.52+-0.04
10.7 negative name mover +0.78+-0.08 +1.80+-0.13
11.10 negative name mover +0.36+-0.07 +0.69+-0.10
- The top of the ranking matches the paper. Under mean-ablation and patching, the five heads with the largest drop are all name mover or S-inhibition heads of the paper (8.10, 8.6, 7.9, 9.9, 7.3, in a slightly different order). The largest rise is 10.7 followed by 11.10, which are the paper’s negative name movers: removing them makes the logit difference larger.
- The effects are far above noise. The in the table is the standard error over 60 prompts, and the drops of the S-inhibition heads are roughly ten or more standard errors.
- Patching is typically about twice as strong as mean-ablation. Head 9.9 is about three times. Giving a head the opposite answer hurts more than just erasing its information.
- 9.6 did not replicate. The paper lists 9.6 as a name mover, but here mean-ablating it raises the logit difference by 0.24 and patching it by 0.22, the opposite direction. Possible reasons: the paper itself documents “backup name mover” heads that take over when the regular name movers are knocked out, and our whole-run intervention lets them compensate; our prompt distribution differs from the paper’s; the paper measured the direct path from the head to the logits, while we change everything the head does downstream. We did not test these one by one, so the honest label is “did not replicate”.
- The ranking is sensitive to the method. Over the 144 heads, the rank correlation is 0.62 between mean-ablation and patching and only 0.35 between mean-ablation and zero-ablation. Zero-ablation puts head 1.10 first (a drop of 2.61); it is not one of the paper’s 26 heads, and it is outside the top 5 under the other two methods. Zeroing replaces the output with a vector the model never saw in training, so a large effect can mean the head matters or can mean the model was pushed off distribution, and this number alone cannot tell them apart.
This section covers only part of the paper’s circuit. We changed only head outputs at the last position, left out the duplicate-token, previous-token and induction heads that act at earlier positions, did not touch the MLPs, did no path patching, and used one template and 60 prompts. What we re-checked is which heads rank at the top, not the whole circuit.
What interpretability can and cannot show
- Reading describes; intervening tests cause. Probes, the logit lens and SAE features describe what is in the activations; only patching and ablation answer whether something is necessary for the behaviour. But the answer depends on what you replace it with: Zhang and Nanda (2023) compared the metrics and corruption methods of activation patching systematically and found that changing the setup can give strikingly different interpretability results, and Heimersheim and Nanda (2024) give advice on how to use and read patching results. The two rank correlations of 0.62 and 0.35 above are a small instance of the same thing.
- No change in the output after removing a component does not mean it is useless. Models have redundancy and compensation (the backup name movers are an example), and a whole-run ablation measures the total effect, which compensation can flatten. Telling direct from indirect paths takes path patching.
- A “circuit” needs criteria. Wang et al. use three quantitative ones: faithfulness (how much of the behaviour the circuit alone reproduces), completeness (whether the circuit contains everything important) and minimality (whether it contains anything superfluous). They state frankly that the three support their explanation and also point to remaining gaps.
- Scale. Explaining one narrow task in GPT-2 small took 26 heads and a whole paper. SAEs carry the work to the activations of frontier models (the table above), but their evaluation metrics are themselves disputed (see above). From “some interpretable features can be found” to “models can be audited” is a long way.
Questions worth asking of an interpretability paper: What is the baseline (a randomly initialized model? random directions?). Does the conclusion survive another way of intervening? What are the sample size and the prompt distribution? Which results failed to replicate, and did the authors say so?
Summary and exercises
The three experiments give not a list of conclusions but a way of asking questions: features are directions, not neurons; good reconstruction does not mean the right features; reading describes while intervening tests cause; and how you replace a component changes the answer.
Quick self-check
In the toy model at (every feature always present), with 5 features and 2 hidden dimensions, the test loss is 0.2496. What is the best reading?
- The model superposed all 5 features and only has a little interference
- Superposition does not pay when features are dense; the model stores about as much as it has dimensions, and the loss equals the 0.2500 baseline of storing 2 features
- Training did not converge, and a larger learning rate would clearly lower the loss
- The baseline is miscomputed; the true baseline should be much lower
With dense data the features are almost always active together, so the interference from superposition is too large to pay. The mean loss over 5 seeds is 0.2496 with a standard deviation of only 0.0003, the same as the baseline of 0.2500 for storing 2 features and predicting the mean of the other 3. Only when the feature probability falls to 0.05 does the loss drop to 0.0093.
Which statements agree with the results of Experiment 2? (select all that apply)
- With no sparsity constraint the reconstruction can be 1.000 while almost no true features are recovered
- The higher the reconstruction , the more true features are recovered
- TopK recovers the most when is close to the number of features active at once
- When the number of features active at once approaches the dimension (, 6.4 on average, 8 dimensions), almost none are recovered
At the is 1.000 and 0.3 of 32 features are recovered. matches the 1.6 features active on average and recovers 28.0 of 32 with an of only 0.854, so the second statement is false. At only 0.3 of 32 are recovered.
On the IOI prompts the logit lens reads a logit difference below 0.5 through layer 7. Can we conclude those layers are irrelevant to the task?
- No. The logit lens only reads, and patching shows the recovered share at the S2 position is still 0.92 to 1.00 through layer 7, so the information is there
- Yes, the logit lens is a causal measurement
- Yes, because the KL is smallest in early layers
- No, because the logit lens can only be used at the last layer
The logit lens reads; it does not intervene. The residual stream of early layers is far from the distribution the unembedding expects (the KL at layer 0 on WikiText-2 is 48.22 nats), so failing to read the answer does not mean the information is absent. At layers 5, 6 and 7 the recovered share at S2 is 0.97, 0.97 and 0.92.
In the head ablation, the rank correlation is 0.62 between mean-ablation and patching and 0.35 between mean-ablation and zero-ablation. What does that say?
- Zero-ablation is the most accurate because it removes all information
- The three methods corroborate each other and the conclusions are robust
- The role of the heads is random anyway
- What you replace the output with changes the conclusion, so state which ablation you used and cross-check with several methods
Over the same 144 heads the three replacements give rankings that do not agree. Zeroing replaces the output with a vector the model never saw, which may only push the model off distribution.
The paper lists 9.6 as a name mover, yet in this page’s mean-ablation it raises the logit difference by 0.24. What is the right way to handle this?
- Drop 9.6 from the results and report only the heads that replicated
- Conclude the paper is wrong
- Report that it did not replicate and give possible reasons (a whole-run ablation measures the total effect and backup heads can compensate; the prompt distribution and the way of intervening also differ), noting that these reasons were not tested one by one
- Switch to another ablation until it shows a drop
Write down failed replications as they are, and keep what is supported apart from what is untested conjecture. Switching methods until the wanted result appears is selective reporting.
Exercises
-
Change the hidden dimension of the toy model to (still 5 features). What is the baseline loss of “store 3 features” at ?
Reference answer
The dropped components number , each costing its variance . At , , so each is and the baseline is . As a check, drops 3 components, giving , which matches the 0.2500 in the table.
-
In the activation patching table, why is the recovered share at the S2 position at layer 0 exactly 1.00, and at every other position exactly 0.00? What do those cells tell us?
Reference answer
The clean and corrupted prompts differ only in the S2 token, and the residual stream at layer 0 is the word embedding plus the position embedding, so putting it back at S2 undoes the whole corruption; at every other position the two prompts are already identical, so patching changes nothing. These cells only prove that the setup is not broken; they teach nothing about the computation. The informative rows are the transition layers (8 and 9), where the information moves from S2 to the last position.
-
In Experiment 2, TopK at () recovers only 15.7 of 32, against 28.0 of 32 at (). Explain the difference, and predict what happens if the space dimension grows from 8 to 16 with everything else unchanged.
Reference answer
The average number of features active at once rises from 1.6 to 3.2, which is no longer “much smaller than the dimension” of 8; different combinations of features are easier to confuse in activation space, so the SAE has a harder time pulling them apart. At , with 6.4 active on average, almost nothing is recovered (0.3 of 32). With 16 dimensions, 3.2 active features are only half as large relative to the dimension, so by the compressed-sensing intuition the recovery at should go up. That is a prediction, not a result of this page: to check it, change
make_features(32, 8, ...)to 16 dimensions and rerun. -
Hands-on: replace the last position (
-1) inhead_outandhead_hookbys2and rerun the head ablation. The paper of Wang et al. places the duplicate-token heads (0.1, 3.0 and the “fuzzy” 0.10) at the S2 position. Write down your prediction first, then run it and see whether it replicates. This page did not run this experiment, so no numbers are given.
Further reading
- Elhage et al., Toy Models of Superposition, 2022. arXiv:2209.10652. The original paper on the toy model, the phase change and the polytope geometry.
- Elhage et al., A Mathematical Framework for Transformer Circuits, 2021. transformer-circuits.pub. The residual-stream view and circuit analysis of attention heads.
- Olsson et al., In-context Learning and Induction Heads, 2022. arXiv:2209.11895. Induction heads and in-context learning.
- Bricken et al., Towards Monosemanticity, 2023. transformer-circuits.pub. Decomposing the MLP of a one-layer Transformer with an SAE.
- Cunningham et al., Sparse Autoencoders Find Highly Interpretable Features in Language Models, 2023. arXiv:2309.08600.
- Templeton et al., Scaling Monosemanticity, 2024. transformer-circuits.pub. SAEs on Claude 3 Sonnet.
- Gao et al., Scaling and evaluating sparse autoencoders, 2024. arXiv:2406.04093. TopK SAEs and evaluation metrics.
- Chanin et al., A is for Absorption, 2024. arXiv:2409.14507; Heap et al., Automated Interpretability Metrics Do Not Distinguish Trained and Random Transformers, 2025. arXiv:2501.17727; Wu et al., AxBench, 2025. arXiv:2501.17148. Limits of SAEs.
- nostalgebraist, interpreting GPT: the logit lens, 2020. LessWrong; Belrose et al., Eliciting Latent Predictions from Transformers with the Tuned Lens, 2023. arXiv:2303.08112.
- Meng et al., Locating and Editing Factual Associations in GPT, 2022. arXiv:2202.05262. Causal tracing and ROME.
- Wang et al., Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small, 2022. arXiv:2211.00593.
- Zhang and Nanda, Towards Best Practices of Activation Patching in Language Models, 2023. arXiv:2309.16042; Heimersheim and Nanda, How to use and interpret activation patching, 2024. arXiv:2404.15255.
- TransformerLens: an open-source library commonly used for experiments like these.
FAQ
- What is mechanistic interpretability, and how does it differ from LIME, SHAP or attention heat maps?
- Mechanistic interpretability reverse-engineers a trained network into an algorithm people can read. It finds the features the network represents, then the components that read and write them and the circuit they form, and tests that account with interventions. LIME, SHAP and saliency maps are post-hoc explanations that say which inputs mattered for an output without opening the network. This page runs the full loop on the indirect object identification task in GPT-2 small. Activation patching shows the key information sitting at the second mention of the subject name through layer 7 (recovered share 0.92 to 1.00) and moving to the last position at layers 8 and 9, and head ablation ranks the S-inhibition and name mover heads at the top of 144 heads.
- What is superposition, and why are neurons polysemantic?
- Superposition means a network stores more features than it has dimensions by placing them in directions that are not orthogonal (Elhage et al., 2022). When features are sparse and rarely active together, their interference can be filtered out by the ReLU and the bias, so storing extra features beats dropping them. A single neuron then responds to several unrelated features, which is polysemanticity. In this page's toy model, five features share two dimensions. When every feature is always present the test loss is 0.2496, the same as the 0.2500 baseline that stores only two features. When each feature is present with probability 0.05 the loss falls to 0.0093 and the five vectors have equal length and sit about 72 degrees apart, a regular pentagon.
- How does a sparse autoencoder find features, and how do L1 and TopK differ?
- A sparse autoencoder encodes an activation into a wider, sparser vector and reconstructs it with a decoder; sparsity comes from an L1 penalty or a TopK cut. With L1 you tune a penalty weight and sparsity is an indirect outcome. TopK (Gao et al., 2024) keeps exactly k activations per sample, which makes sparsity controllable but requires k to match the true sparsity of the data. In this page's synthetic experiment, 32 true features live in 8 dimensions with 1.6 active at a time. With no sparsity pressure the reconstruction R2 is 1.000 but only 0.3 of 32 features are found; k=2 finds 28.0 of 32 at R2 0.854; k=8 falls back to 0.3 of 32.
- What is the difference between the logit lens and activation patching, and why use both?
- The logit lens (nostalgebraist, 2020) applies the final norm and the unembedding matrix to an intermediate residual stream to read which token the model currently favours. It only reads, so it is correlational evidence, and it distorts early layers: on WikiText-2 the KL at layer 0 is 48.22 nats and the top-1 agreement at layer 11 is only 0.55. Activation patching moves activations from one run into another and measures the effect directly. In this page's IOI experiment the lens reads a logit difference of at most 0.46 through layer 7, yet patching shows the second mention of the subject name carries almost all of the key information in those layers.
- Can interpretability results be trusted, and how should I judge them?
- It depends on the method and the baselines. In this page, over the same 144 heads, mean-ablation and patching rank the heads with a rank correlation of 0.62, and mean-ablation and zero-ablation with 0.35. Zero-ablation puts head 1.10 first (a drop of 2.61), while it is outside the top 5 under the other two methods. Of the nine heads reported in the original paper, 9.6 did not replicate here (mean-ablating it raised the logit difference by 0.24). SAE metrics are also disputed: Heap et al. (2025) found that SAEs trained on randomly initialized transformers get similar automated interpretability scores, and AxBench (Wu et al., 2025) found SAEs behind simple baselines for steering on Gemma-2. Ask for a random baseline, agreement across methods and the sample size.