AtP*: An efficient and scalable method for localizing LLM behaviour to components
János Kramár, Tom Lieberum, Rohin Shah, Neel Nanda
TL;DR
The paper tackles the challenge of efficiently attributing LLM behavior to internal components by analyzing Activation Patching (AtP) and proposing AtP*, a gradient-based, scalable alternative. It identifies two failure modes—attention-saturation and cancellation—that cause false negatives and offers two remedies: QK fixes for queries/keys and GradDrop to disentangle direct and indirect effects. Across extensive experiments on Pythia-scale models and both single-prompt and distributional settings, AtP* (and AtP with fixes) consistently outperforms baselines, with a diagnostic method to bound remaining false negatives. The work also discusses extensions to edge patching, coarser node definitions, and practical recommendations for applying causal attribution in real-world mechanistic interpretability tasks. Overall, AtP* provides a practical, scalable framework for reliable circuit localization in large transformers, enabling more robust mechanistic insights and steering capabilities.
Abstract
Activation Patching is a method of directly computing causal attributions of behavior to model components. However, applying it exhaustively requires a sweep with cost scaling linearly in the number of model components, which can be prohibitively expensive for SoTA Large Language Models (LLMs). We investigate Attribution Patching (AtP), a fast gradient-based approximation to Activation Patching and find two classes of failure modes of AtP which lead to significant false negatives. We propose a variant of AtP called AtP*, with two changes to address these failure modes while retaining scalability. We present the first systematic study of AtP and alternative methods for faster activation patching and show that AtP significantly outperforms all other investigated methods, with AtP* providing further significant improvement. Finally, we provide a method to bound the probability of remaining false negatives of AtP* estimates.
