Chapter 6

Circuit case studies

Between 2022 and 2024, researchers opened real language models and traced specific behaviours to specific parts. This chapter walks through the most famous of these case studies, one at a time.

In short

  • A case study picks one narrow behaviour, such as "complete the sentence with the right name", and finds the parts of the model that produce it.
  • IOI (2022) found 26 attention heads in 7 groups inside GPT-2 small that pick the right name. It also found backup heads that take over when you remove the main ones.
  • Modular addition (2023) showed a tiny network that adds numbers by rotating points on circles, like a clock. Othello-GPT showed a model that builds a picture of a game board that it never saw.
  • Factual recall studies found that MLP layers act like a lookup table for facts, but the details inside the table stay hard to read.
  • The lessons: circuits are real and can be tested, but they are messy, often incomplete, partly different between models, and hard to scale by hand.
Learning path · Chapter 6 of 12 · about 50 min · 4 widgets · 4 quizzes

Before you start: Chapter 4: composition and induction heads; Chapter 5: activation patching, path patching, mean ablation and the logit difference metric.

You will learn:

  • the standard recipe of a circuit case study
  • the IOI circuit in GPT-2 small: 26 heads in 7 classes, and self-repair
  • how a tiny network adds numbers with a "clock", and what grokking is
  • how Othello-GPT builds a board that it never saw, and how models recall facts
  • what the case studies teach about universality and scale

How a circuit case study works

Chapter 4 gave the vocabulary (heads, composition, the residual stream). Chapter 5 gave the tools (ablation and patching). This chapter puts them together on real models. All the studies in this chapter follow a similar recipe. If you know the recipe, each study is easier to read.

  1. Pick a narrow task. Choose a behaviour that the model does well, and that you can test with many similar prompts. For example: "When Mary and John went to the store, John gave a drink to ___".
  2. Pick a metric. Choose one number that measures success. A common choice is the logit difference: the score of the right answer minus the score of a wrong answer.
  3. Make a corrupted version. Change the prompt a little so that the right answer is no longer clear. Compare the clean run and the corrupted run.
  4. Locate. Use activation patching and ablation to find which components matter. Chapter 5 explains these tools.
  5. Interpret. For each important component, ask what it does. Look at where an attention head looks. Project its output onto the vocabulary to see which words it pushes up.
  6. Validate. Keep only the circuit, switch off the rest, and check that the task still works. Also check that each part is needed.
1 · Tasknarrow, testable 2 · Metriclogit diff 3 · Corruptclean vs. broken 4 · Locatepatch, ablate 5 · Interpretattention, OV 6 · Validatefaithful? complete? if the test fails, look again SET UP FIND AND EXPLAIN
Figure 6.1. The usual recipe of a circuit case study. Steps 4 to 6 often repeat many times.

The first famous case study used this recipe on a different target: the induction heads (2022). Those heads complete repeated patterns. Chapter 4 explains them, because they are part of the basic toolkit for transformers. Here we start with the next big study.

Notation used in this chapter

We name an attention head by its layer and its index, counting from zero. So 9.9 means "layer 9, head 9". GPT-2 small has 12 layers with 12 heads each, so 144 heads in total. Some papers write the same head as L9H9 or a9.h9.

Indirect object identification: which name comes next?

2022
Kevin Wang, Alexandre Variengien, Arthur Conmy, Buck Shlegeris, Jacob Steinhardt · ICLR 2023
At the time, the largest end-to-end reverse engineering of a natural behaviour in a language model: 26 heads in 7 classes.

The task

Read this sentence and guess the next word:

When Mary and John went to the store, John gave a drink to ___

The answer is "Mary". In grammar, Mary is the indirect object (IO): the person who receives the drink. The researchers call this task IOI, for Indirect Object Identification. GPT-2 small does it well.

The sentence has two names. The subject (S, here John) appears twice. We call the two copies S1 and S2. The indirect object (IO, here Mary) appears only once. So a simple rule solves the task:

  1. Find the names in the sentence.
  2. Find the name that appears twice.
  3. Output the other name.

The question was: does GPT-2 really use this rule, and if so, which parts of the model do each step?

How they searched

The metric was the logit difference: logit("Mary") minus logit("John"). A large positive number means the model clearly prefers the right name.

For the corrupted input, they used the ABC dataset. In these sentences, three different names appear, for example "When Mary and John went to the store, Alice gave a drink to". Now no name is repeated. So the information "which name is duplicated" is gone. Any part of the model that carries that information will behave differently on the two inputs.

The authors then used a new method that they called path patching. It swaps in activations from the ABC run along one path at a time, for example only the path from head 7.3 to the queries of head 9.9. If the logit difference drops, that path matters. They also used mean ablation: they replaced a head's output with its average output over the ABC data. This "switches off" the head's task-specific information but keeps its normal size. Chapter 5 explains both methods in detail.

The circuit, step by step

Use the stepper. It builds the circuit one group at a time. The horizontal axis shows token positions. The vertical axis shows layers (0 at the bottom, 11 at the top). Each box is one or more attention heads. A curved line shows where a head looks (attends).

