Causal tools: ablation and patching
Looking at activations shows what is correlated with a behaviour. To find what causes it, you must reach into the model, change one thing, and watch the output. This chapter explains how.
In short
- Every causal method does three things: pick a part of the model, replace its value, and measure the change in the output.
- Ablation removes a part. The result depends a lot on what value you put in its place: zero, the mean, or a value from another input.
- Activation patching copies an activation from a "clean" run into a "corrupted" run. It shows where the information that decides the answer lives. You can try it below on real numbers from GPT-2 small.
- Path patching, causal scrubbing and ACDC test connections and whole circuits. Attribution patching makes all of this fast with gradients.
- DAS searches for directions (not neurons) that act like variables in a simple program.
- All of these tools have traps: off-distribution values, self-repair, and "illusions" that you create yourself.
Before you start: Chapter 4: the residual stream and attention heads (heads, logits, direct logit attribution), and Chapter 1: observe, then intervene.
You will learn:
- the three steps of every causal method: pick a part, replace its value, measure the change
- why the type of ablation (zero, mean or resample) changes the answer
- how activation patching works, on real GPT-2 small data
- how path patching, causal scrubbing, ACDC and attribution patching test whole circuits
- the traps: off-distribution values, self-repair and subspace illusions
Why correlation is not enough
Chapter 4 gave us stories about heads and circuits, such as the induction head. How do we test such a story in a real model? This chapter gives the tools, which the field built mostly from 2020 to 2024. First, why looking is not enough. In Chapter 7 we meet probes. A probe reads information from activations. But a probe can find information that the model never uses. A neuron can fire on French text and still have no effect on the output. To show that a part matters, you must change it and see the output move.
This idea is old. Neuroscientists damage a brain region and watch which skill is lost. Doctors run trials where they change one thing and keep the rest fixed. In a neural network, this is much easier. We can change any number we like, and we can run the same input again and again with no noise.
Every method in this chapter follows the same three steps:
- Pick a part. This can be a neuron, an attention head, the residual stream at one token, an edge between two parts, or a direction in activation space.
- Replace its value. Use zero, an average, a value from a different input, or a value with noise added.
- Measure the change. Look at how much the output moves.
The methods differ in three ways: what value they put in, what unit they change (a node, an edge, or a subspace), and how they make it fast (real reruns or gradients).
Correlation: watch. Causation: poke. A mechanistic claim is only as strong as the interventions that test it.
Ablation: turn it off and see what breaks
The simplest intervention is an ablation. You remove the output of one part and measure how much worse the model gets. But there is a hard question. What does "remove" mean? During training, a part never outputs "nothing". It always outputs some number. So you must choose a replacement value. There are four common choices.
| Type | Replacement value | Good | Bad |
|---|---|---|---|
| Zero ablation | All zeros | Very simple | Zero can be a value the model never sees. Then you measure "the model is confused", not "this part mattered". |
| Mean ablation | The average activation of this part over a reference dataset | Keeps the typical value. Less off-distribution. | Removes all input-specific information at once. The result depends on the dataset you average over. |
| Resample ablation | The activation from a different, random input | Always a real value the model can produce | Noisy. You must average over many samples. |
| Optimal ablation (Li & Janson, 2024) | The one constant that makes the loss go up the least | Measures only the information the part carries | Needs an optimization for each part |
The choice really matters. Some parts of GPT-2 small output a large, almost constant vector. This vector acts like a bias. If you set it to zero, the model breaks, even though the part carries no information about the input. Mean ablation shows the truth: the part is not important for the task. The IOI paper (Chapter 6) used mean ablation over an "ABC" dataset of prompts with three different names. The ACDC authors found that zero ablation and resample ablation can give different circuits.
Necessary or sufficient?
Ablation of one part tests whether that part is necessary: does the model still work without it? You can also ablate everything except a proposed circuit. This tests whether the circuit is sufficient: is it enough on its own? A good circuit claim needs both tests. Wang et al. (2022) named three criteria for circuits:
- Faithfulness: the circuit alone does the task about as well as the full model.
- Completeness: the circuit contains all the parts that matter.
- Minimality: the circuit contains no parts that do not matter.
Ablation can underestimate how important a part is. When you remove one part, other parts sometimes change their behaviour to make up for it. This is called self-repair. We return to it in the section on pitfalls.
The root idea: causal mediation analysis
Vig and colleagues gave the field its first clear causal recipe. They used a prompt like "The nurse said that". Then they compared the probability of "she" and "he". They asked: which internal parts carry the effect of the word "nurse"?
Statistics has words for this. A mediator is a variable that sits between a cause and an effect.
- The total effect is how much the he/she ratio changes when you change the input word (for example, "nurse" to "man").
- The indirect effect of one component: keep the original input, but set that component to the value it would have under the changed input. If the output moves a lot, the component carries the effect.
- The direct effect: change the input, but freeze the component at its original value.
They found that the gender effect was sparse. A small number of attention heads in middle layers, plus some neurons, carried most of it. The effect was also synergistic (some parts amplify it, others damp it) and split into a direct part and a part that flows through the mediators.
"Set an internal variable to the value it would take under a different input" is exactly what activation patching does. Mediation analysis is its parent.
Activation patching
Activation patching is the main workhorse of mech interp. Three communities found it at about the same time, so it has three names:
- Interchange intervention — from Atticus Geiger and colleagues at Stanford (2020 onward).
- Causal tracing — from the ROME paper by Meng et al. (2022). It uses noise.
- Activation patching — the name used by Anthropic, Redwood Research and Neel Nanda from 2022.
The three runs
We use the IOI task as the example. IOI means "indirect object identification". The model must finish a sentence with the right name. Chapter 6 tells the full story of the circuit that GPT-2 small uses. In short: some heads notice which name is repeated (S-inhibition heads pass this signal on), and other heads copy the other name to the output (name mover heads). We will meet these names below.
Clean run. Use an input where the model does the behaviour. "When Mary and John went to the store, John gave a drink to" → the model predicts " Mary". Save (cache) every activation.
Corrupted run. Use an input that is almost the same, but where the answer changes. "When Mary and John went to the store, Mary gave a drink to" → now the model prefers " John". Save every activation.
Patched run. Run the corrupted input again. But at ONE place (one layer, one token position, one component), paste in the clean activation. Measure how far the output moves back toward " Mary".
Repeat step 3 for every layer and every position. Each result fills one cell of a heatmap. Bright cells show where the information that decides the answer lives.
Denoising and noising
You can patch in two directions. They answer different questions. Heimersheim and Nanda (2024) gave them clear names.
- Denoising: run the corrupted input and patch in a clean activation. This asks: "Is this part sufficient to bring the behaviour back?"
- Noising: run the clean input and patch in a corrupted activation. This asks: "Is this part necessary? Does breaking it break the behaviour?"
What to measure
You need one number that says "how much the model prefers the right answer". There are several choices.
- Logit difference (the usual choice): logit(" Mary") − logit(" John"). It is linear in the final residual stream, so it splits cleanly into parts. It also cancels shifts that affect both names the same way.
- Probability of the right answer: easy to understand, but it saturates. Softmax squashes large changes. It can hide parts that push against the answer.
- KL divergence (a standard measure of how different two probability distributions are) between the patched and clean output distributions: it does not need a specific answer. ACDC uses it.
Most heatmaps show a normalized score:
A score of 0 means "patching did nothing; the output is still corrupted". A score of 1 means "fully restored to clean". Scores can be below 0 or above 1.
Try it: real activation patching on GPT-2 small
The widget below uses real numbers. We computed them for this survey. We ran GPT-2 small (12 layers, 12 heads per layer) with the Hugging Face transformers library. We used denoising: run the corrupted prompt, paste in one clean activation, and read the normalized logit difference. On the clean prompt, the logit difference is +2.01 (the model prefers " Mary"). The scores come from one prompt pair, so they are an example, not an average.
Here is what to look for.
- With the S2 swap, only the second name differs between the two prompts. So in layer 0, only the S2 column (the second " John") can matter. The signal stays at S2 through the early layers. Around layers 7 to 9, it moves to the final token " to". From layer 9 on, almost only the final column is bright. The information has been moved by attention heads from S2 to the end. This "hand-off" shape is the classic IOI result.
- With the "replace all names" corruption, the corrupted prompt is "When Alice and Bob went to the store, Bob gave a drink to". All three name tokens differ, but the pattern (one name repeated) stays the same. Note: this is not the "ABC" dataset of the IOI paper, where three different names appear. Now the " Mary" column (the indirect object) is very bright in early layers. It is the source of the answer. The S1 column is negative: restoring the first " John" alone confuses the model. Late layers again focus on the final token.
- Switch to Attention out and MLP out to see which kind of block does the work at each step.
Zooming in: one cell per attention head
The heatmap above tells us where. Now we ask who. We patch the output of each of the 144 attention heads, one at a time. Hover a head to see the role that the IOI paper gave it.
The two corruptions light up different heads, because they test different information.
- The S2 swap only changes which name is repeated. So it lights up the heads that carry the "this name is repeated" signal: the S-inhibition heads 7.3, 7.9, 8.6 and 8.10. Head 9.9, a name mover, also shows up. With "All positions", the induction head 5.5 (which acts at S2) also lights up.
- The replace-all-names corruption keeps the repeat pattern but changes the names themselves. So the S-inhibition signal is the same in both runs, and it lights up the heads that copy a name to the output: the name mover heads 9.6, 9.9 and 10.0. Some backup name movers (10.1, 10.10, 11.2) are also positive.
- In both cases, head 10.7 is strongly negative, and with replaced names 11.10 is too. These are the negative name movers. They push against the answer. (With replaced names, the backup heads 10.2 and 10.6 are also negative on this one prompt, so a "backup" label does not fix the sign of a head.) Later work showed that 10.7 does "copy suppression" (Chapter 6).
Our quick run on one prompt pair recovers the same head classes that Wang et al. found with many prompts and careful path patching. That is a good sign: the IOI circuit is a stable, real feature of GPT-2 small.
Patching shows where the information that makes the clean and corrupted runs different is used. If both prompts share a feature, patching cannot see it. For example, both of our prompts contain "gave a drink to", so the heads that notice "a name comes next" do not light up. Choose the corruption to match your question.
Best practices
Zhang and Nanda tested the choices one by one. They found:
- How you corrupt matters. Gaussian noise on the embeddings (the ROME method) can push the model off-distribution. It can point to different layers than a natural corruption. They recommend symmetric token replacement: swap in a similar token, such as another name or another city.
- The metric matters. Probability can miss negative components, such as the negative name movers. Logit difference shows them.
- Patching many layers at once (a "sliding window", as in ROME) can make an effect look more localized than it is.
Their main advice: start coarse, then refine. First patch the residual stream by layer and position. Then split into attention and MLP. Then go to single heads. Then use path patching to test connections.
Causal tracing: where are facts stored?
Meng and colleagues asked where a model stores facts. They used prompts like "The Space Needle is in downtown" → "Seattle". Their version of patching is called causal tracing.
- Clean run: the model says "Seattle".
- Corrupted run: add Gaussian noise to the embeddings of the subject tokens ("The Space Needle"). The noise had a standard deviation of 3 times the normal spread of embeddings. Now the model usually cannot recall "Seattle".
- Restore one clean hidden state at one (token, layer). Measure how much the probability of "Seattle" comes back. They did this for the residual stream, for MLP outputs and for attention outputs.
They read the early site as: "middle-layer MLPs store the fact, keyed by the last token of the subject." Then they built ROME (Rank-One Model Editing). ROME changes one MLP weight matrix with a small, rank-one update to change one fact, for example to make the model say the Space Needle is in Paris. They used GPT-2 XL (1.5B parameters) and GPT-J.
Hase et al. (2023), "Does Localization Inform Editing?", found that the layer where causal tracing puts a fact does not predict which layer is best to edit. And Zhang & Nanda showed that Gaussian noise is off-distribution and can mislead. Causal tracing finds where information flows on this input. That is not always where it is "stored".
Interchange interventions and causal abstraction
Atticus Geiger, Christopher Potts, Thomas Icard and colleagues built a formal theory around patching. They call it causal abstraction.
The idea works like this.
- Write a small high-level program with named variables. For the task "is (a + b) > c?", the program has a variable S = a + b, and then the output is "S > c".
- Guess which neurons in the network hold the variable S.
- Take two inputs. Run the network on input 1, but swap in the "S neurons" from input 2. This swap is an interchange intervention.
- Ask the program what should happen if S had input 2's value. Compare with what the network did.
If the network matches the program on most swaps, then the program is a good description of the network. The fraction of matches is called interchange intervention accuracy (IIA). This gives a clear, testable meaning to "the network implements this algorithm".
The same group later used these swaps as a training signal (Interchange Intervention Training, ICML 2022), and wrote a full theory paper, "Causal Abstraction: A Theoretical Foundation for Mechanistic Interpretability" (2023).
Path patching: test a connection, not a node
Activation patching asks "does this node matter?". But a circuit is made of connections. Path patching asks "does the connection from node A to node B matter?".
Here is the trick. Patch A's clean output, but feed it only into B. Every other part after A still sees A's corrupted value. This isolates one edge.
The IOI team used path patching backwards from the output. First they found the heads that write the answer directly (the name movers). Then they asked which heads feed the name movers' queries (the S-inhibition heads). Then which heads feed those (duplicate token and induction heads). Step by step, they built the full circuit. Chapter 6 tells the story.
The number of possible paths explodes as the model grows. You need a good hypothesis to know which paths to test. This is why people built automatic methods, such as ACDC.
Causal scrubbing: test a whole hypothesis
Redwood Research wanted a strict test for a full explanation. Their method is called causal scrubbing. It works like this.
- Write your hypothesis as a map. Each model part maps to a step in a simple computation. Also say what information each part depends on. For example: "this head only uses the previous token".
- For each part, find other inputs that your hypothesis says are equivalent. For the example: any input with the same previous token.
- Replace the part's activation with its value on one of those equivalent inputs. Do this for everything at once. This "scrubs" away all information your hypothesis says does not matter.
- If the hypothesis is right, the model should still perform well.
The score is the fraction of loss recovered: how much of the gap between the full model and a fully scrambled model your hypothesis keeps. They tested it on induction heads in a small attention-only model and on a model that checks if parentheses are balanced.
Causal scrubbing is strict and costly. It needs a very precise hypothesis. And a hypothesis that is only partly right can sometimes pass, because errors can cancel out.
ACDC: automatic circuit discovery
Finding the IOI circuit by hand took months. ACDC (Automatic Circuit DisCovery) does the search automatically.
- Treat the model as a graph. Nodes are heads and MLPs. Edges connect them.
- Start at the output and move backwards. For each edge, replace its value with the value from the corrupted input.
- Measure the KL divergence between the new output and the original output. If it goes up by less than a threshold τ, delete the edge for good. Otherwise, keep it.
- The edges that remain are the circuit.
ACDC found the circuits that people had found by hand: IOI, greater-than, docstring, induction, and Tracr programs. For greater-than in GPT-2 small, it kept 68 of about 32,000 edges, and all of them had also been found manually.
ACDC needs one forward pass per edge, so it is slow on large models. The threshold is a free choice. The greedy order can change the result. And it can miss parts whose effects cancel out, such as a positive head and a negative head that balance each other.
Attribution patching: patching at the speed of gradients
Activation patching needs one forward pass for every cell in the heatmap. For a large model with millions of possible patches, this is far too slow. Attribution patching uses a shortcut from calculus.
The idea: if you change an activation a by a small amount, the metric changes by about the gradient times that amount. So:
You need one clean forward pass, one corrupted forward pass and one backward pass. Then you get an estimate for every component at once. This is a first-order Taylor approximation: it replaces the true curve by a straight line.
The family of fast methods
Edge Attribution Patching (EAP) scores each edge u → v as (clean output of u − corrupted output of u) · (gradient of the metric with respect to the input of v). Two forward passes and one backward pass give scores for all edges. Keep the top edges.
EAP-IG averages the gradient along the straight line from corrupted to clean activations (often 5 to 50 steps). This fixes much of the error of the straight-line estimate. The authors also argued that we should judge a circuit by faithfulness (does it reproduce the model's behaviour?), not by how much it overlaps with a "true" circuit. EAP-IG became a strong default method.
The DeepMind team found that attribution patching (AtP) is the best fast method, but it has two kinds of false negatives (important parts that it scores as unimportant):
- Saturated attention. When the softmax is saturated, its gradient is tiny. The fix: for queries and keys, really recompute the attention pattern, and only then use the straight-line estimate.
- Cancellation. A part's direct effect and indirect effect can cancel. The fix, called GradDrop: switch off the gradient through one layer at a time and average the results.
They tested it on Pythia models up to 12B parameters.
By 2024 the "gradient" world and the "patching" world had merged. Attribution patching is gradient × (activation difference). EAP-IG is integrated gradients applied to components. The same math reappears in the attribution graphs of Chapter 9.
Distributed Alignment Search: patch directions, not neurons
Because of superposition, a variable may not live in single neurons. It may live in a direction or a subspace that mixes many neurons. Patching single neurons will then miss it.
DAS learns a rotation of activation space. The model's weights stay frozen. Only the rotation is trained. The training goal: when you do interchange interventions on the first k rotated dimensions, the network should act like the high-level program. In other words, DAS searches for the subspace that holds the variable.
Boundless DAS learns the size of the subspace with soft masks, so it scales to a 7-billion-parameter model. The task was "Price Tagging": "Please say yes only if it costs between [1.30] and [8.55] dollars, otherwise no." They found that Alpaca (7B) uses two clear boolean variables: "is the price above the lower bound?" and "is the price below the upper bound?". This held even when the inputs and instructions changed.
Pitfalls: when interventions mislead
Interventions are stronger than observation. But they can still mislead. Here are the main traps.
When you put a value into the model that it never sees in training, you test the model in a strange state. Zero ablation and Gaussian noise are common causes. The model may break for reasons that have nothing to do with your question. Fix: prefer mean or resample ablation, and natural corruptions such as swapping one name for another.
McGrath and colleagues ablated an attention layer in a 7B Chinchilla model on a factual recall task. Later attention layers changed their behaviour to make up for the loss, like a hydra growing a new head. They also found late MLP layers that act as "erasers" and push down the most likely token. This happened even in models trained without dropout.
Rushing and Nanda (ICML 2024, "Explorations of Self-Repair in Language Models") found self-repair in many model families and sizes. It is imperfect (it does not fully restore) and noisy (it varies a lot by prompt). They found two causes. First, LayerNorm scaling: removing a head changes the vector's size, and the final LayerNorm rescales it. Second, anti-erasure: neurons that were erasing the answer stop doing so.
The IOI circuit shows this too. When you ablate the name movers, backup name movers take over.
Result: the drop you measure after an ablation can be smaller than the part's real importance. The direct effect and the total effect can differ.
Suppose you find a direction, patch along it, and the behaviour changes. Is the direction really where the model keeps the variable? Not always. The direction may mix two parts:
- a part that changes with the feature but that no later layer reads ("causally disconnected"), and
- a part that later layers do read, but that is normally inactive ("dormant").
Patching along the mix switches on the dormant path. You see the behaviour change, but you caused it through a road the model never takes. The authors showed this in a toy model, in IOI, and in factual recall. Geiger's group replied (Wu et al. 2024) that this risk applies to every causal analysis, not only to DAS.
Probability saturates, so it hides negative components. KL divergence is general but mixes many effects. Logit difference is usually best, but only when there is a clear "right" and "wrong" answer. Always say which metric you used, and check that your conclusion holds with another one.
Patching only sees the difference between clean and corrupted inputs. A badly chosen corruption tests the wrong question. Our widget shows this: the S2 swap finds S-inhibition heads, and the replace-all-names corruption finds name movers. Neither one alone shows the whole circuit. Also, results from one prompt can differ from averages over many prompts.
Testing the testers: ground truth and benchmarks
How do we know if a circuit-finding method works? In a normal model, we do not know the true circuit. So researchers built models where they do know it.
Tracr takes programs written in RASP, a small language that describes what transformers can do (Weiss, Goldberg and Yahav, 2021, "Thinking Like Transformers"). It compiles them straight into transformer weights. Examples include sorting, counting tokens, reversing a list, and checking balanced brackets. Because a person wrote the program, we know the true circuit. Limit: compiled models are not trained, so they look unnatural. For example, they have no superposition unless you add a compression step.
InterpBench trains small transformers with "Strict Interchange Intervention Training" (SIIT). Each model is trained to implement a known circuit, but with realistic trained weights. The authors used them to compare ACDC, EAP and other methods.
MIB gives the field a shared test. It has two tracks:
- Circuit localization: find the components and edges that matter. Scored by faithfulness across circuit sizes.
- Causal variable localization: find a feature in a hidden vector that matches a task variable. Scored with interchange intervention accuracy.
The main results: attribution methods (such as EAP-IG) and mask-learning methods (which learn which edges to keep) did best at circuit localization. Supervised DAS did best at causal variable localization. And, surprisingly, features from sparse autoencoders were not better than plain neurons on that track. (A sparse autoencoder, or SAE, splits an activation into many readable feature directions.) (Chapter 8 discusses this debate.)
Three later results add caution. First, Edge Pruning (Bhaskar et al., NeurIPS 2024, arXiv:2406.16778) learns a mask over edges with gradients. It found circuits with fewer edges than earlier methods, and it scaled to CodeLlama-13B. Second, Miller, Chughtai and Saunders (COLM 2024, arXiv:2407.08734) showed that faithfulness scores change a lot with small changes in the ablation method. So a faithfulness number is only meaningful together with the exact ablation that produced it. Third, Méloux et al. (ICLR 2025, arXiv:2502.20914) found that, even in small networks, many different circuits can produce the same behaviour. One circuit that passes the tests is not always the circuit.
Direct logit attribution: a cheap first look
Some questions do not need any intervention. In a transformer, the final residual stream is a sum: the embeddings plus the output of every attention head and every MLP (Chapter 4). So we can split the final logit difference into one piece per component.
The recipe: take each component's output at the final position. Apply the final LayerNorm scale (frozen from the full run). Then take the dot product with the difference of unembedding vectors, W_U[" Mary"] − W_U[" John"]. The result is that component's direct effect on the logit difference. All the pieces add up (about) to the total.
Direct logit attribution only sees direct effects. A head that matters by steering later heads gets a score near zero. Freezing LayerNorm is an approximation. Self-repair also muddles the picture. Its cousins, the logit lens and the tuned lens, are covered in Chapter 4.
A note on gradient attribution
Older attribution methods also exist for language models. Gradient × input scores each input token by the gradient times its embedding. Integrated Gradients (Sundararajan, Taly and Yan, 2017) integrates gradients along a path from a baseline, so the scores add up to the full output difference. Raw attention weights are not reliable explanations; this was the subject of the 2019 debate "Attention is not Explanation" (Jain and Wallace) and its reply (Wiegreffe and Pinter). Newer decomposition methods, such as information flow routes (Ferrando and Voita, 2024), build a graph of important edges in one forward pass. All of these methods have the same weak points: gradients are local, they can be saturated or noisy, and the baseline is an arbitrary choice.
All methods side by side
| Method | Unit | Cost | What it tests | Main trap |
|---|---|---|---|---|
| Zero / mean / resample ablation | Node | 1 pass per node | Necessity | Off-distribution values; self-repair |
| Activation patching | Node (layer × position, head) | 1 pass per node | Sufficiency (denoising) or necessity (noising) | Only sees the clean/corrupted difference |
| Causal tracing (ROME) | Node | 1 pass per node | Where facts flow | Gaussian noise is off-distribution |
| Path patching | Edge or path | 1 pass per path | Whether a connection matters | Too many paths to test |
| Causal scrubbing | Whole hypothesis | Many passes | Whether an explanation keeps performance | Needs a precise hypothesis; errors can cancel |
| ACDC | Edges | 1 pass per edge | Automatic circuit | Slow; threshold; misses cancelling parts |
| Attribution patching / EAP | Nodes or edges | 2 forward + 1 backward | Fast estimate of patching | Straight-line error; saturation |
| EAP-IG / AtP* | Nodes or edges | A few passes | Better fast estimate | Still approximate |
| DAS / Boundless DAS | Subspace | Training a rotation | Whether a direction acts as a variable | Subspace illusions |
| Direct logit attribution | Node | 1 pass | Direct effect on output | Misses indirect effects |
A practical recipe
Here is a checklist for a causal study of one behaviour. It follows the advice of Heimersheim & Nanda and Zhang & Nanda.
- Define the behaviour with many prompts, not one. Make sure the model does it reliably.
- Pick a metric. Prefer logit difference between a right and a wrong answer.
- Design the corruption. Change only the thing you care about. Prefer natural token swaps over noise. Keep the token count the same.
- Start coarse. Patch the residual stream by layer and position.
- Refine. Split into attention and MLP outputs, then single heads. Use attribution patching to screen many parts quickly, then check the top ones with real patching.
- Test connections with path patching, or run ACDC / EAP-IG to propose a circuit.
- Test the circuit: faithfulness (ablate everything else), completeness and minimality. Use mean or resample ablation, not zero.
- Look for traps: try both noising and denoising; watch for self-repair and negative components; check that results hold across prompts.
- Explain the parts. Look at attention patterns, direct logit attribution, and what features the parts read and write.
- Correlation is not cause. To show that a part matters, change it and measure the output.
- Ablation results depend on the replacement value. Mean or resample ablation is usually safer than zero ablation.
- Activation patching (also called causal tracing or interchange intervention) copies an activation from a clean run into a corrupted run. The logit difference is the usual metric.
- Path patching, causal scrubbing and ACDC test connections and whole circuits. Attribution patching and EAP-IG estimate patching with gradients, very fast.
- DAS finds directions that act like variables. Every method has traps: self-repair, off-distribution values and illusions that you create yourself.
Where this leads: Chapter 6 uses these tools on real behaviours. The gradient ideas come back in the attribution graphs of Chapter 9.
References
- Vig, J., Gehrmann, S., Belinkov, Y., et al. (2020). Investigating Gender Bias in Language Models Using Causal Mediation Analysis. NeurIPS.
- Geiger, A., Lu, H., Icard, T., Potts, C. (2021). Causal Abstractions of Neural Networks. NeurIPS.
- Geiger, A., Wu, Z., Lu, H., et al. (2022). Inducing Causal Structure for Interpretable Neural Networks. ICML.
- Geiger, A., et al. (2023). Causal Abstraction: A Theoretical Foundation for Mechanistic Interpretability.
- Meng, K., Bau, D., Andonian, A., Belinkov, Y. (2022). Locating and Editing Factual Associations in GPT. NeurIPS.
- Hase, P., Bansal, M., Kim, B., Ghandeharioun, A. (2023). Does Localization Inform Editing? NeurIPS.
- Wang, K., Variengien, A., Conmy, A., Shlegeris, B., Steinhardt, J. (2022). Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small. ICLR 2023.
- Goldowsky-Dill, N., MacLeod, C., Sato, L., Arora, A. (2023). Localizing Model Behavior with Path Patching.
- Chan, L., Garriga-Alonso, A., Goldowsky-Dill, N., et al. (2022). Causal Scrubbing. Redwood Research.
- Conmy, A., Mavor-Parker, A. N., Lynch, A., Heimersheim, S., Garriga-Alonso, A. (2023). Towards Automated Circuit Discovery for Mechanistic Interpretability. NeurIPS.
- Nanda, N. (2023). Attribution Patching: Activation Patching At Industrial Scale.
- Syed, A., Rager, C., Conmy, A. (2023). Attribution Patching Outperforms Automated Circuit Discovery.
- Hanna, M., Pezzelle, S., Belinkov, Y. (2024). Have Faith in Faithfulness: Going Beyond Circuit Overlap When Finding Model Mechanisms. COLM.
- Kramár, J., Lieberum, T., Shah, R., Nanda, N. (2024). AtP*: An efficient and scalable method for localizing LLM behaviour to components.
- Zhang, F., Nanda, N. (2023). Towards Best Practices of Activation Patching in Language Models: Metrics and Methods. ICLR 2024.
- Heimersheim, S., Nanda, N. (2024). How to use and interpret activation patching.
- Geiger, A., Wu, Z., Potts, C., Icard, T., Goodman, N. D. (2023). Finding Alignments Between Interpretable Causal Variables and Distributed Neural Representations. CLeaR 2024.
- Wu, Z., Geiger, A., Icard, T., Potts, C., Goodman, N. D. (2023). Interpretability at Scale: Identifying Causal Mechanisms in Alpaca. NeurIPS.
- Makelov, A., Lange, G., Nanda, N. (2023). Is This the Subspace You Are Looking For? An Interpretability Illusion for Subspace Activation Patching. ICLR 2024.
- Wu, Z., Geiger, A., et al. (2024). A Reply to Makelov et al. (2023)'s "Interpretability Illusion" Arguments.
- McGrath, T., Rahtz, M., Kramár, J., Mikulik, V., Legg, S. (2023). The Hydra Effect: Emergent Self-repair in Language Model Computations.
- Rushing, C., Nanda, N. (2024). Explorations of Self-Repair in Language Models. ICML.
- Li, M., Janson, L. (2024). Optimal ablation for interpretability. NeurIPS.
- Lindner, D., Kramár, J., Farquhar, S., et al. (2023). Tracr: Compiled Transformers as a Laboratory for Interpretability. NeurIPS.
- Weiss, G., Goldberg, Y., Yahav, E. (2021). Thinking Like Transformers. ICML.
- Gupta, R., Arcuschin, I., Kwa, T., Garriga-Alonso, A. (2024). InterpBench: Semi-Synthetic Transformers for Evaluating Mechanistic Interpretability Techniques. NeurIPS Datasets & Benchmarks.
- Mueller, A., Geiger, A., Wiegreffe, S., et al. (2025). MIB: A Mechanistic Interpretability Benchmark. ICML.
- Elhage, N., et al. (2021). A Mathematical Framework for Transformer Circuits. Anthropic.
- Sundararajan, M., Taly, A., Yan, Q. (2017). Axiomatic Attribution for Deep Networks (Integrated Gradients). ICML.
- Jain, S., Wallace, B. C. (2019). Attention is not Explanation. NAACL.
- Ferrando, J., Voita, E. (2024). Information Flow Routes: Automatically Interpreting Language Models at Scale. EMNLP.
- Bhaskar, A., Wettig, A., Friedman, D., Chen, D. (2024). Finding Transformer Circuits with Edge Pruning. NeurIPS.
- Miller, J., Chughtai, B., Saunders, W. (2024). Transformer Circuit Faithfulness Metrics are not Robust. COLM.
- Méloux, M., Maniu, S., Portet, F., Peyrard, M. (2025). Everything, Everywhere, All at Once: Is Mechanistic Interpretability Identifiable? ICLR.