Learning Linear Attention in Polynomial Time
Not on the map. Why?
Abstract (arXiv)
Previous research has explored the computational expressivity of Transformer models in simulating Boolean circuits or Turing machines. However, the learnability of these simulators from observational data has remained an open question. Our study addresses this gap by providing the first polynomial-time learnability results (specifically strong, agnostic PAC learning) for single-layer Transformers with linear attention. We show that linear attention may be viewed as a linear predictor in a suitably defined RKHS. As a consequence, the problem of learning any linear transformer may be converted into the problem of learning an ordinary linear predictor in an expanded feature space, and any such predictor may be converted back into a multiheaded linear transformer. Moving to generalization, we show how to efficiently identify training datasets for which every empirical risk minimizer is equivalent (up to trivial symmetries) to the linear Transformer that generated the data, thereby guaranteeing the learned model will correctly generalize across all inputs. Finally, we provide examples of computations expressible via linear attention and therefore polynomial-time learnable, including associative memories, finite automata, and a class of Universal Turing Machine (UTMs) with polynomially bounded computation histories. We empirically validate our theoretical findings on three tasks: learning random linear attention networks, key--value associations, and learning to execute finite automata. Our findings bridge a critical gap between theoretical expressivity and learnability of Transformers, and show that flexible and general models of computation are efficiently learnable.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 40 of its 46 references that are in the map. First posted on arXiv 14 Oct 2024.
Builds on
40 of 46 references.
References · 40
- 2017Attention Is All You Needcited by 59,932
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2017Decoupled Weight Decay Regularizationcited by 1,722
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,283
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 594
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 490
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 471
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 373
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2024xLSTM: Extended Long Short-Term Memorycited by 320
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 293
28 more
- 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 286
- 2022Transformers Learn Shortcuts to Automatacited by 260
- 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problemscited by 256
- 2023Looped Transformers as Programmable Computerscited by 224
- 2022The Parallelism Tradeoff: Limitations of Log-Precision Transformerscited by 191
- 2021Thinking Like Transformerscited by 182
- 2023Birth of a Transformer: A Memory Viewpointcited by 154
- 2019Neural Logic Machinescited by 144
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 137
- 2019On the Turing Completeness of Modern Neural Network Architecturescited by 129
- 2023What Formal Languages Can Transformers Express? A Surveycited by 120
- 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 101
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 101
- 2023Linear attention is (maybe) all you need (to understand transformer optimization)cited by 97
- 2022Formal Language Recognition by Hard Attention Transformers: Perspectives from Circuit Complexitycited by 92
- 2022Vision Transformers provably learn spatial structurecited by 92
- 2023Transformers as Support Vector Machinescited by 67
- 2023Tighter Bounds on the Expressivity of Transformer Encoderscited by 65
- 2023On the Role of Attention in Prompt-tuningcited by 49
- 2023What can a Single Attention Layer Learn? A Study Through the Random Features Lenscited by 39
- 2023Logical Languages Accepted by Transformer Encoders with Hard Attentioncited by 37
- 2023On the Optimization and Generalization of Multi-head Attentioncited by 37
- 2023Sequence Length Independent Norm-Based Generalization Bounds for Transformerscited by 28
- 2024Provably learning a multi-head attention layercited by 21
- 2022An Analysis of Attention via the Lens of Exchangeability and Latent Variable Modelscited by 15
- 2024Learning Associative Memories with Gradient Descentcited by 14
- 2023On the Expressiveness and Generalization of Hypergraph Neural Networkscited by 5
Built on by
Citing papers per year: 2025: 2; 2026: 3.
5 papers.
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 44
- 2026Provably Learning Multi-Head Attention with Queriescited by 2
- 2025On the Existence of Universal Simulators of Attentioncited by 1
- 2026Provably Learning Attention with Queriescited by 1
- 2026Meta-Attention: Bayesian Per-Token Routing for Efficient Transformer Inferencecited by 0
- 2026Provably Learning Multi-Head Attention with Queries4 Aug 2026
- 2026Meta-Attention: Bayesian Per-Token Routing for Efficient Transformer Inference27 May 2026
- 2026Provably Learning Attention with Queries23 Jan 2026
- 2025On the Existence of Universal Simulators of Attention23 Jun 2025
- 2025Training Dynamics of In-Context Learning in Linear Attention27 Jan 2025