arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.30630cs.LGcs.AI
收藏

通过行为反事实解释模型推理

Interpreting Model Reasoning through Behavioral Counterfactuals

University of Wisconsin–Madison(威斯康星大学麦迪逊分校);University of Oxford(牛津大学)

Shawn Im, James Oldfield, Adel Bibi, Sharon Li

AI总结:

本研究提出基于行为反事实的方法,训练模块编辑残差流以最小化提示间输出分布的KL散度,通过归因分析模型推理,在两款大模型案例中揭示未被口头承认的建议对推理的影响机制。

摘要:

随着模型能力的提升,准确理解模型形成思维链时的内部过程是一个重要问题。然而,由于采样响应存在差异,难以隔离干预的影响并系统比较模型推理,这一问题仍具挑战性。我们提出一种通过行为反事实定位和分析给定干预如何影响模型推理的方法:在固定响应的情况下,对提示引入干预会如何改变下一个token分布?我们训练一个模块来编辑残差流,以最小化源提示及其反事实目标提示下固定响应的输出分布之间的KL散度。我们发现,匹配输出分布比标准激活重建目标能更有效地恢复反事实行为,并验证训练模块输出的归因可有效识别反事实恢复的因果重要位置。模型编辑的下游效应的归因图和可视化,为生成关于原始模型计算的假设提供了接口,随后可通过激活修补进行测试。在针对Gemma-4-E4B-it和DeepSeek-R1-0528-Qwen3-8B的案例研究中,我们调查了建议如何在未被口头承认的情况下影响模型推理。我们的分析确定了问题陈述和填充token处的表示,这些表示介导了建议的大部分影响,其下游效应包括改变理由的框架甚至最终答案。

英文摘要:

Faithfully understanding the internal process that occurs as models form their chain of thought is an important problem with the rise in model capabilities. However, this remains challenging due to the variance in sampled responses, making it difficult to isolate the effects of interventions and compare model reasoning systematically. We propose a method for localizing and analyzing how a given intervention affects the model's reasoning through behavioral counterfactuals: given a fixed response, how does introducing an intervention to the prompt change the next-token distributions? We train a module to edit the residual stream such that it minimizes the KL divergence between the output distributions for a fixed response under a source prompt and its counterfactual target prompt. We find that matching the output distributions recovers the counterfactual behavior more effectively than standard activation reconstruction objectives and validate that attribution of the trained module outputs is effective for identifying causally important locations for counterfactual recovery. The attribution maps and visualizations of the downstream effects of model edits provide an interface for generating hypotheses about the original model's computation, which can then be tested with activation patching. In a case study on Gemma-4-E4B-it and DeepSeek-R1-0528-Qwen3-8B, we investigate how a suggestion influences model reasoning even when it is not verbally acknowledged. Our analysis identifies representations at the question statement and filler tokens that mediate a substantial part of the suggestion's influence, with downstream effects such as changing the framing of the justification or even the final answer.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