Grokking phase transitions in learning local rules with gradient descent

Authors: Bojan Žunkovič, Enej Ilievski

arXiv: 2210.15435v1 - DOI (cond-mat.stat-mech)
Submitted to arXiv on 26 Oct. 2022
Abstract

We discuss two solvable grokking (generalisation beyond overfitting) models in a rule learning scenario. We show that grokking is a phase transition and find exact analytic expressions for the critical exponents, grokking probability, and grokking time distribution. Further, we introduce a tensor-network map that connects the proposed grokking setup with the standard (perceptron) statistical learning theory and show that grokking is a consequence of the locality of the teacher model. As an example, we analyse the cellular automata learning task, numerically determine the critical exponent and the grokking time distributions and compare them with the prediction of the proposed grokking model. Finally, we numerically analyse the connection between structure formation and grokking.

The papers around it, by date and closeness

Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper

How to read this map? Illustrated guide

Closest papers Prior work it builds on Papers that cite it

Papers around this one

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Very close Same question Cited by this paper
    Towards Understanding Grokking: An Effective Theory of Representation Learning
    Zi-Ming Liu, Ouail Kitouni, Niklas Nolte et al. · 2022 · Neural Information Processing Systems · cited 311 times · Not summarized yet

    Towards Understanding Grokking explains delayed generalization through representation learning and phase diagrams, while this paper derives grokking transitions for local-rule learning.

    Abstract

    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 representation learning to occur only in a"Goldilocks zone"(including comprehension and grokking) betwee…

  2. Very close Same question
    Statistical Vignettes on the Grokking Phenomenon
    Baye Malick Gning, Elvis Dohmatob · 2026 · Not summarized yet

    Statistical Vignettes analyzes when grokking occurs and derives plateau lengths, while this paper analytically characterizes grokking probabilities and times in local-rule models.

    Abstract

    In this work, we study grokking in a simple, analytically tractable setting whose rich phenomenology allows us to disentangle the effects of initialization, signal strength, weight decay, sample size, and input dimension. These factors can produce superficially similar learning curves through distinct mechanisms, complicating their interpretation. Our analysis distinguishes early fitting through nuisance features, core feature learning, and delayed generalization. We identify sharp conditions under which grokking provably occurs and derive analytic asymptotic expressions for the lengths of the generalization plateaus. Our results also characterize regimes of early generalization and failure …

  3. Very close Same question Cites this paper
    Grokking Explained: A Statistical Phenomenon
    Breno W. Carvalho, A. S. d'Avila Garcez, L. Lamb et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 2 times · Not summarized yet

    Grokking Explained studies delayed generalization under distribution shift using synthetic datasets, while this paper explains grokking through locality in teacher rules.

    Abstract

    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-catego…

  4. Very close Same question Cites this paper Uses this paper in depth
    Scaling and Renormalization in Neural Networks: An Effective Renormalization-Group Description of Grokking
    Min Chen, Jun-Qin Wang, Ze-Guan Wu et al. · 2026 · Not summarized yet

    Scaling and Renormalization describes grokking as a transition in modular addition networks, while this paper models grokking as a phase transition in local-rule learning.

    Abstract

    Grokking is a delayed transition from memorization to generalization in deep neural networks (NNs). We examine whether scaling and renormalization group (RG) theories can describe this dynamics, establishing a quantitative physical framework for neural generalization transitions. For modular addition on a two-layer NN, an ensemble of trained models defines an order parameter (the squared weight norm) and fluctuation proxies for the heat capacity and the susceptibility, with training epoch and weight decay serving as thermal and field control coordinates. To bridge neural architectures to real-space RG, we construct an exact coupling matrix via a second-order expansion of the loss with respec…

  5. Very close Another approach to the problem Cites this paper
    To Grok Grokking: Provable Grokking in Ridge Regression
    Mingyue Xu, Gal Vardi, Itay Safran · 2026 · arXiv.org · preprint, not peer reviewed · cited 7 times · Not summarized yet

    To Grok Grokking proves delayed generalization for ridge regression with weight decay, whereas this paper derives grokking behavior for local-rule learning models.

    Abstract

    We study grokking, the onset of generalization long after overfitting, in a classical ridge regression setting. We prove end-to-end grokking results for learning over-parameterized linear regression models using gradient descent with weight decay. Specifically, we prove that the following stages occur: (i) the model overfits the training data early during training; (ii) poor generalization persists long after overfitting has manifested; and (iii) the generalization error eventually becomes arbitrarily small. Moreover, we show, both theoretically and empirically, that grokking can be amplified or eliminated in a principled manner through proper hyperparameter tuning. To the best of our knowle…

  6. Very close Same question Cites this paper
    Grokking as a First Order Phase Transition in Two Layer Networks
    Noa Rubin, Inbar Seroussi, Z. Ringel · 2023 · International Conference on Learning Representations · cited 58 times · Not summarized yet

    Grokking as a First Order Phase Transition analyzes feature learning in teacher-student models, while this paper derives critical behavior for local-rule grokking.

    Abstract

    A key property of deep neural networks (DNNs) is their ability to learn new features during training. This intriguing aspect of deep learning stands out most clearly in recently reported Grokking phenomena. While mainly reflected as a sudden increase in test accuracy, Grokking is also believed to be a beyond lazy-learning/Gaussian Process (GP) phenomenon involving feature learning. Here we apply a recent development in the theory of feature learning, the adaptive kernel approach, to two teacher-student models with cubic-polynomial and modular addition teachers. We provide analytical predictions on feature learning and Grokking properties of these models and demonstrate a mapping between Grok…

  7. Very close Same question Cites this paper
    Grokking at the Edge of Linear Separability
    A. Beck, N. Levi, Yohai Bar-Sinai · 2024 · International Conference on Machine Learning · cited 16 times · Not summarized yet

    Grokking at the Edge of Linear Separability analyzes delayed generalization in logistic classification, while this paper studies phase transitions in local-rule learning.

    Abstract

    We investigate the phenomenon of grokking -- delayed generalization accompanied by non-monotonic test loss behavior -- in a simple binary logistic classification task, for which"memorizing"and"generalizing"solutions can be strictly defined. Surprisingly, we find that grokking arises naturally even in this minimal model when the parameters of the problem are close to a critical point, and provide both empirical and analytical insights into its mechanism. Concretely, by appealing to the implicit bias of gradient descent, we show that logistic regression can exhibit grokking when the training dataset is nearly linearly separable from the origin and there is strong noise in the perpendicular dir…

  8. Close* Same question Cites this paper
    Grokking as a Phase Transition between Competing Basins: a Singular Learning Theory Approach
    B. Cullen, Sergio Estan-Ruiz, Riya Danait et al. · 2026 · arXiv.org · preprint, not peer reviewed · cited 2 times · Not summarized yet

    Grokking as a Phase Transition between Competing Basins uses singular learning theory to explain grokking transitions, as this paper does for local-rule learning.

