Testing whether an attention head matters does not tell you which downstream computation reads its output. Nicholas Goldowsky-Dill and colleagues at Redwood Research formalize path patching to isolate specific input-to-output routes in a transformer’s computational graph, showing on a 2-layer attention-only model that the textbook single-token induction story explains just 28.2% of induction loss until multi-token context and a separate “parroting” pathway raise explained behavior to 73.5%.
- Induction circuit refinement:
All-Initialexplains 28.2% of loss difference on OpenWebText; adding Layer 0 self-attention (48.6%), 3-token context (55.2%), and token-parroting paths reaches 73.5% (+45.3 percentage points). - Compact GPT-2 Small abstraction: On number-completion prompts (
"The organization estimates that [N]-"), 2 attention heads (9.1and8.8) recover 72.8% of loss, and 8 of 144 heads recover 98.0%. - Cleaner localization than noise corruption: On heads
5.6and6.1in GPT-2 Small, adding Gaussian noise drops numerical completions from 88.1% to 82.5% and 83.9%, whereas patching another number keeps them at 88.0% and 88.3%. - Cheaper than causal scrubbing: Only two inputs (
x_randx_c) are needed per test rather than recursive dataset resampling across node equivalence classes.
How It Works
A localization hypothesis in this framework is a four-tuple (G, delta, P, D): a directed acyclic computational graph G, a dissimilarity metric delta, a set of “important” input-to-output paths P, and a joint distribution D of reference inputs x_r and counterfactual inputs x_c.
To patch individual paths without corrupting shared components, the authors apply Treeify(G): every node with multiple downstream consumers is duplicated so each full path p_i has its own input slot x_i. Paths inside P receive x_r; all unimportant paths outside P receive the same x_c. Reusing one x_c across all unimportant paths preserves canceling components, keeps ensemble layers on-distribution, and lets the framework cache repeated subexpressions.
The headline error score is Average Unexplained Effect (AUE), the expected delta(G(x_r), G_H(x_r, x_c)) divided by the Average Total Effect (ATE) to report proportion explained. When a hypothesis fails, path patching attribution fixes one prompt x_r and drops the absolute value to highlight exact tokens where the patched circuit’s loss rose or fell. Compared with causal scrubbing, path patching drops node-level semantic equivalence claims, cutting sample complexity down to (x_r, x_c) pairs while staying strictly more expressive than node-level activation patching.
Key Findings
Evaluated across the first 300 tokens of 100,000 held-out OpenWebText documents on a 2-layer, 8-head attention-only transformer (with heads 1.5 and 1.6 as induction heads and 0.0 as the main previous-token head), the minimal induction story from Elhage et al. fares poorly:
- Textbook induction (
All-Initial, 15 paths) explains 28.2%: Value (64.1%), query (48.7%), and key (53.3%) hypotheses look decent alone, yet together recover barely a quarter of the induction effect. - Layer 0 self-attention matters (
All-Positional, 48.6%): Several Layer 0 heads attend from tokenitoi, transforming representations before the induction heads read them. Addingi -> L0 -> IHfor queries andj -> L0 -> IHfor values lifts isolated Q and V scores to72.6%and86.2%. - Multi-token prefixes (
All-Long, 55.2%): Head0.6attends to multiple recent tokens, helping induction match 3-token prefixes (K = 3). - Parroting in head
1.5(All-Final, 73.5%): Path patching attribution revealed that head1.5increases loss on repeated proper nouns (like"Bat"or"Newport") even without prefix matching. Addingj -> (L0 or skip) -> 1.5 Kpaths captures this context-independent copying heuristic and adds 18.3 percentage points.
In GPT-2 Small (117M) and GPT-2 XL (1.5B) on "The organization estimates that [N]-" (N from 0 to 100), path patching also isolates N-specific routing far more cleanly than Gaussian noise causal tracing (N(0, 0.2)) or zero ablation. Because counterfactuals are also numbers, heads 5.6 and 6.1 show almost zero KL divergence under patching, exposing them as generic “is this token a number?” detectors rather than number-value routers. Greedily adding heads in GPT-2 Small finds 72.8% loss recovery from just 2 heads (9.1 and 8.8) and 98.0% from 8 of 144 heads.
Caveats and Builder Takeaway
Low AUE measures sufficiency, not completeness. In a majority-vote ensemble or saturating nonlinearity, keeping just over half of redundant heads already drives AUE near zero even though the remaining heads participate in clean forward passes. Canceling paths and distribution-specific heuristics also mean a circuit valid on D can break outside D, while difference-in-expected-loss metrics can hide errors through cross-example cancellation (prefer KL divergence or per-token absolute loss difference).
Treeifying every path grows exponentially with depth, which pushed follow-up tools like ACDC to automate single-hop edge patching instead. Still, when building causal debugging workflows on models up to 1.5B parameters, path patching’s core design rule holds: pair reference prompts with minimal, in-distribution counterfactuals so your intervention separates the mechanism you care about from generic scaffolding heads.


