Grokking as a Subspace Search: Computing the Destination Before Training

Sunjae Jeong, Jaeseung Kim, Hyoseok HwangarXiv 2026

TL;DR

Grokking—that strange phenomenon where a neural network suddenly "gets" a task long after it has already memorized the data—isn't a mystery anymore. It turns out the network is just searching for a specific mathematical "destination" called the right subspace, a destination we can actually calculate from the task itself before training even begins.

What Problem Does This Paper Address?

Imagine training a network to do modular arithmetic. Within a few hundred steps, it memorizes every example perfectly (zero training error). But for the next 50,000 steps, it fails every test question. Then, suddenly, its test accuracy jumps from 0% to 100% in a heartbeat. This is grokking.

For years, researchers have asked: What on earth is the network doing during that long silence?

Previous theories suggested it was a "phase transition" or a slow optimization process, but they all suffered from the same flaw: they could only explain what happened after the network finished. They couldn't predict where the network was going. This paper changes that by showing that for group-based tasks (like multiplication tables), the "destination" is a unique, low-dimensional subspace of the network's internal representations.

Figure 1: Grokking and the delay. Twenty seeds of S5 mul- tiplication; thick lines are medians.

Methods

The authors use Representation Theory—a branch of math that studies symmetry—to find the "right subspace."

  1. Computing the Destination: They show that any group task has a set of "irreducible representations" (think of these as the fundamental "frequencies" or "building blocks" of the group). By combining these, they define the right subspace.
  2. The Projector Trick: To test their theory, they used "projectors"—mathematical filters that force the network's internal embeddings to stay inside (or stay out of) specific subspaces.
  3. Alignment: They measured "alignment" ($\alpha_0$), which is basically a score of how much of the network's random initialization already happens to fall within that "right subspace."

Datasets

The study focuses on algorithmic group tasks. The primary example is $S_5$ (the symmetric group of 5 objects, which has 120 elements), but they also tested:

  • Tasks: Multiplication ($ab$), conjugation ($aba^{-1}$), commutators ($a^{-1}b^{-1}ab$), and squared words ($ab^2a^{-1}$).
  • Groups: 12 different finite groups with orders up to 720.
  • Architectures: Simple one-hidden-layer networks and multi-layer Transformers.

Key Insights and Ideas

  • The Destination is Pre-ordained: For these structured tasks, the solution isn't "learned" in the creative sense; it's discovered. The math of the task dictates exactly what the internal representations must look like for the network to generalize.
  • Grokking is a Search: The "delay" is literally the time the optimizer spends wandering around a high-dimensional space until it stumbles into the "right subspace."
  • The Accuracy Ceiling: If you mathematically block the network from using the right subspace, it hits a hard "ceiling" of accuracy. You can predict exactly what this ceiling will be (e.g., 1/60th accuracy for certain $S_5$ tasks) just by looking at the group's structure.
  • The "Winning" Block: During the delay, the network often gets stuck on a "wrong" subspace (like the "sign block" in $S_5$) that allows for memorization but prevents generalization. Generalization only happens when a "winning" block finally outgrows the wrong one.

Key Results

  • Killing the Delay: When the authors gave the network the right subspace from step one, the median grokking delay dropped from 64,050 steps to just 150 steps.
  • Predictable Timing: The delay follows a strict power law. The closer a network's random start is to the right subspace, the faster it groks.
  • Falsifiability: In 163 different restricted configurations, no network ever exceeded the predicted accuracy ceiling. The math held up every single time.
Figure 2: Giving the right subspace, taking it away, and watching the delay. (a) Test accuracy when the right subspace is given and when it is taken away; faint curves (vanilla) are the untouched runs of Figure 1. (b) The memorizing and generalizing components of the logits in the untouched runs.

Limitations and Future Work

The biggest catch is that this currently only works for visible group actions—tasks with clear, underlying algebraic symmetry.

  • Natural Data: We don't yet know how to compute the "right subspace" for a cat vs. dog classifier or a large language model. In those cases, the "subspace" is hidden behind complex encoders.
  • The "Why" of the Search: While the paper proves the delay is a search, it doesn't fully explain the mechanics of why the optimizer eventually finds the needle in the haystack, or why it sometimes prefers one specific part of the subspace over another.

Ultimately, this paper moves grokking from the realm of "weird AI behavior" into the realm of "predictable mathematical search," providing a rare moment of clarity in the often-opaque world of neural network dynamics.

Summary updated

Abstract

Grokking is the phenomenon in which a neural network generalizes long after it has memorized its training data. Many explanations have been proposed for the delay between memorization and generalization. However, none of them can say before training where the network is heading, so they cannot be tested against one another. We show that on group tasks this destination can be computed from the task itself before training begins. It is a low-dimensional subspace of the network's embeddings, which we call the right subspace, and we prove that it is essentially unique. Knowing the destination makes our hypothesis falsifiable: the delay is a search for the right subspace, and generalization begins when the network finds it. When we give the network the right subspace from the start, the delay disappears. When we take the right subspace away, accuracy stops at a ceiling that we compute before training, and on multiplication the network cannot generalize at all. When we train the network normally, its embeddings move toward the right subspace by themselves, long before test accuracy rises. Finally, interventions during training show that this search sets the length of the delay, and that noise in the optimization does not. On every group task that we tested, grokking is a search for the right subspace, and the delay is the time that this search takes.
BibTeX
@misc{jeong2026grokking,
  author = {Sunjae Jeong and Jaeseung Kim and Hyoseok Hwang},
  title = {{Grokking as a Subspace Search: Computing the Destination Before Training}},
  year = {2026},
  eprint = {2611.30116},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.30116},
}
Figure