Local to Global: Learning Dynamics and Effect of Initialization for Transformers
Not on the map. Why?
Abstract (arXiv)
In recent years, transformer-based models have revolutionized deep learning, particularly in sequence modeling. To better understand this phenomenon, there is a growing interest in using Markov input processes to study transformers. However, our current understanding in this regard remains limited with many fundamental questions about how transformers learn Markov chains still unanswered. In this paper, we address this by focusing on first-order Markov chains and single-layer transformers, providing a comprehensive characterization of the learning dynamics in this context. Specifically, we prove that transformer parameters trained on next-token prediction loss can either converge to global or local minima, contingent on the initialization and the Markovian data properties, and we characterize the precise conditions under which this occurs. To the best of our knowledge, this is the first result of its kind highlighting the role of initialization. We further demonstrate that our theoretical findings are corroborated by empirical evidence. Based on these insights, we provide guidelines for the initialization of transformer parameters and demonstrate their effectiveness. Finally, we outline several open problems in this arena. Code is available at: https://github.com/Bond1995/Markov.
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). First posted on arXiv 5 Jun 2024.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2024: 2; 2025: 9.
11 papers.
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 44
- 2024Training Nonlinear Transformers for Chain-of-Thought Inference: A Theoretical Generalization Analysiscited by 14
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chainscited by 9
- 2024Transformers Handle Endogeneity in In-Context Linear Regressioncited by 8
- 2025Decoupling Positional and Symbolic Attention Behavior in Transformerscited by 6
- 2025On the Convergence of Gradient Descent on Learning Transformers with Residual Connectionscited by 5
- 2025Provable In-Context Learning of Nonlinear Regression with Transformerscited by 4
- 2025Bayes optimal learning of attention-indexed modelscited by 3
- 2025Merging Smarter, Generalizing Better: Enhancing Model Merging on OOD Datacited by 3
- 2025Attention with Trained Embeddings Provably Selects Important Tokenscited by 0
- 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functionscited by 0
- 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functions21 Oct 2025
- 2025Decoupling Positional and Symbolic Attention Behavior in Transformers3 Oct 2025
- 2025Provable In-Context Learning of Nonlinear Regression with Transformers28 Jul 2025
- 2025Merging Smarter, Generalizing Better: Enhancing Model Merging on OOD Data10 Jun 2025
- 2025On the Convergence of Gradient Descent on Learning Transformers with Residual Connections5 Jun 2025
- 2025Bayes optimal learning of attention-indexed models2 Jun 2025
- 2025Attention with Trained Embeddings Provably Selects Important Tokens22 May 2025
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chains14 Feb 2025
- 2025Training Dynamics of In-Context Learning in Linear Attention27 Jan 2025
- 2024Training Nonlinear Transformers for Chain-of-Thought Inference: A Theoretical Generalization Analysis3 Oct 2024
- 2024Transformers Handle Endogeneity in In-Context Linear Regression2 Oct 2024