NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Dichotomy of Early and Late Phase Implicit Biases Can Provably Induce Grokking

Kaifeng Lyu, Jikai Jin, Zhiyuan Li, Simon Shaolei Du, Jason D. Lee, Wei Hu

TL;DR

This paper provides the first rigorous theoretical proof of grokking—the mysterious phenomenon where a neural network suddenly transitions from memorization to perfect generalization long after training accuracy has plateaued. The authors show that this "aha moment" is driven by a dichotomy of implicit biases: an early phase biased toward overfitting kernel solutions and a late phase biased toward generalizable max-margin solutions, with a provably sharp transition between them.

What Problem Does This Paper Address?

In deep learning, "grokking" refers to a puzzling behavior where a model first achieves 100% training accuracy but near-zero test accuracy (it has simply memorized the data). Then, after training for many more steps, the test accuracy suddenly jumps to 100%.

While empirically observed in tasks like modular arithmetic, the underlying mechanism remained poorly understood. Specifically, two big questions remained:

  1. Can we mathematically prove this happens in a neural network setting?
  2. Why is the transition so sudden (sharp) rather than gradual?

The authors tackle these questions by analyzing how initialization scale and weight decay interact to shift the model's internal "preferences" (implicit biases) over time.

Methods

The researchers focused on homogeneous neural networks (a broad class including most MLPs and CNNs) trained with large initialization and small weight decay.

They used gradient flow analysis to divide training into two distinct regimes:

  • The Kernel Regime (Early Phase): Large initialization makes the network behave like a linear kernel predictor (specifically, the Neural Tangent Kernel or NTK). In many complex tasks, this kernel solution overfits.
  • The Rich Regime (Late Phase): Over time, weight decay reduces the parameter norm. This eventually forces the model to escape the kernel regime and seek a solution that minimizes the parameter norm (or maximizes the margin).

The authors proved that the transition between these two "preferences" happens at a specific time ($t \approx \frac{1}{\lambda} \log \alpha$, where $\lambda$ is weight decay and $\alpha$ is initialization scale), explaining the sudden jump in performance.

Datasets

The paper validates its theory using several benchmarks:

  • Modular Addition: Learning $a + b \equiv c \pmod{p}$.
  • Sparse Linear Classification: A synthetic task where only a few input features are relevant, trained using "diagonal linear networks."
  • Matrix Completion: Recovering a low-rank matrix (like a multiplication table) from a small subset of its entries.
  • "Misgrokking" Dataset: A custom-designed dataset where the kernel solution generalizes well but the max-margin solution overfits, used to demonstrate the reverse phenomenon.

Key Insights and Ideas

  • The Dichotomy of Bias: Grokking isn't just "slow learning." It’s a competition between two different types of solutions. The model is "trapped" in a bad solution (memorization) by its initial state before being "pulled" into a good solution (generalization) by the optimizer's long-term bias.
  • Weight Decay is the Catalyst: Small weight decay is what eventually "breaks" the spell of the initial kernel regime. Without it, the transition is much slower and less sharp.
  • "Misgrokking": The authors discovered a new phenomenon they call "misgrokking." If the early-phase bias is actually better for the data than the late-phase bias, the model will start with high test accuracy and then suddenly "forget" how to generalize as training continues.
Comparison of Grokking and Misgrokking

Key Results

  • Provable Sharpness: The paper mathematically demonstrates that the transition from memorization to generalization is sharp. Increasing the initialization scale ($\alpha$) or decreasing weight decay ($\lambda$) delays this transition, confirming their theoretical formula.
  • Empirical Validation: In matrix completion tasks, the model initially fills unobserved entries with zeros (kernel bias, high error) before suddenly recovering the true low-rank structure (rich bias, zero error).
  • Sparse Classification: They showed that for sparse data, the early kernel bias requires $O(kd)$ samples to generalize, while the late-phase $L_1$-like bias only needs $O(k^2 \log d)$, explaining why the model "groks" once it shifts regimes.

Limitations and Future Work

  • Specific Conditions: The proof currently relies on large initialization and weight decay. While these are common "tricks" to induce grokking, the authors acknowledge that other mechanisms (like "slingshot" effects or sharpness reduction) might also play a role in different settings.
  • Practical Speedup: While the paper explains why the delay happens, it doesn't provide a definitive method to eliminate the delay in practical training, which remains a goal for applied researchers.
  • Non-Homogeneous Nets: Extending these proofs to non-homogeneous architectures (like Transformers with LayerNorm) is a suggested next step.

Summary updated

BibTeX
@inproceedings{lyu2024dichotomy,
  author = {Kaifeng Lyu and Jikai Jin and Zhiyuan Li and Simon Shaolei Du and Jason D. Lee and Wei Hu},
  title = {{Dichotomy of Early and Late Phase Implicit Biases Can Provably Induce Grokking}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=XsHqr9dEGH},
}
Figure