Skip to content

Interpreting model reasoning through behavioral counterfactualsInterpreting Model Reasoning through Behavioral Counterfactuals

arXiv· arXiv:2610.30630· Shawn Im, James Oldfield, Adel Bibi, Sharon LiUniversity of Wisconsin–Madison; University of OxfordIndexed by this site · 2026-10-23· Originally publishedAlignment

Quick read

Interpretability

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

The authors propose a behavioral counterfactual framework to locate the effect of prompt interventions on model reasoning, and on Scruples find that the influence of the advice is mainly mediated by the representations of the question sentence and filler tokens.

Questions
Chain of thought may be untrustworthy and hard to monitor, and wording differences in sampled responses make the influence of an intervention on internal computation hard to isolate. The authors aim to locate how a prompt intervention (such as a sentence of advice) is mediated inside the model and changes downstream behavior.
Methods
With a fixed response, train a residual-stream editing module that minimizes the KL divergence between the output distributions under the source prompt and the counterfactual target prompt; then use Integrated Gradients to attribute the edits to each token, validate by ablation, and test the hypotheses with native activation patching.
Experiments and results
The behavioral reconstruction objective achieves KL recovery of 49.9% on Gemma-4-E4B-it and 47.8% on DeepSeek-R1-0528-Qwen3-8B, higher than the activation reconstruction objective; high attribution concentrates on question and filler tokens, and native patching at these positions recovers 16.2% and 19.3%, higher than random patching.
Limitations and future work
The authors state that the analysis covers only a single setting and a single intervention; the experiments include only 2 models, one dataset (Scruples), and one advice intervention, and the advice-acknowledgment check is a keyword-assisted manual check of 500 items per model, which the authors state may undercount.
Experimental setupGemma-4-E4B-it、DeepSeek-R1-0528-Qwen3-8B · Scruples · KL recovery、NMSE recovery et al.
Evaluated models
Gemma-4-E4B-itDeepSeek-R1-0528-Qwen3-8B
Benchmarks
Scruples
Metrics
KL recoveryNMSE recoverySpearman correlationfinal-answer accuracy
AI summaryThe researchers propose an interpretability method based on behavioral counterfactuals for locating and analyzing how prompt interventions affect a model's chain-of-thought reasoning. The method trains a module to edit the residual stream so as to minimize the KL divergence between the output distributions of a fixed response under the source prompt and the counterfactual target prompt; the authors state that this distribution-matching objective recovers counterfactual behavior better than standard activation reconstruction objectives, and that attributing module outputs effectively identifies causally important positions in counterfactual recovery. In case studies on Gemma-4-E4B-it and DeepSeek-R1-0528-Qwen3-8B, the authors analyzed how advice affects reasoning when it is not verbally acknowledged by the model, finding that representations at problem statement and filler token positions mediate a substantial portion of the advice's influence, with downstream effects including changes to the wording framing of arguments and even the final answer. Attribution graphs and visualizations of downstream effects of model editing provide an interface for forming hypotheses about model computation, which can be further tested with activation patching.

