mlsanityData to 14 Oct 2026

Grokking in LLM Pretraining? Monitor Memorization-to-Generalization without Test

arXiv 2506.21551 ↗First posted 26 Jun 2025cs.LGcited by 10

On the map: Mixture-of-experts → MoE large language models

Abstract (arXiv)

This paper presents the first study of grokking in practical LLM pretraining. Specifically, we investigate when an LLM memorizes the training data, when its generalization on downstream tasks starts to improve, and what happens if there is a lag between the two. Unlike existing works studying when a small model generalizes to limited and specified tasks during thousands epochs' training on algorithmic data, we focus on a practical setting for LLMs, i.e., one-epoch pretraining of next-token prediction on a cross-domain, large-scale corpus, and generalization on diverse benchmark tasks covering math/commonsense reasoning, code generation, and domain-specific retrieval. Our study, for the first time, verifies that grokking still emerges in pretraining mixture-of-experts (MoE) LLMs, though different local data groups may enter their grokking stages asynchronously due to the heterogeneity of their distributions and attributions to others. To find a mechanistic interpretation of this local grokking, we investigate the dynamics of training data's pathways (i.e., expert choices across layers in MoE). Our primary discovery is that the pathways evolve from random, non-smooth across layers, instance-specific to more structured and transferable across samples, despite the converged pretraining loss. This depicts a transition from memorization to generalization. Two novel metrics are developed to quantify these patterns: one computes the pathway similarity between samples, while the other measures the consistency of aggregated experts between subsequent layers for each sample. These training data based metrics induce zero cost but can faithfully track and monitor the generalization of LLMs on downstream tasks, which, in conventional settings, requires costly instruction tuning and benchmark evaluation.

Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Placed in MoE large language models, one of 12 directions in Mixture-of-experts. Builds on 25 of its 32 references that are in the map. First posted on arXiv 26 Jun 2025.

Builds on

25 of 32 references.

Closest ancestors · 2

Same direction, newest first

  1. 2025Qwen3 Technical Report14 May
  2. 2024A Closer Look into Mixture-of-Experts in Large Language Models26 Jun

Other references · 23

  1. 2017Attention Is All You Needcited by 60,361
  2. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  5. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  6. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
  7. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
  8. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  9. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
  10. 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
  11. 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
  12. 2022Towards Reasoning in Large Language Models: A Surveycited by 596
11 more
  1. 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 230
  2. 2022Omnigrok: Grokking Beyond Algorithmic Datacited by 146
  3. 2024Min-K%++: Improved Baseline for Detecting Pre-Training Data from Large Language Modelscited by 103
  4. 2023A Tale of Two Circuits: Grokking as Competition of Sparse and Dense Subnetworkscited by 83
  5. 2024Grokked Transformers are Implicit Reasoners: A Mechanistic Journey to the Edge of Generalizationcited by 79
  6. 2024Deep Networks Always Grok and Here is Whycited by 51
  7. 2025Grokking at the Edge of Numerical Stabilitycited by 46
  8. 2023Predicting Grokking Long Before it Happens: A look into the loss landscape of models which grokcited by 35
  9. 2024Unified View of Grokking, Double Descent and Emergent Abilities: A Perspective from Circuits Competitioncited by 23
  10. 2023Understanding Grokking Through A Robustness Viewpointcited by 12
  11. 2024Dual Instruction Tuning with Large Language Models for Mathematical Reasoningcited by 10

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 8.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024What Do Learning Dynamics Reveal About Generalization in LLM Reasoning?
  2. 2023SoK: Memorization in General-Purpose Large Language Models
  3. 2024Generalization v.s. Memorization: Tracing Language Models' Capabilities Back to Pretraining Data
  4. 2025LLM Post-Training: A Deep Dive into Reasoning Large Language Models
  5. 2025The Landscape of Memorization in LLMs: Mechanisms, Measurement, and Mitigation
  6. 2024Language Models "Grok" to Copy
  7. 2025When Data Falls Short: Grokking Below the Critical Threshold
  8. 2025Prismatic Synthesis: Gradient-based Data Diversification Boosts Generalization in LLM Reasoning