Home AI News Grokking in Neural Networks: Unveiling the Curious Behavior of Training and Generalization

Grokking in Neural Networks: Unveiling the Curious Behavior of Training and Generalization

Grokking in Neural Networks: Unveiling the Curious Behavior of Training and Generalization

Grokking in Neural Networks: Understanding the Phenomenon

Grokking in neural networks challenges the traditional theory of how these networks learn and generalize. During training, the network’s performance on test data is expected to improve as the training loss decreases. However, the network’s behavior eventually stabilizes, resulting in poor generalization despite low training loss. Interestingly, with more training, the network evolves and achieves perfect generalization.

The Explanation for Grokking

A recent research paper proposes an explanation for grokking based on the coexistence of two types of solutions within the task that the network is trying to learn:

  1. Generalizing Solution: This approach allows the neural network to effectively generalize to new data. The network can produce higher output values with the same parameter norm, indicating slower learning but higher efficiency.
  2. Memorizing Solution: In this approach, the network memorizes the training data, resulting in perfect training accuracy but poor generalization. Although memory circuits can quickly pick up new information, they are less effective in generating the same output values with fewer inputs.

The research team has found that as the size of the training dataset increases, memorizing circuits become less effective, while generalizing circuits remain mostly unaffected. This suggests the existence of a critical dataset size at which both circuits are equally effective.

The Four Hypotheses

The researchers have validated four hypotheses that provide strong evidence for the grokking phenomenon:

  1. Grokking occurs when the network shifts from initially memorizing the input to gradually emphasizing generalization, leading to an improvement in test accuracy.
  2. A critical dataset size exists, at which both memorization and generalization circuits are equally effective. This critical size represents a crucial stage in the learning process.
  3. “Ungrokking” can occur when the network is further trained on a significantly smaller dataset than the critical size, causing a regression from perfect to low test accuracy.
  4. The concept of semi-grokking is introduced, where the network goes through a phase transition after being trained on a dataset size that balances the effectiveness of memorization and generalization circuits. However, only partial test accuracy is achieved, highlighting the complex interaction between different learning mechanisms in neural networks.


This research provides a comprehensive explanation of the grokking phenomenon. It highlights the coexistence of memory and generalization solutions and their effectiveness in influencing the network’s behavior during training. With a better understanding of neural network generalization and its dynamics, future advancements in AI and machine learning can be made.

Check out the paper. All credit for this research goes to the researchers on this project. Also, don’t forget to join our 30k+ ML SubReddit, 40k+ Facebook Community, Discord Channel, and Email Newsletter, where we share the latest AI research news, cool AI projects, and more.

Source link


Please enter your comment!
Please enter your name here