Grokking as a First Order Phase Transition in Two Layer Networks
Noa Rubin, Inbar Seroussi, Zohar Ringel
TL;DR
The paper addresses the mechanism behind Grokking and feature learning in two-layer neural networks. It adopts a mean-field/adaptive kernel framework and maps Grokking to a first-order phase transition with a mixed Gaussian feature-learning phase (GMFL) after Grokking. It analyzes two toy models—a nonlinear cubic teacher and a modular algebra task—to derive analytic predictions, including phase diagrams with GMFL-I and GMFL-II regimes and a simplified scalar order parameter. It also reports numerical simulations showing that feature learning can reduce sample complexity and cause delayed generalization, linking Grokking to latent kernel adaptation. The results suggest a general, analytically tractable picture of representation learning in DNNs and potential practical implications for training and pruning.
Abstract
A key property of deep neural networks (DNNs) is their ability to learn new features during training. This intriguing aspect of deep learning stands out most clearly in recently reported Grokking phenomena. While mainly reflected as a sudden increase in test accuracy, Grokking is also believed to be a beyond lazy-learning/Gaussian Process (GP) phenomenon involving feature learning. Here we apply a recent development in the theory of feature learning, the adaptive kernel approach, to two teacher-student models with cubic-polynomial and modular addition teachers. We provide analytical predictions on feature learning and Grokking properties of these models and demonstrate a mapping between Grokking and the theory of phase transitions. We show that after Grokking, the state of the DNN is analogous to the mixed phase following a first-order phase transition. In this mixed phase, the DNN generates useful internal representations of the teacher that are sharply distinct from those before the transition.
