TL;DR
This paper investigates "grokking," a phenomenon where models perfectly fit training data but fail to generalize until much later in training. The authors demonstrate that for feature learning kernels, specifically the Recursive Feature Machine (RFM), generalization is critically dependent on breaking symmetries within the training data. They show that RFM learns to represent underlying symmetry groups, and this ability is unlocked only when the training set itself is not perfectly symmetric.
What Problem Does This Paper Address?
The paper tackles the perplexing phenomenon of "grokking," where machine learning models, after achieving perfect accuracy on their training data, suddenly begin to generalize to unseen data much later in the training process. This delayed generalization is particularly evident in tasks involving algebraic structures, like modular arithmetic. While previous work has observed grokking in deep neural networks, this paper explores it within the context of feature learning kernels, specifically the Recursive Feature Machine (RFM) algorithm. The core question is: what drives this sudden leap in generalization, and can we understand it through the lens of how models learn features? The authors hypothesize that the structure of the data, particularly its symmetries, plays a crucial role.
Methods
The study utilizes the Recursive Feature Machine (RFM) algorithm, which iteratively updates feature matrices using the Average Gradient Outer Product (AGOP). RFM is a kernel-based method that aims to learn task-specific features without relying on gradient descent optimization in the traditional sense. The authors employ both Gaussian and quadratic kernels within the RFM framework.
A key methodological contribution is the group-theoretic analysis of the data and the learned features. They frame the problem of learning binary operations in Abelian groups (like modular addition) as a task of learning a function invariant under specific group actions. The symmetry group of the target function is identified, and then the training data is partitioned to either preserve or break these symmetries. This allows for a systematic study of how data partitioning influences RFM's generalization behavior.
Datasets
The paper uses synthetic datasets generated from Abelian groups, primarily focusing on modular arithmetic (Zp) for various prime moduli p. They also explore other Abelian groups, including direct products of cyclic groups like C5 × C11. The data is structured as input-label pairs representing binary operations. The authors create specific train-test partitions that are either symmetric or asymmetric with respect to the underlying group's symmetry operations, which is a novel aspect of their experimental setup.
Key Insights and Ideas
- Symmetry Breaking is Key: The most striking finding is that generalization in RFM is inhibited when the training data exhibits the same symmetries as the target function. Breaking these symmetries, even by moving a single data point, can dramatically improve generalization.
- RFM Learns Symmetry Groups: RFM doesn't just learn arbitrary features; it learns representations of the underlying symmetry group of the problem. The learned feature matrices (AGOPs) directly correspond to permutation representations of these symmetry group elements.
- Symmetry Traps: When training data is partitioned in a way that preserves a specific symmetry subgroup, RFM gets "trapped" and fails to generalize beyond the orbit of that subgroup. This explains why certain data partitions lead to zero test accuracy.
- Kernel Choice Matters (but symmetry breaking is paramount): While the quadratic kernel generally requires more data manipulation to achieve generalization compared to the Gaussian kernel, the core principle of breaking data symmetry is essential for both.
- Theoretical Framework for Generalization: The paper provides a group-theoretic framework to predict when RFM will generalize, based on the initial feature structure and the symmetry of the training data.
Key Results
- Dramatic Generalization Improvement: By breaking data symmetry (e.g., moving one random training point to the test set), test accuracy can jump from near 0% to over 98% for tasks like modular addition.
- Learned Features Align with Symmetry: The learned feature matrices (AGOPs) from RFM consistently align with the permutation representations of the symmetry group elements, particularly for reflections.
- Predictable Failure Modes: The authors demonstrate that RFM's failure to generalize can be precisely predicted by analyzing the symmetry of the training-test partition and the initial feature structure. When RFM is initialized with a feature structure encoding a specific symmetry subgroup, it only generalizes to points within the orbit of that subgroup.
- 100% Precision and Recall: In experiments verifying their theoretical predictions (Finding 4.1), the authors achieve a perfect match between predicted and actual correct classifications, demonstrating the power of their group-theoretic framework.
Limitations and Future Work
- Focus on Algebraic Tasks: The study is primarily conducted on algebraic tasks (binary operations in Abelian groups). The authors acknowledge that most real-world datasets do not possess such clear and exploitable symmetry structures, and their findings may not directly translate.
- Theoretical Formalization: While the paper presents strong empirical evidence and a theoretical framework, the authors suggest that future work should focus on more rigorous theoretical formalization of the "symmetry traps" and the correspondence between symmetry breaking and transitions in learning regimes (e.g., lazy vs. rich).
- Generalizing to Other Groups: The current work focuses on Abelian groups. Extending the analysis to general finite groups and their symmetry properties is a promising direction.
- Kernel and Model Agnosticism: While RFM is used, the authors aim to understand the data's role. Future work could explore whether these symmetry principles apply to other kernel methods, neural network architectures, and optimization algorithms.
Summary updated