Investigating the Limitations of Transformers with Simple Arithmetic Tasks
Not on the map. Why?
Cited by 29 in LLM reasoning, but placed by its own abstract, which didn’t fit.
Abstract (arXiv)
The ability to perform arithmetic tasks is a remarkable trait of human intelligence and might form a critical component of more complex reasoning tasks. In this work, we investigate if the surface form of a number has any influence on how sequence-to-sequence language models learn simple arithmetic tasks such as addition and subtraction across a wide range of values. We find that how a number is represented in its surface form has a strong influence on the model's accuracy. In particular, the model fails to learn addition of five-digit numbers when using subwords (e.g., "32"), and it struggles to learn with character-level representations (e.g., "3 2"). By introducing position tokens (e.g., "3 10e1 2"), the model learns to accurately add and subtract numbers up to 60 digits. We conclude that modern pretrained language models can easily learn arithmetic from very few examples, as long as we use the proper surface representation. This result bolsters evidence that subword tokenizers and positional encodings are components in current transformer designs that might need improvement. Moreover, we show that regardless of the number of parameters and training examples, models cannot learn addition rules that are independent of the length of the numbers seen during training. Code to reproduce our experiments is available at https://github.com/castorini/transformers-arithmetic
Key facts. Cited by 136 papers in the map (data through 7 Oct 2026). Builds on 36 of its 49 references that are in the map. First posted on arXiv 25 Feb 2021.
Builds on
36 of 49 references.
References · 36
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2018Deep contextualized word representationscited by 2,285
- 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,157
- 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,046
- 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 883
- 2018Universal Transformerscited by 613
- 2020Scaling Laws for Autoregressive Generative Modelingcited by 510
- 2020Generative Language Modeling for Automated Theorem Provingcited by 379
- 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 331
24 more
- 2019Deep Learning for Symbolic Mathematicscited by 266
- 2021Scaling Laws for Transfercited by 265
- 2020Rethinking Positional Encoding in Language Pre-trainingcited by 197
- 2019oLMpics -- On what Language Model Pre-training Capturescited by 161
- 2019Do NLP Models Know Numbers? Probing Numeracy in Embeddingscited by 157
- 2020Injecting Numerical Reasoning Skills into Language Modelscited by 133
- 2015Neural GPUs Learn Algorithmscited by 118
- 2020Birds have four legs?! NumerSense: Probing Numerical Commonsense Knowledge of Pre-trained Language Modelscited by 110
- 2015Inferring Algorithmic Patterns with Stack-Augmented Recurrent Netscited by 76
- 2020Improve Transformer Models with Better Relative Position Embeddingscited by 73
- 2018Neural Arithmetic Logic Unitscited by 69
- 2020Do Language Embeddings Capture Scales?cited by 63
- 2019NumNet: Machine Reading Comprehension with Numerical Reasoningcited by 59
- 2019Encoding word order in complex embeddingscited by 53
- 2019Giving BERT a Calculator: Finding Operations and Arguments with Reading Comprehensioncited by 51
- 2020The EOS Decision and Length Extrapolationcited by 46
- 2019EQUATE: A Benchmark Evaluation Framework for Quantitative Reasoning in Natural Language Inferencecited by 39
- 2019Enhancing the Transformer with Explicit Relational Encoding for Math Problem Solvingcited by 34
- 2015Grid Long Short-Term Memorycited by 19
- 2019Text2Math: End-to-end Parsing Text into Math Expressionscited by 13
- 2020Towards Question Format Independent Numerical Reasoning: A Set of Prerequisite Taskscited by 10
- 2020Probing for Multilingual Numerical Understanding in Transformer-Based Language Modelscited by 10
- 2016Extensions and Limitations of the Neural GPUcited by 7
- 2019Quantity Tagger: A Latent-Variable Sequence Labeling Approach to Solving Addition-Subtraction Word Problemscited by 5
Built on by
Citing papers per year: 2021: 8; 2022: 17; 2023: 24; 2024: 47; 2025: 24; 2026: 16.
136 papers.
Sort:
By area:
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2022PAL: Program-aided Language Modelscited by 635
- 2023ToolQA: A Dataset for LLM Question Answering with External Toolscited by 273
- 2022Transformers Learn Shortcuts to Automatacited by 260
- 2022Reasoning with Language Model Prompting: A Surveycited by 251
- 2025Reasoning with Latent Thoughts: On the Power of Looped Transformerscited by 223
- 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 199
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
- 2022LIFT: Language-Interfaced Fine-Tuning for Non-Language Machine Learning Taskscited by 146
- 2022mGPT: Few-Shot Learners Go Multilingualcited by 141
- 2023How well do Large Language Models perform in Arithmetic tasks?cited by 130
- 2023Teaching Arithmetic to Small Transformerscited by 121
38 more
- 2024Tokenization counts: the impact of tokenization on arithmetic in frontier LLMscited by 112
- 2022Teaching Algorithmic Reasoning via In-context Learningcited by 111
- 2023Goat: Fine-tuned LLaMA Outperforms GPT-4 on Arithmetic Taskscited by 84
- 2021Representing Numbers in NLP: a Survey and a Visioncited by 83
- 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 83
- 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
- 2022Limitations of Language Models in Arithmetic and Symbolic Inductioncited by 71
- 2023GPT Can Solve Mathematical Problems Without a Calculatorcited by 68
- 2023Auto-Regressive Next-Token Predictors are Universal Learnerscited by 65
- 2024Getting the most out of your tokenizer for pre-training and domain adaptationcited by 65
- 2023Length Generalization in Arithmetic Transformerscited by 64
- 2021Linear algebra with transformerscited by 62
- 2025SuperBPE: Space Travel for Language Modelscited by 58
- 2023Positional Description Matters for Transformers Arithmeticcited by 56
- 2024BioT5+: Towards Generalized Biological Understanding with IUPAC Integration and Multi-task Tuningcited by 54
- 2024Interpreting and Improving Large Language Models in Arithmetic Calculationcited by 43
- 2024Evaluating Large Language Models on Time Series Feature Understanding: A Comprehensive Taxonomy and Benchmarkcited by 38
- 2024Pre-trained Large Language Models Use Fourier Features to Compute Additioncited by 38
- 2023The first step is the hardest: Pitfalls of Representing and Tokenizing Temporal Data for Large Language Modelscited by 34
- 2024OmniPred: Language Models as Universal Regressorscited by 34
- 2023Learning the greatest common divisor: explaining transformer predictionscited by 33
- 2023MultiTabQA: Generating Tabular Answers for Multi-Table Question Answeringcited by 32
- 2024Language Models Encode Numbers Using Digit Representations in Base 10cited by 32
- 2024PatternBoost: Constructions in Mathematics with a Little Help from AIcited by 32
- 2024Global Lyapunov functions: a long-standing open problem in mathematics, with symbolic transformerscited by 29
- 2022SALSA: Attacking Lattice Cryptography with Transformerscited by 28
- 2021Symbolic Brittleness in Sequence Models: on Systematic Generalization in Symbolic Mathematicscited by 27
- 2022On Neural Architecture Inductive Biases for Relational Taskscited by 26
- 2023Mathematical Language Models: A Surveycited by 24
- 2024Language Models Do Hard Arithmetic Tasks Easily and Hardly Do Easy Arithmetic Taskscited by 24
- 2024How Numerical Precision Affects Arithmetical Reasoning Capabilities of LLMscited by 24
- 2024Tools Fail: Detecting Silent Errors in Faulty Toolscited by 23
- 2022AA-TransUNet: Attention Augmented TransUNet For Nowcasting Taskscited by 22
- 2024Position Coupling: Improving Length Generalization of Arithmetic Transformers Using Task Structurecited by 22
- 2025FoNE: Precise Single-Token Number Embeddings via Fourier Featurescited by 21
- 2024Position: Understanding LLMs Requires More Than Statistical Generalizationcited by 20
- 2022What is my math transformer doing? -- Three results on interpretability and generalizationcited by 19
- 2024Understanding LLM Embeddings for Regressioncited by 19
50 most cited of 136 All 136 (JSON)
- 2026ANI: Adaptive Numerical Injection for Unifying Semantic and Arithmetic Representations in Numerical Reasoning30 Sep 2026
- 2026List Counting Failures Are Not One Phenomenon3 Sep 2026
- 2026Numeracy in Large Language Models: Fundamental Limitations and Paths to Improvement13 Aug 2026
- 2026How Should Transformers Encode Numeric Values in Electronic Health Records?1 Jul 2026
- 2026LinAlg-Bench: A Forensic Benchmark Revealing Structural Failure Modes in LLM Mathematical Reasoning15 May 2026
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)28 Apr 2026
- 2026Artificial Effort17 Apr 2026
- 2026On the Creativity of AI Agents14 Apr 2026
- 2026Generating Hadamard matrices with transformers13 Apr 2026
- 2026The Long Delay to Arithmetic Generalization: When Learned Representations Outrun Behavior30 Mar 2026
- 2026TopoBench: Benchmarking LLMs on Hard Topological Reasoning12 Mar 2026
- 2026Length Generalization Bounds for Transformers13 Feb 2026
38 more
- 2026AI-rithmetic11 Feb 2026
- 2026Even GPT-5.2 Can't Count to Five: The Case for Zero-Error Horizons in Trustworthy LLMs22 Jan 2026
- 2026The Effect of Scripts and Formats on LLM Numeracy21 Jan 2026
- 2026The Two-Stage Decision-Sampling Hypothesis: Understanding the Emergence of Self-Reflection in RL-Trained LLMs4 Jan 2026
- 2025From Isolation to Entanglement: When Do Interpretability Methods Identify and Disentangle Known Concepts?17 Dec 2025
- 2025Contrastive Decoding Mitigates Score Range Bias in LLM-as-a-Judge21 Oct 2025
- 2025To Infinity and Beyond: Tool-Use Unlocks Length Generalization in State Space Models16 Oct 2025
- 2025Efficient numeracy in language models through single-token number embeddings8 Oct 2025
- 2025Efficient Knowledge Probing of Large Language Models by Adapting Pre-trained Embeddings8 Aug 2025
- 2025The Art of Breaking Words: Rethinking Multilingual Tokenizer Design3 Aug 2025
- 2025A Group Theoretic Analysis of the Symmetries Underlying Base Addition and Their Learnability by Neural Networks14 Jul 2025
- 2025Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizations23 Jun 2025
- 2025Long-Short Alignment for Effective Long-Context Modeling in LLMs13 Jun 2025
- 2025Is Random Attention Sufficient for Sequence Modeling? Disentangling Trainable Components in the Transformer1 Jun 2025
- 2025Recursive Decomposition with Dependencies for Generic Divide-and-Conquer Reasoning5 May 2025
- 2025A Survey on Mathematical Reasoning and Optimization with Large Language Models22 Mar 2025
- 2025SuperBPE: Space Travel for Language Models17 Mar 2025
- 2025The Lookahead Limitation: Why Multi-Operand Addition is Hard for LLMs27 Feb 2025
- 2025Beyond In-Distribution Success: Scaling Curves of CoT Granularity for Language Model Generalization25 Feb 2025
- 2025Reasoning with Latent Thoughts: On the Power of Looped Transformers24 Feb 2025
- 2025Learning to Add, Multiply, and Execute Algorithmic Instructions Exactly with Neural Networks24 Feb 2025
- 2025Int2Int: a framework for mathematics with transformers22 Feb 2025
- 2025Learning the symmetric group: large from small18 Feb 2025
- 2025Beyond Single-Task: Robust Multi-Task Length Generalization for LLMs17 Feb 2025
- 2025FoNE: Precise Single-Token Number Embeddings via Fourier Features13 Feb 2025
- 2025Learning Model Successors31 Jan 2025
- 2025Decoding-based Regression31 Jan 2025
- 2025Argos: Agentic Time-Series Anomaly Detection with Autonomous Rule Generation via Large Language Models24 Jan 2025
- 2024Tokenisation is NP-Complete19 Dec 2024
- 2024Language hooks: a modular framework for augmenting LLM reasoning that decouples tool usage from the model and its prompt8 Dec 2024
- 2024Understanding LLM Embeddings for Regression22 Nov 2024
- 2024Quantifying artificial intelligence through algorithmic generalization8 Nov 2024
- 2024PatternBoost: Constructions in Mathematics with a Little Help from AI1 Nov 2024
- 2024ALTA: Compiler-Based Analysis of Transformers23 Oct 2024
- 2024How Numerical Precision Affects Arithmetical Reasoning Capabilities of LLMs17 Oct 2024
- 2024Language Models Encode Numbers Using Digit Representations in Base 1015 Oct 2024
- 2024Global Lyapunov functions: a long-standing open problem in mathematics, with symbolic transformers10 Oct 2024
- 2024MLissard: Multilingual Long and Simple Sequential Reasoning Benchmarks8 Oct 2024
50 newest of 136 All 136 (JSON)
- 2022PAL: Program-aided Language Modelscited by 635
- 2022Reasoning with Language Model Prompting: A Surveycited by 251
- 2025Reasoning with Latent Thoughts: On the Power of Looped Transformerscited by 223
- 2023How well do Large Language Models perform in Arithmetic tasks?cited by 130
- 2022Teaching Algorithmic Reasoning via In-context Learningcited by 111
- 2022Limitations of Language Models in Arithmetic and Symbolic Inductioncited by 71
- 2023Auto-Regressive Next-Token Predictors are Universal Learnerscited by 65
- 2024Pre-trained Large Language Models Use Fourier Features to Compute Additioncited by 38
- 2024Global Lyapunov functions: a long-standing open problem in mathematics, with symbolic transformerscited by 29
- 2024How Numerical Precision Affects Arithmetical Reasoning Capabilities of LLMscited by 24
- 2023Can neural networks do arithmetic? A survey on the elementary numerical skills of state-of-the-art deep learning modelscited by 18
- 2025A Survey on Mathematical Reasoning and Optimization with Large Language Modelscited by 12
12 most cited of 29 All 29 (JSON)
- 2026ANI: Adaptive Numerical Injection for Unifying Semantic and Arithmetic Representations in Numerical Reasoning30 Sep 2026
- 2026Numeracy in Large Language Models: Fundamental Limitations and Paths to Improvement13 Aug 2026
- 2026LinAlg-Bench: A Forensic Benchmark Revealing Structural Failure Modes in LLM Mathematical Reasoning15 May 2026
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)28 Apr 2026
- 2026TopoBench: Benchmarking LLMs on Hard Topological Reasoning12 Mar 2026
- 2025The Art of Breaking Words: Rethinking Multilingual Tokenizer Design3 Aug 2025
- 2025Is Random Attention Sufficient for Sequence Modeling? Disentangling Trainable Components in the Transformer1 Jun 2025
- 2025Recursive Decomposition with Dependencies for Generic Divide-and-Conquer Reasoning5 May 2025
- 2025A Survey on Mathematical Reasoning and Optimization with Large Language Models22 Mar 2025
- 2025Reasoning with Latent Thoughts: On the Power of Looped Transformers24 Feb 2025
- 2024Language hooks: a modular framework for augmenting LLM reasoning that decouples tool usage from the model and its prompt8 Dec 2024
- 2024How Numerical Precision Affects Arithmetical Reasoning Capabilities of LLMs17 Oct 2024
12 newest of 29 All 29 (JSON)
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2022Transformers Learn Shortcuts to Automatacited by 260
- 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 199
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
- 2022LIFT: Language-Interfaced Fine-Tuning for Non-Language Machine Learning Taskscited by 146
- 2022mGPT: Few-Shot Learners Go Multilingualcited by 141
- 2023Teaching Arithmetic to Small Transformerscited by 121
- 2024Tokenization counts: the impact of tokenization on arithmetic in frontier LLMscited by 112
- 2023Goat: Fine-tuned LLaMA Outperforms GPT-4 on Arithmetic Taskscited by 84
- 2021Representing Numbers in NLP: a Survey and a Visioncited by 83
- 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 83
- 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
12 most cited of 104 All 104 (JSON)
- 2026List Counting Failures Are Not One Phenomenon3 Sep 2026
- 2026How Should Transformers Encode Numeric Values in Electronic Health Records?1 Jul 2026
- 2026Artificial Effort17 Apr 2026
- 2026Generating Hadamard matrices with transformers13 Apr 2026
- 2026The Long Delay to Arithmetic Generalization: When Learned Representations Outrun Behavior30 Mar 2026
- 2026Length Generalization Bounds for Transformers13 Feb 2026
- 2026AI-rithmetic11 Feb 2026
- 2026Even GPT-5.2 Can't Count to Five: The Case for Zero-Error Horizons in Trustworthy LLMs22 Jan 2026
- 2026The Effect of Scripts and Formats on LLM Numeracy21 Jan 2026
- 2026The Two-Stage Decision-Sampling Hypothesis: Understanding the Emergence of Self-Reflection in RL-Trained LLMs4 Jan 2026
- 2025From Isolation to Entanglement: When Do Interpretability Methods Identify and Disentangle Known Concepts?17 Dec 2025
- 2025Contrastive Decoding Mitigates Score Range Bias in LLM-as-a-Judge21 Oct 2025
12 newest of 104 All 104 (JSON)