How do Transformers perform In-Context Autoregressive Learning?
Not on the map. Why?
Abstract (arXiv)
Transformers have achieved state-of-the-art performance in language modeling tasks. However, the reasons behind their tremendous success are still unclear. In this paper, towards a better understanding, we train a Transformer model on a simple next token prediction task, where sequences are generated as a first-order autoregressive process st+1 = W st. We show how a trained Transformer predicts the next token by first learning W in-context, then applying a prediction mapping. We call the resulting procedure in-context autoregressive learning. More precisely, focusing on commuting orthogonal matrices W, we first show that a trained one-layer linear Transformer implements one step of gradient descent for the minimization of an inner objective function, when considering augmented tokens. When the tokens are not augmented, we characterize the global minima of a one-layer diagonal linear multi-head Transformer. Importantly, we exhibit orthogonality between heads and show that positional encoding captures trigonometric relations in the data. On the experimental side, we consider the general case of non-commuting orthogonal matrices and generalize our theoretical findings.
Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Builds on 33 of its 44 references that are in the map. First posted on arXiv 8 Feb 2024.
Builds on
33 of 44 references.
References · 33
- 2017Attention Is All You Needcited by 59,932
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2016Layer Normalizationcited by 5,579
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2023Mistral 7Bcited by 3,065
- 2022Training Compute-Optimal Large Language Modelscited by 2,927
21 more
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2019Are Sixteen Heads Really Better than One?cited by 803
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2019Implicit Regularization in Deep Matrix Factorizationcited by 402
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
- 2020Kernel and Rich Regimes in Overparametrized Modelscited by 302
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
- 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 168
- 2021Sinkformers: Transformers with Doubly Stochastic Attentioncited by 136
- 2021Implicit Bias of SGD for Diagonal Linear Networks: a Provable Benefit of Stochasticitycited by 107
- 2022Vision Transformers provably learn spatial structurecited by 92
- 2021A Practical Survey on Faster and Lighter Transformerscited by 73
- 2022The Principle of Diversity: Training Stronger Vision Transformers Calls for Reducing All Levels of Redundancycited by 35
- 2021The loss landscape of deep linear neural networks: a second-order analysiscited by 24
- 2021Convergence of gradient descent for learning linear neural networkscited by 22
- 2019Orthogonality Constrained Multi-Head Attention For Keyword Spottingcited by 6
Built on by
Citing papers per year: 2024: 6; 2025: 8; 2026: 2.
16 papers.
Sort:
By area:
- 2024Transformers are Universal In-context Learnerscited by 42
- 2024Pretrained transformer efficiently learns low-dimensional target functions in-contextcited by 29
- 2024Towards Understanding the Universality of Transformers for Next-Token Predictioncited by 9
- 2025Selective Induction Heads: How Transformers Select Causal Structures In Contextcited by 7
- 2024On Mesa-Optimization in Autoregressively Trained Transformers: Emergence and Capabilitycited by 5
- 2024In-Context Learning of Linear Systems: Generalization Theory and Applications to Operator Learningcited by 5
- 2025Transformers through the lens of support-preserving maps between measurescited by 5
- 2024From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and Whencited by 3
- 2025Token Sample Complexity of Attentioncited by 3
- 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decodingcited by 2
- 2025In-Context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-Separationcited by 1
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descentcited by 1
4 more
- 2025Transformers as Multi-task Learners: Decoupling Features in Hidden Markov Modelscited by 0
- 2025Decomposing Prediction Mechanisms for In-Context Recallcited by 0
- 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functionscited by 0
- 2026Induction Heads Interpolate N-Gramscited by 0
- 2026Induction Heads Interpolate N-Grams2 Jul 2026
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descent12 Apr 2026
- 2025Token Sample Complexity of Attention11 Dec 2025
- 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functions21 Oct 2025
- 2025Transformers through the lens of support-preserving maps between measures30 Sep 2025
- 2025Selective Induction Heads: How Transformers Select Causal Structures In Context9 Sep 2025
- 2025Decomposing Prediction Mechanisms for In-Context Recall2 Jul 2025
- 2025Transformers as Multi-task Learners: Decoupling Features in Hidden Markov Models2 Jun 2025
- 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decoding14 Mar 2025
- 2025In-Context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-Separation12 Feb 2025
- 2024Pretrained transformer efficiently learns low-dimensional target functions in-context4 Nov 2024
- 2024Towards Understanding the Universality of Transformers for Next-Token Prediction3 Oct 2024
4 more
- 2024In-Context Learning of Linear Systems: Generalization Theory and Applications to Operator Learning18 Sep 2024
- 2024Transformers are Universal In-context Learners2 Aug 2024
- 2024From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and When31 May 2024
- 2024On Mesa-Optimization in Autoregressively Trained Transformers: Emergence and Capability27 May 2024
- 2024Transformers are Universal In-context Learnerscited by 42
- 2024Pretrained transformer efficiently learns low-dimensional target functions in-contextcited by 29
- 2024Towards Understanding the Universality of Transformers for Next-Token Predictioncited by 9
- 2025Selective Induction Heads: How Transformers Select Causal Structures In Contextcited by 7
- 2024On Mesa-Optimization in Autoregressively Trained Transformers: Emergence and Capabilitycited by 5
- 2024In-Context Learning of Linear Systems: Generalization Theory and Applications to Operator Learningcited by 5
- 2025Transformers through the lens of support-preserving maps between measurescited by 5
- 2024From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and Whencited by 3
- 2025Token Sample Complexity of Attentioncited by 3
- 2025In-Context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-Separationcited by 1
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descentcited by 1
- 2025Transformers as Multi-task Learners: Decoupling Features in Hidden Markov Modelscited by 0
12 most cited of 15 All 15 (JSON)
- 2026Induction Heads Interpolate N-Grams2 Jul 2026
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descent12 Apr 2026
- 2025Token Sample Complexity of Attention11 Dec 2025
- 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functions21 Oct 2025
- 2025Transformers through the lens of support-preserving maps between measures30 Sep 2025
- 2025Selective Induction Heads: How Transformers Select Causal Structures In Context9 Sep 2025
- 2025Decomposing Prediction Mechanisms for In-Context Recall2 Jul 2025
- 2025Transformers as Multi-task Learners: Decoupling Features in Hidden Markov Models2 Jun 2025
- 2025In-Context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-Separation12 Feb 2025
- 2024Pretrained transformer efficiently learns low-dimensional target functions in-context4 Nov 2024
- 2024Towards Understanding the Universality of Transformers for Next-Token Prediction3 Oct 2024
- 2024In-Context Learning of Linear Systems: Generalization Theory and Applications to Operator Learning18 Sep 2024
12 newest of 15 All 15 (JSON)