English
Related papers

Related papers: Transformers Can Achieve Length Generalization But…

200 papers

Transformer networks have seen great success in natural language processing and machine vision, where task objectives such as next word prediction and image classification benefit from nuanced context sensitivity across high-dimensional…

Machine Learning · Computer Science 2022-12-13 Yuxuan Li , James L. McClelland

Position modeling plays a critical role in Transformers. In this paper, we focus on length extrapolation, i.e., training on short texts while evaluating longer sequences. We define attention resolution as an indicator of extrapolation. Then…

Computation and Language · Computer Science 2022-12-21 Yutao Sun , Li Dong , Barun Patra , Shuming Ma , Shaohan Huang , Alon Benhaim , Vishrav Chaudhary , Xia Song , Furu Wei

The use of Transformer architectures has facilitated remarkable progress in speech enhancement. Training Transformers using substantially long speech utterances is often infeasible as self-attention suffers from quadratic complexity. It is…

Audio and Speech Processing · Electrical Eng. & Systems 2024-06-18 Qiquan Zhang , Hongxu Zhu , Xinyuan Qian , Eliathamby Ambikairajah , Haizhou Li

It is a widely known issue that Transformers, when trained on shorter sequences, fail to generalize robustly to longer ones at test time. This raises the question of whether Transformer models are real reasoning engines, despite their…

Machine Learning · Computer Science 2025-04-04 Ruining Li , Gabrijel Boduljak , Jensen , Zhou

Length extrapolation has attracted considerable attention recently since it allows transformers to be tested on longer sequences than those used in training. Previous research has shown that this property can be attained by using carefully…

Computation and Language · Computer Science 2023-12-20 Zhen Qin , Yiran Zhong , Hui Deng

Large language models (LLMs) based on the Transformer have demonstrated strong performance across diverse tasks. However, current models still exhibit substantial limitations in out-of-distribution (OOD) generalization compared with humans.…

Machine Learning · Computer Science 2026-02-02 Huanyu Liu , Ge Li , Yihong Dong , Sihan Wu , Peixu Wang , Sihao Cheng , Taozhi Chen , Kechi Zhang , Hao Zhu , Tongxuan Liu

Large language models often struggle with length generalization and solving complex problem instances beyond their training distribution. We present a self-improvement approach where models iteratively generate and learn from their own…

Machine Learning · Computer Science 2025-02-14 Nayoung Lee , Ziyang Cai , Avi Schwarzschild , Kangwook Lee , Dimitris Papailiopoulos

Even for simple arithmetic tasks like integer addition, it is challenging for Transformers to generalize to longer sequences than those encountered during training. To tackle this problem, we propose position coupling, a simple yet…

Machine Learning · Computer Science 2024-10-31 Hanseul Cho , Jaeyoung Cha , Pranjal Awasthi , Srinadh Bhojanapalli , Anupam Gupta , Chulhee Yun

The Transformer model has a tendency to overfit various aspects of the training data, such as the overall sequence length. We study elementary string edit functions using a defined set of error indicators to interpret the behaviour of the…

Machine Learning · Computer Science 2024-10-18 Patrik Zavoral , Dušan Variš , Ondřej Bojar

Training large language models to predict beyond their training context lengths has drawn much attention in recent years, yet the principles driving such behavior of length generalization remain underexplored. We propose a new theoretical…

Machine Learning · Computer Science 2025-02-25 Noah Golowich , Samy Jelassi , David Brandfonbrener , Sham M. Kakade , Eran Malach

Length generalization is the ability of language models to maintain performance on inputs longer than those seen during pretraining. In this work, we introduce a simple yet powerful position encoding (PE) strategy, Random Float Sampling…

Machine Learning · Computer Science 2026-02-17 Atsushi Shimizu , Shohei Taniguchi , Yutaka Matsuo

Large language models (LLMs) have exhibited impressive performance and surprising emergent properties. However, their effectiveness remains limited by the fixed context window of the transformer architecture, posing challenges for…

Computation and Language · Computer Science 2025-06-16 Tianqi Du , Haotian Huang , Yifei Wang , Yisen Wang

The relationship between memorization and generalization in large language models (LLMs) remains an open area of research, with growing evidence that the two are deeply intertwined. In this work, we investigate this relationship by…

Machine Learning · Computer Science 2025-06-19 Joshua Barron , Devin White

In this paper, we investigate the inherent capabilities of transformer models in learning arithmetic algorithms, such as addition and parity. Through experiments and attention analysis, we identify a number of crucial factors for achieving…

Machine Learning · Computer Science 2024-05-13 Shaoxiong Duan , Yining Shi , Wei Xu

Despite their recent successes, Transformer-based large language models show surprising failure modes. A well-known example of such failure modes is their inability to length-generalize: solving problem instances at inference time that are…

Computation and Language · Computer Science 2024-08-13 MohammadReza Ebrahimi , Sunny Panchal , Roland Memisevic

Transformers struggle with length generalisation, displaying poor performance even on basic tasks. We test whether these limitations can be explained through two key failures of the self-attention mechanism. The first is the inability to…

Machine Learning · Computer Science 2025-10-07 Mattia Opper , Roland Fernandez , Paul Smolensky , Jianfeng Gao

In Transformers, Position Embeddings (PEs) significantly influence Length Generalization (LG) performance, yet their fundamental role remains unclear. In this work, we investigate the limitations and capabilities of PEs in achieving LG. We…

Machine Learning · Computer Science 2025-10-07 Yang Chen , Yitao Liang , Zhouchen Lin

The programming landscape is nowadays being reshaped by the advent of Large Language Models (LLMs) able to automate code-related tasks related to code implementation (e.g., code completion) and comprehension (e.g., code summarization). Such…

Software Engineering · Computer Science 2025-01-10 Nathan Cooper , Rosalia Tufano , Gabriele Bavota , Denys Poshyvanyk

Transformers have theoretical limitations in modeling certain sequence-to-sequence tasks, yet it remains largely unclear if these limitations play a role in large-scale pretrained LLMs, or whether LLMs might effectively overcome these…

Machine Learning · Computer Science 2025-10-24 Mayank Jobanputra , Yana Veitsman , Yash Sarrof , Aleksandra Bakalova , Vera Demberg , Ellie Pavlick , Michael Hahn

We study length generalization in sequence models on a composite problem involving both state tracking and associative recall. Prior work finds that recurrent networks handle state tracking well but struggle with recall, whereas…

Machine Learning · Computer Science 2025-10-02 Buu Phan , Reza Ebrahimi , Sanjay Haresh , Roland Memisevic