NeurIPS 2026QuestionsPapersAreasAboutMarkdown

The Geometric Inductive Bias of Grokking: Bypassing Phase Transitions via Architectural Topology

Alper YILDIRIM

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: Interpretability & Model Adaptation › Transformer Dynamics Theory · Type: new method · Keywords: grokking, architectural inductive bias, Transformer, residual normalization, uniform attention, commutative tasks

Areas: Model Architectures & Sequence Modeling › Language Model Architectures › Transformer Structural Properties

Summary

We show that constraining Transformer residual streams to be L2-normalized and using uniform attention can eliminate the delayed generalization (grokking) phase on commutative arithmetic tasks, with training and test accuracy rising together from initialization, while this fails on non-commutative permutation tasks.

Explained to a 5-year-old

Some computer programs learn by first memorizing everything and then later understanding. The researchers changed the program's design so that its connections stay small and it looks at all words equally. This helped the program start understanding right away on simple math tasks. But it didn't work on more complicated tasks that need a different kind of thinking. The study shows that how we design learning machines matters a lot.

Explained to a 5-year-old, longer

When computers learn, they sometimes first memorize the training examples without really understanding them. After a while, they suddenly start to generalize, which is called grokking. The researchers wanted to see if they could make the computer understand earlier by changing its architecture. They made two changes: they limited how big the connections between parts of the network could be, and they made the attention mechanism look at all tokens equally instead of learning which ones are important. With these changes, the network started to get the right answers on simple arithmetic tasks right from the beginning. The simple math tasks were like adding and multiplying numbers in a cyclic group. The network no longer needed a separate memorization phase; learning and testing accuracy rose together. However, when the task required a different kind of reasoning-like composing permutations in a non-commutative group-the same changes did not help. This shows that the kind of reasoning needed by the task matters a lot for whether the architectural changes work. The study suggests that there is no single design that will speed up learning for all kinds of problems. By understanding which architectural biases help in which situations, we can design better learning algorithms. Overall, the work teaches us that how we build learning machines influences when they start to truly understand.

For a technical reader

The paper investigates why neural networks sometimes memorize training data before they start generalizing, a phenomenon called grokking. The authors show that two architectural choices-unbounded residual connections and learned attention-contribute to this delay. By imposing L2 normalization on residuals and replacing learned attention with uniform token aggregation, they eliminate the delay on simple commutative arithmetic tasks. On more complex non-commutative tasks, the same changes do not help, indicating that architectural priors must align with task symmetry.

Problem

Neural networks often memorize training data before they generalize, causing a delay known as grokking. Can we redesign network architecture to remove this delay and achieve early generalization?

Method

We enforce L2 normalization on residual streams to bound their magnitude and replace learned attention with uniform token aggregation. These architectural modifications are applied before training to test their effect on the emergence of generalization.

Results

On modular addition and multiplication, the approach removes the memorization delay, achieving simultaneous rise in training and test accuracy from initialization. On S5 permutation composition, the same architectural constraints fail to produce early generalization.

Contributions

We identify two architectural factors-unbounded residual magnitude and data-dependent attention-that influence grokking, and we demonstrate that bounding residuals and using uniform attention can bypass the delay on certain tasks. We also show that these interventions are not universally effective, highlighting the importance of matching architectural priors to task symmetry.

Limitations and assumptions

The findings are limited to the specific arithmetic and permutation tasks studied, and the architectural constraints may not transfer to all domains.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction