Skip to content

RelP: Faithful and Efficient Language Model Circuit Discovery via Relevance PatchingRelP: Faithful and Efficient Circuit Discovery in Language Models via Relevance Patching

arXiv· arXiv:2508.21258· Farnoush Rezaei Jafari, Oliver Eberle, Ashkan Khakzar, Neel NandaMachine Learning Group, Technische Universität Berlin; BIFOLD – Berlin Institute for the Foundations of Learning and DataIndexed by this site · 2026-10-14· Originally publishedAlignment

Quick read

Interpretability

Based on the paper PDF (AI-generated); refer to the original

RelP replaces attribution patching gradients with LRP coefficients; on GPT-2 Large's MLP, PCC with activation patching is 0.956, AtP is 0.006.

Questions
Activation patching replaces activations with counterfactual ones to localize causal components, but component-wise interventions are hard to scale to large models. Attribution patching approximates with gradients, requiring only two forward passes and one backward pass; the authors state that in deep nonlinear networks, gradient noise reduces its agreement with activation patching.
Methods
RelP replaces local gradients in AtP with LRP propagation coefficients, still requiring two forward passes and one backward pass. Each model uses LN-rule, Identity-rule, and 0-rule; Qwen2 and Gemma2-2B additionally use Half-rule, AH-rule not used.
Experiments and results
On 100 IOI prompts, the PCC for both the residual stream and MLP is higher for RelP than for AtP; for GPT-2 Large's MLP it is 0.956 versus 0.006. The only exception is GPT-2 small's attention. On subject–verb agreement, the authors say RelP's faithfulness is comparable to 10-step IG.
Limitations and future work
The authors state that choosing LRP rules brings model-related overhead, attention gains are small, models are small to medium open-source models, and tasks rely on known counterfactual pairs and single-token metrics. Experiments cover IOI three-component PCC for 8 models, and circuit comparison with IG on Pythia-70M; the main text does not give specific scores for Figure 3.
Experimental setupGPT-2 Small、GPT-2 Medium et al. · Indirect Object Identification (IOI)、Subject–Verb Agreement · Pearson correlation coefficient (PCC)、faithfulness et al.
Evaluated models
GPT-2 SmallGPT-2 MediumGPT-2 LargePythia-70MPythia-410MQwen2-0.5BQwen2-7BGemma2-2B
Benchmarks
Indirect Object Identification (IOI)Subject–Verb Agreement
Metrics
Pearson correlation coefficient (PCC)faithfulnesscompleteness
AI summaryThe paper proposes Relevance Patching (RelP), which replaces local gradients in attribution patching with propagation coefficients from Layer-wise Relevance Propagation (LRP) for circuit discovery in mechanistic interpretability. Like attribution patching, RelP requires only two forward passes and one backward pass. The authors validate the method on multiple models and tasks, claiming it approximates activation patching more accurately than standard attribution patching, especially when analyzing residual streams and MLP outputs in the Indirect Object Identification task. For example, on GPT-2 Large's MLP outputs, attribution patching has a Pearson correlation coefficient of 0.006, while RelP reaches 0.956. The authors also compare the faithfulness of sparse feature circuits identified by RelP versus Integrated Gradients (IG), claiming RelP achieves similar faithfulness while avoiding the extra computational overhead of IG.

The paper proposes Relevance Patching (RelP), which replaces local gradients in attribution patching with propagation coefficients from Layer-wise Relevance Propagation (LRP) for circuit discovery in mechanistic interpretability. Like attribution patching, RelP requires only two forward passes and one backward pass. The authors validate the method on multiple models and tasks, claiming it approximates activation patching more accurately than standard attribution patching, especially when analyzing residual streams and MLP outputs in the Indirect Object Identification task. For example, on GPT-2 Large's MLP outputs, attribution patching has a Pearson correlation coefficient of 0.006, while RelP reaches 0.956. The authors also compare the faithfulness of sparse feature circuits identified by RelP versus Integrated Gradients (IG), claiming RelP achieves similar faithfulness while avoiding the extra computational overhead of IG.

Related events and news

1 events · 2 news mentions

News that mentions this paper

Goodfire 报告称神经元可作可解释单元

  • Goodfire Researchcites the paper's id or link
    神经元作为可解释的基础
    RelP: Faithful and Efficient Circuit Discovery in Language Models via Relevance Patching.
  • OpenAI Alignment Researchcites the paper's id or link
    OpenAI 用 SAE 潜变量归因调试失准输出
    This tool is widely used for studying language models, including recently for circuit discovery (Nanda, 2024, Marks et al., 2024, Syed et al., 2024, Jafari et al., 2025, Arora et al., 2024).

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Activation patching is hard to scale, and attribution patching suffers from gradient noise; RelP replaces local gradients with LRP propagation coefficients.

    How to localize causally relevant components in deep language models close to activation patching while only doing two forward passes and one backward pass.

    • Scenario: The authors believe transformer language models are widely used, and understanding their internal mechanisms relates to explanation, trust, and control. One central goal of mechanistic interpretability is to localize components responsible for specific functions, algorithms, or behaviors.
    • Existing methods: Activation patching replaces activations of selected components on original input with those from patched input, directly doing causal testing, but component-wise interventions are hard to scale. Attribution patching (AtP) uses gradients to estimate influence, requiring only two forward passes and one backward pass; the authors state this degrades in robustness and accuracy in deep, highly nonlinear networks, similar to gradient attribution being affected by noisy gradients.
    • Hypothesis: LRP backpropagates output or output-defined metrics, redistributing relevance by layer-wise rules, aiming for conservation of total relevance, sparser explanations, and more robustness to noise. The authors thus replace local gradients in AtP with such propagation coefficients.
    • This paper's approach: Propose Relevance Patching (RelP). Compare its approximation to activation patching against AtP on IOI, with models including GPT-2, Pythia, Qwen2, and Gemma2; and use it on Pythia-70M to recover sparse feature circuits for subject-verb agreement, comparing with Integrated Gradients (IG).
  2. What related research exists?

    The paper places RelP within the patching framework, replaces AtP's local gradients with LRP coefficients, and compares circuit faithfulness with IG.

    Related work is organized into three groups: patching, circuits, and attribution methods. The authors place RelP within the patching framework rather than building a separate circuit search pipeline.

    Activation patching and attribution patching

    • Causal mediation: Pearl (2000) and Vig et al. (2020) test component roles by replacing activations. The paper says many subsequent interpretability studies have followed this practice.
    • Variants: causal tracing in Meng et al. (2022) perturbs activations with Gaussian noise. Path patching (Goldowsky-Dill et al., 2023; Wang et al., 2019) extends the intervention to multi-step computational paths.
    • Gradient approximations: AtP in Nanda (2022) uses gradients instead of full interventions, with two forward passes and one backward pass. AtP* in Kramár et al. (2024) is described by the paper as a follow-up method that improves AtP while remaining scalable. The paper says RelP follows this line but replaces local gradients with LRP propagation coefficients.

    Circuit analysis

    • Edges and scale: ACDC (Conmy et al., 2023) uses activation patching to find key edges in the computational graph; the paper says it is computationally expensive. Lieberum et al. (2023) applies it to large models, and Prakash et al. (2024) uses it to study fine-tuning effects.
    • Features and gradients: SAE (Marks et al., 2025; Kharlapenko et al., 2025) learns disentangled latent features. IFR (Ferrando and Voita, 2024) and EAP (Syed et al., 2023) use gradient attribution for circuit discovery; the paper says this is more computationally efficient.
    • LRP pruning: Hatefi et al. (2025) uses LRP for attribution-guided pruning, addressing both circuit discovery and model compression. The paper says RelP is also based on LRP but stays within the patching framework to approximate activation patching.

    Gradient attribution and propagation attribution

    • Gradient family: local gradients, saliency, Gradient×Input, and Grad-CAM use backpropagation for sensitivity or class-relevance heatmaps. SmoothGrad averages over random perturbations, PathwayGrad first finds key subnetworks then propagates gradients, and IG integrates along a path from baseline to input. The paper says raw gradients are often noisy.
    • Propagation family: LRP (Bach et al., 2015) and DeepLIFT (Shrikumar et al., 2017) use local rules to redistribute the output backward. The paper says this can give more faithful attributions.

    Baselines and benchmarks

    • Baseline methods: on IOI, activation patching is the reference and AtP is the comparison. On subject–verb agreement, IG (10 integration steps) is the gradient baseline, and neuron circuits built directly on neurons with the same discovery pipeline serve as the comparison.
    • Benchmarks: IOI uses 100 prompt pairs, templates in Table 2, with patch swapping the subject and indirect object. Subject–Verb Agreement uses the three structures in Table 3; 300 are discovered and 100 are held out. The SAE comes from Marks et al. (2025) trained on Pythia-70M.

    The authors' positioning is that RelP keeps AtP's algorithmic structure and only replaces local gradients with LRP propagation coefficients, to get closer to activation patching while still using two forward passes and one backward pass. Relative to IG, the authors say circuit faithfulness is comparable, without the extra computation of multi-step integration.

  3. How does the paper address this problem?

    RelP follows AtP's two forward passes and one backward pass, replacing gradients with LRP propagation coefficients computed by layer-wise rules.

    RelP does not change the approximation structure of attribution patching; it only replaces local gradients with LRP propagation coefficients. The computational cost is the same as AtP: two forward passes and one backward pass.

    Causal contribution and AtP

    • Setup: a decoder-only transformer is written as a directed computational graph, with nodes as components and edges as direct computational dependencies. Samples from distribution D are prompt pairs (x_original, x_patch): the former carries the behavior under study, and the latter provides the counterfactual perturbation. The metric L maps output logits to real numbers.
    • Causal quantity: the contribution of component n is the expected difference: L after executing do(n ← n(x_patch)) on the original input, minus L without the intervention. The authors consider directly computing this for all nodes infeasible on large models.
    • AtP: approximates this effect with the dot product of the activation difference and the gradient of L with respect to n (evaluated at the original activations), thus avoiding the need to run the patched model again.

    Replacing gradients with propagation coefficients

    LRP redistributes the output, or a metric defined by the output, from upper layers to lower layers. A local first-order expansion gives the Jacobian, and redistribution uses propagation coefficients ρ to aggregate contributions from connected upper-layer components. The lower-layer relevance is the activation times this coefficient:

    Ri(l−1)=ai(l−1)ρi

    ρ depends on the local Jacobian, lower-layer activations, and upper-layer relevance. The authors describe it as a filter that decides which input activations count as relevant. Propagation can go to the input or stop at an intermediate layer. The initial relevance is usually the target class logit; the paper also mentions using the contrastive logit difference.

    RelP replaces the gradient in the AtP dot product with this ρ, evaluated at the original input activations:

    ĉRelP(n)=𝔼[(n(xpatch)−n(xoriginal))⊤ρ(L(M(xoriginal)))]

    The authors write that this expectation also equals the RelP relevance extracted at the original activations. Unlike Marks et al., who replace the approximation with IG but require multiple forward and backward passes, RelP does not increase the number of passes over AtP.

    Rules on transformers

    Table 1 lists rules by component and uses detach to treat bracketed terms as constants.

    • Normalization: LayerNorm / RMSNorm use the LN-rule. The authors say centering and variance scaling can cause relevance collapse; treating the variance term as a constant makes the operation linear and preserves conservation.
    • Activations and linear layers: GELU / SiLU use the Identity-rule, treating the nonlinear part as constant. Linear layers can use the 0-rule, ϵ-rule, or γ-rule. The 0-rule is equivalent to Gradient×Input; the ϵ-rule is used when sparsity and noise reduction are desired, and the γ-rule when positive contributions should be emphasized.
    • Attention and gates: the AH-rule treats attention weights as constants to handle the case where the weights themselves depend on the input, which would break conservation. Multiplicative gates use the Half-rule, splitting relevance in half to avoid what the authors call spurious doubling.

    Rules and evaluation in experiments

    • Actual rules: in Table 4, GPT-2, Pythia, Qwen2, and Gemma2-2B all use the LN-rule, Identity-rule, and 0-rule. The Half-rule is used only for Qwen2 and Gemma2-2B, which have multiplicative gates. None of the four model families use the AH-rule. The paper does not state why the AH-rule is not used.
    • IOI: 100 pairs of template prompts. L is the logit difference between the original target and the patch target. RelP, AtP, and activation patching are computed separately for the residual stream, attention outputs, and MLP outputs; after summing over the hidden dimension, PCC measures closeness to activation patching.
    • Circuits: nodes are SAE features. Tokens in the same position play similar roles, so node and edge effects are averaged across samples while positions are preserved. The threshold T_N keeps only nodes with contributions above the threshold. Faithfulness is (L(C)−L(∅))/(L(M)−L(∅)), where L(∅) is full-model mean-ablation. Completeness is the faithfulness of the complement M\C.
  4. What experiments did the paper conduct?

    Except for one case, RelP's PCC is higher than AtP's; on GPT-2 Large's MLP, RelP is 0.956 and AtP is 0.006.

    Experimental Setup

    • Models: GPT-2 Small, Medium, Large, Pythia-70M, 410M, Qwen2-0.5B, 7B, Gemma2-2B. These are the analyzed models. The paper does not report LLM evaluation.
    • IOI: 100 prompt pairs, three templates in Table 2; patch swaps subject and indirect object, other tokens unchanged. L is the logit difference between original and patched targets. Components are residual stream, attention output, MLP output; after summing over hidden dimensions, PCC is computed with activation patching.
    • IOI baseline: The authors treat activation patching effects as reference, AtP as baseline. The paper does not report number of repetitions.
    • Subject-verb agreement: Only on Pythia-70M, using SAE from Marks et al. Table 3 has three templates: within RC, across RC, across PP; metric is probability difference between correct and incorrect verb inflection. 300 findings, 100 held out. Evaluation excludes the first third of each circuit.
    • Circuit baseline: IG uses 10 integration steps. Neuron circuits are built directly on neurons using the same discovery process. Faithfulness uses full model mean-ablation as baseline, authors give ideal value 1; completeness is faithfulness of the complement, ideal value 0.
    • Rules: Table 4: LN-rule, Identity-rule, 0-rule for all model families; Half-rule only for Qwen2 and Gemma2-2B; AH-rule not used.

    Main Results

    The table below is from Table 5, also the values in Figure 1. Left of slash is RelP, right is AtP, both PCC with activation patching, computed on 100 IOI prompts.

    Swipe horizontally to read the table

    ModelResidual RelP / AtPAttention RelP / AtPMLP RelP / AtP
    GPT-2 small0.968 / 0.7530.962 / 0.9790.992 / 0.195
    GPT-2 medium0.884 / 0.6710.982 / 0.9610.993 / 0.551
    GPT-2 large0.853 / 0.7400.965 / 0.4610.956 / 0.006
    Pythia-70M0.898 / 0.7280.986 / 0.9810.967 / 0.507
    Pythia-410M0.874 / 0.6950.903 / 0.8790.948 / 0.501
    Qwen2-0.5B0.922 / 0.6840.965 / 0.9330.981 / 0.717
    Qwen2-7B0.549 / 0.2300.569 / 0.3950.622 / 0.471
    Gemma2-2B0.769 / 0.3910.956 / 0.9420.952 / 0.910
    • Authors' summary: Section 5.1 states RelP consistently outperforms AtP across listed architectures and scales, with larger gaps in MLP output and residual stream. Abstract uses GPT-2 Large's MLP as example.
    • Exception in table: The only cell where RelP is lower than AtP is GPT-2 small's attention output. Section 7 states attention gains are small, does not discuss this cell separately.
    • Low row: Qwen2-7B's three RelP columns are the lowest group among eight models, but still higher than same model's AtP. Results section does not explain this model.

    Qualitative Comparison: Residual Stream and MLP0

    • What was measured: Figure 2 compares RelP, AtP, and activation patching on GPT-2 Small. Appendix Figures 4 and 5 are for GPT-2 Large and Pythia-410M respectively. Main text does not give cell values.
    • Authors' paraphrase: Nanda (2022) argues AtP fails notably on residual stream, mainly due to large activation magnitudes and LayerNorm nonlinearity breaking linear approximation; GPT-2 Small's MLP0 acts as extended embedding, where linear approximation may be unstable.
    • Authors' interpretation: Authors state in Figure 2 RelP is closer to activation patching, especially residual stream and MLP output (e.g., MLP0). Figure 4 and 5 captions also state RelP aligns better on residual stream and MLP0.

    Sparse Feature Circuits for Subject-Verb Agreement

    • What was measured: On Pythia-70M, circuits built with SAE features, compared with neuron circuits and IG. Light lines in Figure 3 are circuits for each structure in Table 3, thick lines are averages. Node threshold T_N varies; main text does not give scores per threshold.
    • Scale and error nodes: Authors state this aligns with Marks et al.: about 100 features explain most performance, about 1,500 neurons needed to explain half. Removing residual stream SAE error nodes hurts performance; removing MLP and attention error nodes has smaller impact. Authors state this also aligns with Marks et al.
    • Comparison with IG: Section 5.2 first writes RelP's faithfulness is comparable to AtP; later writes comparable to IG, and states on neuron circuits and feature circuits with attention/MLP errors removed, RelP is higher than IG. IG uses 10 integration steps, RelP still two forward passes and one backward. On completeness, authors state removing only a few nodes from feature circuits greatly reduces Pythia performance, while neuron side needs hundreds for similar effect. Figure 3 does not give curve values in main text.

    Other Ablations and Analyses

    • Rule combinations in Table 4; paper does not report PCC after replacing or removing a rule.
    • Half-rule only for Qwen2 family and Gemma2-2B; AH-rule not used for any of four model families.
    • IG integration steps 10; RelP and AtP both two forward passes and one backward. Paper does not report wall-clock time or number of queries.
    • Circuit evaluation excludes first third (Appendix A.2); T_N varies, main text does not give scores per threshold.
    • IOI attribution sums over hidden dimensions before computing PCC (Section 5.1).
  5. What are some points that can be further explored?

    The authors state that rule selection has model-related overhead, attention gains are small, and experiments are limited to single-token predictions with counterfactual pairs.

    Limitations and future directions noted by the authors

    • Rule overhead: using RelP requires choosing rules within LRP, which adds model-specific overhead relative to model-agnostic attribution methods (Section 7).
    • Attention: the authors say that in experiments RelP consistently outperforms AtP on residual stream and MLP outputs, with smaller gains on attention outputs; deeper analysis combined with the gradient structure of self-attention and more careful rule selection may improve attribution faithfulness (Section 7).
    • Internal layers: the authors say prior work has mainly discussed these difficulties for input-level feature attribution, and systematic study of internal layers remains limited (Section 7).
    • Model scale: experiments use small- and medium-scale open-source models with full access to internals and gradients (Section 7).
    • Task form: tasks align with standard circuit analysis benchmarks, rely on predefined original–patch pairs and single-token prediction metrics, and circuit discovery is limited to behaviors of moderate complexity (Section 7).
    • Future directions: the authors list extension to free-text generation or scenarios without known counterfactual inputs as future work (Section 7).

    Experimental coverage

    • IOI models are GPT-2 Small, Medium, Large, Pythia-70M, 410M, Qwen2-0.5B, 7B, and Gemma2-2B, 8 in total; 100 prompt pairs per model, with components being residual stream, attention outputs, and MLP outputs (Section 5.1, Table 5).
    • The reference for IOI is activation patching, the comparison is AtP, and the metric is PCC. The paper discusses AtP* but does not report PCC against AtP*.
    • Subject–verb agreement is done only on Pythia-70M, with the SAE from Marks et al.; 300 are discovered and 100 are held out; comparisons are IG (steps=10) and neuron circuits (Section 5.2, Appendix A.2).
    • The implemented rules are the LN-rule, Identity-rule, and 0-rule; the Half-rule is used only for Qwen2 and Gemma2-2B; the AH-rule is not used (Table 4). The paper does not report PCC after changing rules.
    • The paper does not report the number of repetitions or wall-clock time, nor does it give faithfulness and completeness values for the curves in Figure 3 in the main text.
  6. Summarize the main content of the paper

    RelP approximates activation patching with LRP propagation coefficients; on IOI it is closer than AtP in most cases, and circuit faithfulness is comparable to IG.

    RelP is a component localization method in mechanistic interpretability: within the attribution patching framework, it replaces local gradients with LRP propagation coefficients, approximating activation patching with two forward passes and one backward pass.

    • Problem: Activation patching can do causal testing, but component-wise interventions are hard to scale. AtP approximates with gradients; the authors state in deep nonlinear networks it is affected by noisy gradients and deviates from activation patching.
    • Approach: Relevance is redistributed backward by layer-wise rules. In experiments, each model uses LN-rule, Identity-rule, and 0-rule; Qwen2 and Gemma2-2B with multiplicative gates additionally use Half-rule. Attention's AH-rule is not used. IOI metric is logit difference between original and patched targets; circuit nodes are SAE features, evaluated with faithfulness and completeness.
    • IOI: 8 models, 100 prompts. On residual stream and MLP, RelP's PCC with activation patching is higher than AtP. On GPT-2 Large's MLP, AtP is 0.006, RelP is 0.956 (Table 5). On attention, only GPT-2 small shows AtP higher, 0.979 vs 0.962. Qwen2-7B's RelP correlations are the lowest group among eight models. Authors paraphrase Nanda, linking AtP's deviation on residual stream and MLP0 to large activations, LayerNorm, and extended embedding.
    • Circuits: Only on Pythia-70M for subject-verb agreement. Authors state about 100 features explain most performance, about 1,500 neurons needed to explain half. Same section first writes faithfulness comparable to AtP, later writes comparable to 10-step IG, and states on neuron circuits and feature circuits with attention/MLP errors removed, it is higher than IG. Removing residual stream SAE error nodes has larger impact than removing MLP or attention error nodes.
    • Authors' conclusion: Propagation rules in feature attribution can be integrated into mechanistic interpretability, staying closer to activation patching while maintaining AtP's computational structure, and achieving faithfulness comparable to IG on sparse circuits. Authors also note rule selection has model-related overhead, attention gains are small, and current tasks rely on known counterfactual pairs and single-token metrics.
Read originalarxiv.org