mlsanityData to 7 Oct 2026

Towards Empirical Interpretation of Internal Circuits and Properties in Grokked Transformers on Modular Polynomials

arXiv 2402.16726 ↗First posted 26 Feb 2024cs.LG cs.AIcited by 14

Not on the map. Why?

Abstract (arXiv)

Grokking has been actively explored to reveal the mystery of delayed generalization and identifying interpretable representations and algorithms inside the grokked models is a suggestive hint to understanding its mechanism. Grokking on modular addition has been known to implement Fourier representation and its calculation circuits with trigonometric identities in Transformers. Considering the periodicity in modular arithmetic, the natural question is to what extent these explanations and interpretations hold for the grokking on other modular operations beyond addition. For a closer look, we first hypothesize that any modular operations can be characterized with distinctive Fourier representation or internal circuits, grokked models obtain common features transferable among similar operations, and mixing datasets with similar operations promotes grokking. Then, we extensively examine them by learning Transformers on complex modular arithmetic tasks, including polynomials. Our Fourier analysis and novel progress measure for modular arithmetic, Fourier Frequency Density and Fourier Coefficient Ratio, characterize distinctive internal representations of grokked models per modular operation; for instance, polynomials often result in the superposition of the Fourier components seen in elementary arithmetic, but clear patterns do not emerge in challenging non-factorizable polynomials. In contrast, our ablation study on the pre-grokked models reveals that the transferability among the models grokked with each operation can be only limited to specific combinations, such as from elementary arithmetic to linear expressions. Moreover, some multi-task mixtures may lead to co-grokking -- where grokking simultaneously happens for all the tasks -- and accelerate generalization, while others may not find optimal solutions. We provide empirical steps towards the interpretability of internal circuits.

Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Builds on 38 of its 44 references that are in the map. First posted on arXiv 26 Feb 2024.

Builds on

38 of 44 references.

References · 38

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2022Locating and Editing Factual Associations in GPTcited by 2,609
  4. 2022Emergent Abilities of Large Language Modelscited by 2,483
  5. 2022In-context Learning and Induction Headscited by 930
  6. 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
  7. 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 700
  8. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  9. 2019Deep Double Descent: Where Bigger Models and More Data Hurtcited by 667
  10. 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
  11. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
  12. 2023Towards Best Practices of Activation Patching in Language Models: Metrics and Methodscited by 328
26 more
  1. 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 229
  2. 2022Hidden Progress in Deep Learning: SGD Learns Parities Near the Computational Limitcited by 184
  3. 2023The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networkscited by 153
  4. 2022Omnigrok: Grokking Beyond Algorithmic Datacited by 142
  5. 2023A Toy Model of Universality: Reverse Engineering How Networks Learn Group Operationscited by 141
  6. 2023Teaching Arithmetic to Small Transformerscited by 121
  7. 2023Explaining grokking through circuit efficiencycited by 105
  8. 2023Grokking as the Transition from Lazy to Rich Training Dynamicscited by 102
  9. 2022The Slingshot Mechanism: An Empirical Study of Adaptive Optimizers and the Grokking Phenomenoncited by 90
  10. 2023A Tale of Two Circuits: Grokking as Competition of Sparse and Dense Subnetworkscited by 78
  11. 2023Grokking modular arithmeticcited by 77
  12. 2023Dichotomy of Early and Late Phase Implicit Biases Can Provably Induce Grokkingcited by 76
  13. 2023Grokking of Hierarchical Structure in Vanilla Transformerscited by 53
  14. 2023Unifying Grokking and Double Descentcited by 49
  15. 2023Grokking as a First Order Phase Transition in Two Layer Networkscited by 48
  16. 2023Feature emergence via margin maximization: case studies in algebraic taskscited by 33
  17. 2023Benign Overfitting and Grokking in ReLU Networks for XOR Cluster Datacited by 32
  18. 2023Predicting Grokking Long Before it Happens: A look into the loss landscape of models which grokcited by 31
  19. 2022Grokking phase transitions in learning local rules with gradient descentcited by 28
  20. 2023Grokking in Linear Estimators -- A Solvable Model that Groks without Understandingcited by 25
  21. 2023To grok or not to grok: Disentangling generalization and memorization on corrupted algorithmic datasetscited by 24
  22. 2023Exposing Limitations of Language Model Agents in Sequential-Task Compositions on the Webcited by 23
  23. 2023Grokking Group Multiplication with Cosetscited by 22
  24. 2023Grokking as Compression: A Nonlinear Complexity Perspectivecited by 14
  25. 2023Grokking Beyond Neural Networks: An Empirical Exploration with Model Complexitycited by 13
  26. 2023Understanding Grokking Through A Robustness Viewpointcited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 6; 2026: 6.

14 papers.

Sort:

By area: