Sheet
pathinterpretability/causal
difficultyadvanced
timeO(L·n)
described2023
revised5w ago
Attribution Patching
Patching every component costs one forward pass each. A first-order Taylor expansion estimates all of them from two forward passes and one backward pass.
Theory
Linearise the metric around the corrupted activation. The estimated effect of replacing with is then the inner product of the gradient at with the difference — and the gradient for every component comes from a single backward pass.
The approximation is poor precisely where the model is most interesting: at saturated softmaxes, at layer-norm scale changes, and anywhere the true effect is large. Integrated gradients along the path from to recovers most of the lost fidelity for a handful of extra passes, and is the right default when the shortlist matters more than the sweep.
Related
References
[2]Syed et al. — Attribution Patching Outperforms Automated Circuit Discovery (2023)arXiv:2310.10348