English
Related papers

Related papers: What Algorithms can Transformers Learn? A Study in…

200 papers

Algorithmic generalization in machine learning refers to the ability to learn the underlying algorithm that generates data in a way that generalizes out-of-distribution. This is generally considered a difficult task for most machine…

Machine Learning · Computer Science 2024-01-17 Simon Ouellette , Rolf Pfister , Hansueli Jud

Recent research in mechanistic interpretability has attempted to reverse-engineer Transformer models by carefully inspecting network weights and activations. However, these approaches require considerable manual effort and still fall short…

Machine Learning · Computer Science 2023-11-01 Dan Friedman , Alexander Wettig , Danqi Chen

It has been observed in recent years that transformers have problems with length generalization for certain types of reasoning and arithmetic tasks. In particular, the performance of a transformer model trained on tasks (say addition) up to…

Machine Learning · Computer Science 2023-10-03 Pranjal Awasthi , Anupam Gupta

When writing programs, people have the ability to tackle a new complex task by decomposing it into smaller and more familiar subtasks. While it is difficult to measure whether neural program synthesis methods have similar capabilities, what…

Machine Learning · Computer Science 2023-10-31 Kensen Shi , Joey Hong , Manzil Zaheer , Pengcheng Yin , Charles Sutton

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

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)…

Machine Learning · Computer Science 2025-11-03 Zachary Izzo , Eshaan Nichani , Jason D. Lee

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

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…

Recent advancements in cognitive science and multi-round reasoning techniques for Large Language Models (LLMs) suggest that iterative thinking processes improve problem-solving performance in complex tasks. Inspired by this, approaches like…

Artificial Intelligence · Computer Science 2025-03-06 Chenhui Xu , Dancheng Liu , Jiajie Li , Amir Nassereldine , Zhaohui Li , Jinjun Xiong

Transformers often fail to learn generalizable algorithms, instead relying on brittle heuristics. Using graph connectivity as a testbed, we explain this phenomenon both theoretically and empirically. We consider a simplified Transformer…

Machine Learning · Computer Science 2026-02-19 Qilin Ye , Deqing Fu , Robin Jia , Vatsal Sharan

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

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

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

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

Analogical reasoning is a hallmark of human intelligence, enabling us to solve new problems by transferring knowledge from one situation to another. Yet, developing artificial intelligence systems capable of robust human-like analogical…

Machine Learning · Computer Science 2026-04-09 Philipp Hellwig , Willem Zuidema , Claire E. Stevenson , Martha Lewis

The remarkable capability of Transformers to do reasoning and few-shot learning, without any fine-tuning, is widely conjectured to stem from their ability to implicitly simulate a multi-step algorithms -- such as gradient descent -- with…

Machine Learning · Computer Science 2024-10-14 Khashayar Gatmiry , Nikunj Saunshi , Sashank J. Reddi , Stefanie Jegelka , Sanjiv Kumar

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

Learning to use tools to solve a variety of tasks is an innate ability of humans and has been observed of animals in the wild. However, the underlying mechanisms that are required to learn to use tools are abstract and widely contested in…

Neural and Evolutionary Computing · Computer Science 2019-07-04 Sam Wenke , Dan Saunders , Mike Qiu , Jim Fleming

We examine how transformers cope with two challenges: learning basic integer arithmetic, and generalizing to longer sequences than seen during training. We find that relative position embeddings enable length generalization for simple…

Machine Learning · Computer Science 2023-06-28 Samy Jelassi , Stéphane d'Ascoli , Carles Domingo-Enrich , Yuhuai Wu , Yuanzhi Li , François Charton

Humans understand new combinations of words encountered if they are combinations of words recognized from different contexts, an ability called Compositional Generalization. The COGS benchmark (Kim and Linzen, 2020) arXiv:2010.05465 reports…

Computation and Language · Computer Science 2025-10-15 William Bruns