AtP*: An efficient and scalable method for localizing LLM behaviour to components

Authors: János Kramár (Google DeepMind), Tom Lieberum (Google DeepMind), Rohin Shah (Google DeepMind), Neel Nanda (Google DeepMind)

Submitted to arXiv on 01 Mar. 2024
License: CC BY 4.0
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.

The papers around it, by date and closeness

Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper

How to read this map? Illustrated guide

Closest papers Prior work it builds on Papers that cite it

Papers around this one

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Very close Another approach to the problem Cites this paper
    RelP: Faithful and Efficient Circuit Discovery via Relevance Patching
    F. Jafari, Oliver Eberle, Ashkan Khakzar et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 11 times · Not summarized yet

    RelP replaces attribution patching’s local gradients with Layer-wise Relevance Propagation to efficiently discover model circuits.

    Abstract

    Activation patching is a standard method in mechanistic interpretability for localizing the components of a model responsible for specific behaviors, but it is computationally expensive to apply at scale. Attribution patching offers a faster, gradient-based approximation, yet suffers from noise and reduced reliability in deep, highly non-linear networks. In this work, we introduce Relevance Patching (RelP), which replaces the local gradients in attribution patching with propagation coefficients derived from Layer-wise Relevance Propagation (LRP). LRP propagates the network's output backward through the layers, redistributing relevance to lower-level components according to local propagation …

  2. Very close Builds on this paper Cites this paper
    Correcting Attribution Patching with a Few Exact Measurements
    Lu-Yang Zhang, Min-Xing Zheng, Jia-Lu Wang · 2026 · Not summarized yet

    Guided-AP uses a small set of exact activation-patching measurements to correct attribution-patching estimates.

    Abstract

    Mechanistic interpretability asks which language model components matter for a behavior, and activation patching answers by changing one component's activation and measuring its effect, at a cost growing with components and prompts. Attribution patching estimates these effects from one gradient pass, but its estimates can be far off, and verifying each one restores the cost. Can the structure of these errors reduce this cost? We propose Guided-AP, which uses a few exact measurements to reveal attribution patching's errors and correct unmeasured estimates. On a single prompt, many components'errors share one sign, so a small exact sample yields one correction for the rest. Over many prompts o…

  3. Close Builds on this paper Cites this paper Uses this paper in depth
    When Attribution Patching Lies: Diagnosis and a Second-Order Correction
    Lu-Yang Zhang, Jia-Lu Wang · 2026 · arXiv.org · preprint, not peer reviewed · cited 5 times · Not summarized yet

    This work diagnoses attribution patching’s errors and proposes a second-order correction to its first-order estimates.

    Abstract

    A central goal of mechanistic interpretability is to identify which internal components causally drive a language model's behavior. Because these importance estimates serve as the evidence for identifying circuits, systematic errors can lead to the misidentification of the underlying mechanisms. While activation patching provides a gold-standard causal metric, its computational cost is prohibitive at scale. Practitioners instead rely on attribution patching, a gradient-based, first-order approximation whose reliability remains poorly understood. In this work, we characterize the source of this unreliability, demonstrating that the dominant error stems from the non-linearities in the downstre…

  4. Close Same question
    Towards Best Practices of Activation Patching in Language Models: Metrics and Methods
    Fred Zhang, Neel Nanda · 2023 · International Conference on Learning Representations · cited 446 times · Not summarized yet

    This study examines how activation-patching choices affect localization and circuit-discovery results in language models.

    Abstract

    Mechanistic interpretability seeks to understand the internal mechanisms of machine learning models, where localization -- identifying the important model components -- is a key step. Activation patching, also known as causal tracing or interchange intervention, is a standard technique for this task (Vig et al., 2020), but the literature contains many variants with little consensus on the choice of hyperparameters or methodology. In this work, we systematically examine the impact of methodological details in activation patching, including evaluation metrics and corruption methods. In several settings of localization and circuit discovery in language models, we find that varying these hyperpa…

  5. Close Another approach to the problem Cites this paper
    Weight Patching: Toward Source-Level Mechanistic Localization in LLMs
    Chen Sun, Chengsheng Zhang, Guanzheng Qin et al. · 2026 · arXiv.org · preprint, not peer reviewed · cited 1 time · Not summarized yet

    Weight Patching localizes behavior through parameter-space interventions rather than activation-space patching.

    Abstract

    Mechanistic interpretability seeks to localize model behavior to the internal components that causally realize it. Prior work has advanced activation-space localization and causal tracing, but modules that appear important in activation space may merely aggregate or amplify upstream signals rather than encode the target capability in their own parameters. To address this gap, we propose Weight Patching, a parameter-space intervention method for source-oriented analysis in paired same-architecture models that differ in how strongly they express a target capability under the inputs of interest. Given a base model and a behavior-specialized counterpart, Weight Patching replaces selected module …

  6. Close Broader context Cites this paper
    Contrastive Attribution in the Wild: An Interpretability Analysis of LLM Failures on Realistic Benchmarks
    Rongyuan Tan, Jue Zhang, Zhuo-Zhao Li et al. · 2026 · arXiv.org · preprint, not peer reviewed · cited 1 time · Not summarized yet

    This work uses LRP-based contrastive attribution to analyze LLM failures on realistic benchmarks.

    Abstract

    Interpretability tools are increasingly used to analyze failures of Large Language Models (LLMs), yet prior work largely focuses on short prompts or toy settings, leaving their behavior on commonly used benchmarks underexplored. To address this gap, we study contrastive, LRP-based attribution as a practical tool for analyzing LLM failures in realistic settings. We formulate failure analysis as \textit{contrastive attribution}, attributing the logit difference between an incorrect output token and a correct alternative to input tokens and internal model states, and introduce an efficient extension that enables construction of cross-layer attribution graphs for long-context inputs. Using this …

  7. Close Broader context
    Detecting High-Stakes Interactions with Activation Probes
    Alex McKenzie, Urja Pawar, Phil Blandfort et al. · 2025 · Machine Learning · cited 62 times · AI summary available

    This work trains activation probes to detect high-stakes interactions for LLM safety monitoring.

    Abstract

    Monitoring is an important aspect of safely deploying Large Language Models (LLMs). This paper examines activation probes for detecting "high-stakes" interactions -- where the text indicates that the interaction might lead to significant harm -- as a critical, yet underexplored, target for such monitoring. We evaluate several probe architectures trained on synthetic data, and find them to exhibit robust generalization to diverse, out-of-distribution, real-world data. Probes' performance is comparable to that of prompted or finetuned medium-sized LLM monitors, while offering computational savings of six orders-of-magnitude. Our experiments also highlight the potential of building resource-awa…

  8. Close Broader context
    TPA: Next Token Probability Attribution for Detecting Hallucinations in RAG
    Pengqian Lu, Jie Lu, Anjin Liu et al. · 2025 · Computation and Language · cited 2 times · AI summary available

    TPA attributes token probabilities to model components to detect hallucinations in retrieval-augmented generation.

    Abstract

    Detecting hallucinations in Retrieval-Augmented Generation remains a challenge. Prior approaches attribute hallucinations to a binary conflict between internal knowledge stored in FFNs and the retrieved context. However, this perspective is incomplete, failing to account for the impact of other components of the LLM, such as the user query, previously generated tokens, the self token, and the final LayerNorm adjustment. To comprehensively capture the impact of these components on hallucination detection, we propose TPA which mathematically attributes each token's probability to seven distinct sources: Query, RAG Context, Past Token, Self Token, FFN, Final LayerNorm, and Initial Embedding. Th…

