揭示大模型算术运算的四阶段信息演化路径。
Addition in Four Movements: Mapping Layer-wise Information Trajectories in LLMs
- 分四阶段追踪模型前向传播中的信息流动。
- 深层激活层可精准解码结果数字,准确率接近完美。
- 适合研究模型内部计算机制与可解释性的人参考。
多数字加法是检验大语言模型计算能力的清晰探针。为解析LLaMA-3-8B-Instruct内部算术过程,我们结合线性探测与logit-lens分析。受人类逐步计算加法方式启发,提出并分析了前向传播中连贯的四阶段轨迹:公式结构表征最先可线性解码,而答案词元仍位于候选列表末尾;核心计算特征随后显著显现;在深层激活层,结果的数值抽象更清晰,实现对和中各数字的近乎完美检测与解码;临近输出时,模型组织并生成最终内容,正确词元稳定占据最高排名。该轨迹表明一种层级化计算过程,优先于机械记忆。我们开源代码与数据以促进复现。
原文摘要 · Abstract (English)
Multi-digit addition is a clear probe of the computational power of large language models. To dissect the internal arithmetic processes in LLaMA-3-8B-Instruct, we combine linear probing with logit-lens inspection. Inspired by the step-by-step manner in which humans perform addition, we propose and analyze a coherent four-stage trajectory in the forward pass:Formula-structure representations become linearly decodable first, while the answer token is still far down the candidate list.Core computational features then emerge prominently.At deeper activation layers, numerical abstractions of the result become clearer, enabling near-perfect detection and decoding of the individual digits in the sum.Near the output, the model organizes and generates the final content, with the correct token reliably occupying the top rank.This trajectory suggests a hierarchical process that favors internal computation over rote memorization. We release our code and data to facilitate reproducibility.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。