Progress measures for grokking via mechanistic interpretability
arXiv:2301.05217
Abstract
Neural networks often exhibit emergent behavior, where qualitatively new capabilities arise from scaling up the amount of parameters, training data, or training steps. One approach to understanding emergence is to find continuous \textit{progress measures} that underlie the seemingly discontinuous qualitative changes. We argue that progress measures can be found via mechanistic interpretability: reverse-engineering learned behaviors into their individual components. As a case study, we investigate the recently-discovered phenomenon of ``grokking'' exhibited by small transformers trained on modular addition tasks. We fully reverse engineer the algorithm learned by these networks, which uses discrete Fourier transforms and trigonometric identities to convert addition to rotation about a circle. We confirm the algorithm by analyzing the activations and weights and by performing ablations in Fourier space. Based on this understanding, we define progress measures that allow us to study the dynamics of training and split training into three continuous phases: memorization, circuit formation, and cleanup. Our results show that grokking, rather than being a sudden shift, arises from the gradual amplification of structured mechanisms encoded in the weights, followed by the later removal of memorizing components.
10 page main body, 2 page references, 24 page appendix
Cited by in corpus (6)
- Explainable Artificial Intelligence (XAI) 2.0: A Manifesto of Open Challenges and Interdisciplinary Research Directions
- Domain-specific ChatBots for Science using Embeddings
- Arithmetic with Language Models: from Memorization to Computation
- Simultaneous energy and mass calibration of large-radius jets with the ATLAS detector using a deep neural network
- The Complexity Dynamics of Grokking
- A Glitch in the Matrix? Locating and Detecting Language Model Grounding with Fakepedia