Redwood Research and UC Berkeley researchers traced how GPT-2 small completes sentences like “When Mary and John went to the store, John gave a drink to” with “Mary” down to 26 attention heads across 7 functional classes, representing just 1.1% of all (head, token position) pairs in the 12-layer model. Rather than stopping at attention heatmaps, Kevin Wang, Alexandre Variengien, Arthur Conmy, Buck Shlegeris, and Jacob Steinhardt introduced path patching to separate direct from mediated causal routes, and formalized faithfulness, completeness, and minimality as falsifiable checks on circuit claims.
This paper became the field’s canonical “model organism” for language-model circuit analysis. It proved that end-to-end reverse engineering works on natural English grammar in a pretrained transformer, while exposing three surprises that reshaped path patching and automated circuit discovery: pointer-based induction heads, self-hedging negative heads, and silent backup heads that step in only when primary heads are knocked out.
- Full-model baseline: Across 100,000 prompts from 15 templates (
p_IOI), GPT-2 small averages a logit difference of 3.56, ranking the indirect object (IO) above the subject (S) 99.3% of the time with 49% meanIOprobability. - 26 heads, 87% faithful: Isolating the 26-head circuit by mean-ablating every other
(head, position)pair on template-matched three-name prompts (p_ABC) stays within 0.46 of the full model’s 3.56 logit difference. - Pointers plus inhibition: Duplicate Token Heads and Induction Heads detect
S2 = S1and send a relative position signal (2.31 S_pos + 0.99 S_tok) through S-Inhibition Heads to suppress Name Mover attention toS1. - Hidden redundancy and hedging: Knocking out all three Name Mover Heads reduces logit difference by only 5% because eight Backup Name Mover Heads compensate, while two Negative Name Mover Heads deliberately write against the answer.
Working backward from logits with path patching
GPT-2 small has 12 layers and 12 heads per layer (144 heads total). To isolate the subgraph solving Indirect Object Identification (“When Mary and John went to the store, John gave a bottle of milk to”), the authors had to solve two methodological problems that break naive ablation studies. First, zero ablation (setting a head’s output to zero) injects an arbitrary out-of-distribution vector that breaks downstream layers relying on mean activations as implicit biases. Second, mean ablation on the p_IOI distribution itself fails to erase task-constant information such as “one name in this sentence is duplicated.” Their fix was template-matched mean ablation on p_ABC, an otherwise identical distribution using three unrelated random names A, B, and C so no unique indirect object exists while grammar aligns token-for-token.
Even with clean counterfactuals, standard activation patching mixes direct and indirect pathways. To isolate direct routes h -> R (paths passing only through residual connections and MLPs, never through other attention heads), the authors introduced path patching: run forward passes on x_orig (p_IOI) and x_new (p_ABC), freeze all attention heads at x_orig except sender h patched to x_new, recompute MLPs and receiver nodes R to capture h’s direct effect on R, and then run a final forward pass on x_orig with R patched to those saved activations.
Tracing backward from the logits at the END token (“to”) immediately surfaced two opposing groups:
- Name Mover Heads (
9.6, 9.9, 10.0): Patching their direct path to logits sharply drops theIO - Slogit difference. They direct 0.59 average attention toIO, their output projection ontoW_U[IO]correlates strongly with attention (rho > 0.81over 500 samples), and their OV matrices place the attended name inside the top 5 logits on over 95% of samples (versus under 20% for an average head). - Negative Name Mover Heads (
10.7, 11.10): Patching them increases logit difference; they share the same attention targets but carry a 98% negative copy score (versus 12% average), seemingly hedging predictions to avoid catastrophic cross-entropy penalties on mistakes.
Patching into the queries of the Name Mover Heads uncovered four S-Inhibition Heads (7.3, 7.9, 8.6, 8.10) at END, which attend primarily to S2 (0.51 average attention). Counterfactual experiments flipping token identity and S1 position across six datasets showed their signal decomposes linearly as 2.31 S_pos + 0.99 S_tok (with 7% mean error): relative position between S1 and S2 drives more than twice the effect of the name token itself, and lengthening sentence prefixes while keeping S1-S2 distance fixed leaves logit difference untouched (3.56 before vs 3.57 after).
Tracing into S-Inhibition values and keys at S2 exposed how GPT-2 small repurposes known mechanisms. Alongside Duplicate Token Heads (0.1, 3.0, fuzzy 0.10) that attend directly from S2 to S1, the circuit uses Induction Heads (5.5, 6.9, fuzzy 5.8, 5.9) paired with Previous Token Heads (2.2, 4.11) attending from S2 to S1+1. Instead of copying S1+1 to predict the next token as documented in Olsson et al.’s induction study, these induction heads act as pointers: patching altered position signals drops logit difference by at least 88% of S-Inhibition’s drop, while swapping name identity at fixed positions changes it by under 8%.
Redundancy, backup heads, and the three validation tests
Knocking out all three primary Name Mover Heads at once produced the paper’s biggest surprise: logit difference fell by only 5%. Rerunning h -> Logits path patching after that knockout revealed eight Backup Name Mover Heads (9.0, 9.7, 10.1, 10.2, 10.6, 10.10, 11.2, 11.9) stepping in to move names to the output, while Negative head 10.7 flipped sign to contribute positively. Before knockout, those eight backup heads behave diversely (four resemble Name Movers, two attend equally to IO and S, 11.2 prefers S1, and 9.7 writes negatively from S2), suggesting training-time dropout built fault-tolerant redundancy.
That shock proved that faithfulness alone cannot validate an explanation. Indeed, a naive 11-head baseline omitting Backups and Negatives stays within 0.1 of the full model’s logit difference, even closer than the full 26-head circuit’s 0.46 gap (87% of 3.56). To catch missing or redundant machinery, the authors formulated three quantitative criteria:
The circuit also yielded a concrete adversarial prediction. Because GPT-2 small identifies S via duplicate detection rather than deep syntactic parsing, duplicating IO in an unrelated middle sentence (“John and Mary went to the store. Mary had a good day. John gave a bottle of milk to”) confuses the suppression mechanism. Across those double-IO prompts, mean logit difference plunges from 3.55 to 1.23 (IO probability drops from 0.49 to 0.36), and GPT-2 small predicts the wrong name S 23.4% of the time (up from 0.7%). In the control where S appears three times instead, logit difference actually rises to 3.64 and errors fall to 0.4%.
Inspect all seven head groups in the IOI circuit
Browse the functional roles below to see how each head class contributes, why naive ablations misread it, and what checks confirmed its behavior inside and outside p_IOI.
Select a component group (or use Left and Right arrow keys) to compare head IDs, mechanism, quantitative checks, and surprises.
Name Mover Heads (9.6, 9.9, 10.0)
Output (3 heads)Active at END, they attend selectively to the uninhibited IO token (0.59 avg attention) and copy its embedding directly into logits.
- Mechanism
- OV matrices copy any attended name into the top 5 logits over 95% of the time; dot product with W_U[IO] correlates at rho > 0.81 with attention.
- Why naive knockouts mislead
- Ablating all three drops logit difference by only 5% because eight Backup Name Movers compensate silently.
- Outside p_IOI
- On repeated random 100-token sequences, Name Movers also project strongly onto next-token embeddings, confirming general contextual copying.
- Query control
- Without S-Inhibition signals writing to their queries, Name Movers shift attention onto S1 instead of IO.
Negative Name Mover Heads (10.7, 11.10)
Hedging (2 heads)They attend to IO just like Name Movers, but their OV matrices write in the opposite direction of the attended name.
- Measured evidence
- Show a 98% negative copy score (vs 12% average head); path patching them to logits raises logit difference.
- Why naive circuits omit them
- A 11-head naive circuit without Negatives or Backups looks more faithful (0.1 gap vs 0.46), yet fails completeness tests when heads are ablated.
- Compensation quirk
- When primary Name Movers are knocked out, head 10.7 actually flips from negative to positive contribution on logit difference.
- Hypothesized purpose
- Authors speculate negative heads hedge output confidence to limit steep cross-entropy penalties when the model is wrong.
S-Inhibition Heads (7.3, 7.9, 8.6, 8.10)
Routing (4 heads)Active at END, they attend to S2 (0.51 avg attention) and write a suppression signal into Name Mover queries so S1 is ignored.
- Signal decomposition
- Six counterfactual datasets yield logit_diff = 2.31 S_pos + 0.99 S_tok (7% mean error): S1's relative position outweighs S's token identity.
- Adversarial leak
- On sentences with an extra IO mention, S-Inhibition heads attend to both S2 and the second IO, flipping S over IO 23.4% of the time.
- Relative vs absolute
- Lengthening sentence prefixes while keeping S1-to-S2 distance constant preserves logit difference (3.56 vs 3.57), pointing to relative offsets.
- Value vs key inputs
- Driven primarily by value composition at S2 from Duplicate Token and Induction Heads, amplified via S-Inhibition keys.
Duplicate (0.1, 3.0, 0.10), Induction (5.5, 6.9, 5.8, 5.9), Prev (2.2, 4.11)
Detection (9 heads)Active at S2, these heads match S2 back to S1 or S1+1 and transmit S1's position into S-Inhibition values and keys.
- Unexpected pointer role
- Induction heads 5.5 and 6.9 do not predict S1+1 here; they pass S1's location (over 88% position drop vs under 8% token drop when patched).
- Missing parameter check
- Authors flagged QK collision math, OV positional copying, and parameter-level induction checks as omitted due to time limits.
- Fuzzy helpers
- Fuzzy Duplicate head 0.10 (active on duplicated names in OWT) and fuzzy Induction heads 5.8, 5.9 boost S-Inhibition keys.
- External validation
- Heads 2.2/4.11, 0.1/3.0, and 5.5/6.9 rank among GPT-2 small's top previous-token, duplicate-token, and induction heads on random tokens.
Backup Name Mover Heads (9.0, 9.7, 10.1, 10.2, 10.6, 10.10, 11.2, 11.9)
Redundancy (8 heads)Dormant or mixed during normal passes, these eight late-layer heads step in above 2% effect size when primary Name Movers are knocked out.
- Why dropout matters
- Authors hypothesize training-time dropout pressured GPT-2 small to build redundant pathways resilient to dropped heads.
- Interpretability trap
- Redundant OR-like circuits pass single-head or single-class faithfulness tests while hiding parallel heads from naive pruning.
- Diverse baseline behavior
- Four mimic Name Movers, two (10.2, 11.9) copy IO and S equally, 11.2 prefers S1, and 9.7 attends negatively to S2 before knockout.
- Greedy incompleteness
- Even with all 8 backups included, greedy search finds mixed-class subsets K with incompleteness scores up to 3.09.
Source: Wang et al. (2022), Sections 3 and 4, Appendices A through J.
For readers skipping the interactive tabs, the 26-head circuit splits into five key functional takeaways:
- Name Movers (
9.6, 9.9, 10.0): ReadIOatENDwith 0.59 average attention and over 95% name-copying accuracy. - Negative Name Movers (
10.7, 11.10): Counter-intuitively subtract from the attended name’s logit (98% negative copy score), likely to hedge cross-entropy risk. - S-Inhibition Heads (
7.3, 7.9, 8.6, 8.10): ReadS2and emit a position-heavy offset (2.31 S_pos + 0.99 S_tok) into Name Mover queries to blockS1. - Duplicate, Induction, and Previous Token Heads (
0.1, 3.0, 0.10;5.5, 6.9, 5.8, 5.9;2.2, 4.11): Detect repetition atS2and passS1’s position as a pointer rather than predictingS1+1. - Backup Name Movers (8 heads): Compensate when primary Name Movers fail (keeping logit drop to 5%), illustrating why completeness tests matter as much as faithfulness.
Caveats, unmapped MLPs, and what came next
Three sharp limitations bound what this paper establishes. First, MLPs are left out of the 26-head graph, yet MLP0 is essential. Knocking out MLP0 alone reverses the sign of the logit difference (a -115% variation), and knocking out all MLPs after layer 0 drops logit difference to -1.1. The 26 attention heads clearly rely on MLP0 (and collectively later MLPs) to format token representations, even though no individual later MLP breaks the task on its own.
Second, the circuit fails the hardest completeness test. Random subset knockouts and whole-class knockouts look clean, yet greedy search over mixed-class subsets K uncovers discrepancies up to 3.09 logit difference (87% of the baseline) between C \ K and M \ K. In addition, the authors flag missing parameter-level weight checks on Duplicate Token and Induction Heads, as well as the unexplained mechanism behind S-Inhibition attention patterns and Backup Name Mover compensation.
Third, the findings target one 124M-parameter model on 15 synthetic templates. Preliminary checks on GPT-2 medium already revealed sparse logit-affecting heads that did not exclusively attend to IO and S, showing that circuits grow less tidy with scale. Even within GPT-2 small, natural prompts with repeated IO names trigger S-Inhibition attention patterns absent from p_IOI.
Still, this paper turned mechanistic interpretability into a testable discipline. Its path-patching algorithm and completeness metrics directly motivated ACDC automated circuit discovery and causal scrubbing. For builders evaluating interpretability claims today, the practical takeaway is clear: never trust a clean subgraph on clean prompts alone; test whether it breaks under adversarial predictions, survives mixed-node knockouts, and accounts for backup pathways.


