Grokking at the Edge of Numerical Stability
Not on the map. Why?
Abstract (arXiv)
Grokking, the sudden generalization that occurs after prolonged overfitting, is a surprising phenomenon challenging our understanding of deep learning. Although significant progress has been made in understanding grokking, the reasons behind the delayed generalization and its dependence on regularization remain unclear. In this work, we argue that without regularization, grokking tasks push models to the edge of numerical stability, introducing floating point errors in the Softmax function, which we refer to as Softmax Collapse (SC). We demonstrate that SC prevents grokking and that mitigating SC enables grokking without regularization. Investigating the root cause of SC, we find that beyond the point of overfitting, the gradients strongly align with what we call the na"ive loss minimization (NLM) direction. This component of the gradient does not alter the model's predictions but decreases the loss by scaling the logits, typically by scaling the weights along their current direction. We show that this scaling of the logits explains the delay in generalization characteristic of grokking and eventually leads to SC, halting further learning. To validate our hypotheses, we introduce two key contributions that address the challenges in grokking tasks: StableMax, a new activation function that prevents SC and enables grokking without regularization, and perpGrad, a training algorithm that promotes quick generalization in grokking tasks by preventing NLM altogether. These contributions provide new insights into grokking, elucidating its delayed generalization, reliance on regularization, and the effectiveness of existing grokking-inducing methods. Code for this paper is available at https://github.com/LucasPrietoAl/grokking-at-the-edge-of-numerical-stability.
Key facts. Cited by 41 papers in the map (data through 7 Oct 2026). Builds on 33 of its 41 references that are in the map. First posted on arXiv 8 Jan 2025.
Builds on
33 of 41 references.
References · 33
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
- 2016PointNet: Deep Learning on Point Sets for 3D Classification and Segmentationcited by 5,223
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
- 2018On Lazy Training in Differentiable Programmingcited by 671
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
- 2019Gradient Descent Maximizes the Margin of Homogeneous Neural Networkscited by 308
- 2022Hidden Progress in Deep Learning: SGD Learns Parities Near the Computational Limitcited by 184
- 2018Gradient descent aligns the layers of deep linear networkscited by 182
- 2018PPFNet: Global Context Aware Local Features for Robust 3D Point Matchingcited by 180
- 2020Directional convergence and alignment in deep learningcited by 172
- 2022Omnigrok: Grokking Beyond Algorithmic Datacited by 142
21 more
- 2023A Toy Model of Universality: Reverse Engineering How Networks Learn Group Operationscited by 141
- 2023Explaining grokking through circuit efficiencycited by 105
- 2023Grokking as the Transition from Lazy to Rich Training Dynamicscited by 102
- 2022The Slingshot Mechanism: An Empirical Study of Adaptive Optimizers and the Grokking Phenomenoncited by 90
- 2018Risk and parameter convergence of logistic regressioncited by 81
- 2023Grokking modular arithmeticcited by 77
- 2023Dichotomy of Early and Late Phase Implicit Biases Can Provably Induce Grokkingcited by 76
- 2021Intrinsic Dimension, Persistent Homology and Generalization in Neural Networkscited by 70
- 2023Why Do We Need Weight Decay in Modern Deep Learning?cited by 70
- 2023Rotational Equilibrium: How Weight Decay Balances Learning Across Neural Networkscited by 50
- 2024Deep Networks Always Grok and Here is Whycited by 49
- 2023Grokking as a First Order Phase Transition in Two Layer Networkscited by 48
- 2022Grokking phase transitions in learning local rules with gradient descentcited by 28
- 2024Emergence in non-neural models: grokking modular arithmetic via average gradient outer productcited by 26
- 2022The Asymmetric Maximum Margin Bias of Quasi-Homogeneous Neural Networkscited by 25
- 2023Grokking Group Multiplication with Cosetscited by 22
- 2024Topological Generalization Bounds for Discrete-Time Stochastic Optimization Algorithmscited by 12
- 2022DeepStability: A Study of Unstable Numerical Methods and Their Solutions in Deep Learningcited by 11
- 2024Grokking at the Edge of Linear Separabilitycited by 11
- 2024Language Models "Grok" to Copycited by 5
- 2023Achieving Margin Maximization Exponentially Fast via Progressive Norm Rescalingcited by 4
Built on by
Citing papers per year: 2025: 18; 2026: 23.
41 papers.
Sort:
By area:
- 2025Reinforcement Learning for Reasoning in Large Language Models with One Training Examplecited by 288
- 2025Hierarchical Reasoning Modelcited by 167
- 2025Less is More: Recursive Reasoning with Tiny Networkscited by 38
- 2025Provable Scaling Laws of Feature Emergence from Learning Dynamics of Grokkingcited by 14
- 2025Muon Optimizer Accelerates Grokkingcited by 11
- 2025Grokking in LLM Pretraining? Monitor Memorization-to-Generalization without Testcited by 10
- 2025Adversarial Attacks Leverage Interference Between Features in Superpositioncited by 7
- 2025Mechanistic Insights into Grokking from the Embedding Layercited by 6
- 2026To Grok Grokking: Provable Grokking in Ridge Regressioncited by 6
- 2026Thinking with Looped Flowscited by 6
- 2025What Happens During the Loss Plateau? Understanding Abrupt Learning in Transformerscited by 5
- 2026The Geometric Inductive Bias of Grokking: Bypassing Phase Transitions via Architectural Topologycited by 4
29 more
- 2026Grokking or Glitching? How Low-Precision Drives Slingshot Loss Spikescited by 4
- 2025Not All Explanations for Deep Learning Phenomena Are Equally Valuablecited by 3
- 2026Grokking as a Falsifiable Finite-Size Transitioncited by 3
- 2025Grokking vs. Learning: Same Features, Different Encodingscited by 2
- 2025NeuralGrok: Accelerate Grokking by Neural Gradient Transformationcited by 2
- 2026Distributional Spectral Diagnostics for Localizing Grokking Transitionscited by 2
- 2025OrthoGrad Improves Neural Calibrationcited by 1
- 2025Egalitarian Gradient Descent: A Simple Approach to Accelerated Grokkingcited by 1
- 2025When Data Falls Short: Grokking Below the Critical Thresholdcited by 1
- 2026Tuning the Implicit Regularizer of Masked Diffusion Language Models: Enhancing Generalization via Insights from k-Paritycited by 1
- 2026The Implicit Bias of Logit Regularizationcited by 1
- 2026Dynamical Systems Theory Behind a Hierarchical Reasoning Modelcited by 1
- 2026What Does the Weight Norm Control in Grokking? Logit-Scale Mediation under Cross-Entropycited by 1
- 2026Radial Suppression Accelerates Algorithmic Generalization: A Geometric Analysis of Delayed Generalizationcited by 1
- 2026Tunneling the Loss Landscape: Bypassing Memorization with Monte Carlo Parameter Swappingcited by 1
- 2026Post-Grokking Collapse at the Representation-Readout Interface in Muon-Trained Transformerscited by 1
- 2025Decomposing Prediction Mechanisms for In-Context Recallcited by 0
- 2025Beyond the Linear Separability Ceiling: Aligning Representations in VLMscited by 0
- 2025Tracing the Path to Grokking: Embeddings, Dropout, and Network Activationcited by 0
- 2026Training Beyond Convergence: Grokking nnU-Net for Glioma Segmentation in Sub-Saharan MRIcited by 0
- 2026Induced Numerical Instability: Hidden Costs in Multimodal Large Language Modelscited by 0
- 2026Generalization at the Edge of Stabilitycited by 0
- 2026The Geometric Structure of Models Learning Sparse Datacited by 0
- 2026One Model, Two Roles: Emergent Specialization in a Shared Recurrent Transformercited by 0
- 2026Rating the Pitch, Not the Product: User Evaluations of LLMs Reflect Expectations More Than Performancecited by 0
- 2026When Recursive Models Finish Computingcited by 0
- 2026A Spectral Theory of Grokking: Weight Decay induces Feature Learningcited by 0
- 2026Misalignment of Low-Loss Regions Causes Grokkingcited by 0
- 2026Unrolled Flow Models for Reasoningcited by 0
- 2026Unrolled Flow Models for Reasoning7 Oct 2026
- 2026Misalignment of Low-Loss Regions Causes Grokking30 Sep 2026
- 2026A Spectral Theory of Grokking: Weight Decay induces Feature Learning22 Sep 2026
- 2026When Recursive Models Finish Computing22 Sep 2026
- 2026Thinking with Looped Flows10 Sep 2026
- 2026Post-Grokking Collapse at the Representation-Readout Interface in Muon-Trained Transformers7 Aug 2026
- 2026Tunneling the Loss Landscape: Bypassing Memorization with Monte Carlo Parameter Swapping3 Aug 2026
- 2026Rating the Pitch, Not the Product: User Evaluations of LLMs Reflect Expectations More Than Performance6 Jul 2026
- 2026Radial Suppression Accelerates Algorithmic Generalization: A Geometric Analysis of Delayed Generalization30 Jun 2026
- 2026What Does the Weight Norm Control in Grokking? Logit-Scale Mediation under Cross-Entropy16 Jun 2026
- 2026One Model, Two Roles: Emergent Specialization in a Shared Recurrent Transformer18 May 2026
- 2026The Geometric Structure of Models Learning Sparse Data8 May 2026
29 more
- 2026Distributional Spectral Diagnostics for Localizing Grokking Transitions7 May 2026
- 2026Grokking or Glitching? How Low-Precision Drives Slingshot Loss Spikes7 May 2026
- 2026Generalization at the Edge of Stability21 Apr 2026
- 2026Grokking as a Falsifiable Finite-Size Transition25 Mar 2026
- 2026Dynamical Systems Theory Behind a Hierarchical Reasoning Model24 Mar 2026
- 2026The Geometric Inductive Bias of Grokking: Bypassing Phase Transitions via Architectural Topology5 Mar 2026
- 2026Induced Numerical Instability: Hidden Costs in Multimodal Large Language Models27 Feb 2026
- 2026The Implicit Bias of Logit Regularization12 Feb 2026
- 2026Training Beyond Convergence: Grokking nnU-Net for Glioma Segmentation in Sub-Saharan MRI30 Jan 2026
- 2026Tuning the Implicit Regularizer of Masked Diffusion Language Models: Enhancing Generalization via Insights from k-Parity30 Jan 2026
- 2026To Grok Grokking: Provable Grokking in Ridge Regression27 Jan 2026
- 2025When Data Falls Short: Grokking Below the Critical Threshold6 Nov 2025
- 2025Adversarial Attacks Leverage Interference Between Features in Superposition13 Oct 2025
- 2025Egalitarian Gradient Descent: A Simple Approach to Accelerated Grokking6 Oct 2025
- 2025Less is More: Recursive Reasoning with Tiny Networks6 Oct 2025
- 2025Provable Scaling Laws of Feature Emergence from Learning Dynamics of Grokking25 Sep 2025
- 2025Tracing the Path to Grokking: Embeddings, Dropout, and Network Activation15 Jul 2025
- 2025Beyond the Linear Separability Ceiling: Aligning Representations in VLMs10 Jul 2025
- 2025Decomposing Prediction Mechanisms for In-Context Recall2 Jul 2025
- 2025Not All Explanations for Deep Learning Phenomena Are Equally Valuable29 Jun 2025
- 2025Hierarchical Reasoning Model26 Jun 2025
- 2025Grokking in LLM Pretraining? Monitor Memorization-to-Generalization without Test26 Jun 2025
- 2025What Happens During the Loss Plateau? Understanding Abrupt Learning in Transformers16 Jun 2025
- 2025OrthoGrad Improves Neural Calibration4 Jun 2025
- 2025Mechanistic Insights into Grokking from the Embedding Layer21 May 2025
- 2025Reinforcement Learning for Reasoning in Large Language Models with One Training Example29 Apr 2025
- 2025NeuralGrok: Accelerate Grokking by Neural Gradient Transformation24 Apr 2025
- 2025Muon Optimizer Accelerates Grokking22 Apr 2025
- 2025Grokking vs. Learning: Same Features, Different Encodings3 Feb 2025
- 2025Reinforcement Learning for Reasoning in Large Language Models with One Training Examplecited by 288
- 2025Hierarchical Reasoning Modelcited by 167
- 2025Less is More: Recursive Reasoning with Tiny Networkscited by 38
- 2026Dynamical Systems Theory Behind a Hierarchical Reasoning Modelcited by 1
- 2026Unrolled Flow Models for Reasoningcited by 0
- 2026Unrolled Flow Models for Reasoning7 Oct 2026
- 2026Dynamical Systems Theory Behind a Hierarchical Reasoning Model24 Mar 2026
- 2025Less is More: Recursive Reasoning with Tiny Networks6 Oct 2025
- 2025Hierarchical Reasoning Model26 Jun 2025
- 2025Reinforcement Learning for Reasoning in Large Language Models with One Training Example29 Apr 2025
- 2025Provable Scaling Laws of Feature Emergence from Learning Dynamics of Grokkingcited by 14
- 2025Muon Optimizer Accelerates Grokkingcited by 11
- 2025Adversarial Attacks Leverage Interference Between Features in Superpositioncited by 7
- 2025Mechanistic Insights into Grokking from the Embedding Layercited by 6
- 2026To Grok Grokking: Provable Grokking in Ridge Regressioncited by 6
- 2026Thinking with Looped Flowscited by 6
- 2025What Happens During the Loss Plateau? Understanding Abrupt Learning in Transformerscited by 5
- 2026The Geometric Inductive Bias of Grokking: Bypassing Phase Transitions via Architectural Topologycited by 4
- 2026Grokking or Glitching? How Low-Precision Drives Slingshot Loss Spikescited by 4
- 2025Not All Explanations for Deep Learning Phenomena Are Equally Valuablecited by 3
- 2026Grokking as a Falsifiable Finite-Size Transitioncited by 3
- 2025Grokking vs. Learning: Same Features, Different Encodingscited by 2
12 most cited of 32 All 32 (JSON)
- 2026Misalignment of Low-Loss Regions Causes Grokking30 Sep 2026
- 2026A Spectral Theory of Grokking: Weight Decay induces Feature Learning22 Sep 2026
- 2026When Recursive Models Finish Computing22 Sep 2026
- 2026Thinking with Looped Flows10 Sep 2026
- 2026Post-Grokking Collapse at the Representation-Readout Interface in Muon-Trained Transformers7 Aug 2026
- 2026Tunneling the Loss Landscape: Bypassing Memorization with Monte Carlo Parameter Swapping3 Aug 2026
- 2026Rating the Pitch, Not the Product: User Evaluations of LLMs Reflect Expectations More Than Performance6 Jul 2026
- 2026Radial Suppression Accelerates Algorithmic Generalization: A Geometric Analysis of Delayed Generalization30 Jun 2026
- 2026What Does the Weight Norm Control in Grokking? Logit-Scale Mediation under Cross-Entropy16 Jun 2026
- 2026One Model, Two Roles: Emergent Specialization in a Shared Recurrent Transformer18 May 2026
- 2026The Geometric Structure of Models Learning Sparse Data8 May 2026
- 2026Distributional Spectral Diagnostics for Localizing Grokking Transitions7 May 2026
12 newest of 32 All 32 (JSON)