Interactive · Build the IOI circuit
Click the steps. Boxes appear at the token position where the head acts, in the row of its layer.

The model reads the sentence. The answer slot is after the final "to" (right side). Mary (blue) is the IO. John (orange) is the subject. It appears at S1 and again at S2. Nothing is lit yet.

At S2 (the second "John"), the model must notice "I saw this name before".

Duplicate token heads (0.1 and 3.0, blue boxes) sit at S2 and attend straight back to S1, the earlier copy of the same token. Previous token heads (2.2 and 4.11, green) sit at the token after S1 ("went") and copy "the token before me was John" into that position. Induction heads (5.5 and 6.9, purple) then use that note: at S2 they attend to "went", the token after the earlier John. Both routes write the same message at S2: "John is a repeat".

S-inhibition heads (7.3, 7.9, 8.6, 8.10, yellow) sit at the final "to". They attend to S2 and read the "John is a repeat" message. They write a signal into the final position. This signal later tells the name movers: do not look at John.

Name mover heads (9.9, 9.6, 10.0, orange) sit at the final "to". They attend to names in the sentence and copy the name they attend to into the output. Because the S-inhibition signal changed their queries, they look at Mary, not John. So they push up the logit for "Mary". The answer appears.

Two surprises. Negative name movers (10.7 and 11.10, red) attend to the names too, but they write the opposite: they push "Mary" down a little. The authors guessed that they stop the model from being over-confident. Backup name movers (8 heads, grey) do little in a normal run. But if you switch off the main name movers, the backup heads start to copy names and recover much of the performance.

previous token duplicate token induction S-inhibition name mover negative name mover backup name mover

Here is the full list of heads. The heads in brackets are smaller members of their class. Together they make the 26 heads of the paper.

ClassHeads (layer.head)PositionJob
Previous token2.2, 4.11S1+1Copy "previous token was John" into the next position. This feeds the induction heads.
Duplicate token0.1, 3.0 (0.10)S2Attend from S2 to S1. Signal "this token is a repeat".
Induction5.5, 6.9 (5.8, 5.9)S2Same signal, through the induction mechanism (attend to S1+1).
S-inhibition7.3, 7.9, 8.6, 8.10ENDMove the "John is a repeat" signal to the end. Reduce name movers' attention to John.
Name mover9.9, 9.6, 10.0ENDAttend to the IO name and copy it to the output.
Negative name mover10.7, 11.10ENDAttend to names and write the opposite direction. Lower the IO logit a little.
Backup name mover9.0, 9.7, 10.1, 10.2, 10.6, 10.10, 11.2, 11.9ENDDo little normally. Take over if the name movers are removed.
Key idea: heads talk through the residual stream

Notice how the heads "talk". The S-inhibition heads do not change the name movers' weights. They write a vector into the residual stream at the final position. The name movers read that vector when they form their query ("what should I look for?"). This is Q-composition, one of the three composition types from the Mathematical Framework (Chapter 4).

How good is the explanation?

The authors proposed three tests for any circuit. These tests are now standard vocabulary.

Surprise: self-repair

When the researchers removed the main name mover heads, the performance did not collapse. The backup heads started to do the same job. This effect is called self-repair. (McGrath et al. later called a related effect, seen across whole layers, the "hydra effect".) It means that simple ablation can underestimate how important a component is. If you remove a head and nothing changes, the head may still do the job in a normal run.

Limits of the IOI study
  • It covers one narrow, template-based task.
  • It studies attention heads only. MLP layers were mostly left out. (Removing all MLPs after the first layer breaks the task, so they do matter.)
  • The circuit is faithful at 87%, but not complete. Later work (Miller, Chughtai and Saunders, COLM 2024) showed that this kind of faithfulness score changes a lot with small changes in how you ablate. So "87%" holds for the paper's exact method, not for every method.
  • It took a team of researchers months of manual work for one small behaviour in a 124M-parameter model.

Copy suppression: explaining one head completely

2023
Callum McDougall, Arthur Conmy, Cody Rushing, Thomas McGrath, Neel Nanda · BlackboxNLP 2024
Explains head 10.7 of GPT-2 small, the "negative name mover" from IOI, across the whole training distribution.

The IOI study left a puzzle. Why does head 10.7 push the right answer down? A later study looked at this one head on all kinds of text, not only IOI sentences.

The mechanism

Head 10.7 does copy suppression. It works in three steps:

  1. Earlier layers predict some next token, for example a word that already appeared earlier in the text.
  2. The head's QK circuit asks: "Is the token that we are about to predict already present earlier in the context?" If yes, the head attends to that earlier copy.
  3. The head's OV circuit writes a negative vote for that same token. So the prediction "repeat this word" gets weaker.
… the castle was old . We walked into the ? earlier layers predict "castle" (copy) head 10.7 QK: "is castle already here?" → attend OV: − castle lower the repeat
Figure 6.2. Copy suppression (illustrative sentence). If the model is about to repeat a word that is already in the context, head 10.7 finds the earlier copy and votes against it. This makes the model less over-confident.

