English
Related papers

Related papers: Transformers Can Achieve Length Generalization But…

200 papers

Length Generalization is the essential capacity of autonomous agents to perform tasks in longer contexts than those encountered during training. To systematically study this feat, we test how well models can approximate the next token…

Natural language exhibits patterns of hierarchically governed dependencies, in which relations between words are sensitive to syntactic structure rather than linear ordering. While re-current network models often fail to generalize in a…

Computation and Language · Computer Science 2021-09-27 Jackson Petty , Robert Frank

Length generalization (LG) is a challenging problem in learning to reason. It refers to the phenomenon that when trained on reasoning problems of smaller lengths or sizes, the resulting model struggles with problems of larger sizes or…

Artificial Intelligence · Computer Science 2024-04-02 Changnan Xiao , Bing Liu

Transformers, central to the successes in modern Natural Language Processing, often falter on arithmetic tasks despite their vast capabilities --which paradoxically include remarkable coding abilities. We observe that a crucial challenge is…

Computation and Language · Computer Science 2023-11-28 Ruoqi Shen , Sébastien Bubeck , Ronen Eldan , Yin Tat Lee , Yuanzhi Li , Yi Zhang

Much theoretical work has described the ability of transformers to represent formal languages. However, linking theoretical results to empirical performance is not straightforward due to the complex interplay between the architecture, the…

Computation and Language · Computer Science 2024-10-07 Anej Svete , Nadav Borenstein , Mike Zhou , Isabelle Augenstein , Ryan Cotterell

Out-of-distribution generalization capabilities of sequence-to-sequence models can be studied from the lens of two crucial forms of generalization: length generalization -- the ability to generalize to longer sequences than ones seen during…

Machine Learning · Computer Science 2025-05-29 Kartik Ahuja , Amin Mansouri

Neural networks are surprisingly good at interpolating and perform remarkably well when the training set examples resemble those in the test set. However, they are often unable to extrapolate patterns beyond the seen data, even when the…

Machine Learning · Computer Science 2020-04-23 Yann Dubois , Gautier Dagan , Dieuwke Hupkes , Elia Bruni

Transformers have supplanted recurrent models in a large number of NLP tasks. However, the differences in their abilities to model different syntactic properties remain largely unknown. Past works suggest that LSTMs generalize very well on…

Computation and Language · Computer Science 2020-10-09 Satwik Bhattamishra , Kabir Ahuja , Navin Goyal

Unlike recurrent models, conventional wisdom has it that Transformers cannot perfectly model regular languages. Inspired by the notion of working memory, we propose a new Transformer variant named RegularGPT. With its novel combination of…

Computation and Language · Computer Science 2023-05-09 Ta-Chung Chi , Ting-Han Fan , Alexander I. Rudnicky , Peter J. Ramadge

Transformers have shown inconsistent success in AI planning tasks, and theoretical understanding of when generalization should be expected has been limited. We take important steps towards addressing this gap by analyzing the ability of…

Artificial Intelligence · Computer Science 2026-03-23 Yash Sarrof , Yupei Du , Katharina Stein , Alexander Koller , Sylvie Thiébaux , Michael Hahn

Despite the remarkable practical success of transformer-based language models, recent work has raised concerns about their ability to perform state tracking. In particular, a growing body of literature has shown this limitation primarily…

Machine Learning · Computer Science 2026-02-23 M. Reza Ebrahimi , Michaël Defferrard , Sunny Panchal , Roland Memisevic

This paper provides norm-based generalization bounds for the Transformer architecture that do not depend on the input sequence length. We employ a covering number based approach to prove our bounds. We use three novel covering number bounds…

Machine Learning · Statistics 2023-10-23 Jacob Trauger , Ambuj Tewari

An ideal length-extrapolatable Transformer language model can handle sequences longer than the training length without any fine-tuning. Such long-context utilization capability relies heavily on a flexible positional embedding design. Upon…

Computation and Language · Computer Science 2023-11-16 Ta-Chung Chi , Ting-Han Fan , Alexander I. Rudnicky

Length generalization, the ability to generalize from small training context sizes to larger ones, is a critical challenge in the development of Transformer-based language models. Positional encoding (PE) has been identified as a major…

Computation and Language · Computer Science 2023-11-08 Amirhossein Kazemnejad , Inkit Padhi , Karthikeyan Natesan Ramamurthy , Payel Das , Siva Reddy

Classification algorithms using Transformer architectures can be affected by the sequence length learning problem whenever observations from different classes have a different length distribution. This problem causes models to use sequence…

Machine Learning · Computer Science 2024-03-15 Jean-Thomas Baillargeon , Luc Lamontagne

Preventing the performance decay of Transformers on inputs longer than those used for training has been an important challenge in extending the context length of these models. Though the Transformer architecture has fundamentally no limits…

Increasing the input length has been a driver of progress in language modeling with transformers. We identify conditions where shorter inputs are not harmful, and achieve perplexity and efficiency improvements through two new methods that…

Computation and Language · Computer Science 2021-06-04 Ofir Press , Noah A. Smith , Mike Lewis

Length generalization is the ability of a learning algorithm to learn a hypothesis which generalizes to longer inputs than the inputs in the training set. In this paper, we provide provable guarantees of length generalization for various…

Machine Learning · Computer Science 2025-06-09 Thomas Chen , Tengyu Ma , Zhiyuan Li

Recently, recurrent models such as state space models and linear attention have become popular due to their linear complexity in the sequence length. Thanks to their recurrent nature, in principle they can process arbitrarily long…

Machine Learning · Computer Science 2025-10-14 Ricardo Buitrago Ruiz , Albert Gu

Whether language models can systematically generalize remains actively debated. Yet empirical performance is jointly shaped by multiple factors such as training data, training paradigms, and inference-time strategies, making failures…

Artificial Intelligence · Computer Science 2026-04-17 Yao Tong , Jiayuan Ye , Anastasia Borovykh , Reza Shokri