Grokking is delayed generalization: a neural network first fits its training data perfectly, then—sometimes much later—test accuracy rises abruptly from guessing to nearly 100%. The shift from memorization to a general rule raises a question: what changes inside the network? section 8.5
Research described in “Complexity Dynamics of Grokking” tracks the learned representation’s intrinsic complexity. It rises as the network memorizes, then falls sharply as the network settles on a simpler pattern that generalizes. This rise-and-fall appears with sufficient regularization; without it, complexity stays high and the network does not generalize. The account connects this pattern to the coffee automaton’s arc of rising and then declining complexity. section 8.5
Modular arithmetic
In experiments on modular arithmetic, including addition, multiplication, subtraction, and division, representation complexity peaks around the transition: training accuracy is already high while test accuracy has yet to catch up. Complexity then falls as the model reaches a simpler, rule-like solution. section 8.5
Figure 8.8 Complexity during grokking on modular arithmetic tasks. Gray curves show train and test accuracy; the thick curve shows the estimated complexity of the learned representation. Across modular addition, multiplication, subtraction, and division, complexity rises during the memorization-to-generalization transition and then falls once the model settles into a simpler rule-like solution. The peak occurs near the interval where training accuracy (dashed gray) is already high, but test accuracy (solid gray) has not yet fully caught up. As models memorize, complexity increases; as they generalize, complexity (measured in bytes) decreases. Used with permission granted by the lead author (Branton DeMoss).
Compare training and test accuracy with estimated representation complexity across modular arithmetic tasks. section 8.5
