From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training Dynamics
Zheng-An Chen, Tao Luo
TL;DR
This work analyzes transformer training dynamics under small initialization through gradient flow, revealing a two-stage process: first, asymmetric weight perturbations induce condensation of outer parameters toward a target direction; second, after these parameters stabilize, the key-query matrices activate and undergo rank-collapse, refining representations. The framework combines rigorous blow-up and condensation results with a dynamics-separation regime that yields linear key-query dynamics governed by a matrix $\mathbf{F}$, enabling rank-1 collapse when $\mathbf{F}$ has a unique largest singular value. Experimental validation on synthetic data and WikiText demonstrates the two-stage trajectory, including observable condensation in outer weights and subsequent rank collapse in the attention components. These findings offer a principled mechanism for implicit regularization in overparameterized transformers and a foundation for understanding why small initialization can promote robust generalization and efficient learning in language models.
Abstract
Although transformer-based models have shown exceptional empirical performance, the fundamental principles governing their training dynamics are inadequately characterized beyond configuration-specific studies. Inspired by empirical evidence showing improved reasoning capabilities under small initialization scales in language models, we employ the gradient flow analytical framework established in [Zhou et al. NeurIPS 2022] to systematically investigate linearized Transformer training dynamics. Our theoretical analysis dissects the dynamics of attention modules into two distinct stages. In the first stage, asymmetric weight perturbations from random initialization sustain non-degenerate gradient dynamics in parameter matrices, facilitating systematic escape from small initialization regimes. Subsequently, these matrices undergo condensation, progressively aligning toward the target orientation. In the second stage, the previously static key-query matrices actively participate in training, driving the normalized matrices toward asymptotic rank collapse. This two-stage framework generalizes classical directional convergence results.
