TL;DR
This paper reveals that Transformers don't learn all their features at once; instead, they follow "incremental learning dynamics" where the complexity (rank) of the weight updates grows step-by-step. By proving this mathematically for simplified models and demonstrating it experimentally on models like ViT and GPT-2, the authors provide a theoretical explanation for why low-rank adaptation methods (like LoRA) are so effective.
What Problem Does This Paper Address?
Despite the massive success of the Transformer architecture, we still lack a rigorous theoretical understanding of how it actually learns during training. Specifically, researchers have long observed "incremental learning" in simple linear networks—where a model learns simple features first before moving to complex ones—but it wasn't clear if this applied to the highly non-linear, complex world of Transformers (with their attention heads, softmax layers, and residual connections).
The authors set out to answer: Are there incremental learning dynamics when training a Transformer? Understanding this could explain the "implicit bias" of gradient descent—why models tend to find simple, generalizable solutions rather than over-fitting to noise.
Methods
The authors approach the problem through two lenses:
- Theoretical Analysis (The "Diagonal" Transformer): To make the math tractable, they study a simplified Transformer where weight matrices are diagonal. They analyze the gradient flow (the continuous-time version of gradient descent) in the small initialization regime. They prove that under these conditions, the network learns in discrete stages. In each stage, the loss plateaus while the weights are near a "saddle point," followed by a sudden jump where the rank of the weight matrix increases by at most one.
- Experimental Validation: They move beyond the simplifications to see if the theory holds in the real world. They train standard Vision Transformers (ViT) and GPT-2 models using standard optimizers (Adam) and initializations. They track the stable rank (a continuous approximation of a matrix's rank) of the difference between the trained weights and the initial weights ($\Delta W$).
Datasets
The authors validated their findings across several standard benchmarks:
- Toy Task: A student-teacher setup using a single attention head.
- Vision: CIFAR-10, CIFAR-100, and ImageNet (using ViT).
- Language: Wikitext-103 (using GPT-2).
Key Insights and Ideas
- Saddle-to-Saddle Dynamics: Learning is not a smooth descent. It’s a series of "jumps" between saddle points. The model spends most of its time on a loss plateau, "deciding" which feature to learn next, before rapidly increasing its weight rank to capture that feature.
- Implicit Low-Rank Bias: Even without any explicit constraints, gradient descent naturally prefers low-rank updates. The "learned perturbation" (the change from $W_{initial}$ to $W_{final}$) remains remarkably low-rank throughout training compared to the full dimensionality of the model.
- The "Why" Behind LoRA: This paper provides a "natural" justification for Low-Rank Adaptation (LoRA). LoRA works so well because it forces the model to do exactly what it already wants to do during standard training: update its knowledge via low-rank changes.
- Conservation Laws: The authors identify a "balancedness" property in diagonal layers ($u_i^2 - v_i^2$ remains constant), which acts as a mathematical anchor to track how weights evolve over time.
Key Results
- Theoretical Proof: Theorem 1.1 rigorously establishes that for diagonal transformers with small initialization, the number of non-negligible entries in the weight products increases by at most one per stage.
- Empirical Evidence of Rank Growth: In experiments with ViT on ImageNet and GPT-2 on Wikitext, the authors show that the stable rank of the weight updates ($\Delta W$) starts near 1 and increases gradually over thousands of iterations.
- Impact of Initialization: They found that the smaller the initialization scale, the more pronounced the "staircase" nature of the loss curve and the lower the rank of the final learned weights. However, even with standard "default" initializations, the low-rank bias remains clearly visible.
Limitations and Future Work
- Diagonal Assumption: The rigorous proof relies on diagonal weight matrices. While experiments suggest the principle generalizes to full matrices, the mathematical proof for the general case remains an open challenge.
- Smoothness Requirements: The theory requires the model to be twice-differentiable. This means it applies to Transformers using GeLU activations (like ViT) but technically excludes those using the non-smooth ReLU.
- Loss Functions: The current theory doesn't easily account for losses with "exponential tails" (like standard cross-entropy) where weights might grow to infinity; it assumes weights converge to a finite local minimum.
- Future Directions: The authors suggest this work could lead to new, more efficient training algorithms that explicitly leverage these incremental dynamics to reduce memory and computation costs.
Summary updated