Grokking and Generalization Collapse: Insights from HTSR theory

Hari Prakash, Charles H. Martin

Abstract: Neural network training is often characterized by "grokking," a sudden transition from overfitting to generalization. This paper investigates the long-term stability of this state, discovering a subsequent "anti-grokking" phase where generalization catastrophically collapses while training accuracy remains perfect. By applying Heavy-Tailed Self-Regularization (HTSR) theory, we demonstrate that the weight matrix power-law exponent $\alpha$ can predict this collapse without access to test data. We identify "correlation traps"—anomalous rank-one perturbations in weight matrices—as the primary mechanism driving this transition into the Very-Heavy-Tailed regime.

1. Introduction

In deep learning, grokking represents a counterintuitive shift toward generalization late in training. While often attributed to weight decay, this study examines training dynamics in the absence of explicit regularization. We aim to identify intrinsic measures of generalization derived solely from model weights that can distinguish between a truly generalized model and one on the verge of collapse.

2. Theoretical Framework: HTSR and the $\alpha$ Metric

We utilize Heavy-Tailed Self-Regularization (HTSR) theory to analyze the Empirical Spectral Density (ESD) of weight matrices. The key metric is the power-law exponent $\alpha$, fitted to the tail of the ESD. An $\alpha \approx 2$ indicates an ideal, generalizing layer, while $\alpha < 2$ signals a "Very-Heavy-Tailed" (VHT) regime associated with over-correlation and overfitting. Additionally, we monitor "correlation traps"—outlier eigenvalues ($\lambda_{trap}$) that deviate from the Marchenko-Pastur (MP) distribution when weight matrices are randomized, signaling atypical weight structures.

3. Experimental Setup

Experiments were conducted using a 3-layer Multi-Layer Perceptron (MLP) trained on a 1,000-sample subset of MNIST (100 samples per class). Evaluation was performed on the standard 10,000-sample MNIST test set. Training was extended to $10^7$ steps without weight decay to observe long-term behavior.

4. The Discovery of Anti-Grokking

The most significant finding is that generalization is not necessarily permanent. After the initial grokking phase, the model enters an "anti-grokking" phase where test accuracy drops toward chance levels (0.5) despite training accuracy remaining at 1.0.

Training and test accuracy curves illustrating the transition through pre-grokking, grokking, and the final anti-grokking collapse.

The $\alpha$ metric consistently delineates these phases:

  • Pre-grokking: $\alpha \gtrsim 5$ (random-like weights).
  • Grokking: $\alpha$ stabilizes near 2 (optimal correlation).
  • Anti-grokking: $\alpha$ falls significantly below 2 (over-correlation).

5. Mechanism of Generalization Collapse

The collapse is driven by the emergence of "correlation traps." In the anti-grokking phase, the number of detected traps in the first fully connected layer (FC1) increases from 1 to an average of 7.5. These traps push the ESD into the VHT regime, effectively breaking the model's ability to generalize.

Marchenko-Pastur ESD plots showing the increase in outlier 'spikes' (correlation traps) as the model transitions from a single spike to multiple spikes during collapse.

Notably, standard metrics like the $l_2$ weight norm fail to signal this collapse, as they increase monotonically throughout both grokking and anti-grokking phases, making them unreliable for detecting late-stage generalization failure.

6. Conclusion and Future Work

The HTSR $\alpha$ metric provides a powerful, intrinsic signal for monitoring model health and predicting generalization collapse. Future research will focus on validating these phenomena in larger architectures like Transformers and developing $\alpha$-guided regularizers or early-stopping criteria that do not require validation sets.

Summary updated

BibTeX
@inproceedings{prakash2025grokking,
  author = {Hari Prakash and Charles H. Martin},
  title = {{Grokking and Generalization Collapse: Insights from HTSR theory}},
  booktitle = {HiLD @ ICML},
  year = {2025},
  url = {https://openreview.net/forum?id=upyC7rwR1M},
}
Figure