Exploring Length Generalization in Large Language Models
Not on the map. Why?
Cited by 37 in LLM reasoning, but placed by its own abstract, which didn’t fit.
Abstract (arXiv)
The ability to extrapolate from short problem instances to longer ones is an important form of out-of-distribution generalization in reasoning tasks, and is crucial when learning from datasets where longer problem instances are rare. These include theorem proving, solving quantitative mathematics problems, and reading/summarizing novels. In this paper, we run careful empirical studies exploring the length generalization capabilities of transformer-based language models. We first establish that naively finetuning transformers on length generalization tasks shows significant generalization deficiencies independent of model scale. We then show that combining pretrained large language models' in-context learning abilities with scratchpad prompting (asking the model to output solution steps before producing an answer) results in a dramatic improvement in length generalization. We run careful failure analyses on each of the learning modalities and identify common sources of mistakes that highlight opportunities in equipping language models with the ability to generalize to longer problems.
Key facts. Cited by 206 papers in the map (data through 14 Oct 2026). Builds on 31 of its 33 references that are in the map. First posted on arXiv 11 Jul 2022.
Builds on
31 of 33 references.
References · 31
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,392
- 2022LaMDA: Language Models for Dialog Applicationscited by 1,220
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2018Adafactor: Adaptive Learning Rates with Sublinear Memory Costcited by 905
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
- 2019Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inferencecited by 876
19 more
- 2018Universal Transformerscited by 647
- 2020Transformers as Soft Reasoners over Languagecited by 270
- 2020Understanding the Failure Modes of Out-of-Distribution Generalizationcited by 146
- 2022Impact of Pretraining Term Frequencies on Few-Shot Reasoningcited by 142
- 2020From Local Structures to Size Generalization in Graph Neural Networkscited by 124
- 2015Neural GPUs Learn Algorithmscited by 121
- 2018Correcting Length Bias in Neural Machine Translationcited by 120
- 2019Unlearn Dataset Bias in Natural Language Inference by Fitting the Residualcited by 119
- 2021Can You Learn an Algorithm? Generalizing from Easy to Hard Problems with Recurrent Networkscited by 117
- 2022Unveiling Transformers with LEGO: a synthetic reasoning taskcited by 106
- 2020Does syntax need to grow on trees? Sources of hierarchical inductive bias in sequence-to-sequence networkscited by 72
- 2020The EOS Decision and Length Extrapolationcited by 46
- 2019LSTM Networks Can Perform Dynamic Countingcited by 45
- 2020INT: An Inequality Benchmark for Evaluating Generalization in Theorem Provingcited by 44
- 2019Location Attention for Extrapolation to Longer Sequencescited by 33
- 2022End-to-end Algorithm Synthesis with Recurrent Networks: Logical Extrapolation Without Overthinkingcited by 33
- 2020What they do when in doubt: a study of inductive biases in seq2seq learnerscited by 20
- 2019Do Multi-hop Readers Dream of Reasoning Chains?cited by 14
- 2021Staircase Attention for Recurrent Processing of Sequencescited by 14
Built on by
Citing papers per year: 2022: 17; 2023: 46; 2024: 56; 2025: 42; 2026: 45.
206 papers.
Sort:
By area:
- 2023A Survey of Large Language Modelscited by 2,576
- 2022Towards Reasoning in Large Language Models: A Surveycited by 596
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 503
- 2022Language Models Are Greedy Reasoners: A Systematic Formal Analysis of Chain-of-Thoughtcited by 337
- 2023Trained Transformers Learn Linear Models In-Contextcited by 337
- 2024Titans: Learning to Memorize at Test Timecited by 328
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
- 2024Long-context LLMs Struggle with Long In-context Learningcited by 286
- 2022Transformers Learn Shortcuts to Automatacited by 268
- 2023Challenges and Applications of Large Language Modelscited by 254
- 2022Reasoning with Language Model Prompting: A Surveycited by 252
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
38 more
- 2022Hidden Progress in Deep Learning: SGD Learns Parities Near the Computational Limitcited by 187
- 2024The pitfalls of next-token predictioncited by 160
- 2022A Survey of Deep Learning for Mathematical Reasoningcited by 124
- 2023Teaching Arithmetic to Small Transformerscited by 123
- 2024Tokenization counts: the impact of tokenization on arithmetic in frontier LLMscited by 115
- 2022Teaching Algorithmic Reasoning via In-context Learningcited by 112
- 2022General-Purpose In-Context Learning by Meta-Learning Transformerscited by 105
- 2024Chain of Thoughtlessness? An Analysis of CoT in Planningcited by 103
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 102
- 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 86
- 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 85
- 2023Testing the General Deductive Reasoning Capacity of Large Language Models Using OOD Examplescited by 84
- 2024Formal Mathematical Reasoning: A New Frontier in AIcited by 81
- 2024Transformers Can Do Arithmetic with the Right Embeddingscited by 78
- 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 75
- 2023Generalization on the Unseen, Logic Reasoning and Degree Curriculumcited by 73
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Surveycited by 72
- 2022Simplicity Bias in Transformers and their Ability to Learn Sparse Boolean Functionscited by 70
- 2022LAMBADA: Backward Chaining for Automated Reasoning in Natural Languagecited by 66
- 2023Length Generalization in Arithmetic Transformerscited by 66
- 2022Parsel: Algorithmic Reasoning with Language Models by Composing Decompositionscited by 64
- 2023Towards Better Chain-of-Thought Prompting Strategies: A Surveycited by 62
- 2023Coverage-based Example Selection for In-Context Learningcited by 59
- 2024Larimar: Large Language Models with Episodic Memory Controlcited by 53
- 2023JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attentioncited by 52
- 2023Do Transformers Parse while Predicting the Masked Word?cited by 48
- 2024Enhance Reasoning for Large Language Models in the Game Werewolfcited by 46
- 2024Efficient Large Multi-modal Models via Visual Context Compressioncited by 46
- 2024Softmax is not Enough (for Sharp Size Generalisation)cited by 46
- 2023Extending Context Window of Large Language Models via Semantic Compressioncited by 45
- 2022Dissecting Transformer Length Extrapolation via the Lens of Receptive Field Analysiscited by 42
- 2023ShapeGPT: 3D Shape Generation with A Unified Multi-modal Language Modelcited by 39
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpadcited by 36
- 2023Understanding the Capabilities of Large Language Models for Automated Planningcited by 34
- 2024Probing the limitations of multimodal language models for chemistry and materials researchcited by 32
- 2025Self-Improving Transformers Overcome Easy-to-Hard and Length Generalization Challengescited by 31
- 2025Next-Latent Prediction Transformers Learn Compact World Modelscited by 31
- 2022Towards Better Out-of-Distribution Generalization of Neural Algorithmic Reasoning Taskscited by 30
50 most cited of 206 All 206 (JSON)
- 2026Learning to Extrapolate in Depth with Looped Transformers10 Oct 2026
- 2026Length Generalization Needs Proper Regularization3 Oct 2026
- 2026Beyond the Training Horizon: Mechanisms and Limits of Length Generalization in Looped Transformers27 Sep 2026
- 2026Distance generalization in transformers: why bother with positional encoding?10 Sep 2026
- 2026Length Generalization for Transformers via Compression8 Sep 2026
- 2026On the Representational Geometry of Dynamic Programs25 Aug 2026
- 2026Can a Dynamic Internal Field Govern a Transformer's Cognition? Certifiability, not Superiority, in Homeostatic Compute Control25 Aug 2026
- 2026Where Cognition Lives: Dissecting Emergent from Computed Function in a Minimal Complete Cognitive Architecture23 Aug 2026
- 2026Looped Language Models Improve Compositional Tool Calling17 Aug 2026
- 2026Numeracy in Large Language Models: Fundamental Limitations and Paths to Improvement13 Aug 2026
- 2026State Propagation Also Satisfies: A Complex-Valued State-Space Model for Deterministic State Tracking4 Aug 2026
- 2026Relative Positions Generalize, Absolute Positions Memorize: An Implicit-Bias Account of Length Generalization in Attention21 Jul 2026
38 more
- 2026Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across Tasks20 Jul 2026
- 2026Hierarchical Domain Generalization17 Jul 2026
- 2026Adaptive Depth in Looped Transformers: Diagnosing Learned Halting Gates and Trajectory Readouts8 Jul 2026
- 2026Out-of-Distribution Generalization of Risk Aversion in Language Models2 Jul 2026
- 2026Fine-Tuning Large Language Models for Quantum Reasoning20 Jun 2026
- 2026A Verifiable Search Is Not a Learnable Chain-of-Thought20 Jun 2026
- 2026Refit the Probe: Single-Direction Ablation Is Not a Necessity Test30 May 2026
- 2026Unveiling the Visual Counting Bottleneck in Vision-Language Models28 May 2026
- 2026Length Generalization with Log-Depth Recurrent Units25 May 2026
- 2026Equilibrium Residuals Expose Three Regimes of Matrix-Game Strategic Reasoning in Language Models11 May 2026
- 2026Repeated-Token Counting Reveals a Dissociation Between Representations and Outputs10 May 2026
- 2026Convex Optimization of Spiking Neural Networks with Global and Approximation Guarantees8 May 2026
- 2026It Just Takes Two: Scaling Amortized Inference to Large Sets8 May 2026
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)28 Apr 2026
- 2026On the Emergence of Syntax by Means of Local Interaction20 Apr 2026
- 2026Recurrent Reasoning on Symbolic Puzzles with Sequence Models19 Apr 2026
- 2026Generalization in LLM Problem Solving: The Case of the Shortest Path16 Apr 2026
- 2026THEIA: Learning Complete Kleene Three-Valued Logic in a Pure-Neural Modular Architecture13 Apr 2026
- 2026Exploration of Fast-Slow Latent Recurrence for Train-Short, Test-Long Generalization2 Apr 2026
- 2026On the Ability of Transformers to Verify Plans20 Mar 2026
- 2026Transformers Can Learn Rules They've Never Seen: Proof of Computation Beyond Interpolation17 Mar 2026
- 2026EsoLang-Bench: Evaluating Genuine Reasoning in Large Language Models via Esoteric Programming Languages10 Mar 2026
- 2026Can Vision-Language Models Solve the Shell Game?9 Mar 2026
- 2026Symbol-Equivariant Recurrent Reasoning Models2 Mar 2026
- 2026On the "Induction Bias" in Sequence Models20 Feb 2026
- 2026Size-Transferability of Graph Transformers with Convolutional Positional Encodings16 Feb 2026
- 2026Length Generalization Bounds for Transformers13 Feb 2026
- 2026Positive Distribution Shift as a Framework for Understanding Tractable Learning9 Feb 2026
- 2026Latent Reasoning with Supervised Thinking States9 Feb 2026
- 2026Rational Transductors7 Feb 2026
- 2026How Far Ahead Do LLMs Plan? Uncovering the Latent Horizon in Chain-of-Thought Reasoning2 Feb 2026
- 2026Shattered Compositionality: Counterintuitive Learning Dynamics of Transformers for Arithmetic30 Jan 2026
- 2026The Two-Stage Decision-Sampling Hypothesis: Understanding the Emergence of Self-Reflection in RL-Trained LLMs4 Jan 2026
- 2025Adapting, Fast and Slow: On Few-Shot Transportability of Compositions28 Dec 2025
- 2025From Small to Large: Generalization Bounds for Transformers on Variable-Size Inputs14 Dec 2025
- 2025Sequential Enumeration in Large Language Models4 Dec 2025
- 2025How Does RL Post-training Induce Skill Composition? A Case Study on Countdown1 Dec 2025
- 2025Pre-Generating Multi-Difficulty PDE Data for Few-Shot Neural PDE Solvers29 Nov 2025
50 newest of 206 All 206 (JSON)
- 2022Towards Reasoning in Large Language Models: A Surveycited by 596
- 2022Language Models Are Greedy Reasoners: A Systematic Formal Analysis of Chain-of-Thoughtcited by 337
- 2024Titans: Learning to Memorize at Test Timecited by 328
- 2022Reasoning with Language Model Prompting: A Surveycited by 252
- 2022A Survey of Deep Learning for Mathematical Reasoningcited by 124
- 2022Teaching Algorithmic Reasoning via In-context Learningcited by 112
- 2024Chain of Thoughtlessness? An Analysis of CoT in Planningcited by 103
- 2023Testing the General Deductive Reasoning Capacity of Large Language Models Using OOD Examplescited by 84
- 2024Formal Mathematical Reasoning: A New Frontier in AIcited by 81
- 2022LAMBADA: Backward Chaining for Automated Reasoning in Natural Languagecited by 66
- 2022Parsel: Algorithmic Reasoning with Language Models by Composing Decompositionscited by 64
- 2023Towards Better Chain-of-Thought Prompting Strategies: A Surveycited by 62
12 most cited of 37 All 37 (JSON)
- 2026Beyond the Training Horizon: Mechanisms and Limits of Length Generalization in Looped Transformers27 Sep 2026
- 2026Numeracy in Large Language Models: Fundamental Limitations and Paths to Improvement13 Aug 2026
- 2026Fine-Tuning Large Language Models for Quantum Reasoning20 Jun 2026
- 2026A Verifiable Search Is Not a Learnable Chain-of-Thought20 Jun 2026
- 2026Equilibrium Residuals Expose Three Regimes of Matrix-Game Strategic Reasoning in Language Models11 May 2026
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)28 Apr 2026
- 2026Recurrent Reasoning on Symbolic Puzzles with Sequence Models19 Apr 2026
- 2026EsoLang-Bench: Evaluating Genuine Reasoning in Large Language Models via Esoteric Programming Languages10 Mar 2026
- 2026Symbol-Equivariant Recurrent Reasoning Models2 Mar 2026
- 2026Latent Reasoning with Supervised Thinking States9 Feb 2026
- 2026How Far Ahead Do LLMs Plan? Uncovering the Latent Horizon in Chain-of-Thought Reasoning2 Feb 2026
- 2025How Does RL Post-training Induce Skill Composition? A Case Study on Countdown1 Dec 2025
12 newest of 37 All 37 (JSON)
- 2024Efficient Large Multi-modal Models via Visual Context Compressioncited by 46
- 2023ShapeGPT: 3D Shape Generation with A Unified Multi-modal Language Modelcited by 39
- 2024Probing the limitations of multimodal language models for chemistry and materials researchcited by 32
- 2024Representing Online Handwriting for Recognition in Large Vision-Language Modelscited by 7
- 2026Can Vision-Language Models Solve the Shell Game?cited by 3
- 2026Unveiling the Visual Counting Bottleneck in Vision-Language Modelscited by 1
- 2026Unveiling the Visual Counting Bottleneck in Vision-Language Models28 May 2026
- 2026Can Vision-Language Models Solve the Shell Game?9 Mar 2026
- 2024Probing the limitations of multimodal language models for chemistry and materials research25 Nov 2024
- 2024Efficient Large Multi-modal Models via Visual Context Compression28 Jun 2024
- 2024Representing Online Handwriting for Recognition in Large Vision-Language Models23 Feb 2024
- 2023ShapeGPT: 3D Shape Generation with A Unified Multi-modal Language Model29 Nov 2023
- 2025QLLM: Do We Really Need a Mixing Network for Credit Assignment in Multi-Agent Reinforcement Learning?cited by 6
- 2026Looped Language Models Improve Compositional Tool Callingcited by 2
- 2025Graph of Agents: Principled Long Context Modeling by Emergent Multi-Agent Collaborationcited by 1
- 2025A Multi-Agent Framework for Stateful Inference-Time Searchcited by 0
- 2025A Vision Toward Energy-Efficient Domain-Specific Artificial Intelligence Models and Agentscited by 0
- 2026Looped Language Models Improve Compositional Tool Calling17 Aug 2026
- 2025A Vision Toward Energy-Efficient Domain-Specific Artificial Intelligence Models and Agents24 Oct 2025
- 2025A Multi-Agent Framework for Stateful Inference-Time Search8 Oct 2025
- 2025Graph of Agents: Principled Long Context Modeling by Emergent Multi-Agent Collaboration26 Sep 2025
- 2025QLLM: Do We Really Need a Mixing Network for Credit Assignment in Multi-Agent Reinforcement Learning?17 Apr 2025
- 2025Next-Latent Prediction Transformers Learn Compact World Modelscited by 31
- 2025When Do Neural Networks Learn World Models?cited by 8
- 2025Next-Latent Prediction Transformers Learn Compact World Models8 Nov 2025
- 2025When Do Neural Networks Learn World Models?13 Feb 2025
- 2023A Survey of Large Language Modelscited by 2,576
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 503
- 2023Trained Transformers Learn Linear Models In-Contextcited by 337
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
- 2024Long-context LLMs Struggle with Long In-context Learningcited by 286
- 2022Transformers Learn Shortcuts to Automatacited by 268
- 2023Challenges and Applications of Large Language Modelscited by 254
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
- 2022Hidden Progress in Deep Learning: SGD Learns Parities Near the Computational Limitcited by 187
- 2024The pitfalls of next-token predictioncited by 160
- 2023Teaching Arithmetic to Small Transformerscited by 123
- 2024Tokenization counts: the impact of tokenization on arithmetic in frontier LLMscited by 115
12 most cited of 148 All 148 (JSON)
- 2026Learning to Extrapolate in Depth with Looped Transformers10 Oct 2026
- 2026Length Generalization Needs Proper Regularization3 Oct 2026
- 2026Distance generalization in transformers: why bother with positional encoding?10 Sep 2026
- 2026Length Generalization for Transformers via Compression8 Sep 2026
- 2026On the Representational Geometry of Dynamic Programs25 Aug 2026
- 2026Can a Dynamic Internal Field Govern a Transformer's Cognition? Certifiability, not Superiority, in Homeostatic Compute Control25 Aug 2026
- 2026Where Cognition Lives: Dissecting Emergent from Computed Function in a Minimal Complete Cognitive Architecture23 Aug 2026
- 2026State Propagation Also Satisfies: A Complex-Valued State-Space Model for Deterministic State Tracking4 Aug 2026
- 2026Relative Positions Generalize, Absolute Positions Memorize: An Implicit-Bias Account of Length Generalization in Attention21 Jul 2026
- 2026Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across Tasks20 Jul 2026
- 2026Hierarchical Domain Generalization17 Jul 2026
- 2026Adaptive Depth in Looped Transformers: Diagnosing Learned Halting Gates and Trajectory Readouts8 Jul 2026
12 newest of 148 All 148 (JSON)