Misalignment of training and test losses explains grokking behavior
Misalignment of Low-Loss Regions Causes Grokking
Machine LearningArtificial Intelligence
Summary
Grokking is when a model suddenly gets better on new data after seemingly overfitting the data it was trained on. The authors studied why this happens and found it depends on how the training and test tasks line up. If the low-error areas for training and testing match up well, grokking doesn’t happen. But when these areas don’t line up, grokking can appear. This finding challenges some earlier ideas about grokking and explains it through differences in the shapes of error regions.
What this means in practice
- •For machine learning engineers: Design training splits and data partitions to better control and predict grokking and generalization behaviors in models.
- •For deep learning framework developers: Incorporate tools that analyze geometric alignment of low-loss regions to help debug generalization dynamics during training.
Authors
Yongding Tian, Zaid Al-Ars, Maksim Kitsak, Peter Hofstee
Abstract
Grokking refers to the delayed emergence of validation-set generalization after a model has already overfit the training set. Although first observed in small algorithmic tasks trained with transformers, its underlying mechanism remains unsettled. In this work, we develop an analysis framework based on mode connectivity and the geometry of low-loss regions. The framework predicts that the standard modular-arithmetic setting does not always produce grokking: under a symmetry-preserving train/validation split, we observe a stable anti-grokking case in which validation performance does not recover. This counterexample challenges several existing correlational explanations of grokking. More broadly, our analysis framework and results further suggest that grokking arises when the low-loss regions induced by the training and validation partitions are misaligned. Once these regions become well aligned, training hyperparameters alone cannot produce grokking and the observed dynamics collapse to either trainable or non-trainable behavior.