In machine learning, grokking, or delayed generalization, is a transition to generalization that occurs many training iterations after the interpolation threshold, after many iterations of seemingly little progress, as opposed to the usual process where generalization occurs slowly and progressively once the interpolation threshold has been reached. [2] [3] [4]
Grokking was introduced in January 2022 by OpenAI researchers investigating how neural network perform calculations. It derives from the word grok coined by Robert Heinlein in his novel Stranger in a Strange Land . [1]
Grokking can be understood as a phase transition during the training process. [5] While grokking has been thought of as largely a phenomenon of relatively shallow models, grokking has been observed in deep neural networks and non-neural models and is the subject of active research. [6] [7] [8] [9]
One potential explanation is that the weight decay (a component of the loss function that penalizes higher values of the neural network parameters, also called regularization) slightly favors the general solution that involves lower weight values, but that is also harder to find. According to Neel Nanda, the process of learning the general solution may be gradual, even though the transition to the general solution occurs more suddenly later. [1]
Recent theories [10] [11] have hypothesized that grokking occurs when neural networks transition from a "lazy training" [12] regime where the weights do not deviate far from initialization, to a "rich" regime where weights abruptly begin to move in task-relevant directions. Follow-up empirical and theoretical work [13] has accumulated evidence in support of this perspective, and it offers a unifying view of earlier work as the transition from lazy to rich training dynamics is known to arise from properties of adaptive optimizers, [14] weight decay, [15] initial parameter weight norm, [8] and more.