arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.23351cs.CLcs.AIcs.LG
收藏

当链式推理失败时,解决方案隐藏在隐藏状态中

When Chain-of-Thought Fails, the Solution Hides in the Hidden States

Heriot-Watt University(赫瑞斯泰大学);University of Edinburgh(爱丁堡大学)

Houman Mehrafarin, Amit Parekh, Ioannis Konstas

AI总结:

研究通过激活补丁分析发现,链式推理(CoT)中的隐藏状态包含任务相关信息,即使原始推理轨迹错误,也能通过补丁提升准确率,揭示CoT中某些token能编码足够的信息恢复正确答案。

摘要:

无论中间推理是否在计算上有效还是仅具有解释性,都取决于链式推理(CoT)token是否包含任务相关信息。我们通过在GSM8K上对CoT进行机械因果分析,使用激活补丁技术:将CoT生成的token级隐藏状态转移到相同问题的直接回答运行中,然后测量对最终答案准确率的影响。在不同模型中,生成后补丁的准确率显著高于直接回答提示和原始CoT轨迹,表明单个CoT token能编码足够的信息恢复正确答案,即使原始轨迹错误。这种任务相关信息在正确CoT运行中更普遍,且在token分布上不均匀,集中在中后期层,并在推理轨迹中较早出现。此外,补丁语言token如动词和实体包含任务解决信息,引导生成向正确推理发展,而数学token编码接近答案的内容,但成功率低。补丁输出通常较短,但准确率超过完整CoT轨迹,表明完整推理链不总是必要。这些发现表明,CoT编码可恢复的token级问题解决信息,为推理如何表示以及何处失败提供了新见解。

英文摘要:

Whether intermediate reasoning is computationally useful or merely explanatory depends on whether chain-of-thought (CoT) tokens contain task-solving information. We present a mechanistic causal analysis of CoT on GSM8K using activation patching: transferring token-level hidden states from an arithmetic CoT generation to a direct-answer run for the same question, then measuring the effect on final-answer accuracy. Across models, patching can elicit generations that lead to correct answers, revealing that individual CoT hidden states can encode sufficient task-solving information even when the original CoT trace is incorrect. This information is more prevalent in correct than incorrect CoT runs and is unevenly distributed across tokens, concentrating in mid-to-late layers and appearing earlier in the reasoning trace. Moreover, patching from language tokens such as verbs and entities more frequently elicits correct reasoning traces, whereas patches from mathematical tokens more often produce answer-proximal generations that rarely succeed. Further analysis shows that earlier CoT tokens concentrate recoverable information, while later ones require broader search to find the correct answer. Together, these findings show that CoT encodes recoverable, token-level task-solving information, revealing how arithmetic reasoning is represented, accessed, and disrupted.

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

↑