Lune

ICLR2025顶会

A Formal Framework for Understanding Length Generalization in Transformers

Xinting Huang, Andy Yang, Satwik Bhattamishra, Yash Raj Sarrof, Andreas Krebs, Hattie Zhou, Preetum Nakkiran, Michael Hahn

摘要

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 1 . Our theory not only explains a broad set of empirical observations but also opens the way to provably predicting length generalization capabilities in transformers.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Characterizing the Expressivity of Fixed-Precision Transformer Language Models 引用了 The Expressive Power of Transformers with Chain of Thought
  • Knee-Deep in C-RASP: A Transformer Depth Hierarchy 引用了 The Expressive Power of Transformers with Chain of Thought
  • Knee-Deep in C-RASP: A Transformer Depth Hierarchy 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • What Algorithms can Transformers Learn? A Study in Length Generalization 引用了 Towards Automated Circuit Discovery for Mechanistic Interpretability
  • 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
  • Transformers Provably Learn Chain-of-Thought Reasoning with Length Generalization 引用了 What Algorithms can Transformers Learn? A Study in Length Generalization
  • Transformers Provably Learn Chain-of-Thought Reasoning with Length Generalization 引用了 The Expressive Power of Transformers with Chain of Thought
  • Transformers Provably Learn Chain-of-Thought Reasoning with Length Generalization 引用了 The Impact of Positional Encoding on Length Generalization in Transformers
  • Softmax Transformers are Turing-Complete 引用了 The Expressive Power of Transformers with Chain of Thought
  • Softmax Transformers are Turing-Complete 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • The Impact of Positional Encoding on Length Generalization in Transformers 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper24

  1. The Expressive Capacity of State Space Models: A Formal Language PerspectiveYash Raj Sarrof, Yana Veitsman, Michael HahnNeurIPS 2024 · 53 次引用
  2. Transformers Provably Learn Chain-of-Thought Reasoning with Length GeneralizationYu Huang, Zixin Wen, Aarti Singh, Yuejie Chi 等NeurIPS 2025 · 22 次引用
  3. Characterizing the Expressivity of Fixed-Precision Transformer Language ModelsJiaoda Li, Ryan CotterellNeurIPS 2025 · 18 次引用
  4. Knee-Deep in C-RASP: A Transformer Depth HierarchyAndy Yang, Michaël Cadilhac, David ChiangNeurIPS 2025 · 15 次引用
  5. Softmax Transformers are Turing-CompleteHongjian Jiang, Michael Hahn, Georg Zetzsche, Anthony W. LinICLR 2026 · 12 次引用

它引用的 Paper25

  1. Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 次引用
  2. Towards Automated Circuit Discovery for Mechanistic InterpretabilityArthur Conmy, Augustine N. Mavor-Parker, Aengus Lynch, Stefan Heimersheim 等NeurIPS 2023 · 861 次引用
  3. The Impact of Positional Encoding on Length Generalization in TransformersAmirhossein Kazemnejad, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das 等NeurIPS 2023 · 444 次引用
  4. The Expressive Power of Transformers with Chain of ThoughtWilliam Merrill, Ashish SabharwalICLR 2024 · 243 次引用
  5. What Algorithms can Transformers Learn? A Study in Length GeneralizationHattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin 等ICLR 2024 · 189 次引用

相关 Paper

  1. Theoretical Analysis of Hierarchical Language Recognition and Generation by Transformers without Positional EncodingDaichi Hayakawa, Issei SatoACL 2025
  2. The Role of Sparsity for Length Generalization in LLMsNoah Golowich, Samy Jelassi, David Brandfonbrener, Sham M. Kakade 等ICML 2025
  3. Quantitative Bounds for Length Generalization in TransformersZachary Izzo, Eshaan Nichani, Jason D. LeeICLR 2026 · 8 次引用
  4. Length Generalization via Auxiliary TasksPranjal Awasthi, Anupam Gupta, Ravi KumarNeurIPS 2025
  5. Exploring Transformer ExtrapolationZhen Qin, Yiran Zhong, Hui DengAAAI 2024 · 12 次引用
黄昏的海面,两侧是细线勾勒的悬崖