← Latest papers
📊 statistics

Algebraic Representability as the Limiting Regime of Grokking: An Exactly Solvable Model with Holomorphic Activations

This paper demonstrates that in two-layer neural networks with holomorphic monomial activations trained on modular arithmetic, the expressible function class collapses to a finite-dimensional algebraic variety, causing the network to exhibit a binary outcome of either instant generalisation or guaranteed training failure—thereby eliminating the grokking phenomenon entirely as the capacity-grokking relationship reaches its limiting regime.

Original authors: Chon-Fai Kam, Xavier Cadet, Miloud Bessafi, Frederic Cadet

Published 2026-07-16
📖 7 min read🧠 Deep dive

Original authors: Chon-Fai Kam, Xavier Cadet, Miloud Bessafi, Frederic Cadet

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are teaching a robot to solve math puzzles. Usually, when we train these robots (called neural networks), we expect them to get better the more we practice. But sometimes, something weird happens: the robot memorizes the answers perfectly, gets a perfect score on its homework, but then fails miserably when you give it a new, similar problem. It sits there, stuck in a "memorization" mode, for thousands of steps. Then, suddenly, without any warning, it snaps into a new mode and starts solving the new problems correctly. This strange, delayed awakening is called grokking. It's like a student who crams for a test, forgets everything the next day, and then suddenly understands the concept a week later.

Scientists have been trying to figure out why this delay happens. They know that the size of the robot's brain (its "capacity") matters. If the brain is too small, it might never learn. If it's huge, it learns instantly. But what happens in the middle? Does the delay just get shorter as the brain gets bigger? Or is there a point where the robot's brain is so strangely built that it cannot learn the answer at all, no matter how long you wait? This paper dives into that question by building a very specific, mathematically perfect robot to see what happens when the rules of learning are pushed to their absolute limit.


The Robot with a One-Size-Fits-All Brain

The authors of this paper decided to stop guessing and start building. Instead of using a standard, messy robot brain, they built a special kind of network with a very strict rule: it can only think in a specific type of mathematical pattern called a "holomorphic monomial."

Think of this robot's brain like a locksmith with a very specific set of keys.

  • Standard Robots (Universal Approximators): Most AI models are like a locksmith with a giant toolbox. No matter what lock you give them, they can eventually pick it if they have enough time and enough tools. They might take a long time to figure out the right combination (memorization), and then suddenly get it (generalization), but they can always open the door.
  • This Paper's Robot: This robot only has one specific key shape. It can only open locks that match that exact shape. If you give it a lock that doesn't fit that shape, it doesn't just take a long time to open it; it cannot open it at all. It's not a matter of "not enough practice"; it's a matter of "wrong tool."

The researchers tested this robot on modular arithmetic tasks (basically, math problems where numbers wrap around, like a clock). They asked: If the robot's brain is so limited that it can't even represent the answer, does it still "grok"?

The Big Discovery: The "All-or-Nothing" Switch

The answer they found is surprisingly simple and binary. There is no middle ground, no slow delay, and no grokking.

  1. The "Yes" Case: If the math problem the robot is asked to solve happens to match the specific shape of its key, the robot solves it instantly. It learns the training data and the new data at the exact same time. There is no waiting period. It's like handing the locksmith the exact key they were born to hold; the door swings open immediately.
  2. The "No" Case: If the problem doesn't match the key's shape, the robot fails completely. It doesn't memorize the answers. It doesn't get stuck in a loop. It just stays at the level of random guessing forever. The training loss (a measure of how wrong it is) hits a hard floor and refuses to go lower, no matter how wide the robot's brain is or how long you train it.

The authors proved this mathematically. They showed that for this specific type of robot, the set of problems it can solve is a tiny, fixed slice of all possible problems. If your problem isn't in that slice, the robot is mathematically incapable of fitting the data. It's not an optimization problem; it's a structural impossibility.

The Experiment: 585 Trials of Truth

To prove this wasn't just a theory, the team ran 585 experiments. They tested the robot on 39 different math problems with 5 different "key shapes" (activation degrees).

  • The Result: The robot's behavior matched the math predictions with 99.8% accuracy.
  • The Pattern: The results formed a perfect "staircase." If the problem's numbers added up to the right total, the robot succeeded instantly. If not, it failed instantly.
  • The Missing Middle: In 585 runs, there were zero cases of "grokking" (the delayed success) and zero cases of "memorization without generalization" (getting the homework right but failing the test). The robot either won immediately or lost immediately.

The Comparison: The "Normal" Robot

To make sure this wasn't just a weird quirk of their special robot, they ran the same tests on a standard, "normal" robot (using a ReLU activation, which is the industry standard).

  • The Normal Robot: This robot could solve every problem. It memorized everything. But on the hard problems, it exhibited the classic grokking behavior: it memorized the training set, sat there for thousands of steps, and then suddenly generalized.
  • The Contrast: The problems that caused the special robot to fail completely were the exact same problems that caused the normal robot to grok. This proves that the "delay" in grokking isn't just about the problem being hard; it's about the robot's brain being almost big enough, but not quite. The special robot showed us what happens when the brain is too small to even start the race.

The "Bottleneck" Test: Bridging the Gap

The researchers wanted to see if there was a smooth path between "instant failure" and "instant success." They took a normal robot and squeezed its brain through a "bottleneck," making it narrower and narrower.

  • Wide Bottleneck: The robot groks (delayed success).
  • Medium Bottleneck: The robot memorizes but never generalizes (it gets stuck).
  • Tiny Bottleneck: The robot fails to memorize at all (instant failure).

This experiment connected the dots. It showed that the "instant failure" regime of the special robot is just the extreme end of the same spectrum where grokking happens. As you shrink a robot's capacity, the delay gets longer and longer, until finally, the delay becomes infinite because the robot can't even memorize the data in the first place.

What About Learning the Keys?

One might wonder: "What if the robot could learn its own keys?" The authors tested this by letting the robot learn its own input encoding (instead of being given the fixed "roots of unity" encoding).

  • The Result: The "staircase" of instant success and failure disappeared. The robot could now solve almost all the linear problems instantly.
  • The Exception: There was still one problem it couldn't solve: the multiplication task (a×ba \times b). Even with a learned brain, the robot's structure was too simple to capture the complexity of multiplication. This confirmed that the failure wasn't just about the specific math they used to feed the robot; it was a fundamental limit of the robot's architecture.

The Takeaway

This paper reveals a fundamental truth about AI training: Grokking is a race between memorization and generalization. But for that race to happen, the runner must first be able to tie their shoes.

If a neural network's brain is too small or too rigid to even represent the answer (to "tie its shoes"), the race never starts. There is no delay, no struggle, and no sudden awakening. There is just a hard stop. The question of "when will it grok?" dissolves into the simpler, more primitive question: "Can it represent the target at all?"

The authors have shown that when you push a network to its mathematical limits, the messy, confusing behavior of grokking vanishes, replaced by a clean, binary reality: either the math fits, and you win instantly; or it doesn't, and you lose instantly. It's a reminder that before we can talk about how AI learns, we have to make sure it's actually capable of learning what we're asking it to do.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →