Marginals Before Conditionals: Why Transformers "Stall" Before Getting the Point
Marginals Before Conditionals
The paper introduces a "wind tunnel" task to study staged learning in Transformers, where models must disambiguate a mapping using a selector token . It reveals that models consistently learn marginal distributions before conditionals , resulting in a loss plateau at exactly (where is the ambiguity level) followed by a sharp, collective transition to zero loss.
TL;DR
Imagine teaching a model that "Bank" can mean a river edge or a financial institution, but it only figures out which one is which (using context) after a long, frustrating plateau where it just guesses both. This paper proves that Transformers learn the "average" (marginal) answer long before they learn to use specific context (conditional) to disambiguate. Surprisingly, more data and more optimization noise actually make this wait longer.
The "Wind Tunnel" of Conditional Learning
Why do models fail to see the obvious? To answer this, the authors constructed a minimal task:
- Input: A base string and a selector .
- Mapping: maps to possible targets. Without , you are guessing (Loss = ). With , the answer is unique (Loss = 0).
The study finds a universal training trajectory: a rapid drop to the "marginal" solution (), a long flat plateau, and then a sudden "snap" where the model suddenly "gets it" and loss hits zero.
Insight 1: Duration Depends on Data Size (), Not Complexity ()
One might assume that highly ambiguous tasks (large ) would take longer to solve. The authors found this is false. If you keep the total dataset size constant, the model takes the same amount of time to escape the plateau regardless of whether or .
The bottleneck isn't the complexity of the confusion, but the volume of examples the optimizer must process to align the internal "routing" circuits.
Figure 1: The model hits the plateau almost immediately and stays there until a sharp "snap."
Insight 2: The Noise Trap (Entropic Stabilization)
In many optimization problems, noise (via high learning rates or small batches) helps "kick" the model out of local minima. Here, the opposite happens.
- Fact: Higher learning rates prolong the plateau.
- Why?: The marginal solution is a "low-gradient" state where competing directions cancel out. This creates a flat saddle point. Noise acts as an "entropic force" that keeps the model floating in this flat region, preventing it from finding the narrow, shallow "escape hatch" that leads to the conditional solution.
Insight 3: The Collective Snap & Internal Cascade
Is the model learning one group at a time? No. The transition is collective. At half the waiting time (), zero percent of the groups are solved. Then, suddenly, everything solves at once.
Mechanistically, the authors found that a specific "selector-routing" head (L0H3) starts specializing long before the loss actually drops. This "hidden progress" accounts for about 50% of the plateau duration.
Figure 2: The direction consistency snaps from 0 (random walk) to 0.8 (targeted escape) at the moment of transition.
Directional Asymmetry: The "Arrow of Time"
The paper links this to the Reversal Curse. Learning the mapping is much faster than the reverse . Because the "backward" direction lacks the group structure (shared strings) that the Transformer can use to scaffold its circuits, it takes 1.7x to 4.4x longer to learn.
Critical Analysis & Conclusion
This paper provides a rigorous "physics of training" view of why models stall. It falsifies several common myths:
- Myth: Plateaus are caused by gradient cancellation across groups. (Result: Falsified; duration doesn't scale with the number of groups).
- Myth: Noise helps escape. (Result: Falsified; noise stabilizes the "dumb" solution).
- Myth: Models learn one thing at a time. (Result: Falsified; learning is a collective phase transition).
Limitations: The study uses a 4-layer Transformer on synthetic data. While it provides a "wind tunnel" for theory, natural language has many overlapping hierarchies of ambiguity, which might smooth out these sharp transitions or create a "staircase" of plateaus.
The Takeaway for Researchers: If your model is stuck on a plateau and ignoring context, adding more data or increasing the learning rate might actually be counter-productive. You may be inadvertently "stabilizing" the very ignorance you're trying to fix.