Why would a model want this? Earlier heads often copy words from the context. Copying is a good guess, but not always. Copy suppression corrects for naive copying. It makes the model's predictions better calibrated: its confidence better matches how often it is right.

The authors explained 76.9% of head 10.7's effect with this mechanism, using evidence from the weights. This is rare. Most studies explain a head on one task. This study explained one head on the model's whole training distribution.

Copy suppression also explains part of the IOI self-repair. In IOI, the name movers copy "Mary". Head 10.7 sees that "Mary" is predicted and suppresses it a little. If you remove the name movers, "Mary" is no longer predicted strongly, so head 10.7 suppresses less. The logit for Mary partly comes back. Self-repair is partly a side effect of a head that reacts to what other heads do. On one narrow task, the authors found that copy suppression explains 39% of the self-repair.

Greater-than: how GPT-2 compares years

2023
Michael Hanna, Ollie Liu, Alexandre Variengien · NeurIPS 2023
Finds a circuit of attention heads and MLPs in GPT-2 small that knows which two-digit years come after a given year.

The task

The war lasted from the year 1732 to the year 17__

A sensible end year must be later than the start year. So the model should give high probability to 33, 34, …, 99 and low probability to 00, …, 32. The researchers measured this with the probability difference: the total probability on years greater than YY, minus the total probability on years less than or equal to YY. GPT-2 small scores 81.7%. So it really does "know" the comparison.

For the corrupted input, they replaced the start year with "01" (as in "1701"). Then almost every end year is valid, and the comparison information is gone.

Interactive · The greater-than behaviour
Move the start year. The bars show an illustrative next-token distribution with the same shape as GPT-2's: probability turns on just after YY. (Not real model output.)

The circuit

Path patching found a small circuit:

  1. Attention heads in layers 5 to 9 (a5.h1, a5.h5, a6.h9, a7.h10, a8.h8, a8.h11, a9.h1) sit at the final position. They attend to the start-year token "32" and move information about it to the end.
  2. MLPs 8, 9, 10 and 11 do the comparison. The researchers looked at their outputs with the logit lens. The MLP outputs push up years greater than YY and push down years less than or equal to YY.
  3. MLP 8 acts mostly indirectly: it changes what later MLPs do. MLP 11 pushes up roughly the first 50 years after YY, a bit like a sense of "how long a war can last".
Figure 6.3. Schematic of the greater-than pattern (shape only, not real values). Each row is a start year YY. Each column is a predicted end year. Bright cells mean high probability. The bright area starts just right of the diagonal: the model prefers years after YY. On the right, the circuit that produces it.

The circuit alone reaches 72.7% probability difference, which is 89.5% of the full model's score. The mechanism also works in some other "greater-than" contexts. But it also fires in a few contexts where it should not. The authors call it "complex but general".

Limit

The study found which MLPs do the comparison. It could not fully explain how the neurons inside those MLPs compute it. Many neurons each contribute a little. This is a common pattern: attention heads are often easy to explain, and MLPs are hard.

Grokking and modular addition: a network that adds with a clock

2023
Neel Nanda, Lawrence Chan, Tom Lieberum, Jess Smith, Jacob Steinhardt · ICLR 2023
Fully reverse engineers a small transformer that does modular addition, and uses that understanding to explain grokking.

Grokking

In 2022, Power and colleagues found a strange training effect. They called it grokking. A small network learns a math task. First it memorizes the training examples: training accuracy is 100%, but test accuracy is poor. Then, after many more steps with no visible change, test accuracy suddenly jumps to near 100%. The network has suddenly generalized.

Why does this happen? Nanda and colleagues answered this question by fully reverse engineering one such network.

The task

The model is a one-layer transformer. The task is modular addition: given a and b, output (a + b) mod p, with p = 113. "mod p" means "wrap around after p", like hours on a clock: on a 12-hour clock, 9 + 5 = 2. The model trained on 30% of all possible (a, b) pairs, with weight decay. Weight decay is a training penalty that keeps weights small.

The algorithm: addition as rotation

The trained network uses an algorithm that nobody programmed. It is based on circles.

  1. Embed on a circle. The embedding turns each number a into a point on a circle: (cos(w·a), sin(w·a)), with w = 2πk/p for some whole number k. The network does this for a few key frequencies k, about five of them.
  2. Rotate. The attention and MLP layers combine the points for a and b. They use the trigonometry identities
    cos(w(a+b)) = cos(wa)·cos(wb) − sin(wa)·sin(wb)
    sin(w(a+b)) = sin(wa)·cos(wb) + cos(wa)·sin(wb)
    In circle terms: start at angle w·a, then rotate by angle w·b. You land at angle w·(a+b).
  3. Read out. For each possible answer c, the unembedding computes cos(w(a+b−c)). This is largest (equal to 1) exactly when c = (a+b) mod p. Summing over the key frequencies makes the right answer stand out even more.
Interactive · Modular addition on a clock
Pick a and b. The left circle places each number n at angle 2πk·n/p. Blue is a, purple is b, orange is the sum of the two angles. The right side shows the logit for each possible answer c: the sum of cos(2πk(a+b−c)/p) over the chosen frequencies.

Try it. With one frequency, the right answer has the top logit, but its neighbours are almost as high. With five frequencies, the waves add up only at the right answer. Everywhere else they partly cancel. This is why the network uses several frequencies: it makes the answer sharp.

Three phases of training

Once they knew the algorithm, the authors could measure it during training. They defined progress measures: numbers that track the hidden circuit, not only the loss. For example, the restricted loss keeps only the key-frequency parts of the model. The excluded loss removes them. With these tools, they saw three phases.

1 · Memorization 2 · Circuit formation 3 · Cleanup training steps → loss train loss test loss clock circuit grows quietly
Figure 6.4. The three phases (schematic). Test accuracy jumps late, but the clock circuit was growing all through phase 2. The "sudden" grokking moment is the cleanup of the memorized solution.
  1. Memorization. The network memorizes the training pairs. Train loss falls. Test loss stays high.
  2. Circuit formation. The clock algorithm slowly forms. Train accuracy is already 100%, so the train loss shows nothing new. Test loss still stays high, because the memorized parts still dominate the output.
  3. Cleanup. Weight decay removes the memorization parts, because they cost large weights. Now only the clean circuit remains. Test loss drops suddenly. This is the visible "grokking" moment.
Key idea

Grokking looks sudden from outside, but inside it is gradual. Understanding the mechanism let the authors build measures that showed the progress long before the loss did. This is an example of mech interp predicting training dynamics, not only explaining a finished model.

The Clock and the Pizza: not always the same algorithm

2023
Ziqian Zhong, Ziming Liu, Max Tegmark, Jacob Andreas · NeurIPS 2023
Networks trained on the same modular addition task can learn different algorithms.

Do all networks learn the clock? This follow-up said no. Small changes in hyperparameters and initialization gave different algorithms. The authors found a second algorithm and called it the pizza.

Clock a +b a+b rotate by a, then rotate by b (multiply) Pizza a b midpoint average the two points (add vectors)
Figure 6.5. Two algorithms for the same task. The clock multiplies (rotates) angles. The pizza averages the two points; the direction of the midpoint encodes (a+b)/2, and its length depends on a−b. The output space looks like slices of a pizza.

In the pizza algorithm, the network adds the two circle points as vectors and looks at their midpoint. The direction of the midpoint gives information about a + b. A nonlinearity is then needed to read the answer. Some networks even ran several algorithms in parallel. Networks with less flexible attention tended toward the pizza.

Lesson and limit

"Even simple learning problems admit a surprising diversity of solutions." This is a warning against assuming that every model learns the same thing. Also, modular addition is a toy task with perfect structure. Real language tasks are much messier.

Othello-GPT: a world model from move lists

2022
Kenneth Li, Aspen K. Hopkins, David Bau, Fernanda Viégas, Hanspeter Pfister, Martin Wattenberg · ICLR 2023
A GPT trained only on lists of Othello moves builds an internal picture of the board.

Do language models only learn surface statistics, or do they build a model of the world behind the text? This is a big debate. Othello-GPT gave a clean test case.

The setup

Othello is a board game on an 8×8 grid. Two players place black and white pieces. When you place a piece, you flip the opponent's pieces that lie in a line between your new piece and one of your old pieces.

The researchers trained a GPT model (8 layers, 512 dimensions, 8 heads) on millions of game transcripts. Each transcript is just a list of moves, like "D3, C5, F6, …". The model's only job was to predict a legal next move. It never saw the board. It never got the rules.

What they found

The follow-up: "mine" versus "theirs"

2023
Neel Nanda, Andrew Lee, Martin Wattenberg · BlackboxNLP 2023 (first as the blog post "Actually, Othello-GPT Has A Linear Emergent World Representation")
The board is linear after all, in the right basis: mine versus theirs.

Why did linear probes fail? Neel Nanda had a guess. The model plays both sides, and the players take turns. So maybe the model does not care about "black" and "white". Maybe it cares about "my pieces" and "their pieces", relative to the player who moves next.

He was right. A linear probe for "mine / theirs / empty" reads the board with very high accuracy. A linear probe for black/white fails because the meaning of each direction flips every move. Try it below.

Interactive · Two ways to colour the same board
This is a real Othello game played with random legal moves. Switch the view, then press "Next move" several times. Small dots show legal moves for the player to move.

Bars: the black/white values are the linear and nonlinear probe error rates reported by Li et al. Nanda's mine/theirs linear probe is drawn as "very high accuracy" (schematic).

D3 C5 F6 F5 E6 … layer 1 … middle layer … next legal move linear probe one direction per square orange = mine · blue = theirs · empty = grey
Figure 6.6. Reading the board. A linear probe on a middle layer outputs, for each square, "mine", "theirs" or "empty". The board is never in the input; the model built it.

