Local to Global: Learning Dynamics and Effect of Initialization for Transformers
Ashok Vardhan Makkuva, Marco Bondaschi, Chanakya Ekbote, Adway Girish,, Alliot Nagle, Hyeji Kim, Michael Gastpar

TL;DR
This paper analyzes how transformer models learn first-order Markov chains, revealing the impact of initialization on convergence and providing guidelines for better training based on theoretical and empirical insights.
Contribution
It offers the first comprehensive characterization of learning dynamics for transformers on Markov chains, emphasizing the role of initialization and data properties.
Findings
Transformers trained on Markov data can converge to global or local minima depending on initialization.
Theoretical conditions for convergence are derived and validated empirically.
Guidelines for effective transformer initialization are proposed.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsInnovative Teaching and Learning Methods