Prior work it builds on

  1. Related Broader context
    Finding Neurons in a Haystack: Case Studies with Sparse Probing
    Wes Gurnee, Neel Nanda, Matthew Pauly et al. · 2023 · Trans. Mach. Learn. Res. · cited 405 times · Not summarized yet

    This study uses sparse probes on neuron activations to locate neurons associated with human-interpretable input features.

    Abstract

    Despite rapid adoption and deployment of large language models (LLMs), the internal computations of these models remain opaque and poorly understood. In this work, we seek to understand how high-level human-interpretable features are represented within the internal neuron activations of LLMs. We train $k$-sparse linear classifiers (probes) on these internal activations to predict the presence of features in the input; by varying the value of $k$ we study the sparsity of learned representations and how this varies with model scale. With $k=1$, we localize individual neurons which are highly relevant for a particular feature, and perform a number of case studies to illustrate general propertie…

  2. Related Broader context
    The Hydra Effect: Emergent Self-repair in Language Model Computations
    Tom McGrath, Matthew Rahtz, János Kramár et al. · 2023 · arXiv.org · preprint, not peer reviewed · cited 175 times · Not summarized yet

    This work uses causal ablations to study compensation between layers and other motifs in language-model computations.

    Abstract

    We investigate the internal structure of language model computations using causal analysis and demonstrate two motifs: (1) a form of adaptive computation where ablations of one attention layer of a language model cause another layer to compensate (which we term the Hydra effect) and (2) a counterbalancing function of late MLP layers that act to downregulate the maximum-likelihood token. Our ablation studies demonstrate that language model layers are typically relatively loosely coupled (ablations to one layer only affect a small number of downstream layers). Surprisingly, these effects occur even in language models trained without any form of dropout. We analyse these effects in the context …

  3. Related Broader context
    Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
    Kenneth Li, Oam Patel, Fernanda Viégas et al. · 2023 · Neural Information Processing Systems · cited 1,683 times · Not summarized yet

    ITI shifts selected attention-head activations at inference time to improve truthful responses.

    Abstract

    We introduce Inference-Time Intervention (ITI), a technique designed to enhance the"truthfulness"of large language models (LLMs). ITI operates by shifting model activations during inference, following a set of directions across a limited number of attention heads. This intervention significantly improves the performance of LLaMA models on the TruthfulQA benchmark. On an instruction-finetuned LLaMA called Alpaca, ITI improves its truthfulness from 32.5% to 65.1%. We identify a tradeoff between truthfulness and helpfulness and demonstrate how to balance it by tuning the intervention strength. ITI is minimally invasive and computationally inexpensive. Moreover, the technique is data efficient: …

  4. Related Broader context
    Sparse Interventions in Language Models with Differentiable Masking
    Nicola De Cao, Leon Schmid, Dieuwke Hupkes et al. · 2021 · BlackboxNLP Workshop on Analyzing and Interpreting Neural Networks for NLP · cited 39 times · Not summarized yet

    This method uses differentiable masking to find sparse neuron subsets that causally affect linguistic outputs.

    Abstract

    There has been a lot of interest in understanding what information is captured by hidden representations of language models (LMs). Typically, interpretation methods i) do not guarantee that the model actually uses the information found to be encoded, and ii) do not discover small subsets of neurons responsible for a considered phenomenon. Inspired by causal mediation analysis, we propose a method that discovers a small subset of neurons within a neural LM responsible for a particular linguistic phenomenon, i.e., subsets causing a change in the corresponding token emission probabilities. We use a differentiable relaxation to approximately search through the combinatorial space. An L_0 regular…

  5. Related Broader context
    Improving Activation Steering in Language Models with Mean-Centring
    Ole Jorgensen, Dylan Cope, Nandi Schoots et al. · 2023 · arXiv.org · preprint, not peer reviewed · cited 83 times · Not summarized yet

    This work derives mean-centred activation steering vectors to control toxicity and story completion.

    Abstract

    Recent work in activation steering has demonstrated the potential to better control the outputs of Large Language Models (LLMs), but it involves finding steering vectors. This is difficult because engineers do not typically know how features are represented in these models. We seek to address this issue by applying the idea of mean-centring to steering vectors. We find that taking the average of activations associated with a target dataset, and then subtracting the mean of all training activations, results in effective steering vectors. We test this method on a variety of models on natural language tasks by steering away from generating toxic text, and steering the completion of a story towa…

