TL;DR
This paper investigates whether "grokking" (sudden generalization after overfitting) leads to fundamentally different models than standard "steady" learning. The authors find that grokked and steadily trained models learn the same core features, but steady learning can achieve significantly higher model compressibility, particularly in a novel "compressive regime."
What Problem Does This Paper Address?
The phenomenon of "grokking" in neural networks, where generalization emerges abruptly after a long period of overfitting, has been observed in various tasks. However, a key question remains: does this distinct learning trajectory result in models with different internal representations or capabilities compared to models that learn more gradually ("steady learning")? Understanding these differences is crucial for determining if grokking offers any practical advantages or if it's simply a slower form of learning. This paper aims to bridge this gap by directly comparing grokked and steadily learned models across several dimensions: learned features, model compressibility, and developmental dynamics during training.
Methods
The authors employ two main strategies:
- Controlled Tasks: They use two well-defined tasks known for interpretable features:
- Ising Model Classification: Classifying snapshots of the 2D Ising model into "ordered" or "disordered" phases. This task is designed to emphasize learning the "energy" feature.
- Modular Addition: A classic task for studying representation learning, where models learn to perform addition modulo P. This task is known to elicit Fourier representations.
- Inducing Grokking: Grokking is induced by tuning the weight initialization scale ($w_0$). Higher $w_0$ values favor overfitting and can lead to grokking, while lower values result in steady learning.
- Analysis Techniques:
- Feature Analysis: Correlating neuron activations with known task-specific features (energy, magnetization for Ising; Fourier coefficients for modular addition).
- Compressibility Measurement: Using magnitude pruning to quantify how much a model can be compressed while retaining accuracy. They introduce a "compressibility" metric based on the area under the pruning curve.
- Information Geometry: Employing novel measures based on the Fisher Information Metric (FIM) to analyze model trajectories in parameter space, providing insights into the "speed" and "direction" of learning.
Datasets
The paper uses synthetic datasets generated for two specific tasks:
- Ising Model Snapshots: 300 snapshots (16x16 grids of +/- 1 spins) generated via Monte Carlo simulations at various temperatures around the critical point. These are designed to include some "ambiguous" configurations to prevent simple memorization of labels.
- Modular Addition Data: Pairs of numbers (a, b) for modular addition modulo P=113, represented as two-hot encoded vectors. A fixed fraction (70%) of all possible pairs is used for training.
Key Insights and Ideas
- Same Features, Different Encodings: The most striking finding is that grokked and steadily learned models learn the same fundamental features for a given task. The difference lies in how efficiently these features are encoded.
- The "Compressive Regime": Steady learning, under specific conditions (particularly lower weight initialization scales), can enter a "compressive regime." This regime exhibits a linear trade-off between model loss and compressibility, allowing for significantly higher compression than grokked models.
- Task-Dependent Development: Model development during the grokking plateau is not universal. In modular addition, models continue to refine their representations (e.g., Fourier localization), but in the Ising task, there's little sign of development during the plateau before generalization.
- Grokking's Straight Path: Information-geometric analysis reveals that grokked models follow a remarkably straight path in parameter space, suggesting a more direct optimization trajectory.
Key Results
- Feature Equivalence: In both the Ising and modular addition tasks, grokked and steadily learned models learn the same core features (energy/magnetization for Ising, Fourier coefficients for modular addition).
- Compressibility Advantage for Steady Learning: In the identified "compressive regime" of steady learning, models achieved up to 25x compression (compared to a base model) while maintaining 95% accuracy, significantly outperforming the 5x compression achieved by grokked models under similar conditions.
- Ising Task Dynamics: For the Ising task, grokking models showed a higher peak cosine similarity in their information-geometric trajectory, suggesting a straighter path, and feature development was largely absent during the pre-grokking plateau.
- Modular Addition Dynamics: In contrast, modular addition models showed development (e.g., improved Fourier localization) even during the grokking plateau.
- Information Geometry: Novel FIM-based measures provided a general way to analyze model dynamics, revealing that grokked models follow a straighter path in information space, and that this path is influenced by weight decay dynamics.
Limitations and Future Work
- Generalizability: The study uses controlled "toy" tasks. A key question for future work is whether these findings (especially the compressibility advantage of steady learning) generalize to larger, more complex models and real-world datasets.
- Compressive Regime Specificity: The "compressive regime" was found to be parameter-dependent and could be eliminated by increasing the batch size. Further exploration is needed to understand its prevalence and how to reliably induce it.
- Practical Utility of Grokking: The paper questions the practical utility of grokking if steady learning offers better compression. Future work should investigate if there are tasks where grokking is necessary or where it offers other, as yet undiscovered, advantages.
- Information Geometry for Interpretability: The authors suggest that information-geometric measures could be valuable tools for interpretability and scaling analysis, especially since they are general and task-agnostic, unlike hand-crafted progress measures. Further research in this direction is warranted.
Summary updated