Lune

NeurIPS2025顶会

Extrapolation by Association: Length Generalization Transfer In Transformers

Ziyang Cai, Nayoung Lee, Avi Schwarzschild, Samet Oymak, Dimitris Papailiopoulos

摘要

Transformer language models have demonstrated impressive generalization capabilities in natural language domains, yet we lack a fine-grained understanding of how such generalization arises. In this paper, we investigate length generalization--the ability to extrapolate from shorter to longer inputs--through the lens of task association. We find that length generalization can be transferred across related tasks. That is, training a model with a longer and related auxiliary task can lead it to generalize to unseen and longer inputs from some other target task. We demonstrate this length generalization transfer across diverse algorithmic tasks, including arithmetic operations, string transformations, and maze navigation. Our results show that transformer models can inherit generalization capabilities from similar tasks when trained jointly. Moreover, we observe similar transfer effects in pretrained language models, suggesting that pretraining equips models with reusable computational scaffolding that facilitates extrapolation in downstream settings. Finally, we provide initial mechanistic evidence that length generalization transfer correlates with the re-use of the same attention heads between the tasks. Together, our findings deepen our understanding of how transformers generalize to out-of-distribution inputs and highlight the compositional reuse of inductive structure across tasks.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Quantitative Bounds for Length Generalization in Transformers 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • Quantitative Bounds for Length Generalization in Transformers 引用了 The Impact of Positional Encoding on Length Generalization in Transformers
  • Multitask Prompted Training Enables Zero-Shot Task Generalization 引用了 Language Models are Few-Shot Learners
  • Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation 引用了 Language Models are Few-Shot Learners
  • YaRN: Efficient Context Window Extension of Large Language Models 引用了 The Impact of Positional Encoding on Length Generalization in 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 引用了 Language Models are Few-Shot Learners
  • Exploring Depth Generalization in Large Language Models for Solving Recursive Logic Tasks 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • Exploring Depth Generalization in Large Language Models for Solving Recursive Logic Tasks 引用了 The Impact of Positional Encoding on Length Generalization in Transformers
  • Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across Tasks 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across Tasks 引用了 The Impact of Positional Encoding on Length Generalization in Transformers
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. The Illusion of Diminishing Returns: Measuring Long Horizon Execution in LLMsAkshit Sinha, Arvindh Arun, Shashwat Goel, Steffen Staab 等ICLR 2026 · 64 次引用
  2. Quantitative Bounds for Length Generalization in TransformersZachary Izzo, Eshaan Nichani, Jason D. LeeICLR 2026 · 8 次引用
  3. Train Once, Answer All: Many Pretraining Experiments for the Cost of OneSebastian Bordt, Martin PawelczykICLR 2026 · 6 次引用
  4. Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across TasksDamien Teney, Liangze Jiang, Hemanth Saratchandran, Simon LuceyICLR 2026 · 3 次引用
  5. Exploring Depth Generalization in Large Language Models for Solving Recursive Logic TasksZhiyuan HeAAAI 2026

它引用的 Paper23

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Multitask Prompted Training Enables Zero-Shot Task GeneralizationVictor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach 等ICLR 2022 · 1,976 次引用
  3. Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 次引用
  4. YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 次引用
  5. The Impact of Positional Encoding on Length Generalization in TransformersAmirhossein Kazemnejad, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das 等NeurIPS 2023 · 444 次引用

相关 Paper

  1. Exploring Length Generalization in Large Language ModelsCem Anil, Yuhuai Wu, Anders Andreassen, Aitor Lewkowycz 等NeurIPS 2022 · 267 次引用
  2. Length Generalization via Auxiliary TasksPranjal Awasthi, Anupam Gupta, Ravi KumarNeurIPS 2025
  3. What Algorithms can Transformers Learn? A Study in Length GeneralizationHattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin 等ICLR 2024 · 189 次引用
  4. Principled Understanding of Generalization for Generative Transformer Models in Arithmetic Reasoning TasksXingcheng Xu, Zibo Zhao, Haipeng Zhang, Yanqing YangACL 2025 · 2 次引用
  5. Learning to grok: Emergence of in-context learning and skill composition in modular arithmetic tasksTianyu He, Darshil Doshi, Aritra Das, Andrey GromovNeurIPS 2024 · 52 次引用
黄昏的海面,两侧是细线勾勒的悬崖