Do PhD-level LLMs Truly Grasp Elementary Addition? Probing Rule Learning vs. Memorization in Large Language Models

Yang Yan, Yu Lu, Renjun Xu, Zhenzhong Lan · DOI

TL;DR

This paper investigates whether Large Language Models (LLMs) truly understand fundamental arithmetic principles or merely memorize patterns. By testing LLMs on elementary addition with symbolic transformations, the authors reveal a significant performance drop, indicating a reliance on memorization rather than genuine rule learning. This highlights critical limitations in current LLM architectures for mathematical reasoning and suggests a need for new evaluation methods and model designs.

What Problem Does This Paper Address?

Large Language Models (LLMs) have achieved remarkable performance on various benchmarks, leading to the perception that they possess advanced reasoning capabilities. However, a growing body of research suggests that LLMs can be brittle and fail on seemingly simple tasks, raising a fundamental question: do they truly grasp underlying principles, or are they sophisticated pattern matchers? Existing benchmarks, often complex, can mask these underlying weaknesses. This paper tackles this by probing LLMs' understanding of elementary addition, a foundational mathematical operation, to differentiate between genuine rule learning and memorization.

Methods

The authors employ a novel approach to evaluate LLMs' arithmetic comprehension by focusing on elementary two-integer addition. Their methodology centers on three key experiments:

  • Digit Scaling Tests: Examining how accuracy changes with the number of digits in the operands, expecting a monotonic degradation for true algorithmic understanding.
  • Symbolic Generalization: Testing the models' ability to apply addition rules when digits are replaced with arbitrary symbols (e.g., 7 → Y). This probes whether the models have learned abstract rules or are tied to numerical representations.
  • Rule Intervention Studies: Investigating the impact of explicitly providing addition rules (e.g., through few-shot prompting) on performance, to see if it helps or hinders models that might rely on internalized, potentially misaligned, knowledge.

They also analyze two core arithmetic principles: commutativity (A + B = B + A) and compositional generalization (invariance under symbolic transformations).

Datasets

The paper constructs a comprehensive dataset of 100,000 two-integer addition problems. This dataset is divided into three phases:

  • Phase 1: Covers all two-digit combinations (0-99) for a baseline.
  • Phase 2: Samples equal-length digit pairs from [27, 249] to test scaling effects.
  • Phase 3: Extends to larger numbers ([249, 264]) to probe performance limits.

Crucially, for testing commutativity, both A + B and B + A variants of each problem are included. For symbolic generalization, bijective mappings are applied to digits.

Key Insights and Ideas

  • Symbolic Representation is a Key Differentiator: The stark performance drop when digits are replaced by symbols is the most compelling evidence that LLMs are not generalizing abstract arithmetic rules. This suggests their "understanding" is tied to the specific numerical tokens they were trained on.
  • Commutativity is Not Guaranteed: Even for simple addition, LLMs frequently violate the commutative property (A + B ≠ B + A), indicating a lack of deep understanding of this fundamental mathematical axiom.
  • Explicit Rules Can Hinder Performance: Providing LLMs with explicit, human-defined addition rules often degrades their performance. This suggests that their internal mechanisms might be misaligned with these rules, and they default to their learned patterns, which are not necessarily robust.
  • "Explain-and-Do" Offers a Glimpse of Hope: Approaches where models first explain their reasoning before solving a problem maintain performance better than direct rule provision. This hints that encouraging models to articulate their (pattern-based) understanding might be more effective than imposing external rules.
  • Benchmarking Limitations: Current benchmarks, even those for mathematical reasoning, may be too focused on complex problem-solving and fail to adequately assess fundamental rule learning and generalization capabilities.

Key Results

  • LLMs achieve high accuracy (73.8-99.8%) on standard numerical addition tasks.
  • Performance collapses dramatically (≤7.5% accuracy) on symbolic addition tasks, with a mean drop of -81.23%. For instance, Claude-3.5-sonnet dropped from 99.81% to 7.51%.
  • Over 1,700 cases of commutativity violations were observed in some models.
  • Explicit rule provision degraded performance by 81.2% on average.
  • The "Explain-and-Do" approach maintained baseline accuracy, suggesting a better alignment with the models' internal processing.

Limitations and Future Work

  • Scope of Mathematical Operations: The study focuses solely on elementary addition. While this is a strong test case, findings might not directly generalize to more complex arithmetic operations or abstract reasoning tasks.
  • Methodological Framework: While systematic, the evaluation might overlook alternative pathways for developing genuine mathematical comprehension beyond supervised and reinforcement learning.
  • Future Work: The authors suggest expanding research to broader mathematical operations, exploring diverse architectural approaches for principle learning, and developing more comprehensive evaluation frameworks that can assess mathematical comprehension while maintaining practical applicability. They also emphasize the need for architectures capable of genuine mathematical reasoning beyond pattern recognition.

Summary updated

BibTeX
@misc{yan2025do,
  author = {Yang Yan and Yu Lu and Renjun Xu and Zhenzhong Lan},
  title = {{Do PhD-level LLMs Truly Grasp Elementary Addition? Probing Rule Learning vs. Memorization in Large Language Models}},
  year = {2025},
  eprint = {2504.05262},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.05262},
}
Figure