The follow-up also found features for "was this square just flipped?". Simple vector arithmetic along the mine/theirs directions (add or subtract the probe direction for a square) changed the model's predicted moves, as expected. Several edits at once worked less well. So the representation is linear and causal.

Key idea

Othello-GPT supports the linear representation hypothesis. A concept can look nonlinear only because we chose the wrong frame. In the model's own frame (mine vs. theirs), it is a simple direction. Probing results depend on the questions we ask.

Limit

Othello is a small, synthetic world with exact rules. It shows that world models can emerge from next-token prediction. It does not show how rich the world models in large language models are.

Why did a linear "black vs. white" probe fail on Othello-GPT, while a linear "mine vs. theirs" probe worked?
The model plays both sides. For it, "my piece" is a stable concept and "black piece" is not: who is "me" alternates every move. In the mine/theirs basis, the board is linear. Interventions along these directions also changed the model's moves.

Factual recall: where do facts live?

A language model knows many facts: "The Eiffel Tower is in Paris", "Michael Jordan plays basketball". Where in the network are these facts stored, and how are they retrieved? Several studies attacked this question. Together they tell a story with a twist.

Step 0: MLPs as key-value memories

2021
Mor Geva, Roei Schuster, Jonathan Berant, Omer Levy · EMNLP 2021
Each MLP neuron acts as a key (a pattern detector) linked to a value (a push on output words).

An MLP layer has two weight matrices. Geva and colleagues read them as a memory:

Keys in lower layers detect shallow patterns. Keys in upper layers detect topics and meaning. The layer output is a mix of many memories. Later layers refine the result.

Step 1: causal tracing and ROME

2022
Kevin Meng, David Bau, Alex Andonian, Yonatan Belinkov · NeurIPS 2022
Introduces causal tracing to locate facts in mid-layer MLPs, and ROME to edit them with a rank-one weight change.

Meng and colleagues used a prompt like "The Space Needle is in downtown" (answer: Seattle). Then they used causal tracing, the noise-based form of activation patching from Chapter 5. In short: add noise to the subject tokens ("The Space Needle") so that the model no longer says Seattle, then restore one clean hidden state at a time and check how much of "Seattle" comes back.

Figure 6.7. Schematic of a causal tracing result in GPT-2 XL (shape only). Each cell is "restore this token's state at this layer". Two hot spots appear: middle-layer MLPs at the last subject token ("Needle"), and late layers at the final token.

Two places mattered most in GPT-2 XL. First: the MLPs in the middle layers, at the last token of the subject. Second: late layers at the final token, where attention moves the answer to the output.

The authors then built ROME (Rank-One Model Editing). They treated the middle MLP as a key-value store, as Geva suggested. They made a small "rank-one" change to its weights so that the key "Space Needle" maps to a new value, for example "Paris". After the edit, the model said "The Space Needle is in Paris" in many different phrasings. They tested edits on a dataset called CounterFact. A follow-up, MEMIT, edits thousands of facts at once.

Step 2: three stages of recall

2023
Mor Geva, Jasmijn Bastings, Katja Filippova, Amir Globerson · EMNLP 2023
Recall happens in three stages: enrich the subject, move the relation, extract the attribute.

Geva and colleagues blocked attention edges ("attention knockout") and projected states onto the vocabulary. They found three stages:

  1. Subject enrichment. Early and middle MLPs add many attributes of the subject to the last subject token. After this step, the "Needle" position carries "Seattle", "tower", "Washington", and more.
  2. Relation propagation. Information about the relation ("is in the city of") flows to the final position.
  3. Attribute extraction. At the final position, attention heads look back at the enriched subject token and pull out the attribute that fits the relation.
MichaelJordanplaysthesportof ① attention joins "Michael"+"Jordan" MLP MLP MLP ② enriched "Jordan" basketball · Bulls Chicago · athlete … lookup in early-mid MLPs attention head ③ extract the attribute that fits "sport" basketball
Figure 6.8. The three-stage story of factual recall. ① Early attention combines the tokens of a multi-token name. ② MLPs at the last subject token look up and add attributes. ③ An attention head at the final position reads out the attribute that matches the question.

Step 3: the twist — inside the lookup table

2023
Neel Nanda, Senthooran Rajamanoharan, János Kramár, Rohin Shah (Google DeepMind) · Alignment Forum, 5 posts
An honest negative result: the MLP "lookup" of facts did not break down into a simple, readable mechanism.

The DeepMind team asked Pythia 2.8B which sport about 1,500 athletes play, for example "Michael Jordan plays the sport of" → basketball. They confirmed the three-stage shape: attention layers 0–1 join the name tokens, MLPs 2 to 6 look up the fact on the last name token, and later attention heads extract it. The sport ends up as a linear direction in the residual stream.

Then they tried to explain how MLPs 2–6 do the lookup, neuron by neuron. They failed. The MLPs did not use a sparse, readable mechanism. The team's best description: the early MLPs "hash" the name tokens into a vector that is almost orthogonal to other names, and later neurons look up these hashed vectors. It acts like a big hash table: "this exact token combination → basketball". A lookup table has no short description. There may be no simple story to find.

