NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

When Attribution Patching Lies: Diagnosis and a Second-Order Correction

Luyang Zhang, Jialu WangNeurIPS 2026

TL;DR

When trying to reverse-engineer how language models think, researchers often use a fast shortcut called attribution patching instead of doing slow, exact causal interventions—but this shortcut sometimes lies. This paper reveals that these errors don't come from the specific neuron or attention head you are inspecting, but from how the rest of the network nonlinearly warps the signal downstream. Armed with this insight, the authors introduce a cheap, scalable second-order fix that catches and corrects these lies, making high-precision circuit discovery feasible even on multibillion-parameter models.

What Problem Does This Paper Address?

Imagine trying to figure out which parts of an engine matter by removing one bolt at a time and restarting the car. In mechanistic interpretability—the science of reverse-engineering neural networks—that’s activation patching. You swap a component's activation (like an attention head) from a "clean" prompt into a "corrupted" one and measure how much the output changes. It is the gold standard for finding causal "circuits" in a model, but testing thousands of components one by one is hopelessly expensive in modern Large Language Models (LLMs).

To survive the compute bill, practitioners use attribution patching: a fast, gradient-based shortcut that estimates all components' importance in a single backward pass by assuming the network behaves like a straight line (a first-order Taylor approximation).

The catch? Neural networks aren't straight lines. When nonlinearities kick in, attribution patching makes systematic errors, causing researchers to misidentify how models actually work. Until now, we lacked a clear mathematical diagnosis of when attribution patching fails, why prior fixes fell short, and how to fix it without losing its speed advantage.

Methods

The authors dissect attribution patching error using a second-order Taylor expansion. They split the approximation error into a dominant quadratic term (which captures how curved the network's response is along the patch direction) and a tiny cubic remainder.

Rather than computing a massive matrix of second derivatives, they compute just the exact slice of curvature they need using a Hessian-vector product (HVP). This requires only one extra backward pass—roughly $3\times$ the cost of a single pass, rather than scaling prohibitive costs across the whole model.

From this math, they build three practical tools:

  1. A Reliability Score ($\tilde{R}$): Normalized by the initial first-order estimate, $\tilde{R}$ acts as a warning light. If $\tilde{R} \ll 1$, trust the fast approximation; if $\tilde{R} \approx 1$, curvature is warping your results.
  2. Multi-Step HVP (MS-HVP): For massive perturbations where even a second-order curve overshoots, MS-HVP breaks the patch path into $K$ smaller steps, shrinking the leftover error quadratically ($1/K^2$).
  3. The Screen–Flag–Fix Pipeline: Instead of running expensive corrections everywhere, you screen all components cheaply with attribution patching, flag suspect ones using $\tilde{R}$, and fix only the troublemakers with HVP.
Figure 1: Screen–Flag–Fix pipeline for reliable attribution patching. (a) Attribution patching screens all heads cheaply; (b) a reliability score flags suspect estimates; (c) HVP corrects only the flagged heads, recovering the true ranking.

Datasets

No new datasets are introduced, nor are models trained from scratch. Instead, the authors evaluate five existing model families ranging from 124M to 9B parameters (GPT-2, Pythia, Qwen2.5, Gemma-2, and Llama-3.1) on three established mechanistic interpretability benchmarks:

  • Indirect Object Identification (IOI): Using naturalistic "name-swap" corruptions (e.g., swapping character names in a story).
  • Greater-Than (GT) & Factual Recall: Using random vocabulary token replacements ( plus supplementary tests with semantic entity swaps and zero-ablations).

Key Insights and Ideas

  • It’s the downstream network, not the local neuron: Prior attempts to fix attribution patching looked at the local curvature right at the patched activation function (like GeLU or softmax). The authors show this is structurally incomplete: a component's signal has to travel through the rest of the network, where cross-layer interactions create massive curvature. Full-network curvature exceeds local curvature by $2\times$ to $66\times$ with near-zero correlation ($r = 0.04$). In fact, correcting with local curvature alone makes errors $>750\%$ worse!
Figure 2: Network–local curvature gap. Full- network curvature vs. local component curvature across three models; prior fixes (AtP∗[7], GIM [8]) use only the local quantity.
  • Existing baselines solve the wrong math: Integrated Hessians (IH), a popular higher-order attribution method, consistently under-corrects patching error. Why? Because IH is designed to measure feature interactions, its path-integration math leaves a $1/4$ weight on the curvature term—exactly half the $1/2$ needed for an exact Taylor error correction.
  • Fixes matter most at the "cliff's edge": Attribution patching is actually decent at global rankings, so why bother fixing it? Because circuit discovery relies on hard cutoffs (e.g., "keep the top 20 heads"). HVP shines right at these decision boundaries—for example, rescuing a crucial GPT-2 duplicate-token head that attribution patching underestimated by $4.4\times$ and buried in 27th place.

Key Results

  • Scalability at 8B+ parameters: On 8B–9B models (Llama-3.1-8B, Gemma-2-9B), standard refinement baselines like Integrated Gradients (IG) become infeasible, requiring ~25 GPU-days per task. HVP finishes in 2.4–28.7 GPU-hours and slashes top-5 relative error by up to 82% (dropping Llama-3.1-8B IOI error from 19.78% down to 3.54% with MS-HVP).
  • Cheaper and more accurate than IG: On smaller models where IG can actually run, MS-HVP matches or beats it. On the hardest, high-curvature task (Pythia-410M IOI, where standard single-step HVP overshoots), 5-step MS-HVP beats 35-step IG while using $3.5\times$ less compute.
  • Massive savings via selective fixing: Using the Screen–Flag–Fix workflow on GPT-2 IOI captures 97% of the accuracy gains of full HVP at just 28% of the compute cost.
  • Better circuit recovery: On GPT-2 Greater-Than, MS-HVP boosts top-5 attention head recovery from 70.1% to 83.2%, beating both IG and GIM. On GPT-2 IOI, it recovers 100% of the 20 canonical ground-truth heads (up from 95%).

Limitations and Future Work

The authors note a few clear boundaries to their current setup:

  • Single-token focus: The experiments primarily perturb single tokens; extending the math and diagnostics to multi-token, complex semantic corruptions is an open next step.
  • Component accuracy $\neq$ full circuit completeness: HVP gives much truer importance scores for individual components, which mirrors how standard discovery tools rank parts. However, patching multiple components simultaneously introduces off-diagonal interaction terms ($O(n^2)$ cost), meaning HVP doesn't automatically guarantee that an entire assembled circuit is minimal or complete without pairing it with verification tools.
  • Scaling & Sparse Autoencoders (SAEs): While tested up to 9B parameters, behavior at frontier scales (70B+) remains to be verified. Additionally, applying HVP to modern SAE features introduces sharp encoder nonlinearities (like ReLU or top-$k$) whose extra curvature effects warrant dedicated future study.

Summary updated

BibTeX
@inproceedings{zhang2026when,
  author = {Luyang Zhang and Jialu Wang},
  title = {{When Attribution Patching Lies: Diagnosis and a Second-Order Correction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=9z06SMMtXu},
}
Figure