mlsanityData to 7 Oct 2026

Teaching Arithmetic to Small Transformers

arXiv 2307.03381 ↗First posted 7 Jul 2023cs.LGcited by 121

Not on the map. Why?

Cited by 31 in LLM reasoning, but placed by its own abstract, which didn’t fit.

Abstract (arXiv)

Large language models like GPT-4 exhibit emergent capabilities across general-purpose tasks, such as basic arithmetic, when trained on extensive text data, even though these tasks are not explicitly encoded by the unsupervised, next-token prediction objective. This study investigates how small transformers, trained from random initialization, can efficiently learn arithmetic operations such as addition, multiplication, and elementary functions like square root, using the next-token prediction objective. We first demonstrate that conventional training data is not the most effective for arithmetic learning, and simple formatting changes can significantly improve accuracy. This leads to sharp phase transitions as a function of training data scale, which, in some cases, can be explained through connections to low-rank matrix completion. Building on prior work, we then train on chain-of-thought style data that includes intermediate step results. Even in the complete absence of pretraining, this approach significantly and simultaneously improves accuracy, sample complexity, and convergence speed. We also study the interplay between arithmetic and text data during training and examine the effects of few-shot prompting, pretraining, and model scale. Additionally, we discuss length generalization challenges. Our work highlights the importance of high-quality, instructive data that considers the particular characteristics of the next-word prediction objective for rapidly eliciting arithmetic capabilities.

Key facts. Cited by 121 papers in the map (data through 7 Oct 2026). Builds on 54 of its 68 references that are in the map. First posted on arXiv 7 Jul 2023.

Builds on

54 of 68 references.

References · 54

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  5. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  6. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
  7. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  8. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  9. 2023Let's Verify Step by Stepcited by 3,598
  10. 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
  11. 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
  12. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
38 more
  1. 2022Emergent Abilities of Large Language Modelscited by 2,483
  2. 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
  3. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  4. 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
  5. 2022LaMDA: Language Models for Dialog Applicationscited by 1,218
  6. 2018Self-Attention with Relative Position Representationscited by 1,112
  7. 2023Teaching Large Language Models to Self-Debugcited by 963
  8. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
  9. 2022Solving math word problems with process- and outcome-based feedbackcited by 871
  10. 2022Large Language Models Can Self-Improvecited by 656
  11. 2017Program Induction by Rationale Generation : Learning to Solve and Explain Algebraic Word Problemscited by 642
  12. 2023DataComp: In search of the next generation of multimodal datasetscited by 635
  13. 2022Efficiently Scaling Transformer Inferencecited by 529
  14. 2022Language Models are Multilingual Chain-of-Thought Reasonerscited by 518
  15. 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
  16. 2019Explain Yourself! Leveraging Language Models for Commonsense Reasoningcited by 367
  17. 2016Solving General Arithmetic Word Problemscited by 353
  18. 2022Emergent Analogical Reasoning in Large Language Modelscited by 239
  19. 2023Looped Transformers as Programmable Computerscited by 224
  20. 2022Exploring Length Generalization in Large Language Modelscited by 204
  21. 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 199
  22. 2019Do NLP Models Know Numbers? Probing Numeracy in Embeddingscited by 157
  23. 2022Impact of Pretraining Term Frequencies on Few-Shot Reasoningcited by 142
  24. 2021Investigating the Limitations of Transformers with Simple Arithmetic Taskscited by 136
  25. 2023How well do Large Language Models perform in Arithmetic tasks?cited by 130
  26. 2022Teaching Algorithmic Reasoning via In-context Learningcited by 111
  27. 2014Learning to Executecited by 105
  28. 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 101
  29. 2022Compositional Semantic Parsing with Large Language Modelscited by 95
  30. 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
  31. 2021Making Transformers Solve Compositional Taskscited by 72
  32. 2022Limitations of Language Models in Arithmetic and Symbolic Inductioncited by 71
  33. 2021Linear algebra with transformerscited by 62
  34. 2022Transcending Scaling Laws with 0.1% Extra Computecited by 55
  35. 2017Making Neural Programming Architectures Generalize via Recursioncited by 35
  36. 2021A Data-Centric Approach for Training Deep Neural Networks with Less Datacited by 28
  37. 2022What is my math transformer doing? -- Three results on interpretability and generalizationcited by 19
  38. 2021Exploring Generalization Ability of Pretrained Language Models on Arithmetic and Logical Reasoningcited by 17

50 most cited of 54 All 54 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 13; 2024: 51; 2025: 31; 2026: 26.

121 papers.

Sort:

By area:

  1. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
  2. 2025Reasoning with Latent Thoughts: On the Power of Looped Transformerscited by 223
  3. 2024The pitfalls of next-token predictioncited by 156
  4. 2023Looped Transformers are Better at Learning Learning Algorithmscited by 135
  5. 2024Beyond Autoregression: Discrete Diffusion for Complex Reasoning and Planningcited by 135
  6. 2024Tokenization counts: the impact of tokenization on arithmetic in frontier LLMscited by 112
  7. 2023Amortizing intractable inference in large language modelscited by 94
  8. 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 82
  9. 2024Transformers Can Do Arithmetic with the Right Embeddingscited by 77
  10. 2023Unleashing the potential of prompt engineering for large language modelscited by 72
  11. 2024Premise Order Matters in Reasoning with Large Language Modelscited by 71
  12. 2023Auto-Regressive Next-Token Predictors are Universal Learnerscited by 65
