mlsanityData to 7 Oct 2026

Transformers discover an elementary calculation system exploiting local attention and grid-like problem representation

arXiv 2207.02536 ↗First posted 6 Jul 2022cs.LG cs.AIcited by 7

On the map: LLM reasoning → Mathematical reasoning

Abstract (arXiv)

Mathematical reasoning is one of the most impressive achievements of human intellect but remains a formidable challenge for artificial intelligence systems. In this work we explore whether modern deep learning architectures can learn to solve a symbolic addition task by discovering effective arithmetic procedures. Although the problem might seem trivial at first glance, generalizing arithmetic knowledge to operations involving a higher number of terms, possibly composed by longer sequences of digits, has proven extremely challenging for neural networks. Here we show that universal transformers equipped with local attention and adaptive halting mechanisms can learn to exploit an external, grid-like memory to carry out multi-digit addition. The proposed model achieves remarkable accuracy even when tested with problems requiring extrapolation outside the training distribution; most notably, it does so by discovering human-like calculation strategies such as place value alignment.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Placed in Mathematical reasoning, one of 17 directions in LLM reasoning. Builds on 22 of its 30 references that are in the map. First posted on arXiv 6 Jul 2022.

Builds on

22 of 30 references.

Closest ancestors · 1

Same direction, newest first

  1. 2020Generative Language Modeling for Automated Theorem Proving7 Sep

Other references · 21

  1. 2017Attention Is All You Needcited by 59,932
  2. 2017Decoupled Weight Decay Regularizationcited by 1,722
  3. 2018Relational inductive biases, deep learning, and graph networkscited by 1,341
  4. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
  5. 2017Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learningcited by 935
  6. 2019DeepXDE: A deep learning library for solving differential equationscited by 617
  7. 2018Universal Transformerscited by 613
  8. 2019Stand-Alone Self-Attention in Vision Modelscited by 542
  9. 2016Adaptive Computation Time for Recurrent Neural Networkscited by 479
  10. 2015Recent Advances in Convolutional Neural Networkscited by 360
  11. 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 331
  12. 2019Deep Learning for Symbolic Mathematicscited by 266
9 more
  1. 2021PonderNet: Learning to Pondercited by 156
  2. 2020Injecting Numerical Reasoning Skills into Language Modelscited by 133
  3. 2015Neural GPUs Learn Algorithmscited by 118
  4. 2018Neural Arithmetic Logic Unitscited by 69
  5. 2020Neural Arithmetic Unitscited by 25
  6. 2021The Case for Translation-Invariant Self-Attention in Transformer-Based Language Modelscited by 23
  7. 2015Grid Long Short-Term Memorycited by 19
  8. 2016Extensions and Limitations of the Neural GPUcited by 7
  9. 2021Neural Sequence-to-grid Module for Learning Symbolic Rulescited by 5

Built on by

Cited by year

Citing papers per year: 2022: 1; 2023: 4; 2024: 1; 2025: 1.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Principled Understanding of Generalization for Generative Transformer Models in Arithmetic Reasoning Tasks
  2. 2023A Hybrid System for Systematic Generalization in Simple Arithmetic Problems
  3. 2024Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristics
  4. 2026Algorithmic Scratchpads and Curriculum Staging for Arithmetic Reasoning in Tiny Transformers
  5. 2024Seq-VCR: Preventing Collapse in Intermediate Transformer Representations for Enhanced Reasoning
  6. 2023Frugal LMs Trained to Invoke Symbolic Solvers Achieve Parameter-Efficient Arithmetic Reasoning
  7. 2024How Numerical Precision Affects Arithmetical Reasoning Capabilities of LLMs
  8. 2025Why Can't Transformers Learn Multiplication? Reverse-Engineering Reveals Long-Range Dependency Pitfalls