Positional Description Matters for Transformers Arithmetic
Not on the map. Why?
Abstract (arXiv)
Transformers, central to the successes in modern Natural Language Processing, often falter on arithmetic tasks despite their vast capabilities --which paradoxically include remarkable coding abilities. We observe that a crucial challenge is their naive reliance on positional information to solve arithmetic problems with a small number of digits, leading to poor performance on larger numbers. Herein, we delve deeper into the role of positional encoding, and propose several ways to fix the issue, either by modifying the positional encoding directly, or by modifying the representation of the arithmetic task to leverage standard positional encoding differently. We investigate the value of these modifications for three tasks: (i) classical multiplication, (ii) length extrapolation in addition, and (iii) addition in natural language context. For (i) we train a small model on a small dataset (100M parameters and 300k samples) with remarkable aptitude in (direct, no scratchpad) 15 digits multiplication and essentially perfect up to 12 digits, while usual training in this context would give a model failing at 4 digits multiplication. In the experiments on addition, we use a mere 120k samples to demonstrate: for (ii) extrapolation from 10 digits to testing on 12 digits numbers while usual training would have no extrapolation, and for (iii) almost perfect accuracy up to 5 digits while usual training would be correct only up to 3 digits (which is essentially memorization with a training set of 120k samples).
Key facts. Cited by 56 papers in the map (data through 7 Oct 2026). Builds on 25 of its 25 references that are in the map. First posted on arXiv 22 Nov 2023.
Builds on
25 of 25 references.
References · 25
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2023Let's Verify Step by Stepcited by 3,598
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2022Solving math word problems with process- and outcome-based feedbackcited by 871
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
- 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 199
- 2021Investigating the Limitations of Transformers with Simple Arithmetic Taskscited by 136
13 more
- 2023Teaching Arithmetic to Small Transformerscited by 121
- 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 114
- 2022Teaching Algorithmic Reasoning via In-context Learningcited by 111
- 2022Unveiling Transformers with LEGO: a synthetic reasoning taskcited by 105
- 2022Limitations of Language Models in Arithmetic and Symbolic Inductioncited by 71
- 2023GPT Can Solve Mathematical Problems Without a Calculatorcited by 68
- 2023Length Generalization in Arithmetic Transformerscited by 64
- 2021The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalizationcited by 62
- 2021Linear algebra with transformerscited by 62
- 2021SHAPE: Shifted Absolute Position Embedding for Transformerscited by 37
- 2022Systematic Generalization and Emergent Structures in Transformers Trained on Structured Taskscited by 19
- 2022What is my math transformer doing? -- Three results on interpretability and generalizationcited by 19
- 2023Can neural networks do arithmetic? A survey on the elementary numerical skills of state-of-the-art deep learning modelscited by 18
Built on by
Citing papers per year: 2024: 28; 2025: 20; 2026: 8.
56 papers.
Sort:
By area:
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
- 2024The pitfalls of next-token predictioncited by 156
- 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 82
- 2024Transformers Can Do Arithmetic with the Right Embeddingscited by 77
- 2024Can Language Models Learn to Skip Steps?cited by 59
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpadcited by 35
- 2025Ignore the KL Penalty! Boosting Exploration on Critical Tokens to Enhance RL Fine-Tuningcited by 33
- 2024NumeroLogic: Number Encoding for Enhanced LLMs' Numerical Reasoningcited by 31
- 2025Self-Improving Transformers Overcome Easy-to-Hard and Length Generalization Challengescited by 30
- 2024The CLRS-Text Algorithmic Reasoning Language Benchmarkcited by 28
- 2024Universal Length Generalization with Turing Programscited by 25
- 2024Position Coupling: Improving Length Generalization of Arithmetic Transformers Using Task Structurecited by 22
38 more
- 2024On Positional Bias of Faithfulness for Long-form Summarizationcited by 22
- 2024Transformers Provably Learn Sparse Token Selection While Fully-Connected Nets Cannotcited by 21
- 2024LLMs Are Prone to Fallacies in Causal Inferencecited by 21
- 2025FoNE: Precise Single-Token Number Embeddings via Fourier Featurescited by 21
- 2024Do Language Models Exhibit the Same Cognitive Biases in Problem Solving as Human Learners?cited by 19
- 2024The SIFo Benchmark: Investigating the Sequential Instruction Following Ability of Large Language Modelscited by 18
- 2024Algorithmic Capabilities of Random Transformerscited by 17
- 2024Probabilistic Medical Predictions of Large Language Modelscited by 16
- 2025Lost at the Beginning of Reasoningcited by 15
- 2025Exposing Numeracy Gaps: A Benchmark to Evaluate Fundamental Numerical Abilities in Large Language Modelscited by 14
- 2025The Lookahead Limitation: Why Multi-Operand Addition is Hard for LLMscited by 13
- 2025Extrapolation by Association: Length Generalization Transfer in Transformerscited by 13
- 2024Transformers meet Neural Algorithmic Reasonerscited by 12
- 2024Your Context Is Not an Array: Unveiling Random Access Limitations in Transformerscited by 11
- 2024Explicitly Encoding Structural Symmetry is Key to Length Generalization in Arithmetic Taskscited by 10
- 2025The Role of Sparsity for Length Generalization in Transformerscited by 8
- 2025Quantitative Bounds for Length Generalization in Transformerscited by 8
- 2024ALTA: Compiler-Based Analysis of Transformerscited by 7
- 2025Efficient numeracy in language models through single-token number embeddingscited by 6
- 2024Quantifying artificial intelligence through algorithmic generalizationcited by 5
- 2024Automated Rewards via LLM-Generated Progress Functionscited by 4
- 2024Golden Touchstone: A Comprehensive Bilingual Benchmark for Evaluating Financial Large Language Modelscited by 4
- 2025QA-prompting: Improving Summarization with Large Language Models using Question-Answeringcited by 4
- 2025Reinforced Context Order Recovery for Adaptive Reasoning and Planningcited by 4
- 2026Seeing to Generalize: How Visual Data Corrects Binding Shortcutscited by 4
- 2024Provable Length Generalization in Sequence Prediction via Spectral Filteringcited by 3
- 2025The Imitation Game: Turing Machine Imitator is Length Generalizable Reasonercited by 3
- 2024Machine learning for modular multiplicationcited by 2
- 2025Context-aware Biases for Length Extrapolationcited by 2
- 2025Training LLMs Beyond Next Token Prediction -- Filling the Mutual Information Gapcited by 2
- 2024Learning interpretable positional encodings in transformers depends on initializationcited by 1
- 2025Discovering Learning-Friendly Generation Orders for Sequential Computationcited by 1
- 2025AuditAgent: Expert-Guided Multi-Agent Reasoning for Cross-Document Fraudulent Evidence Discoverycited by 1
- 2025Exact Learning of Arithmetic with Differentiable Agentscited by 1
- 2026A model of errors in transformerscited by 1
- 2026AI-rithmeticcited by 1
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)cited by 1
- 2024Positional Description for Numerical Normalizationcited by 0
50 most cited of 56 All 56 (JSON)
- 2026Universal Transformers for Circuit Computations: Perfect Length Generalization in Tiny Transformers31 Aug 2026
- 2026Explaining and Tuning Transformer-based LLMs in Arithmetic Tasks with Human Strategies19 Jul 2026
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)28 Apr 2026
- 2026To See the Unseen: on the Generalization Ability of Transformers in Symbolic Reasoning23 Apr 2026
- 2026DriveCode: Domain Specific Numerical Encoding for LLM-Based Autonomous Driving1 Mar 2026
- 2026Seeing to Generalize: How Visual Data Corrects Binding Shortcuts16 Feb 2026
- 2026AI-rithmetic11 Feb 2026
- 2026A model of errors in transformers20 Jan 2026
- 2025SATGround: A Spatially-Aware Approach for Visual Grounding in Remote Sensing9 Dec 2025
- 2025Exact Learning of Arithmetic with Differentiable Agents27 Nov 2025
- 2025Training LLMs Beyond Next Token Prediction -- Filling the Mutual Information Gap31 Oct 2025
- 2025Quantitative Bounds for Length Generalization in Transformers30 Oct 2025
38 more
- 2025Efficient numeracy in language models through single-token number embeddings8 Oct 2025
- 2025AuditAgent: Expert-Guided Multi-Agent Reasoning for Cross-Document Fraudulent Evidence Discovery30 Sep 2025
- 2025Reinforced Context Order Recovery for Adaptive Reasoning and Planning18 Aug 2025
- 2025The Imitation Game: Turing Machine Imitator is Length Generalizable Reasoner17 Jul 2025
- 2025Discovering Learning-Friendly Generation Orders for Sequential Computation30 Jun 2025
- 2025Lost at the Beginning of Reasoning27 Jun 2025
- 2025Learning Moderately Input-Sensitive Functions: A Case Study in QR Code Decoding25 Jun 2025
- 2025Extrapolation by Association: Length Generalization Transfer in Transformers10 Jun 2025
- 2025QA-prompting: Improving Summarization with Large Language Models using Question-Answering20 May 2025
- 2025Context-aware Biases for Length Extrapolation11 Mar 2025
- 2025The Lookahead Limitation: Why Multi-Operand Addition is Hard for LLMs27 Feb 2025
- 2025The Role of Sparsity for Length Generalization in Transformers24 Feb 2025
- 2025Exposing Numeracy Gaps: A Benchmark to Evaluate Fundamental Numerical Abilities in Large Language Models16 Feb 2025
- 2025FoNE: Precise Single-Token Number Embeddings via Fourier Features13 Feb 2025
- 2025Ignore the KL Penalty! Boosting Exploration on Critical Tokens to Enhance RL Fine-Tuning10 Feb 2025
- 2025Self-Improving Transformers Overcome Easy-to-Hard and Length Generalization Challenges3 Feb 2025
- 2024Golden Touchstone: A Comprehensive Bilingual Benchmark for Evaluating Financial Large Language Models9 Nov 2024
- 2024Quantifying artificial intelligence through algorithmic generalization8 Nov 2024
- 2024Can Language Models Learn to Skip Steps?4 Nov 2024
- 2024Provable Length Generalization in Sequence Prediction via Spectral Filtering1 Nov 2024
- 2024On Positional Bias of Faithfulness for Long-form Summarization31 Oct 2024
- 2024ALTA: Compiler-Based Analysis of Transformers23 Oct 2024
- 2024Automated Rewards via LLM-Generated Progress Functions11 Oct 2024
- 2024Algorithmic Capabilities of Random Transformers6 Oct 2024
- 2024Positional Description for Numerical Normalization22 Aug 2024
- 2024Probabilistic Medical Predictions of Large Language Models21 Aug 2024
- 2024Your Context Is Not an Array: Unveiling Random Access Limitations in Transformers10 Aug 2024
- 2024Universal Length Generalization with Turing Programs3 Jul 2024
- 2024The SIFo Benchmark: Investigating the Sequential Instruction Following Ability of Large Language Models28 Jun 2024
- 2024LLMs Are Prone to Fallacies in Causal Inference18 Jun 2024
- 2024Transformers meet Neural Algorithmic Reasoners13 Jun 2024
- 2024Learning interpretable positional encodings in transformers depends on initialization12 Jun 2024
- 2024Transformers Provably Learn Sparse Token Selection While Fully-Connected Nets Cannot11 Jun 2024
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpad10 Jun 2024
- 2024The CLRS-Text Algorithmic Reasoning Language Benchmark6 Jun 2024
- 2024Explicitly Encoding Structural Symmetry is Key to Length Generalization in Arithmetic Tasks4 Jun 2024
- 2024Position Coupling: Improving Length Generalization of Arithmetic Transformers Using Task Structure31 May 2024
- 2024Transformers Can Do Arithmetic with the Right Embeddings27 May 2024
50 newest of 56 All 56 (JSON)
- 2024Can Language Models Learn to Skip Steps?cited by 59
- 2025Ignore the KL Penalty! Boosting Exploration on Critical Tokens to Enhance RL Fine-Tuningcited by 33
- 2024NumeroLogic: Number Encoding for Enhanced LLMs' Numerical Reasoningcited by 31
- 2024The CLRS-Text Algorithmic Reasoning Language Benchmarkcited by 28
- 2025Lost at the Beginning of Reasoningcited by 15
- 2024Transformers meet Neural Algorithmic Reasonerscited by 12
- 2024Explicitly Encoding Structural Symmetry is Key to Length Generalization in Arithmetic Taskscited by 10
- 2025Reinforced Context Order Recovery for Adaptive Reasoning and Planningcited by 4
- 2025The Imitation Game: Turing Machine Imitator is Length Generalizable Reasonercited by 3
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)cited by 1
- 2026To See the Unseen: on the Generalization Ability of Transformers in Symbolic Reasoningcited by 0
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)28 Apr 2026
- 2026To See the Unseen: on the Generalization Ability of Transformers in Symbolic Reasoning23 Apr 2026
- 2025Reinforced Context Order Recovery for Adaptive Reasoning and Planning18 Aug 2025
- 2025The Imitation Game: Turing Machine Imitator is Length Generalizable Reasoner17 Jul 2025
- 2025Lost at the Beginning of Reasoning27 Jun 2025
- 2025Ignore the KL Penalty! Boosting Exploration on Critical Tokens to Enhance RL Fine-Tuning10 Feb 2025
- 2024Can Language Models Learn to Skip Steps?4 Nov 2024
- 2024Transformers meet Neural Algorithmic Reasoners13 Jun 2024
- 2024The CLRS-Text Algorithmic Reasoning Language Benchmark6 Jun 2024
- 2024Explicitly Encoding Structural Symmetry is Key to Length Generalization in Arithmetic Tasks4 Jun 2024
- 2024NumeroLogic: Number Encoding for Enhanced LLMs' Numerical Reasoning30 Mar 2024
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
- 2024The pitfalls of next-token predictioncited by 156
- 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 82
- 2024Transformers Can Do Arithmetic with the Right Embeddingscited by 77
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpadcited by 35
- 2024Universal Length Generalization with Turing Programscited by 25
- 2024Position Coupling: Improving Length Generalization of Arithmetic Transformers Using Task Structurecited by 22
- 2024On Positional Bias of Faithfulness for Long-form Summarizationcited by 22
- 2024Transformers Provably Learn Sparse Token Selection While Fully-Connected Nets Cannotcited by 21
- 2024LLMs Are Prone to Fallacies in Causal Inferencecited by 21
- 2025FoNE: Precise Single-Token Number Embeddings via Fourier Featurescited by 21
- 2024Do Language Models Exhibit the Same Cognitive Biases in Problem Solving as Human Learners?cited by 19
12 most cited of 41 All 41 (JSON)
- 2026Universal Transformers for Circuit Computations: Perfect Length Generalization in Tiny Transformers31 Aug 2026
- 2026Explaining and Tuning Transformer-based LLMs in Arithmetic Tasks with Human Strategies19 Jul 2026
- 2026AI-rithmetic11 Feb 2026
- 2026A model of errors in transformers20 Jan 2026
- 2025Exact Learning of Arithmetic with Differentiable Agents27 Nov 2025
- 2025Training LLMs Beyond Next Token Prediction -- Filling the Mutual Information Gap31 Oct 2025
- 2025Quantitative Bounds for Length Generalization in Transformers30 Oct 2025
- 2025Efficient numeracy in language models through single-token number embeddings8 Oct 2025
- 2025AuditAgent: Expert-Guided Multi-Agent Reasoning for Cross-Document Fraudulent Evidence Discovery30 Sep 2025
- 2025Discovering Learning-Friendly Generation Orders for Sequential Computation30 Jun 2025
- 2025Learning Moderately Input-Sensitive Functions: A Case Study in QR Code Decoding25 Jun 2025
- 2025Extrapolation by Association: Length Generalization Transfer in Transformers10 Jun 2025
12 newest of 41 All 41 (JSON)