cs.LGApr 6, 2026

Grokking as Dimensional Phase Transition in Neural Networks

Authors: Ping Wang

Organizations: Institute of High Energy Physics, Chinese Academy of Science, 100049 Beijing, China

Abstract

Neural network grokking -- the abrupt memorization-to-generalization transition -- challenges our understanding of learning dynamics. Through finite-size scaling of gradient avalanche dynamics across eight model scales, we find that grokking is a dimensional phase transition: effective dimensionality~DD crosses from sub-diffusive (subcritical, D<1D < 1) to super-diffusive (supercritical, D>1D > 1) at generalization onset, exhibiting self-organized criticality (SOC). Crucially, DD reflects gradient field geometry, not network architecture: synthetic i.i.d.\ Gaussian gradients maintain D≈1D \approx 1 regardless of graph topology, while real training exhibits dimensional excess from backpropagation correlations. The grokking-localized D(t)D(t) crossing -- robust across topologies -- offers new insight into the trainability of overparameterized networks.

Figures & tables

Explore similar work

Apr 6, 2026

Dimensional Criticality at Grokking Across MLPs and Transformers

Abrupt transitions between distinct dynamical regimes are a hallmark of complex systems. Grokking in deep neural networks provides a striking example -- an abrupt transition from memorization to generalization long after training accuracy saturates -- yet robust macroscopic signatures of this transition remain elusive. Here we introduce TDU--OFC (Thresholded Diffusion Update--Olami-Feder-Christensen), an offline avalanche probe that converts gradient snapshots into cascade statistics and extracts a macroscopic observable -- the time-resolved effective cascade dimension D(t)D(t) -- via grokking-aligned finite-size scaling. Across Transformers trained on modular addition and MLPs trained on XOR, we discover a localized dynamical crossing of the Gaussian diffusion baseline D=1D=1 precisely at the generalization transition. The crossing direction is task-dependent: modular addition descends through D=1D=1 (approaching from D>1D>1), while XOR ascends (from D<1D<1). This opposite-direction convergence is consistent with attraction toward a candidate shared critical manifold, rather than trivial residence near D≈1D \approx 1. Negative controls confirm this picture: ungrokked runs remain supercritical (D>1D>1) and never enter the post-transition regime. In addition, avalanche distributions exhibit heavy tails and finite-size scaling consistent with the dimensional exponent extracted from D(t)D(t). Shadow-probe controls (αtrain=0α_{\mathrm{train}}=0) confirm that D(t)D(t) is non-invasive, and grokked trajectories diverge from ungrokked ones in D(t)D(t) some 100100--200200 epochs before the behavioral transition.
Sep 9, 2026

Quantifying the Memorization-to-Generalization Transition: Scaling Laws and Phase Structure in Grokking

Neural networks trained past memorization frequently undergo a delayed transition to generalization, a phenomenon known as grokking. Despite theoretical progress on why this transition occurs, the quantitative structure of when it occurs in hyperparameter space remains uncharacterized. We map the memorization-to-generalization boundary across 384 configurations of two-hidden-layer MLPs on modular arithmetic, fitting a power-law scaling relation for generalization onset time: Tgrok∝H−0.27 D−2.04 η−0.50 λ−0.64T_{\mathrm{grok}} \propto H^{-0.27}\, D^{-2.04}\, η^{-0.50}\, λ^{-0.64} (R2=0.732R^2 = 0.732; 0.8210.821 with interactions). The exponent hierarchy reveals that data complexity (D−2.04D^{-2.04}) is the dominant driver of regime transition, not model capacity (H−0.27H^{-0.27}): doubling data accelerates generalization by ∼4×{\sim}4\times, while doubling width yields only ∼1.2×{\sim}1.2\times. A sharp phase boundary at weight decay λ≳1.0λ\gtrsim 1.0 separates grokking from non-grokking configurations, and weight norm trajectories show monotonic compression during the transition, consistent with implicit regularization selecting low-complexity solutions. These results provide a quantitative foundation for predicting and controlling regime transitions in overparameterized networks.
Jun 15, 2026

Noise-Driven Escape from Metastable Phases explains Grokking in Deep Neural Networks

Deep neural networks (DNNs) exhibit first order phase transitions under variations of the L2 regularization strength, with each transition marking the onset of a new learnable feature. Below a critical regularization strength, all features are in principle learnable, but coexisting metastable states, separated by energy barriers, can trap the network and impede convergence. A strength of DNNs is their ability to generalize. But many open questions remain, among them the origin of so called grokking: the abrupt, delayed onset of generalization after prolonged apparent overfitting. We show for linear DNNs that grokking is consistent with hysteresis in first-order L2 phase transitions: using L2 regularization to engineer deliberate trapping, we demonstrate that a model in a low-accuracy metastable state escapes only when SGD noise drives it across an energy barrier, with escape times following Arrhenius scaling. We reproduce grokking-like delayed convergence across two orders of magnitude in escape time by deliberately trapping models in metastable phases. Using sparse sub-sampling we also reproduce the canonical grokking curve where test error eventually approaches the final training error. Our work suggests that the number of metastable states equals the number of learnable features -- one per singular value of the data covariance -- the potential for hysteresis grows naturally with task complexity. We provide evidence that the same mechanism likely operates in general nonlinear DNNs. Our results provide routes toward more efficient learning schemes.