Prior work it builds on

  1. Close Broader context Used in depth by this paper
    The Slingshot Mechanism: An Empirical Study of Adaptive Optimizers and the Grokking Phenomenon
    Vimal Thilak, Etai Littwin, Shuangfei Zhai et al. · 2022 · arXiv.org · preprint, not peer reviewed · cited 113 times · Not summarized yet

    The Slingshot Mechanism studies optimizer dynamics and cyclic training regimes associated with grokking, rather than deriving local-rule grokking transitions.

    Abstract

    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, and can be easily monitored by the cyclic behavior of the norm of the last layers weights. We empirica…

  2. Related* Groundwork for this paper Used in depth by this paper
    Statistical Mechanics of Learning
    A. Engel, C. Van den Broeck · 2001 · cited 645 times · Not summarized yet

    Statistical Mechanics of Learning is cited as earlier learning theory background for this paper's connection between grokking and statistical learning.

  3. Close Groundwork for this paper
    Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets
    Alethea Power, Yuri Burda, Harri Edwards et al. · 2022 · Machine Learning · preprint, not peer reviewed · cited 811 times · AI summary available

    Grokking: Generalization Beyond Overfitting introduced delayed generalization on small algorithmic datasets, the phenomenon modeled here for local rules.

    Abstract

    In this paper we propose to study generalization of neural networks on small algorithmically generated datasets. In this setting, questions about data efficiency, memorization, generalization, and speed of learning can be studied in great detail. In some situations we show that neural networks learn through a process of "grokking" a pattern in the data, improving generalization performance from random chance level to perfect generalization, and that this improvement in generalization can happen well past the point of overfitting. We also study generalization as a function of dataset size and find that smaller datasets require increasing amounts of optimization for generalization. We argue th…

  4. Related Broader context
    Multi-scale Feature Learning Dynamics: Insights for Double Descent
    M. Pezeshki, Amartya Mitra, Yoshua Bengio et al. · 2021 · International Conference on Machine Learning · cited 39 times · Not summarized yet

    Multi-scale Feature Learning Dynamics studies epoch-wise double descent, a training-dynamics topic related to but distinct from local-rule grokking.

    Abstract

    A key challenge in building theoretical foundations for deep learning is the complex optimization dynamics of neural networks, resulting from the high-dimensional interactions between the large number of network parameters. Such non-trivial dynamics lead to intriguing behaviors such as the phenomenon of"double descent"of the generalization error. The more commonly studied aspect of this phenomenon corresponds to model-wise double descent where the test error exhibits a second descent with increasing model complexity, beyond the classical U-shaped error curve. In this work, we investigate the origins of the less studied epoch-wise double descent in which the test error undergoes two non-monot…

  5. Related Broader context Used in depth by this paper
    Prevalence of neural collapse during the terminal phase of deep learning training
    Vardan Papyan, Xue-Mei Han, D. Donoho · 2020 · Proceedings of the National Academy of Sciences of the United States of America · cited 1,099 times · Not summarized yet

    Prevalence of neural collapse documents late-training feature geometry in image classifiers, rather than grokking in local-rule learning.

    Abstract

    Significance Modern deep neural networks for image classification have achieved superhuman performance. Yet, the complex details of trained networks have forced most practitioners and researchers to regard them as black boxes with little that could be understood. This paper considers in detail a now-standard training methodology: driving the cross-entropy loss to zero, continuing long after the classification error is already zero. Applying this methodology to an authoritative collection of standard deepnets and datasets, we observe the emergence of a simple and highly symmetric geometry of the deepnet features and of the deepnet classifier, and we document important benefits that the geomet…