The researchers propose an interpretability method based on behavioral counterfactuals for locating and analyzing how prompt interventions affect a model's chain-of-thought reasoning. The method trains a module to edit the residual stream so as to minimize the KL divergence between the output distributions of a fixed response under the source prompt and the counterfactual target prompt; the authors state that this distribution-matching objective recovers counterfactual behavior better than standard activation reconstruction objectives, and that attributing module outputs effectively identifies causally important positions in counterfactual recovery. In case studies on Gemma-4-E4B-it and DeepSeek-R1-0528-Qwen3-8B, the authors analyzed how advice affects reasoning when it is not verbally acknowledged by the model, finding that representations at problem statement and filler token positions mediate a substantial portion of the advice's influence, with downstream effects including changes to the wording framing of arguments and even the final answer. Attribution graphs and visualizations of downstream effects of model editing provide an interface for forming hypotheses about model computation, which can be further tested with activation patching.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    How to locate the influence of prompt interventions on the model's internal computation during reasoning, especially when chain of thought is untrustworthy.

    Core question: how to separate and locate, under a fixed response, the effect of a prompt intervention on the model's internal computation during reasoning.

    • Setting and motivation: The authors argue that as model capabilities improve, understanding how models reason becomes important; and recent work shows that chain of thought may become hard to monitor and unreliable for understanding decisions (Chen et al., 2025; OpenAI, 2026, etc.).
    • Shortcomings of existing methods: The authors state that responses sampled under the same prompt differ greatly in wording and reasoning structure, making it difficult to compare activations and identify downstream effects; analyses centered on predefined reasoning behaviors (Venhoff et al., 2025) or sentence-level influence (Bogdan et al., 2025) may fail to capture all the ways an intervention affects computation.
    • Core observation: Fixing the generated response and comparing the next-token distribution at each response position under the source prompt and the counterfactual prompt can isolate the effect of the intervention itself and expose changes not visible in the sampled text.
    • Method proposed in the paper: Train an editing module that modifies the residual stream at intermediate layers so that the output distribution matches the counterfactual distribution; attribute and ablate the module's outputs to generate hypotheses about the original model's computation, then test them on the original model with activation patching.
    • Case setting: On Scruples ethical scenarios, the intervention is a user adding a sentence of advice that the author is wrong; the authors state that the influence of this advice exists even when it is not verbally acknowledged, and the analysis finds that the representations of the question sentence and filler tokens mediate a considerable portion of this influence.
  2. What related research exists?

    Related work falls into three groups: interpretable architectures, counterfactuals and causal analysis, and understanding reasoning; the authors position their work as connecting internal representations with downstream behavior via behavioral counterfactuals.

    Interpretable Models

    • Sparse autoencoders of Huben et al. (2024) and transcoders of Dunefsky et al. (2024)—sparse decomposition of activations or model component computations—are an influential recent direction in interpretability.
    • Bussmann et al. (2025), Bhalla et al. (2025), Lubana et al. (2025), Fel et al. (2026)—add structures such as multi-level, temporal or block sparsity to sparse decomposition.
    • Fraser-Taliente et al. (2026), Pan et al. (2026), Huang et al. (2025), Li et al. (2025)—explain activations or downstream behavior in natural language; Bai et al. (2026) and Karvonen et al. (2026) examine the limitations of existing methods in faithfulness, stability and generalization.

    Counterfactuals and Causal Analysis

    • Geiger et al. (2021) propose identifying causal factors in model computation; Meng et al. (2022) and Geiger et al. (2024) localize behavior to key components or map variables to distributed representations.
    • Sankaranarayanan et al. (2026) use counterfactual responses to locate concept-related attention heads; Xiao & Aranguri (2026) find the direction of behavioral change by comparing the mean activation difference of responses before and after fine-tuning.
    • The end-to-end training objective of Braun et al. (2024) is the method on which this paper's editing module training is based.

    Understanding Reasoning

    • Chen et al. (2025), Turpin et al. (2023), Arcuschin et al. (2025)—show that reasoning traces are unfaithful.
    • Korbak et al. (2025), Guan et al. (2025)—monitor chain of thought with another language model; Hase & Potts (2026) and Yueh-Han et al. (2026) make models more monitorable by improving faithfulness and maintaining low controllability, respectively; Boppana et al. (2026) probe the final answer during reasoning. This paper's intervention design is based on Guan et al. (2025).

    Positioning and comparison: The authors state that this paper does not rely on predefined reasoning behaviors or sentence-level descriptions, but directly connects intermediate representations with downstream behavior; in response to Karvonen et al. (2026)'s result that activation tools provide no additional information for predicting counterfactual behavior, the authors state that this paper shows activation methods can complement verbal reasoning. This paper has no comparison baseline methods; the controls are the activation reconstruction objective and random patching.

  3. How does the paper address this problem?

    With responses fixed, train a residual-stream editing module to match the counterfactual output distribution, then perform attribution, ablation and native activation patching.

    Overall approach: use behavioral counterfactuals as the framework—with generated responses fixed, compare the next-token distribution under the source prompt and the counterfactual prompt; train an editing module to reproduce this distribution change, then locate key positions through attribution and ablation, and finally verify on the original model with activation patching.

    Counterfactual Distribution Matching

    • For each control prompt xi, construct an intervention prompt x̃i = I(xi), and generate one response for each; with the response y fixed, run forward passes under both prompts and compare the next-token distribution at each position, thereby isolating the intervention effect.
    • Bidirectional training: control→intervention and intervention→control, with two fixed responses per prompt pair, for 4N records in total.
    • The editing module acts on the residual stream at each position of a selected intermediate layer: h′j = hj + Fθ(hj), i.e., an additive edit to the residual activations; the module is a gated MLP with a shared encoder and direction-specific output heads, with output heads initialized to zero (similar to LoRA).

    Objective Function and Renormalization

    • The loss is the behavioral reconstruction loss: L(θ)=1/4N∑r 1/(|yr|)∑t KL(p̄ttgt,r | p̄tθ,r), i.e., minimizing the KL divergence between the edited distribution and the target distribution on the common support.
    • The common support St = TopK(ptsrc) ∪ TopK(pttgt) ∪ {yt}, renormalized on it; for Top-p sampling, K is chosen so that the Top-K probability mass is usually no less than the Top-p threshold.
    • The evaluation metric is normalized recovery: 1 − L/D, where D is the average KL between the source and target distributions without applying the edit.

    Attribution and Causal Validation

    • Use Integrated Gradients (16 steps) to attribute the loss decrease U(z) = ℓr(0) − ℓr(z) to individual token-level edits (edit events).
    • Ablation validation: set the edit at position τ to zero while keeping the other edits unchanged, rerun the downstream layers, and measure the counterfactual KL change at each response position and on average.
    • Native activation patching: replace the high-scoring positions obtained from attribution (question span, filler tokens) in the original model with activations under the counterfactual condition, to test whether these positions causally mediate the intervention's influence.

    Implementation Details

    • The module is applied after the model's mid-layer: after layer 20 for Gemma-4-E4B-it and after layer 17 for DeepSeek-R1-0528-Qwen3-8B (zero-based counting).
    • Generation configuration: Gemma uses temperature 1.0, Top-p 0.95, Top-K 64; DeepSeek uses temperature 0.6, Top-p 0.95; Max New Tokens is 32768 for both (Tables 3, 4).
    • Training: Adam, effective batch size 128, learning rate swept from 2e-5/5e-5/1e-4, 1 epoch, linear warmup 10% (Table 5); the behavioral objective selects checkpoints by validation-set KL recovery, and the activation reconstruction objective selects checkpoints by validation-set NMSE.
  4. What experiments did the paper conduct?

    On Scruples, compare the two training objectives, validate the causality of attribution, and use native activation patching to test the mediating role of question and filler tokens.

    Experimental Setup

    • Models tested: Gemma-4-E4B-it and DeepSeek-R1-0528-Qwen3-8B, with the editing module applied after layer 20 and layer 17, respectively.
    • Dataset: Scruples (Lourie et al., 2021), with 27,766 train, 2,500 val and 2,500 test examples; each prompt has a control and an intervention condition, doubling the number of samples; each source prompt generates one response under each condition.
    • Intervention: Based on Guan et al. (2025), a sentence is added to the prompt stating that the author is wrong and soliciting an opinion; in the control condition this sentence is empty.
    • Metrics: KL recovery (1 − L/D), NMSE recovery, Spearman correlation between attribution scores and ablation effects, final answer accuracy.
    • Attribution evaluation protocol: For each sequence, take the 5 edit events with the highest IG scores plus 5 random edit events, 10 in total, and compute the correlation between attribution scores and ablation effects.
    • Patching control: Random patching of the same number of tokens serves as the control; error bars are 95% bootstrap confidence intervals from resampling source prompts 1000 times; all evaluations are reported on the test set.

    Main Results

    Comparison of the behavioral reconstruction objective and the activation reconstruction objective (Figure 2):

    Swipe horizontally to read the table

    ModelObjectiveKL recoveryNMSE recovery
    Gemma-4-E4B-itBehavioral reconstruction49.9%0.0%
    Gemma-4-E4B-itActivation reconstruction-3.4%36.9%
    DeepSeek-R1-0528-Qwen3-8BBehavioral reconstruction47.8%-3.0%
    DeepSeek-R1-0528-Qwen3-8BActivation reconstruction20.4%43.0%
    • The authors state that although activation reconstruction better reconstructs the mid-layer residual stream, it recovers less of the output distribution, and is even negative on Gemma; the authors argue that geometric activation reconstruction may be insufficient to transfer counterfactual output-level behavior.
    • Therefore all downstream analyses use the module trained with the distribution-matching objective.

    Causal Validation of Attribution

    • What was measured: The correlation between IG attribution scores and single-point ablation effects (Figure 3), with the correlation between edit norm and effect as a control.
    • Results: The median Spearman correlation of IG is 0.58 on Gemma-4-E4B-it and 0.68 on DeepSeek-R1-0528-Qwen3-8B; the edit-norm controls are 0.36 and 0.53, respectively.
    • Authors' interpretation: The authors state that high-attribution events correlate well with ablation effects and are consistently greater than random events; the effects are not caused solely by edit magnitude.

    Case Study: Where the Advice's Influence Lies

    • Final answer accuracy (Table 1): Gemma-4-E4B-it control 76.2%, with advice 72.6%; DeepSeek-R1-0528-Qwen3-8B control 72.3%, with advice 62.5%.
    • Verbal acknowledgment is rare: Keyword-assisted manual inspection of 500 intervention responses per model finds that Gemma-4-E4B-it has at least 4/500 and DeepSeek-R1-0528-Qwen3-8B has 113/500 responses that explicitly mention the advice (Appendix A.5).
    • High-attribution tokens (Table 2): Among the top 5% of absolute attribution within each record, the most common are mostly filler tokens (whitespace, punctuation, separators) or question text tokens; on Gemma the indentation token appears most frequently, with 29.5% of its occurrences entering the top 5%. The authors suggest that the advice's influence may be routed through these tokens that carry no key semantics.
    • Ablation example (Figure 4): Ablating the edit of an indentation token in a Gemma response changes wording tendencies, for example the description of the flight attendant and whether one feels unfairly treated; the authors state that filler-token edits can change the framing of the situation.

    Native Activation Patching Validation

    • What was measured: Patching the question span, filler tokens, or both on the original model, measuring KL recovery (Figure 5).
    • Results: On Gemma-4-E4B-it, question 0.0601, filler 0.114, both 0.162, with random patching controls 0.0264/0.0301/0.0554; on DeepSeek-R1-0528-Qwen3-8B, question 0.113, filler 0.0749, both 0.193, with random controls 0.014/0.0298/0.0517. The authors state that patching these positions recovers roughly 2.3 to 8.1 times more than the random controls.
    • Authors' interpretation: Filler tokens have a greater effect on Gemma and the question has a greater effect on DeepSeek; Figures 6 and 7 show that after patching the output distribution shifts toward the counterfactual direction, and in individual examples the relative probabilities of final answer candidates also change.

    Other Ablations and Analyses

    • Architecture ablation (Figure 9): On Gemma, fixed vector 22.3%, linear 43.3%, MLP 49.9%; on DeepSeek, 13.0%, 44.0%, 47.8% (KL recovery).
    • RelP attribution (Figure 10): median correlation Gemma 0.18, DeepSeek 0.16, weaker than IG.
    • All-token attribution (Appendix B.4, Figures 11–13): correlation is lower on 10 random samples; the authors suspect this is mainly because most tokens have low attribution scores and are more affected by noise.
    • Support quality (Figure 8): 90% of response positions in both models retain at least about 99.3% of the probability mass within the common support.
  5. What are some points that can be further explored?

    The authors state that the analysis is limited to a single setting and intervention, and list more complex interventions, filler token representations, and other future directions.

    Limitations and Future Directions Noted by the Authors

    • The authors state that the current analysis focuses on only a single setting and a single intervention, and believe the framework can generalize to more complex settings and interventions (Discussion, Limitations and Future Work).
    • Directions listed by the authors: attribute from more targeted token sets; intervene on intermediate reasoning steps; explore the representations behind harmful interventions (such as jailbreak) (Discussion).
    • The authors suggest combining geometric methods (Wurgaft et al., 2026) or verbalization methods (Gurnee et al., 2026) to further analyze representations on filler tokens (Discussion).
    • The authors hope future work will design counterfactual comparisons that can isolate more complex computational factors (Discussion).
    • The authors state that the advice-acknowledgment statistics may undercount: acknowledgments that do not use the keywords cannot be detected, and DeepSeek may confuse user with author or assistant (Appendix A.5).

    Scope of Experiments

    • The models tested are 2 in total, Gemma-4-E4B-it and DeepSeek-R1-0528-Qwen3-8B, with the editing module applied after one intermediate layer each.
    • The dataset is one benchmark, Scruples, and the intervention is only one kind of advice that "thinks the author is wrong"; each source prompt generates 1 response per condition.
    • Attribution evaluation takes 10 edit events per sequence (5 high-attribution + 5 random); the advice-acknowledgment check covers 500 intervention responses per model.
    • The paper does not report the compute used for training, the training time, or the auxiliary model used to train the editing module (the editing module is trained by the authors themselves).
  6. Summarize the main content of the paper

    Behavioral counterfactual framework: with a fixed response, match the counterfactual distribution and locate the influence of the advice mediated by the question sentence and filler tokens.

    This is an interpretability paper that proposes the behavioral counterfactuals framework to study how prompt interventions are mediated inside the model and change reasoning behavior.

    • Problem: Chain of thought may be unfaithful and hard to monitor, and variation in sampled responses makes intervention effects hard to isolate; the authors aim to locate the key positions where an intervention affects computation and its downstream effects.
    • Method: With responses fixed, train a gated MLP editing module to make additive edits to the residual stream at an intermediate layer, minimizing the KL divergence from the counterfactual target distribution on the common support; attribute individual token edits with Integrated Gradients, verify causality with ablation, then test hypotheses on the original model with native activation patching.
    • Objective comparison: The behavioral reconstruction objective achieves KL recovery of 49.9% on Gemma-4-E4B-it and 47.8% on DeepSeek-R1-0528-Qwen3-8B; the activation reconstruction objective achieves -3.4% and 20.4%, respectively (Figure 2). The authors argue that reconstructing activations is insufficient to transfer output-level behavior.
    • Attribution validation: The median Spearman correlation between IG attribution and ablation effects is 0.58 (Gemma) and 0.68 (DeepSeek), higher than the edit-norm control (Figure 3).
    • Case findings: On Scruples, the advice lowers DeepSeek's final answer accuracy from 72.3% to 62.5%, but only 113 of 500 responses explicitly acknowledge the advice; high attribution concentrates on question and filler tokens, and native patching at these positions recovers 16.2% (Gemma) and 19.3% (DeepSeek), higher than random patching (Figure 5).
    • Authors' conclusion: The authors state that the framework can expose intervention effects that are not verbalized, and that activation analysis can complement verbal reasoning; limitations are that it covers only a single setting and intervention, and the authors plan to explore more complex interventions and filler-token representations in future work.
Read originalarxiv.org