mlsanityData to 7 Oct 2026

A Formal Framework for Understanding Length Generalization in Transformers

arXiv 2410.02140 ↗First posted 3 Oct 2024cs.LGcited by 44

Not on the map. Why?

Abstract (arXiv)

A major challenge for transformers is generalizing to sequences longer than those observed during training. While previous works have empirically shown that transformers can either succeed or fail at length generalization depending on the task, theoretical understanding of this phenomenon remains limited. In this work, we introduce a rigorous theoretical framework to analyze length generalization in causal transformers with learnable absolute positional encodings. In particular, we characterize those functions that are identifiable in the limit from sufficiently long inputs with absolute positional encodings under an idealized inference scheme using a norm-based regularizer. This enables us to prove the possibility of length generalization for a rich family of problems. We experimentally validate the theory as a predictor of success and failure of length generalization across a range of algorithmic and formal language tasks. Our theory not only explains a broad set of empirical observations but also opens the way to provably predicting length generalization capabilities in transformers.

Key facts. Cited by 44 papers in the map (data through 7 Oct 2026). First posted on arXiv 3 Oct 2024.

Builds on

0 of 0 references.

No references here yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 19; 2026: 24.

44 papers.

Sort:

By area:

  1. 2025Between Circuits and Chomsky: Pre-pretraining on Formal Languages Imparts Linguistic Biasescited by 36
  2. 2025Lower Bounds for Chain-of-Thought Reasoning in Hard-Attention Transformerscited by 28
  3. 2025Characterizing the Expressivity of Fixed-Precision Transformer Language Modelscited by 14
  4. 2025Knee-Deep in C-RASP: A Transformer Depth Hierarchycited by 12
  5. 2025Transformers Provably Learn Chain-of-Thought Reasoning with Length Generalizationcited by 12
  6. 2025Softmax Transformers are Turing-Completecited by 9
  7. 2025The Role of Sparsity for Length Generalization in Transformerscited by 8
  8. 2025Quantitative Bounds for Length Generalization in Transformerscited by 8
  9. 2025The Counting Power of Transformerscited by 7
  10. 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilitiescited by 6
  11. 2025Transformers are Inherently Succinctcited by 4
  12. 2026Length Generalization Bounds for Transformerscited by 4
32 more
  1. 2025Language Models, Graph Searching, and Supervision Adulteration: When More Supervision is Less and How to Make More Morecited by 3
  2. 2025The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architecturescited by 3
  3. 2025To Infinity and Beyond: Tool-Use Unlocks Length Generalization in State Space Modelscited by 3
  4. 2026Context-Free Recognition with Transformerscited by 3
  5. 2026On the Spatiotemporal Dynamics of Generalization in Neural Networkscited by 3
  6. 2024Low-Dimension-to-High-Dimension Generalization And Its Implications for Length Generalizationcited by 2
  7. 2025Probability Distributions Computed by Autoregressive Transformerscited by 2
  8. 2026Sharper Generalization Bounds for Transformercited by 2
  9. 2025From Small to Large: Generalization Bounds for Transformers on Variable-Size Inputscited by 1
  10. 2026On the Ability of Transformers to Verify Planscited by 1
  11. 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)cited by 1
  12. 2026Length Generalization with Log-Depth Recurrent Unitscited by 1
  13. 2026Compressing History into Memory: Distilling Transformers into Recurrent Transformerscited by 1
  14. 2026Any-Dimensional Learning by Samplingcited by 1
  15. 2025The Role of Logic and Automata in Understanding Transformerscited by 0
  16. 2025On the Limitations and Capabilities of Position Embeddings for Length Generalizationcited by 0
  17. 2025Post-Norm can Resharpen Attentioncited by 0
  18. 2026Structure-BiEval: A Self-Supervised, Dual-Track Framework for Decoupling Structure and Content in LLM Evaluation for Web Information Systemscited by 0
  19. 2026Do Transformers Have the Ability for Periodicity Generalization?cited by 0
  20. 2026Rational Transductorscited by 0
  21. 2026Universal priors: solving empirical Bayes via Bayesian inference and pretrainingcited by 0
  22. 2026Size Transferability of Graph Transformers with Convolutional Positional Encodingscited by 0
  23. 2026Synthesis and Verification of Transformer Programs (Technical Report)cited by 0
  24. 2026Arithmetic OOD Failure Unfolds in Stages in Minimal GPTscited by 0
  25. 2026On the Mirage of Long-Range Dependency, with an Application to Integer Multiplicationcited by 0
  26. 2026How Many Different Outputs Can a Transformer Generate?cited by 0
  27. 2026When Does Reward Teach State? A Hidden-Automaton Instrument and a Group-Language Warning Signalcited by 0
  28. 2026Hierarchical Domain Generalizationcited by 0
  29. 2026Relative Positions Generalize, Absolute Positions Memorize: An Implicit-Bias Account of Length Generalization in Attentioncited by 0
  30. 2026Universal Transformers for Circuit Computations: Perfect Length Generalization in Tiny Transformerscited by 0
  31. 2026Length Generalization for Transformers via Compressioncited by 0
  32. 2026Beyond the Training Horizon: Mechanisms and Limits of Length Generalization in Looped Transformerscited by 0