A Tale of Two Circuits: Grokking as Competition of Sparse and Dense Subnetworks

William Merrill, Nikolaos Tsilivis, Aman Shukla
3/21/2023
cs.LG

No official code found. Best implementation: Tsili42/parity-nn (8 stars, last commit 2023-03-13).

Abstract

Grokking is a phenomenon where a model trained on an algorithmic task first overfits but, then, after a large amount of additional training, undergoes a phase transition to generalize perfectly. We empirically study the internal structure of networks undergoing grokking on the sparse parity task, and find that the grokking phase transition corresponds to the emergence of a sparse subnetwork that dominates model predictions. On an optimization level, we find that this subnetwork arises when a small subset of neurons undergoes rapid norm growth, whereas the other neurons in the network decay slowly in norm. Thus, we suggest that the grokking phase transition can be understood to emerge from competition of two largely distinct subnetworks: a dense one that dominates before the transition and generalizes poorly, and a sparse one that dominates afterwards.

View on arXivView PDF

Code Implementations(1)

Tsili42/parity-nnCommunity100%
82PythonMar 13, 20233 years ago

Similar Papers

Cite this paper

@article{merrill2023tale,
  title  = {A Tale of Two Circuits: Grokking as Competition of Sparse and Dense Subnetworks},
  author = {William Merrill and Nikolaos Tsilivis and Aman Shukla},
  year   = {2023},
  eprint = {2303.11873},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2303.11873v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.11873.svg)](https://codeofpaper.com/paper/2303.11873)

Discussion