mlsanityData to 14 Oct 2026

Principled Understanding of Generalization for Generative Transformer Models in Arithmetic Reasoning Tasks

arXiv 2407.17963 ↗First posted 25 Jul 2024cs.LG cs.AIcited by 5

On the map: LLM reasoning → Mathematical reasoning

Abstract (arXiv)

Transformer-based models excel in various tasks but their generalization capabilities, especially in arithmetic reasoning, remain incompletely understood. Arithmetic tasks provide a controlled framework to explore these capabilities, yet performance anomalies persist, such as inconsistent effectiveness in multiplication and erratic generalization in modular addition (e.g., modulo 100 vs. 101). This paper develops a unified theoretical framework for understanding the generalization behaviors of transformers in arithmetic tasks, focusing on length generalization. Through detailed analysis of addition, multiplication, and modular operations, we reveal that translation invariance in addition aligns with relative positional encoding for robust generalization, while base mismatch in modular operations disrupts this alignment. Experiments across GPT-family models validate our framework, confirming its ability to predict generalization behaviors. Our work highlights the importance of task structure and training data distribution for achieving data-efficient and structure-aware training, providing a systematic approach to understanding of length generalization in transformers.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in Mathematical reasoning, one of 17 directions in LLM reasoning. Builds on 15 of its 27 references that are in the map. First posted on arXiv 25 Jul 2024.

Builds on

15 of 27 references.

Closest ancestors · 1

Same direction, newest first

  1. 2022Limitations of Language Models in Arithmetic and Symbolic Induction9 Aug

Other references · 14

  1. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,592
  2. 2022Toy Models of Superpositioncited by 971
  3. 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 406
  4. 2023AI Alignment: A Comprehensive Surveycited by 263
  5. 2023The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networkscited by 156
  6. 2022Scaling Laws and Interpretability of Learning from Repeated Datacited by 152
  7. 2021Investigating the Limitations of Transformers with Simple Arithmetic Taskscited by 139
  8. 2023Teaching Arithmetic to Small Transformerscited by 123
  9. 2024Transformers Can Do Arithmetic with the Right Embeddingscited by 78
  10. 2023Length Generalization in Arithmetic Transformerscited by 66
  11. 2023Searching for Needles in a Haystack: On the Role of Incidental Bilingualism in PaLM's Translation Capabilitycited by 62
  12. 2019Location Attention for Extrapolation to Longer Sequencescited by 33
2 more
  1. 2024From GPT-4 to Gemini and Beyond: Assessing the Landscape of MLLMs on Generalizability, Trustworthiness and Causality through Four Modalitiescited by 19
  2. 2023From Interpolation to Extrapolation: Complete Length Generalization for Arithmetic Transformerscited by 10

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 5.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2022Achieving and Understanding Out-of-Distribution Generalization in Systematic Reasoning in Small-Scale Transformers
  2. 2024How Numerical Precision Affects Arithmetical Reasoning Capabilities of LLMs
  3. 2025Unlocking Out-of-Distribution Generalization in Transformers via Recursive Latent Space Reasoning
  4. 2024Explicitly Encoding Structural Symmetry is Key to Length Generalization in Arithmetic Tasks
  5. 2024Unraveling Arithmetic in Large Language Models: The Role of Algebraic Structures
  6. 2024Grokked Transformers are Implicit Reasoners: A Mechanistic Journey to the Edge of Generalization
  7. 2026Shared circuits predict whether LLMs generalize across formats in arithmetic reasoning
  8. 2026Algorithmic Scratchpads and Curriculum Staging for Arithmetic Reasoning in Tiny Transformers