Training Dynamics of Transformers on Unbounded Inputs: Attention Learning Can Lag Output Layer Learning
Not on the map. Why?
Abstract (arXiv)
The success of transformers is attributed to several factors, including their capacity to express formal languages over variable-length inputs, and ability of the attention mechanism to focus on relevant input features. However, there is limited understanding of the training dynamics of shallow transformers, specifically how to decouple the learning of the attention and the output (feedforward) layer. A natural extension of the theory of one-step gradient feature learning in feedforward networks suggests that one could first learn the attention weights with a single gradient step, and then train the output layer. We show that this fails for a shallow transformer trained to recognize a star-free language from unbounded-length input. We prove that the transformer can be trained to recognize the language with a three-phase gradient descent: the output layer is updated first, followed by an attention update, and the output layer is fine-tuned in the third phase. In contrast, the language cannot be learned by training only the attention or output layer, or by a single attention-layer update followed by finetuning the output layer. We empirically show that ``attention learning lagging output layer learning" is beneficial in other language recognition, regression, and in-context learning tasks as well.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 27 of its 31 references that are in the map. First posted on arXiv 14 Oct 2026.
Builds on
27 of 31 references.
References · 27
- 2015An Introduction to Matrix Concentration Inequalitiescited by 397
- 2019Gradient Descent Maximizes the Margin of Homogeneous Neural Networkscited by 320
- 2022Transformers Learn Shortcuts to Automatacited by 268
- 2022High-dimensional Asymptotics of Feature Learning: How One Gradient Step Improves the Representationcited by 150
- 2023SGD learning on neural networks: leap complexity and saddle-to-saddle dynamicscited by 143
- 2023What Formal Languages Can Transformers Express? A Surveycited by 124
- 2020Infinite attention: NNGP and NTK for deep attention networkscited by 121
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 102
- 2024What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formationcited by 89
- 2020Learning Parities with Neural Networkscited by 78
- 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 75
- 2023Transformers as Support Vector Machinescited by 74
15 more
- 2024Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformerscited by 50
- 2023Logical Languages Accepted by Transformer Encoders with Hard Attentioncited by 38
- 2022Random Feature Amplification: Feature Learning and Generalization in Neural Networkscited by 35
- 2024From Sparse Dependence to Sparse Attention: Unveiling How Chain-of-Thought Enhances Transformer Sample Efficiencycited by 29
- 2024Training Neural Networks as Recognizers of Formal Languagescited by 24
- 2024Transformers Provably Learn Sparse Token Selection While Fully-Connected Nets Cannotcited by 22
- 2023Provable Guarantees for Nonlinear Feature Learning in Three-Layer Neural Networkscited by 19
- 2024Attention layers provably solve single-location regressioncited by 17
- 2023Provable Guarantees for Neural Networks via Gradient Feature Learningcited by 14
- 2025How Transformers Learn Regular Language Recognition: A Theoretical Study on Training Dynamics and Implicit Biascited by 11
- 2024Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow Analysiscited by 9
- 2025What Happens During the Loss Plateau? Understanding Abrupt Learning in Transformerscited by 7
- 2025Transformers Provably Learn Sparse XOR with Polylogarithmic Parameterscited by 3
- 2025The Role of Logic and Automata in Understanding Transformerscited by 1
- 2026Finite-Time Analysis of Gradient Descent for Shallow Transformerscited by 1
Built on by
Not cited yet.