The verb to grok comes from Robert Heinlein's novel Stranger in a Strange Land (1961), where it is a Martian word for an understanding so deep that the observer merges with the observed. In machine learning, Power et al. (2022) used it for something more modest and stranger. They trained a small transformer on operation tables such as division modulo 97, showing it half of the possible equations. The model memorized the training set in fewer than a thousand steps, with total overfitting and chance performance on the validation data. But they kept training, and much later (on the order of a thousand times more steps) validation accuracy began to rise until it became perfect (2022, sec. 3.1). Weight decay, a regularizer that shrinks the weights, turned out to help it the most.
Mechanistic interpretability opened the box. On modular addition, Nanda and colleagues found that the network ends up representing numbers as rotations on a circle and adding them with trigonometric identities. They distinguished three phases: memorization; formation of a general circuit while memorization is still present; and a "cleanup" in which regularization removes the memorized components. The final jump is abrupt, but the underlying process is gradual (Millière & Buckner, 2024b, sec. 2.5).
The case is philosophically juicy for two reasons. First, it contradicts the idea that a network that has memorized has stopped learning: memorizing and generalizing can coexist and compete within the same system. Second, Millière & Buckner (2024b) read it as evidence against the picture of models as giant tables of input–output pairs, a relative of Block's Blockhead: the transformer ends up implementing an algorithm. The p(doom) song evokes it with "There was a sudden drop in your training loss" (osmarks, n.d.), although in grokking what drops suddenly is the validation loss: the training loss was already at the floor.