arXiv:2508.02513cs.CLcs.AI2025-08被引 7

发现大模型解数学题时按位逐个处理数字,机制可解释且不依赖模型大小

Modular Arithmetic: Language Models Solve Math Digit by Digit

  • 大模型在解算术题时,对每一位数字(个位、十位等)有独立神经电路
  • 通过干预特定数位,能精准改变答案,证明这些电路具因果作用
  • 该机制适用于不同模型规模和分词方式,具有普遍性

尽管近期研究揭示了大语言模型(LLMs)在简单算术任务中采用的内部策略,但其底层机制尚未形成统一理解。本文扩展了现有发现,表明LLMs以逐位方式表示数字,并提供了证据,证明存在针对不同数位位置(个位、十位、百位等)的专用神经电路——即独立运作于不同数位上的MLP神经元子群。这些电路的存在与模型规模和分词策略无关,无论数字是逐位编码还是整体作为单个标记处理均成立。通过特征重要性分析与因果干预,我们识别并验证了这些数位位置特异的电路,揭示出大模型解决算术问题所依赖的组合式且可解释的结构。我们的干预手段能选择性地改变模型在特定数位上的预测结果,进一步证实了数位电路在算术求解中的因果作用。

原文摘要 · Abstract (English)

While recent work has begun to uncover the internal strategies that Large Language Models (LLMs) employ for simple arithmetic tasks, a unified understanding of their underlying mechanisms is still lacking. We extend recent findings showing that LLMs represent numbers in a digit-wise manner and present evidence for the existence of digit-position-specific circuits that LLMs use to perform simple arithmetic tasks, i.e. modular subgroups of MLP neurons that operate independently on different digit positions (units, tens, hundreds). Notably, such circuits exist independently of model size and of tokenization strategy, i.e. both for models that encode longer numbers digit-by-digit and as one token. Using Feature Importance and Causal Interventions, we identify and validate the digit-position-specific circuits, revealing a compositional and interpretable structure underlying the solving of arithmetic problems in LLMs. Our interventions selectively alter the model's prediction at targeted digit positions, demonstrating the causal role of digit-position circuits in solving arithmetic tasks.

算术推理可解释性神经电路

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