Lune

ICLR2026顶会

Quantitative Bounds for Length Generalization in Transformers

Zachary Izzo, Eshaan Nichani, Jason D. Lee

摘要

We study the problem of length generalization (LG) in transformers: the ability of a model trained on shorter sequences to maintain performance when evaluated on much longer, previously unseen inputs. Prior work by Huang et al. (2025) established that transformers eventually achieve length generalization once the training sequence length exceeds some finite threshold, but left open the question of how large it must be. In this work, we provide the first quantitative bounds on the required training length for length generalization to occur. Motivated by previous empirical and theoretical work, we analyze LG in several distinct problem settings: ℓ ∞ error control vs. average error control over an input distribution, infinite-precision softmax attention vs. finite-precision attention (which reduces to an argmax) in the transformer, and one-vs. two-layer transformers. In all scenarios, we prove that LG occurs when the internal behavior of the transformer on longer sequences can be "simulated" by its behavior on shorter sequences seen during training. Our bounds give qualitative estimates for the length of training data required for a transformer to generalize, and we verify these insights empirically. These results sharpen our theoretical understanding of the mechanisms underlying extrapolation in transformers, and formalize the intuition that richer training data is required for generalization on more complex tasks.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • What Algorithms can Transformers Learn? A Study in Length Generalization 引用了 Thinking Like Transformers
  • What Algorithms can Transformers Learn? A Study in Length Generalization 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • What Algorithms can Transformers Learn? A Study in Length Generalization 引用了 The Impact of Positional Encoding on Length Generalization in Transformers
  • What Algorithms can Transformers Learn? A Study in Length Generalization 引用了 Exploring Length Generalization in Large Language Models
  • Length Generalization Bounds for Transformers 引用了 What Algorithms can Transformers Learn? A Study in Length Generalization
  • Length Generalization Bounds for Transformers 引用了 Thinking Like Transformers
  • Length Generalization Bounds for Transformers 引用了 Exploring Length Generalization in Large Language Models
  • Softmax Transformers are Turing-Complete 引用了 Thinking Like Transformers
  • Softmax Transformers are Turing-Complete 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • Discovering Interpretable Algorithms by Decompiling Transformers to RASP 引用了 What Algorithms can Transformers Learn? A Study in Length Generalization
  • Discovering Interpretable Algorithms by Decompiling Transformers to RASP 引用了 Softmax Transformers are Turing-Complete
  • Discovering Interpretable Algorithms by Decompiling Transformers to RASP 引用了 Thinking Like Transformers
  • The Impact of Positional Encoding on Length Generalization in Transformers 引用了 Thinking Like Transformers
  • The Impact of Positional Encoding on Length Generalization in Transformers 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • The Impact of Positional Encoding on Length Generalization in Transformers 引用了 Exploring Length Generalization in Large Language Models
  • On the Ability of Transformers to Verify Plans 引用了 Softmax Transformers are Turing-Complete
  • On the Ability of Transformers to Verify Plans 引用了 Thinking Like Transformers
  • On the Ability of Transformers to Verify Plans 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • On the Ability of Transformers to Verify Plans 引用了 The Impact of Positional Encoding on Length Generalization in Transformers
  • On the Ability of Transformers to Verify Plans 引用了 Exploring Length Generalization in Large Language Models
  • Exploring Length Generalization in Large Language Models 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. Softmax Transformers are Turing-CompleteHongjian Jiang, Michael Hahn, Georg Zetzsche, Anthony W. LinICLR 2026 · 12 次引用
  2. When Does Sparsity Mitigate the Curse of Depth in LLMsYao Yao, Xinyuan Song, Sebastian Pokutta, Max Zimmer 等ICML 2026 · 5 次引用
  3. Discovering Interpretable Algorithms by Decompiling Transformers to RASPXinting Huang, Aleksandra Bakalova, Satwik Bhattamishra, William Merrill 等ICML 2026 · 3 次引用
  4. On the Ability of Transformers to Verify PlansYash Sarrof, Yupei Du, Katharina Stein, Alexander Koller 等ICML 2026 · 1 次引用
  5. Length Generalization Bounds for TransformersAndy Yang, Pascal Bergsträßer, Georg Zetzsche, David Chiang 等ICML 2026

它引用的 Paper21

  1. Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 次引用
  2. The Impact of Positional Encoding on Length Generalization in TransformersAmirhossein Kazemnejad, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das 等NeurIPS 2023 · 444 次引用
  3. Exploring Length Generalization in Large Language ModelsCem Anil, Yuhuai Wu, Anders Andreassen, Aitor Lewkowycz 等NeurIPS 2022 · 267 次引用
  4. What Algorithms can Transformers Learn? A Study in Length GeneralizationHattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin 等ICLR 2024 · 189 次引用
  5. Thinking Like TransformersGail Weiss, Yoav Goldberg, Eran YahavICML 2021 · 183 次引用

相关 Paper

  1. Length Generalization via Auxiliary TasksPranjal Awasthi, Anupam Gupta, Ravi KumarNeurIPS 2025
  2. Extrapolation by Association: Length Generalization Transfer In TransformersZiyang Cai, Nayoung Lee, Avi Schwarzschild, Samet Oymak 等NeurIPS 2025 · 13 次引用
  3. A Formal Framework for Understanding Length Generalization in TransformersXinting Huang, Andy Yang, Satwik Bhattamishra, Yash Raj Sarrof 等ICLR 2025
  4. Generalizing Reasoning Problems to Longer LengthsChangnan Xiao, Bing LiuICLR 2025
  5. On the "Induction Bias" in Sequence ModelsMohammadReza Ebrahimi, Michaël Defferrard, Sunny Panchal, Roland MemisevicICML 2026 · 3 次引用
黄昏的海面,两侧是细线勾勒的悬崖