A useful attitude

The team suggested a change of focus. Some computations, like memorized facts, may have no short explanation. So it may be better to study how later circuits use the fact representation, and to treat the lookup itself as a black box.

A critique: where you edit is not where it is stored

2023
Peter Hase, Mohit Bansal, Been Kim, Asma Ghandeharioun · NeurIPS 2023
Causal tracing does not predict which layer is best for editing a fact.

ROME used causal tracing to choose the layer to edit. Hase and colleagues tested if that choice matters. It does not. You can edit a fact successfully in layers that causal tracing does not highlight. Which layer you edit predicts success much better than what causal tracing says about that layer.

Lesson

"An edit works here" does not mean "the knowledge is stored here". Successful editing is not proof of understanding. This critique applies to many interventions: changing a model's behaviour is easier than explaining it.

Hase et al. (2023) showed that you can edit a fact well in layers that causal tracing does not highlight. What is the main lesson?
ROME edits do work, and causal tracing does measure something real. But "where an edit works" and "where the model computes the fact" are different questions. Many locations can be used to change the output.

Reusable mechanisms: successor heads, function vectors, binding IDs

The studies above each explain one task. A second wave of work in 2023 found mechanisms that the model reuses across many tasks. These look more like the "subroutines" of a program.

2023
Rhys Gould, Euan Ong, George Ogden, Arthur Conmy · ICLR 2024
Heads that move to the next item in an ordered list: Monday → Tuesday, 1 → 2, January → February.

A successor head takes an item in an ordered sequence and predicts the next one. "Monday" → "Tuesday". "3" → "4". "March" → "April". "first" → "second".

The authors found such heads in many models: GPT-2, Pythia and Llama-2, from 31 million to 12 billion parameters. This is strong evidence for universality.

How do they work? The model has shared "mod-10" features. These features encode the position of a token in its sequence, modulo 10. So "3", "March" and "third" share some features: they are all "item number 3". The successor head maps "item n" features to "item n+1" outputs. The authors could edit the head's behaviour with vector arithmetic on the mod-10 features.

2023
Eric Todd, Millicent L. Li, Arnab Sen Sharma, Aaron Mueller, Byron C. Wallace, David Bau · ICLR 2024
A few attention heads carry a compact vector that means "the task in these examples".

Give a model a few examples: "hot → cold, big → small, fast → ". It answers "slow". It learned the task "antonym" from the context. Where is that task stored?

Todd and colleagues found that a small number of attention heads in middle layers carry it. The sum of their outputs is a function vector (FV). Then they did a striking test. They took a new prompt with no examples, just "fast →", and added the antonym FV to the residual stream. The model answered "slow". The vector alone carries the task. FVs can also be added together to combine tasks.

2023
Jiahai Feng, Jacob Steinhardt · ICLR 2024
Models tag each entity and its attribute with a matching "binding ID" vector.

"Alice lives in Paris. Bob lives in Tokyo. Where does Bob live?" To answer, the model must keep each person paired with the right city. This is the binding problem.

Feng and Steinhardt found that models attach a binding ID vector to each entity and to its attribute. It works like a matching colour tag. Alice and Paris get one tag. Bob and Tokyo get another. To answer, the model finds the city whose tag matches Bob's tag. If you swap the binding vectors, the model swaps its answers. They found this in every large enough model of the Pythia and LLaMA families.

Alice Paris Bob Tokyo "Where does Bob live?" Tokyo match the blue tag

These three results share a theme. The model builds abstract, reusable representations: "item number n", "the task is antonyms", "tag number 2". Then it reuses them in many contexts. This is good news for interpretability. If models reuse parts, we can learn a part once and recognize it in many places.

Arithmetic without algorithms: a bag of heuristics

2024
Yaniv Nikankin, Anja Reusch, Aaron Mueller, Yonatan Belinkov · ICLR 2025
LLMs do arithmetic with many small rules of thumb in MLP neurons, not with one clean algorithm.

The modular addition network used a clean algorithm. Do large language models do arithmetic the same way? Nikankin and colleagues studied models such as Llama3-8B on problems like "226 − 68 =". The answer was no.

The models did not use a single clean algorithm. They also did not simply memorize answers. Instead, a sparse set of MLP neurons each implemented a simple heuristic, a rule of thumb. Examples of such rules:

Each rule is weak alone. But many rules vote together, and the votes add up to the correct answer. The authors call this a bag of heuristics. The mechanism appeared early in training and was the main source of accuracy.

226 − 68 = ? operand in 200–300 result in 150–170 result ends in 8 result is even … many more each rule votes 148 156 158 168 198 votes add up: only 158 fits every rule
Figure 6.9. The bag-of-heuristics idea (illustrative rules). No single neuron computes 226 − 68. Many weak rules each narrow the answer, and their votes combine.

