Skip to main content
QUICK REVIEW

[论文解读] LLMs Faithfully and Iteratively Compute Answers During CoT: A Systematic Analysis With Multi-step Arithmetics

Keito Kudo, Yoichi Aoki|ArXiv.org|Dec 2, 2024
Artificial Intelligence in LawSocial Sciences被引用 3
一句话总结

本研究探究大型语言模型(LLMs)在多步算术任务中,于思维链(CoT)生成之前还是期间执行内部推理。通过在十种大型语言模型上使用因果探测与激活修补技术,作者发现:简单子问题在CoT开始前即已内部解决,而复杂多跳推理则发生在CoT过程中,揭示了一种混合的“边说边想”与“先想后说”机制,具有系统性的内部计算模式。

ABSTRACT

This study investigates the internal information flow of large language models (LLMs) while performing chain-of-thought (CoT) style reasoning. Specifically, with a particular interest in the faithfulness of the CoT explanation to LLMs' final answer, we explore (i) when the LLMs' answer is (pre)determined, especially before the CoT begins or after, and (ii) how strongly the information from CoT specifically has a causal effect on the final answer. Our experiments with controlled arithmetic tasks reveal a systematic internal reasoning mechanism of LLMs. They have not derived an answer at the moment when input was fed into the model. Instead, they compute (sub-)answers while generating the reasoning chain on the fly. Therefore, the generated reasoning chains can be regarded as faithful reflections of the model's internal computation.

研究动机与目标

  • 确定LLMs的思维链(CoT)输出是否忠实反映内部推理过程,还是仅是事后的合理化解释。
  • 探究答案计算的时间点——模型是否在CoT生成之前或期间内部解决答案。
  • 区分简单单步推理与复杂多跳推理在内部计算时间上的差异。
  • 通过探测与干预技术分析内部表征与最终答案之间的因果关系。
  • 为多样化LLMs在受控算术任务中系统性地提供结构化内部推理模式的证据。

提出的方法

  • 作者设计了一个受控的符号化多步算术推理任务测试平台,包含明确的变量与目标值。
  • 在每一层与时间步上应用因果探测,以检测隐藏状态何时首次预测出变量(如A、B、C)的正确值。
  • 在某一时间步上探测准确率较高,表明模型已内部计算出对应值。
  • 通过激活修补技术验证探测结果,将隐藏状态替换为来自高准确率(H+)与低准确率(H−)区域的值。
  • 通过比较不同修补条件下模型的输出,评估内部状态对最终答案的因果影响。
  • 该分析在十种LLMs上展开,包括Qwen、Llama、Yi与Mistral,覆盖五个任务层级,复杂度逐步递增。
Figure 1: Probes predict each variable’s value from the LLMs’ hidden states at each timestep $\times$ layer; a high accuracy indicates where the model completes the corresponding calculation ( § ˜ 3 ). Causal interventions ( § ˜ 4.1 , § ˜ 4.2 ) revealed a somewhat indirect relationship between sub-
Figure 1: Probes predict each variable’s value from the LLMs’ hidden states at each timestep $\times$ layer; a high accuracy indicates where the model completes the corresponding calculation ( § ˜ 3 ). Causal interventions ( § ˜ 4.1 , § ˜ 4.2 ) revealed a somewhat indirect relationship between sub-

实验结果

研究问题

  • RQ1LLMs在推理过程中何时内部计算答案——是在CoT生成之前还是期间?
  • RQ2思维链输出是否忠实反映了内部推理过程,还是仅是事后的合理化解释?
  • RQ3简单子问题是否在CoT开始前即被解决,而复杂多跳问题是否在CoT生成过程中浮现?
  • RQ4在CoT推理中,内部表征与最终答案之间存在何种因果关系?
  • RQ5不同LLM架构与任务复杂度下,内部计算模式如何变化?

主要发现

  • 简单单步算术(如A = 2 + 3)在CoT生成开始前即已内部计算完成,表现为早期时间步探测准确率较高。
  • 更复杂的多跳推理(如B = 1 + A,其中A = 2 + 3)发生在CoT生成阶段,探测准确率仅在CoT标记生成后才上升。
  • 通过激活修补进行的因果干预证实,高探测准确率区域的内部状态显著影响最终答案,尽管因果路径略为间接。
  • 对于Llama3.2-3B,模型在隐藏状态中正确计算出中间值(如B = 5),但在输出前错误地覆盖了这些值,导致最终错误。
  • 探测结果表明,各模型间表现出一致的内部推理模式,表明存在系统性融合的“边说边想”与“先想后说”行为。
  • 错误分析显示,模型通常能内部推导出正确的中间值,但无法在最终输出中保留这些值,表明最终标记生成过程存在不稳定性。
Figure 2: Probing results for Qwen2.5-7B at the task level 3 . The input sequence below the graphs is one example (the results are averaged over the test set). The upper part indicates the maximum probing accuracy achieved at each token position $t$ . The bottom part shows the probing accuracies in
Figure 2: Probing results for Qwen2.5-7B at the task level 3 . The input sequence below the graphs is one example (the results are averaged over the test set). The upper part indicates the maximum probing accuracy achieved at each token position $t$ . The bottom part shows the probing accuracies in

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。