arXiv:2504.05262cs.CL2025-04EMNLP被引 7

测试大模型加法理解力,发现其依赖模式匹配而非真正掌握规则。

Do Large Language Models Truly Grasp Addition? A Rule-Focused Diagnostic Using Two-Integer Arithmetic

  • 通过交换律、符号变换和长度扩展三类诊断测试模型
  • 符号输入下准确率降至7.5%以下,交换律错误率达20%
  • 提示解释或给规则反而降低性能,说明非真正理解

大型语言模型在高级数学基准上表现优异,但在基础算术任务中仍会出错,引发对其是否真正掌握基本算术规则的质疑。为此,我们系统性地评估12个主流大模型在两整数加法(0到2^64)上的表现,检验三个关键性质:交换律(A+B=B+A)、符号重映射下的表示不变性(如7↦Y),以及运算数长度与准确率的单调关系。结果显示,尽管数值准确率高达73.8%-99.8%,但模型在诊断测试中表现严重异常:符号输入下准确率≤7.5%,交换律违反比例达20%,且准确率随操作数长度变化非单调。干预实验进一步揭示:显式提供规则使性能下降29.49%,要求解释后作答仅维持基线水平。这些结果表明当前大模型处理加法主要依赖模式匹配,而非稳健的规则推导,亟需新的诊断基准与模型架构创新以培养真正的数学推理能力。数据集与代码已开源于https://github.com/kuri-leo/llm-arithmetic-diagnostic。

原文摘要 · Abstract (English)

Large language models (LLMs) achieve impressive results on advanced mathematics benchmarks but sometimes fail on basic arithmetic tasks, raising the question of whether they have truly grasped fundamental arithmetic rules or are merely relying on pattern matching. To unravel this issue, we systematically probe LLMs' understanding of two-integer addition ($0$ to $2^{64}$) by testing three crucial properties: commutativity ($A+B=B+A$), representation invariance via symbolic remapping (e.g., $7 \mapsto Y$), and consistent accuracy scaling with operand length. Our evaluation of 12 leading LLMs reveals a stark disconnect: while models achieve high numeric accuracy (73.8-99.8%), they systematically fail these diagnostics. Specifically, accuracy plummets to $\le 7.5$% with symbolic inputs, commutativity is violated in up to 20% of cases, and accuracy scaling is non-monotonic. Interventions further expose this pattern-matching reliance: explicitly providing rules degrades performance by 29.49%, while prompting for explanations before answering merely maintains baseline accuracy. These findings demonstrate that current LLMs address elementary addition via pattern matching, not robust rule induction, motivating new diagnostic benchmarks and innovations in model architecture and training to cultivate genuine mathematical reasoning. Our dataset and generating code are available at https://github.com/kuri-leo/llm-arithmetic-diagnostic.

大模型算术理解诊断测试

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