Papers that cite it

  1. Close Same question
    To grok or not to grok: Disentangling generalization and memorization on corrupted algorithmic datasets
    Darshil Doshi, Aritra Das, Tian-Yu He et al. · 2023 · International Conference on Learning Representations · cited 35 times · Not summarized yet

    To grok or not to grok studies rule learning versus memorization on corrupted modular-arithmetic data, while this paper models learning local rules.

    Abstract

    Robust generalization is a major challenge in deep learning, particularly when the number of trainable parameters is very large. In general, it is very difficult to know if the network has memorized a particular set of examples or understood the underlying rule (or both). Motivated by this challenge, we study an interpretable model where generalizing representations are understood analytically, and are easily distinguishable from the memorizing ones. Namely, we consider multi-layer perceptron (MLP) and Transformer architectures trained on modular arithmetic tasks, where ($\xi \cdot 100\%$) of labels are corrupted (\emph{i.e.} some results of the modular operations in the training set are inc…

  2. Close Same question
    Grokking Beyond Neural Networks: An Empirical Exploration with Model Complexity
    Jack William Miller, Charles O'Neill, Thang Bui · 2023 · Trans. Mach. Learn. Res. · cited 21 times · Not summarized yet

    Grokking Beyond Neural Networks tests delayed generalization across several model classes, while this paper gives analytic and numerical results for local-rule learning.

    Abstract

    In some settings neural networks exhibit a phenomenon known as \textit{grokking}, where they achieve perfect or near-perfect accuracy on the validation set long after the same performance has been achieved on the training set. In this paper, we discover that grokking is not limited to neural networks but occurs in other settings such as Gaussian process (GP) classification, GP regression, linear regression and Bayesian neural networks. We also uncover a mechanism by which to induce grokking on algorithmic datasets via the addition of dimensions containing spurious information. The presence of the phenomenon in non-neural architectures shows that grokking is not restricted to settings conside…

  3. Close Same question
    Predicting Grokking Long Before it Happens: A look into the loss landscape of models which grok
    Pascal Junior Tikeng Notsawo, Hattie Zhou, Mohammad Pezeshki et al. · 2023 · arXiv.org · preprint, not peer reviewed · cited 42 times · Not summarized yet

    Predicting Grokking forecasts delayed generalization from early learning curves, whereas this paper derives grokking probabilities and time distributions.

    Abstract

    This paper focuses on predicting the occurrence of grokking in neural networks, a phenomenon in which perfect generalization emerges long after signs of overfitting or memorization are observed. It has been reported that grokking can only be observed with certain hyper-parameters. This makes it critical to identify the parameters that lead to grokking. However, since grokking occurs after a large number of epochs, searching for the hyper-parameters that lead to it is time-consuming. In this paper, we propose a low-cost method to predict grokking without training for a large number of epochs. In essence, by studying the learning curve of the first few epochs, we show that one can predict whet…

  4. Close Same question
    Deciphering Two Training Clocks in Grokking via Deep Linear Network Theory with Conditional ReLU Reduction
    Huihui Tan, Kuo Gai, Shi-Hua Zhang · 2026 · arXiv.org · preprint, not peer reviewed · cited 2 times · Not summarized yet

    Deciphering Two Training Clocks formalizes separate timescales for fitting and representation simplification, while this paper analyzes grokking times and transitions.

    Abstract

    Grokking suggests that fitting the training data and learning a simple underlying rule may occur on different time scales. We formalize this phenomenon by separating the fast decay of the classification loss from the slower simplification of the learned representation, and we call the resulting pair of stopping times two training clocks. For deep linear networks, we show that a post-margin gap-growth or one-step tail-contraction condition reduces the cross-entropy loss to level epsilon on a logarithmic time scale. In contrast, when layerwise weight decay is present, the induced regularization on the end-to-end map can be expressed as a Schatten-type penalty; under a sharp late-time Kurdyka-L…

  5. Close Same question
    Let Me Grok for You: Accelerating Grokking via Embedding Transfer from a Weaker Model
    Zhiwei Xu, Zhiyu Ni, Yixin Wang et al. · 2025 · International Conference on Learning Representations · cited 15 times · Not summarized yet

    Let Me Grok for You accelerates delayed generalization through embedding transfer, while this paper analyzes how local teacher rules produce grokking.

    Abstract

    ''Grokking'' is a phenomenon where a neural network first memorizes training data and generalizes poorly, but then suddenly transitions to near-perfect generalization after prolonged training. While intriguing, this delayed generalization phenomenon compromises predictability and efficiency. Ideally, models should generalize directly without delay. To this end, this paper proposes GrokTransfer, a simple and principled method for accelerating grokking in training neural networks, based on the key observation that data embedding plays a crucial role in determining whether generalization is delayed. GrokTransfer first trains a smaller, weaker model to reach a nontrivial (but far from optimal) t…

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

Updated on 1 November 2026.

The illustrated guide to the papers around a paper