arXiv:2604.15842cs.CL2026-04

揭秘大模型算术推理内部机制,发现关键模块分工模式。

Disentangling Mathematical Reasoning in LLMs: A Methodological Investigation of Internal Mechanisms

论文配图:Disentangling Mathematical Reasoning in LLMs: A Methodological Investigation of Internal Mechanisms
图 1 · 摘自论文原文
  • 通过早期解码追踪每层的词预测过程,观察推理路径。
  • 高手模型在最后几层才生成正确结果,且注意力与MLP分工明确。
  • 适合对大模型内部机理、推理能力感兴趣的科研人员。

大型语言模型(LLMs)展现出惊人的能力,但其处理推理密集型任务的内部机制仍不清晰。为深入理解模型内部处理机制,本文通过考察模型执行算术任务时的内部过程,探究其如何完成算术运算。利用早期解码技术,我们追踪了各层中下一个词预测的构建过程。实验发现,模型虽在早期识别出算术任务,但正确结果仅在最后几层生成。值得注意的是,擅长算术的模型表现出明显的注意力与MLP模块分工:注意力负责传递输入信息,而MLP负责聚合信息;低水平模型则无此分工。此外,表现优异的模型在处理更复杂算术任务时呈现出功能性处理特征,表明其具备超越事实记忆的推理能力。

原文摘要 · Abstract (English)

Large language models (LLMs) have demonstrated impressive capabilities, yet their internal mechanisms for handling reasoning-intensive tasks remain underexplored. To advance the understanding of model-internal processing mechanisms, we present an investigation of how LLMs perform arithmetic operations by examining internal mechanisms during task execution. Using early decoding, we trace how next-token predictions are constructed across layers. Our experiments reveal that while the models recognize arithmetic tasks early, correct result generation occurs only in the final layers. Notably, models proficient in arithmetic exhibit a clear division of labor between attention and MLP modules, where attention propagates input information and MLP modules aggregate it. This division is absent in less proficient models. Furthermore, successful models appear to process more challenging arithmetic tasks functionally, suggesting reasoning capabilities beyond factual recall.

模型机理算术推理模块分工

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。