Papers that cite it

  1. Related Same question
    Separating Tongue from Thought: Activation Patching Reveals Language-Agnostic Concept Representations in Transformers
    Clément Dumas, C. Wendler, Veniamin Veselovsky et al. · 2024 · Annual Meeting of the Association for Computational Linguistics · cited 67 times · Not summarized yet

    This study uses activation patching to locate language-independent concept representations during translation in transformer LLMs.

    Abstract

    A central question in multilingual language modeling is whether large language models (LLMs) develop a universal concept representation, disentangled from specific languages. In this paper, we address this question by analyzing latent representations (latents) during a word-translation task in transformer-based LLMs. We strategically extract latents from a source translation prompt and insert them into the forward pass on a target translation prompt. By doing so, we find that the output language is encoded in the latent at an earlier layer than the concept to be translated. Building on this insight, we conduct two key experiments. First, we demonstrate that we can change the concept without …

  2. Related Same method, another problem
    From Passive to Persuasive: Localized Activation Injection for Empathy and Negotiation
    Niranjan Chebrolu, Kokil Jaidka, G. Yeo · 2025 · cited 1 time · Not summarized yet

    STAR applies attribution patching to locate behavioral origins, then injects activation vectors to steer empathy and negotiation.

    Abstract

    Complex social behaviors, such as empathy and strategic politeness, are widely assumed to resist the directional decomposition that makes activation steering effective for coarse attributes like sentiment or toxicity. We present STAR: Steering via Attribution and Representation, which tests this assumption by using attribution patching to identify the layer--token positions where each behavioral trait causally originates, then injecting contrastive activation vectors at precisely those locations. Evaluated on emotional dialogue and negotiation in both single- and multi-turn settings, localized injection consistently outperforms global steering and instruction priming; human evaluation confir…

  3. Related Same method, another problem
    Position-aware Automatic Circuit Discovery
    Tal Haklay, Hadas Orgad, David Bau et al. · 2025 · Annual Meeting of the Association for Computational Linguistics · cited 17 times · Not summarized yet

    This work extends gradient-based edge attribution patching to account for positional variation when discovering circuits.

    Abstract

    A widely used strategy to discover and understand language model mechanisms is circuit analysis. A circuit is a minimal subgraph of a model's computation graph that executes a specific task. We identify a gap in existing circuit discovery methods: they assume circuits are position-invariant, treating model components as equally relevant across input positions. This limits their ability to capture cross-positional interactions or mechanisms that vary across positions. To address this gap, we propose two improvements to incorporate positionality into circuits, even on tasks containing variable-length examples. First, we extend edge attribution patching, a gradient-based method for circuit disc…

  4. Related Broader context
    Identifying Sparsely Active Circuits Through Local Loss Landscape Decomposition
    B. Chrisman, Lucius Bushnaq, Lee Sharkey · 2025 · arXiv.org · preprint, not peer reviewed · cited 6 times · Not summarized yet

    L3D decomposes local loss landscapes to identify low-rank subnetworks that reconstruct model gradients.

    Abstract

    Much of mechanistic interpretability has focused on understanding the activation spaces of large neural networks. However, activation space-based approaches reveal little about the underlying circuitry used to compute features. To better understand the circuits employed by models, we introduce a new decomposition method called Local Loss Landscape Decomposition (L3D). L3D identifies a set of low-rank subnetworks: directions in parameter space of which a subset can reconstruct the gradient of the loss between any sample's output and a reference output vector. We design a series of progressively more challenging toy models with well-defined subnetworks and show that L3D can nearly perfectly re…

  5. Related Broader context Uses this paper in depth
    Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language Models
    Samuel Marks, C. Rager, Eric J. Michaud et al. · 2024 · International Conference on Learning Representations · cited 507 times · Not summarized yet

    This work discovers and edits sparse causal circuits composed of interpretable features in language models.

    Abstract

    We introduce methods for discovering and applying sparse feature circuits. These are causally implicated subnetworks of human-interpretable features for explaining language model behaviors. Circuits identified in prior work consist of polysemantic and difficult-to-interpret units like attention heads or neurons, rendering them unsuitable for many downstream applications. In contrast, sparse feature circuits enable detailed understanding of unanticipated mechanisms. Because they are based on fine-grained units, sparse feature circuits are useful for downstream tasks: We introduce SHIFT, where we improve the generalization of a classifier by ablating features that a human judges to be task-irr…

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

Updated on 3 November 2026.

The illustrated guide to the papers around a paper