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-Initial explains 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.1 and 8.8) recover 72.8% of loss, and 8 of 144 heads recover 98.0%.
  • Cleaner localization than noise corruption: On heads 5.6 and 6.1 in 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_r and x_c) are needed per test rather than recursive dataset resampling across node equivalence classes.
Iterative induction circuit refinement on a 2-layer attention-only transformer
Metric: proportion of induction head loss effect explained vs. baseline removing heads 1.5 and 1.6 (0.702 mean absolute loss diff; higher is better).
All-Initial (15 textbook paths)
28.2%
All-Positional (+ L0 self-attn)
48.6%
All-Long (3-token window)
55.2%
All-Final (+ 1.5 parroting)
73.5%
Value path only
64.1% to 86.2%
Query path only
48.7% to 72.6%
Key path only
53.3% to 55.8%

Source: Goldowsky-Dill et al. (2023), Tables 1, 2, 3 and Section 3.5.

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:

  1. 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.
  2. Layer 0 self-attention matters (All-Positional, 48.6%): Several Layer 0 heads attend from token i to i, transforming representations before the induction heads read them. Adding i -> L0 -> IH for queries and j -> L0 -> IH for values lifts isolated Q and V scores to 72.6% and 86.2%.
  3. Multi-token prefixes (All-Long, 55.2%): Head 0.6 attends to multiple recent tokens, helping induction match 3-token prefixes (K = 3).
  4. Parroting in head 1.5 (All-Final, 73.5%): Path patching attribution revealed that head 1.5 increases loss on repeated proper nouns (like "Bat" or "Newport") even without prefix matching. Adding j -> (L0 or skip) -> 1.5 K paths 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.

Noise corruption vs. number-to-number path patching in GPT-2 Small
Ablated targetCorrupted KLCorrupted # probPatched KLPatched # prob
Head 5.60.02582.5%0.01188.0%
Head 6.10.01783.9%0.00388.3%
All 144 heads2.32826.9%3.10888.1%

Baseline numerical completion probability is 88.1%. Source: Goldowsky-Dill et al. (2023), Table 5.

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.