English

The Complexity Dynamics of Grokking

Machine Learning 2025-08-22 v2

Abstract

We demonstrate the existence of a complexity phase transition in neural networks by studying the grokking phenomenon, where networks suddenly transition from memorization to generalization long after overfitting their training data. To characterize this phase transition, we introduce a theoretical framework for measuring complexity based on rate-distortion theory and Kolmogorov complexity, which can be understood as principled lossy compression for networks. We find that properly regularized networks exhibit a sharp phase transition: complexity rises during memorization, then falls as the network discovers a simpler underlying pattern that generalizes. In contrast, unregularized networks remain trapped in a high-complexity memorization phase. We establish an explicit connection between our complexity measure and generalization bounds, providing a theoretical foundation for the link between lossy compression and generalization. Our framework achieves compression ratios 30-40x better than na\"ive approaches, enabling precise tracking of complexity dynamics. Finally, we introduce a regularization method based on spectral entropy that encourages networks toward low-complexity representations by penalizing their intrinsic dimension.

Keywords

Cite

@article{arxiv.2412.09810,
  title  = {The Complexity Dynamics of Grokking},
  author = {Branton DeMoss and Silvia Sapora and Jakob Foerster and Nick Hawes and Ingmar Posner},
  journal= {arXiv preprint arXiv:2412.09810},
  year   = {2025}
}
R2 v1 2026-06-28T20:33:21.662Z