Anthropic later saw a similar picture in Claude 3.5 Haiku with attribution graphs (diagrams of which internal features cause which): one path estimates the rough size of the sum, and another path gets the last digit exactly (Chapter 9). Models seem to prefer many parallel, approximate paths over one exact procedure.

Does circuit analysis scale? A 70B model

2023
Tom Lieberum, Matthew Rahtz, János Kramár, Neel Nanda, Geoffrey Irving, Rohin Shah, Vladimir Mikulik (Google DeepMind)
The standard circuit tools work on a 70-billion-parameter model, but the explanation is only partial.

All the studies so far used small models. GPT-2 small has 124 million parameters. Does the method still work on a model 500 times larger? The DeepMind team tested this on Chinchilla 70B.

The task: a multiple-choice question with options labelled A, B, C, D. The model knows the right answer text. It must output the right letter.

Lesson

Circuit tools work at scale. Full understanding does not come with them. The team located the key heads quickly, but explaining exactly what those heads compute stayed partial. This gap — easy to locate, hard to explain — appears again and again.

Universality: do different models learn the same circuits?

The third claim of "Zoom In" (Chapter 1) was universality: similar features and circuits form in different models. If true, research on one model transfers to others. What does the evidence say?

Evidence for
  • Induction heads appear in almost every transformer.
  • Successor heads appear in GPT-2, Pythia and Llama-2, from 31M to 12B parameters.
  • Binding IDs appear in all large enough Pythia and LLaMA models.
  • Curve detectors and similar features appear in many vision models (Chapter 2).
Evidence against
  • Clock vs. pizza: the same task gives different algorithms.
  • Chughtai, Chan and Nanda (2023): networks learn group operations with group representations, but which representation depends on the random seed. They called this "weak universality".
  • Only 1–5% of GPT-2 neurons are universal across seeds (below).
2024
Wes Gurnee, Theo Horsley, Zifan Carl Guo, Tara Rezaei Kheirkhah, Qinyi Sun, Will Hathaway, Neel Nanda, Dimitris Bertsimas
Compares neurons across five GPT-2 models that differ only in their random seed.

Gurnee and colleagues trained five GPT-2 models that were identical except for the random seed. They ran 100 million tokens through all five and compared every neuron's activations. A neuron is "universal" if a neuron in every other model fires on the same inputs.

Figure 6.10. Universal neurons (schematic). Five models differ only in their seed. Most neurons have no clear partner in the other models (grey). A small fraction — about 1 to 5% — match across all five (coloured lines).

Only 1–5% of neurons were universal. But those neurons were special. They were usually interpretable, and they fell into families: neurons for single tokens, for letters of the alphabet, for position, for syntax and for meaning. Some had clear jobs:

How to read this

Low neuron universality does not prove that features are not universal. Because of superposition, the same feature can be spread across different neurons in different models. Later work compared features from sparse autoencoders instead of neurons (Chapter 8). Still, the safe summary is: universality is partial.

In the IOI study, removing the main name mover heads did not destroy performance. Why?
Backup heads do little in a normal run but start to copy names when the main name movers are gone. Copy suppression in head 10.7 also eases off. This self-repair is why "ablate and see nothing change" does not prove a part is unimportant.

What the case studies teach us

The case studies from 2022 to 2024 changed how people think about neural networks. Here are the main lessons.

1 · Circuits are real

Before these studies, many people thought that large networks were hopeless to read. The case studies showed real, testable algorithms: name copying, clock arithmetic, board tracking, copy suppression. Each claim names specific components, and each claim survived causal tests. Neural networks are not random soup.

2 · But circuits are messy

The clean stories have rough edges. IOI was 87% faithful and not fully complete. Greater-than explained 89.5%. The MLPs in fact recall looked like lookup tables. LLM arithmetic was a bag of heuristics, not one algorithm. Models seem to like many parallel, partly redundant paths.

3 · Ablation can mislead

Backup heads and self-repair mean that switching off one part often changes little. The model compensates. So a small effect after ablation does not prove a part is unimportant. Researchers now prefer careful patching, and they compare several kinds of ablation (Chapter 5).

4 · Universality is partial

Some mechanisms, like induction heads and successor heads, appear everywhere. Others depend on the seed and the settings. We cannot assume that a circuit from one model exists in another. We must check.

5 · Manual work does not scale

Each study took a team weeks or months, for one narrow behaviour, usually in a small model. A frontier model does thousands of behaviours. This scale problem drove the next phase of the field:

