What is Grokking?
In Turkish: Grokking · Topic: Math foundations
A phenomenon in which a neural network that has long since memorized its training data suddenly starts giving correct answers on new data after much more training.
How does it work?
Early in training, the model memorizes the examples: training error approaches zero, but performance on unseen data stays poor. As training continues, especially with regularization such as weight decay, the network slowly shifts from the memorizing solution to a simpler, more general one. From the outside, this shows up as a sudden jump in test accuracy. The effect was first observed on small algorithmic tasks such as modular addition.
Why does it matter?
Grokking suggests that stopping training as soon as overfitting appears is not always the right call. It is a frequently cited example in interpretability research, which tries to understand what models learn inside and when they learn it. How far it applies to large language models is still debated.
Example
A small network learning modular addition may memorize the sums it was trained on, then thousands of steps later begin answering sums it has never seen correctly.
FAQ
Is grokking the same as overfitting?
No. In overfitting, a model memorizes the training data and fails on new data. In grokking, generalization appears later, after the memorization phase, if training continues.
Does grokking happen in large language models too?
It has been shown most clearly on small, rule-based tasks. Some studies point to similar delayed-learning patterns in larger models, but how far it applies is still being researched.