Emergent Mind

Abstract

Neural networks trained to solve modular arithmetic tasks exhibit grokking, a phenomenon where the test accuracy starts improving long after the model achieves 100% training accuracy in the training process. It is often taken as an example of "emergence", where model ability manifests sharply through a phase transition. In this work, we show that the phenomenon of grokking is not specific to neural networks nor to gradient descent-based optimization. Specifically, we show that this phenomenon occurs when learning modular arithmetic with Recursive Feature Machines (RFM), an iterative algorithm that uses the Average Gradient Outer Product (AGOP) to enable task-specific feature learning with general machine learning models. When used in conjunction with kernel machines, iterating RFM results in a fast transition from random, near zero, test accuracy to perfect test accuracy. This transition cannot be predicted from the training loss, which is identically zero, nor from the test loss, which remains constant in initial iterations. Instead, as we show, the transition is completely determined by feature learning: RFM gradually learns block-circulant features to solve modular arithmetic. Paralleling the results for RFM, we show that neural networks that solve modular arithmetic also learn block-circulant features. Furthermore, we present theoretical evidence that RFM uses such block-circulant features to implement the Fourier Multiplication Algorithm, which prior work posited as the generalizing solution neural networks learn on these tasks. Our results demonstrate that emergence can result purely from learning task-relevant features and is not specific to neural architectures nor gradient descent-based optimization methods. Furthermore, our work provides more evidence for AGOP as a key mechanism for feature learning in neural networks.

RFM trained on modular arithmetic with p = 61; test accuracy, loss, and generalization progress.

Overview

  • The paper demonstrates that the phenomenon of 'grokking,' where test accuracy improves suddenly after achieving 100% training accuracy, also occurs in Recursive Feature Machines (RFM) which are non-neural models.

  • The authors reveal that feature learning, specifically the learning of block-circulant features, is the underlying mechanism behind grokking, rather than traditional loss measures.

  • The introduction of new progress measures, namely circulant deviation and AGOP alignment, provides deeper insights into the gradual feature learning process, offering a new perspective on measuring model performance.

Emergence in Non-Neural Models: Grokking Modular Arithmetic via Average Gradient Outer Product

The paper under discussion investigates the phenomenon of "grokking" within the domain of machine learning, specifically focusing on modular arithmetic tasks. Grokking refers to a surprising observation during the training of neural networks where test accuracy suddenly improves long after achieving 100% training accuracy. This phenomenon is often viewed as a manifestation of emergence, where model capabilities appear conspicuously and abruptly. The authors of this work provide compelling evidence that grokking is not exclusive to neural networks or gradient descent-based optimization.

Key Contributions and Findings

  1. Generalization Beyond Neural Networks: The authors demonstrate that grokking occurs in Recursive Feature Machines (RFM), a non-neural machine learning model that enables feature learning using the Average Gradient Outer Product (AGOP). RFMs, when combined with kernel machines, show a rapid transition from near zero to perfect test accuracy, analogous to the behavior observed in neural networks.

  2. Feature Learning as the Underlying Mechanism: This work posits that the emergence observed in grokking is a result of feature learning. Specifically, the authors show that RFMs learn block-circulant features to solve modular arithmetic tasks. This finding suggests that feature learning drives the phase transition in performance rather than traditional measures like training loss or test loss, which remain constant initially.

  3. AGOP and Neural Networks: The authors draw parallels between RFMs and neural networks, showing that both models learn block-circulant features. Through theoretical evidence, they argue that these features implement the Fourier Multiplication Algorithm, a method previously hypothesized to be the generalized solution for neural networks on modular arithmetic.

  4. Progress Measures and Gradual Feature Learning: Two novel progress measures are introduced: circulant deviation and AGOP alignment. These metrics capture the gradual improvement in features learned by the model, contrasting sharply with the abrupt improvement in test accuracy and traditional loss measures. These progress measures provide deeper insights into the grokking phenomenon, revealing a gradual evolution towards generalization that is not immediately obvious from conventional metrics.

  5. Random Circulant Features: The research also shows that standard kernel machines can achieve generalization to modular arithmetic tasks when trained with random circulant features. This further validates the significance of circulant structures in enabling generalization and demonstrates that no additional specialized structure is necessary.

Implications and Speculations on Future Developments in AI

The findings from this paper have several implications, both theoretical and practical:

Understanding Emergence in AI:

The work emphasizes that emergence, as observed in grokking, is intricately tied to feature learning. This insight can drive future research to further investigate the mechanisms of feature learning in various machine learning models, leading to a better understanding of how skills and abilities emerge during training.

Algorithm-Independent Emergence:

By illustrating that grokking is not dependent on neural network architectures or gradient descent, the paper opens up new avenues for exploring emergence in other machine learning paradigms. Future research can leverage this understanding to devise models that harness feature learning mechanisms akin to AGOP to achieve efficient and robust generalization.

Designing New Training Algorithms:

The ability of RFMs to generalize using block-circulant features suggests that incorporating AGOP-like mechanisms into training algorithms could enhance performance across different tasks. This can influence the design of novel training algorithms that explicitly focus on learning such feature representations.

Broader Application of Progress Measures:

The introduction of circulant deviation and AGOP alignment as progress measures highlights the potential for developing new metrics that better capture the evolution of model capability. These measures can be adapted and applied across various domains to monitor and accelerate the learning process more effectively.

Enhanced Interpretability of Learned Features:

Understanding the structure of block-circulant features provides deeper insights into the internal workings of machine learning models. This enhances the interpretability of models, allowing for more transparent and explainable AI systems.

In conclusion, this paper makes significant strides in understanding the phenomenon of grokking outside the confines of neural networks by elucidating the role of feature learning through AGOP. The research underscores the importance of feature learning in the emergence of model capabilities and provides a path forward for developing more generalized, efficient, and interpretable machine learning models.

Create an account to read this summary for free:

Newsletter

Get summaries of trending comp sci papers delivered straight to your inbox:

Unsubscribe anytime.

YouTube