Grokking, or delayed generalization, is an intriguing learning phenomenon where test set loss decreases sharply only after a model's training set loss has converged. This challenges conventional understanding of the training dynamics in deep learning networks. In this paper, we formalize and investigate grokking, highlighting that a key factor in its emergence is a distribution shift between training and test data. We introduce two synthetic datasets specifically designed to analyze grokking. One dataset examines the impact of limited sampling, and the other investigates transfer learning's role in grokking. By inducing distribution shifts through controlled imbalanced sampling of sub-categories, we systematically reproduce the phenomenon, demonstrating that while small-sampling is strongly associated with grokking, it is not its cause. Instead, small-sampling serves as a convenient mechanism for achieving the necessary distribution shift. We also show that when classes form an equivariant map, grokking can be explained by the model's ability to learn from similar classes or sub-categories. Unlike earlier work suggesting that grokking primarily arises from high regularization and sparse data, we demonstrate that it can also occur with dense data and minimal hyper-parameter tuning. Our findings deepen the understanding of grokking and pave the way for developing better stopping criteria in future training processes.
Dichotomy of Early and Late Phase Implicit Biases Can Provably Induce Grokking
Princeton University(普林斯顿大学);Stanford University(斯坦福大学);Toyota Technological Institute at Chicago(芝加哥丰田理工学院);University of Washington(华盛顿大学);University of Michigan(密歇根大学)
The grokking phenomenon as reported by Power et al. ( arXiv:2201.02177 ) refers to a regime where a long period of overfitting is followed by a seemingly sudden transition to perfect generalization. In this paper, we attempt to reveal the underpinnings of Grokking via a series of empirical studies. Specifically, we uncover an optimization anomaly plaguing adaptive optimizers at extremely late stages of training, referred to as the Slingshot Mechanism. A prominent artifact of the Slingshot Mechanism can be measured by the cyclic phase transitions between stable and unstable training regimes, an…
Grokking, the unusual phenomenon for algorithmic datasets where generalization happens long after overfitting the training data, has remained elusive. We aim to understand grokking by analyzing the loss landscapes of neural networks, identifying the mismatch between training and test losses as the cause for grokking. We refer to this as the "LU mechanism" because training and test losses (against model weight norm) typically resemble "L" and "U", respectively. This simple mechanism can nicely explain many aspects of grokking: data size dependence, weight decay dependence, the emergence of repr…
Grokking is a phenomenon where a model trained on an algorithmic task first overfits but, then, after a large amount of additional training, undergoes a phase transition to generalize perfectly. We empirically study the internal structure of networks undergoing grokking on the sparse parity task, and find that the grokking phase transition corresponds to the emergence of a sparse subnetwork that dominates model predictions. On an optimization level, we find that this subnetwork arises when a small subset of neurons undergoes rapid norm growth, whereas the other neurons in the network decay slo…
College of Engineering, Computing and Cybernetics(工程、计算与控制学院);The Australian National University(澳大利亚国立大学);School of Physics and Astronomy(物理与天文学院);Tel-Aviv University(特拉维夫大学)
Neural networks sometimes exhibit grokking, a phenomenon where perfect or near-perfect performance is achieved on a validation set well after the same performance has been obtained on the corresponding training set. In this workshop paper, we introduce a robust technique for measuring grokking, based on fitting an appropriate functional form. We then use this to investigate the sharpness of transitions in training and validation accuracy under two settings. The first setting is the theoretical framework developed by Levi et al. (2023) where closed form expressions are readily accessible. The s…
Department of XXX, University of YYY, Location, Country(XXX系,YYY大学,地点,国家);School of ZZZ, Institute of WWW, Location, Country(ZZZ学院,WWW研究所,地点,国家);CHU Sainte-Justine Research Center, Montréal(圣朱斯特研究中心,蒙特利尔);CIFAR AI Chair(CIFAR人工智能席位)
A Stochastic--Geometric Theory of Scaling Laws in Grokking
Research Ireland – Centre for Research Training in AI(爱尔兰研究——人工智能研究培训中心);J.E. Cairnes School of Business & Economics(J.E. 商业与经济学学院);University of Galway(Galway大学);Université Laval(拉瓦尔大学);CIFAR AI Chair(CIFAR人工智能主席);Mila – Québec AI Institute(魁北克人工智能研究所);School of Computer Science & Data Science Institute Visual Intelligence Lab(计算机科学与数据科学学院视觉智能实验室)
Department of Physics, City University of Hong Kong(香港城市大学物理系);Department of Physics and Astronomy, University of Pennsylvania(宾夕法尼亚大学物理与天文学系);Innovation Campus Delaware, Air Liquide(Air Liquide创新校园)
Raymond and Beverly Sackler School of Physics and Astronomy, Tel Aviv University, Tel Aviv 69978, Israel(雷蒙德与贝弗利·萨克勒物理与天文学学院,特拉维夫大学);École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland(洛桑联邦理工学院(EPFL),洛桑,瑞士)
Flatness is Necessary, Neural Collapse is Not: Rethinking Generalization via Grokking
Ting Han Lamarr Institute, TU Dortmund, Germany(廷汉拉马尔研究所,杜伊斯堡-艾森大学,德国);Institute for AI in Medicine, UK Essen(人工智能医学研究所,英国埃森);Research Center Trustworthy Data Science and Security of the University Alliance Ruhr, TU Dortmund, Germany(trustworthy数据科学与安全研究所以及鲁尔大学联盟,杜伊斯堡-艾森大学,德国);Ruhr University Bochum, Germany(波恩鲁尔大学,德国);Department of Physics, TU Dortmund, Germany(物理系,杜伊斯堡-艾森大学,德国);Lamarr Institute, TU Dortmund, Germany(廷汉拉马尔研究所,杜伊斯堡-艾森大学,德国)
A Basin-Selection Perspective on Grokking via Singular Learning Theory
Department of Computer Science(计算机科学系);Department of Mathematics(数学系);Mathematical Institute(数学研究所);University of Pisa(比萨大学);Imperial College London(伦敦帝国学院);University of Oxford(牛津大学);Section of Mathematics and Artificial Intelligence(数学与人工智能系);Max Planck Institute of Molecular Cell Biology and Genetics(马克斯·普朗克分子细胞生物学和遗传学研究所);Center for Systems Biology(系统生物学中心);Faculty of Mathematics(数学系);TU Dresden(德累斯顿技术大学)
MIT(麻省理工学院);Institute for AI and Fundamental Interactions(人工智能与基础交互研究所)
We aim to understand grokking, a phenomenon where models generalize long after overfitting their training set. We present both a microscopic analysis anchored by an effective theory and a macroscopic analysis of phase diagrams describing learning performance across hyperparameters. We find that generalization originates from structured representations whose training dynamics and dependence on training set size can be predicted by our effective theory in a toy setting. We observe empirically the presence of four learning phases: comprehension, grokking, memorization, and confusion. We find repr…
INRIA, CNRS, Département d’Informatique de l’Ecole Normale Supérieure / PSL, France(法国国家信息与自动化技术研究院(INRIA)、法国国家科学研究中心(CNRS)、巴黎综合理工学院计算机系 / PSL研究院);Department of Computing, Imperial College London, United Kingdom(伦敦帝国理工学院计算机系,英国)
Deciphering Two Training Clocks in Grokking via Deep Linear Network Theory with Conditional ReLU Reduction
State Key Laboratory of Mathematical Sciences, Academy of Mathematics and Systems Science, Chinese Academy of Sciences, Beijing 100190, China(数学科学国家重点实验室,数学与系统科学研究院,中国科学院,北京100190,中国);School of Mathematical Sciences, University of Chinese Academy of Sciences, Beijing 100049, China(中国科学院大学数学科学学院,北京100049,中国);Shanghai Institute for Mathematics and Interdisciplinary Sciences (SIMIS), Shanghai, China(上海数学与交叉科学研究所(SIMIS),上海,中国);Key Laboratory of Systems Health Science of Zhejiang Province, School of Life Science, Hangzhou Institute for Advanced Study, University of Chinese Academy of Sciences, Chinese Academy of Sciences, Hangzhou 310024, China(浙江省系统健康科学重点实验室,生命科学学院,杭州先进研究院,中国科学院大学,中国科学院,杭州310024,中国)
Exploring Information-Theoretic Metrics Associated with Neural Collapse in Supervised Training
School of Computer and Communication Engineering, University of Science and Technology Beijing(北京科技大学计算机与通信工程学院);Tsinghua University(清华大学);Shanghai AI Laboratory(上海人工智能实验室)