38 more
  1. 2024Understanding Transformer Reasoning Capabilities via Graph Algorithmscited by 64
  2. 2024Can Language Models Learn to Skip Steps?cited by 59
  3. 2023Positional Description Matters for Transformers Arithmeticcited by 56
  4. 2024Number Cookbook: Number Understanding of Language Models and How to Improve Itcited by 41
  5. 2024Pre-trained Large Language Models Use Fourier Features to Compute Additioncited by 38
  6. 2024IsoBench: Benchmarking Multimodal Foundation Models on Isomorphic Representationscited by 37
  7. 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpadcited by 35
  8. 2024Causal Language Modeling Can Elicit Search and Reasoning Capabilities on Logic Puzzlescited by 35
  9. 2023Learning the greatest common divisor: explaining transformer predictionscited by 33
  10. 2024NumeroLogic: Number Encoding for Enhanced LLMs' Numerical Reasoningcited by 31
  11. 2025Self-Improving Transformers Overcome Easy-to-Hard and Length Generalization Challengescited by 30
  12. 2024Simulation of Graph Algorithms with Looped Transformerscited by 29
  13. 2024Out-of-distribution generalization via composition: a lens through induction heads in Transformerscited by 28
  14. 2025Roll the dice & look before you leap: Going beyond the creative limits of next-token predictioncited by 28
  15. 2024Universal Length Generalization with Turing Programscited by 25
  16. 2024A Philosophical Introduction to Language Models -- Part I: Continuity With Classic Debatescited by 22
  17. 2024Position Coupling: Improving Length Generalization of Arithmetic Transformers Using Task Structurecited by 22
  18. 2024Can We Rely on LLM Agents to Draft Long-Horizon Plans? Let's Take TravelPlanner as an Examplecited by 22
  19. 2025FoNE: Precise Single-Token Number Embeddings via Fourier Featurescited by 21
  20. 2024Mixture of Parrots: Experts improve memorization more than reasoningcited by 20
  21. 2024Looped ReLU MLPs May Be All You Need as Practical Programmable Computerscited by 19
  22. 2024ALPINE: Unveiling the Planning Capability of Autoregressive Learning in Language Modelscited by 18
  23. 2024From Artificial Needles to Real Haystacks: Improving Retrieval Capabilities in LLMs by Finetuning on Synthetic Datacited by 18
  24. 2024Transforming the Bootstrap: Using Transformers to Compute Scattering Amplitudes in Planar N = 4 Super Yang-Mills Theorycited by 17
  25. 2023Uncovering hidden geometry in Transformers via disentangling position and contextcited by 15
  26. 2024Towards Empirical Interpretation of Internal Circuits and Properties in Grokked Transformers on Modular Polynomialscited by 14
  27. 2025Extrapolation by Association: Length Generalization Transfer in Transformerscited by 13
  28. 2023Arithmetic with Language Models: from Memorization to Computationcited by 12
  29. 2024Transformers meet Neural Algorithmic Reasonerscited by 12
  30. 2024UniZero: Generalized and Efficient Planning with Scalable Latent World Modelscited by 12
  31. 2024The Belief State Transformercited by 12
  32. 2024Regress, Don't Guess -- A Regression-like Loss on Number Tokens for Language Modelscited by 12
  33. 2024A Theory for Length Generalization in Learning to Reasoncited by 11
  34. 2024Language Models are Symbolic Learners in Arithmeticcited by 11
  35. 2023Sweeping Heterogeneity with Smart MoPs: Mixture of Prompts for LLM Task Adaptationcited by 10
  36. 2024Language Models Trained to do Arithmetic Predict Human Risky and Intertemporal Choicecited by 10
  37. 2024Explicitly Encoding Structural Symmetry is Key to Length Generalization in Arithmetic Taskscited by 10
  38. 2023Chain-of-Thought Reasoning is a Policy Improvement Operatorcited by 8

50 most cited of 121 All 121 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2026Algorithmic Scratchpads and Curriculum Staging for Arithmetic Reasoning in Tiny Transformers
  2. 2024Language Models Do Hard Arithmetic Tasks Easily and Hardly Do Easy Arithmetic Tasks
  3. 2024Unraveling Arithmetic in Large Language Models: The Role of Algebraic Structures
  4. 2022Transformers discover an elementary calculation system exploiting local attention and grid-like problem representation
  5. 2025Integrating Arithmetic Learning Improves Mathematical Reasoning in Smaller Models
  6. 2024PARAMANU-GANITA: Can Small Math Language Models Rival with Large Language Models on Mathematical Reasoning?
  7. 2026Separators Make Carry Propagation Learnable:The Geometry of Latent Carry in a Multiplication Transformer
  8. 2022Overcoming Barriers to Skill Injection in Language Modeling: Case Study in Arithmetic