English
Related papers

Related papers: How Many Different Outputs Can a Transformer Gener…

200 papers

Transformer networks have achieved remarkable empirical success across a wide range of applications, yet their theoretical expressive power remains insufficiently understood. In this paper, we study the expressive capabilities of…

Machine Learning · Computer Science 2026-03-04 Linyan Gu , Lihua Yang , Feng Zhou

We study the problem of efficient generative inference for Transformer models, in one of its most challenging settings: large deep models, with tight latency targets and long sequence lengths. Better understanding of the engineering…

Transformers often struggle with length generalization, meaning they fail to generalize to sequences longer than those encountered during training. While arithmetic tasks are commonly used to study length generalization, certain tasks are…

Machine Learning · Computer Science 2025-04-18 Hanseul Cho , Jaeyoung Cha , Srinadh Bhojanapalli , Chulhee Yun

Transformer is the state-of-the-art model for many natural language processing, computer vision, and audio analysis problems. Transformer effectively combines information from the past input and output samples in auto-regressive manner so…

Machine Learning · Computer Science 2025-03-14 Joni-Kristian Kämäräinen

Transformers suffer from the computational overhead of their quadratic dependence on the length of sequences processed. We present three methods, all adding an intermediate step between training and inference/generation, which extend the…

Machine Learning · Computer Science 2024-08-21 R. I. Cukier

We study Transformers on the task \emph{program trace generation} (PTG), where models produce step-by-step execution traces for synthetic programs. Unlike existing algorithmic problems, PTG externalizes reasoning through long traces where…

Computation and Language · Computer Science 2025-09-30 Simeng Sun

Theoretical efforts to prove advantages of Transformers in comparison with classical architectures such as feedforward and recurrent neural networks have mostly focused on representational power. In this work, we take an alternative…

Machine Learning · Statistics 2025-03-17 Alireza Mousavi-Hosseini , Clayton Sanford , Denny Wu , Murat A. Erdogdu

We study the error rate of LLMs on tasks like arithmetic that require a deterministic output, and repetitive processing of tokens drawn from a small set of alternatives. We argue that incorrect predictions arise when small errors in the…

Machine Learning · Computer Science 2026-01-21 Suvrat Raju , Praneeth Netrapalli

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

Transformers, especially the decoder-only variants, are the backbone of most modern large language models; yet we do not have much understanding of their expressive power except for the simple $1$-layer case. Due to the difficulty of…

Machine Learning · Computer Science 2024-12-05 Lijie Chen , Binghui Peng , Hongxun Wu

We prove that transformers can exactly interpolate datasets of finite input sequences in $\mathbb{R}^d$, $d\geq 2$, with corresponding output sequences of smaller or equal length. Specifically, given $N$ sequences of arbitrary but finite…

Machine Learning · Computer Science 2026-05-14 Albert Alcalde , Giovanni Fantuzzi , Enrique Zuazua

With the attention mechanism, transformers achieve significant empirical successes. Despite the intuitive understanding that transformers perform relational inference over long sequences to produce desirable representations, we lack a…

Machine Learning · Computer Science 2024-04-02 Yufeng Zhang , Boyi Liu , Qi Cai , Lingxiao Wang , Zhaoran Wang

The increasing number of protein sequences decoded from genomes is opening up new avenues of research on linking protein sequence to function with transformer neural networks. Recent research has shown that the number of known protein…

Machine Learning · Computer Science 2022-06-23 Anowarul Kabir , Amarda Shehu

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

Understanding how Transformers work and how they process information is key to the theoretical and empirical advancement of these machines. In this work, we demonstrate the existence of two phenomena in Transformers, namely isolation and…

We propose using mechanistic interpretability -- techniques for reverse engineering model weights into human-interpretable algorithms -- to derive and compactly prove formal guarantees on model performance. We prototype this approach by…

Machine Learning · Computer Science 2024-12-25 Jason Gross , Rajashree Agrawal , Thomas Kwa , Euan Ong , Chun Hei Yip , Alex Gibson , Soufiane Noubir , Lawrence Chan

We revisit the design choices in Transformers, and propose methods to address their weaknesses in handling long sequences. First, we propose a simple layer named gated attention unit, which allows the use of a weaker single-head attention…

Machine Learning · Computer Science 2022-06-28 Weizhe Hua , Zihang Dai , Hanxiao Liu , Quoc V. Le

Transformers are powerful sequence models, but require time and memory that grows quadratically with the sequence length. In this paper we introduce sparse factorizations of the attention matrix which reduce this to $O(n \sqrt{n})$. We also…

Machine Learning · Computer Science 2019-04-25 Rewon Child , Scott Gray , Alec Radford , Ilya Sutskever

Despite the widespread adoption of prompting, prompt tuning and prefix-tuning of transformer models, our theoretical understanding of these fine-tuning methods remains limited. A key question is whether one can arbitrarily modify the…

Machine Learning · Computer Science 2024-02-23 Aleksandar Petrov , Philip H. S. Torr , Adel Bibi

Prompt engineering has emerged as a powerful technique for guiding large language models (LLMs) toward desired responses, significantly enhancing their performance across diverse tasks. Beyond their role as static predictors, LLMs…

Machine Learning · Computer Science 2025-03-27 Ryumei Nakada , Wenlong Ji , Tianxi Cai , James Zou , Linjun Zhang