大型语言模型真正掌握加法了吗?基于双整数算术的规则聚焦诊断
Do Large Language Models Truly Grasp Addition? A Rule-Focused Diagnostic Using Two-Integer Arithmetic
AI总结:
本文通过双整数加法的交换律、符号表示不变性和操作数长度扩展一致性诊断12个LLMs,发现其高准确率源于模式匹配而非规则归纳,为模型架构和训练创新提供了新方向。
摘要:
大型语言模型(LLMs)在高级数学基准测试中取得了令人瞩目的成绩,但有时在基本算术任务上却会失败,这引发了它们是否真正掌握了基本算术规则,还是仅仅依赖模式匹配的疑问。为了探究这一问题,我们通过测试三个关键属性来系统地探测LLMs对双整数加法($0$ 到 $2^{64}$)的理解:交换律($A+B=B+A$)、通过符号重映射(例如,$7 \mapsto Y$)的表示不变性,以及准确率随操作数长度的一致性扩展。我们对12个领先的LLMs的评估揭示了一个明显的脱节:尽管模型达到了很高的数字准确率(73.8-99.8%),但它们在这些诊断测试中系统性地失败了。具体而言,在符号输入下准确率骤降至$\le 7.5$%,交换律在高达20%的情况下被违反,且准确率扩展呈非单调性。干预措施进一步暴露了这种对模式匹配的依赖:明确提供规则会使性能下降29.49%,而在回答前要求解释仅能维持基线准确率。这些发现表明,当前的LLMs是通过模式匹配而非稳健的规则归纳来解决基础加法的,这推动了新的诊断基准以及模型架构和训练方面的创新,以培养真正的数学推理能力。我们的数据集和生成代码可在 https://github.com/kuri-leo/llm-arithmetic-diagnostic 获取。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。