StudyModelMain methodHeadline result
IOI (2022)GPT-2 smallPath patching, mean ablation26 heads in 7 classes; 87% faithful
Copy suppression (2023)GPT-2 smallWeight analysis, ablationHead 10.7 suppresses copies; 76.9% explained
Greater-than (2023)GPT-2 smallPath patching, logit lensHeads in layers 5–9 + MLPs 8–11; 89.5% recovered
Grokking (2023)1-layer transformerFourier analysis of weightsAddition by rotation; 3 training phases
Clock & Pizza (2023)Small transformersWeight and output analysisDifferent algorithms for one task
Othello-GPT (2022–23)8-layer GPTProbes, interventionsWorld model, linear in mine/theirs basis
ROME (2022)GPT-2 XLCausal tracing, weight editingMid-layer MLPs at last subject token
Fact Finding (2023)Pythia 2.8BPatching, neuron analysisMLPs 2–6 act like a lookup table
Successor heads (2023)GPT-2, Pythia, Llama-2Head analysis, vector arithmeticMod-10 features; universal 31M–12B
Function vectors (2023)Several LLMsCausal mediationA few heads carry the task as one vector
Binding IDs (2023)Pythia, LLaMAActivation swapsMatching tags bind entity to attribute
Chinchilla MC (2023)Chinchilla 70BLogit attribution, patchingCorrect-letter heads; partial explanation
Arithmetic (2024)Llama3-8B and othersNeuron analysisBag of heuristics
Universal neurons (2024)5 × GPT-2Activation correlation1–5% of neurons universal
In the grokking study, test accuracy jumps late in training. What did the mechanistic analysis show was happening before the jump?
Progress measures such as the restricted and excluded loss showed the Fourier circuit growing during the "flat" phase. The visible jump in test accuracy is the cleanup phase, when memorization parts are removed.
Key takeaways
  • Circuits are real. IOI, greater-than, modular addition and copy suppression are testable algorithms with named parts.
  • But circuits are messy. Explanations are partial (IOI is 87% faithful), and MLPs often act like lookup tables.
  • Ablation can mislead, because backup heads and self-repair hide the importance of a part.
  • Models build world models (Othello-GPT) and reusable parts (successor heads, function vectors, binding IDs). Universality is only partial.
  • Manual circuit work does not scale. This drove automation (Chapter 5) and better units than neurons (Chapter 8 and Chapter 9).

Where this leads: Chapter 7 looks at a simpler unit than a circuit: one direction that you can read with a probe or write with a steering vector.

References

  1. Wang, Variengien, Conmy, Shlegeris, Steinhardt (2022). Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small. ICLR 2023.
  2. McDougall, Conmy, Rushing, McGrath, Nanda (2023). Copy Suppression: Comprehensively Understanding an Attention Head. BlackboxNLP 2024 (published as "Copy Suppression: Comprehensively Understanding a Motif in Language Model Attention Heads").
  3. Hanna, Liu, Variengien (2023). How does GPT-2 compute greater-than? NeurIPS 2023.
  4. Power, Burda, Edwards, Babuschkin, Misra (2022). Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets.
  5. Nanda, Chan, Lieberum, Smith, Steinhardt (2023). Progress measures for grokking via mechanistic interpretability. ICLR 2023.
  6. Zhong, Liu, Tegmark, Andreas (2023). The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networks. NeurIPS 2023.
  7. Chughtai, Chan, Nanda (2023). A Toy Model of Universality: Reverse Engineering How Networks Learn Group Operations.
  8. Li, Hopkins, Bau, Viégas, Pfister, Wattenberg (2022). Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Task. ICLR 2023.
  9. Nanda, Lee, Wattenberg (2023). Emergent Linear Representations in World Models of Self-Supervised Sequence Models. BlackboxNLP 2023.
  10. Geva, Schuster, Berant, Levy (2021). Transformer Feed-Forward Layers Are Key-Value Memories. EMNLP 2021.
  11. Meng, Bau, Andonian, Belinkov (2022). Locating and Editing Factual Associations in GPT. NeurIPS 2022. Site: rome.baulab.info.
  12. Geva, Bastings, Filippova, Globerson (2023). Dissecting Recall of Factual Associations in Auto-Regressive Language Models. EMNLP 2023.
  13. Nanda, Rajamanoharan, Kramár, Shah (2023). Fact Finding: Attempting to Reverse-Engineer Factual Recall on the Neuron Level. Alignment Forum.
  14. Hase, Bansal, Kim, Ghandeharioun (2023). Does Localization Inform Editing? NeurIPS 2023.
  15. Gould, Ong, Ogden, Conmy (2023). Successor Heads: Recurring, Interpretable Attention Heads In The Wild. ICLR 2024.
  16. Todd, Li, Sen Sharma, Mueller, Wallace, Bau (2023). Function Vectors in Large Language Models. ICLR 2024.
  17. Feng, Steinhardt (2023). How do Language Models Bind Entities in Context? ICLR 2024.
  18. Nikankin, Reusch, Mueller, Belinkov (2024). Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristics. ICLR 2025.
  19. Lieberum, Rahtz, Kramár, Nanda, Irving, Shah, Mikulik (2023). Does Circuit Analysis Interpretability Scale? Evidence from Multiple Choice Capabilities in Chinchilla.
  20. Gurnee, Horsley, Guo, Kheirkhah, Sun, Hathaway, Nanda, Bertsimas (2024). Universal Neurons in GPT2 Language Models.
  21. Miller, Chughtai, Saunders (2024). Transformer Circuit Faithfulness Metrics are not Robust. COLM 2024.