mlsanityData to 7 Oct 2026

Clustering and Alignment: Understanding the Training Dynamics in Modular Addition

arXiv 2408.09414 ↗First posted 18 Aug 2024cs.LGcited by 5

Not on the map. Why?

Abstract (arXiv)

Recent studies have revealed that neural networks learn interpretable algorithms for many simple problems. However, little is known about how these algorithms emerge during training. In this article, I study the training dynamics of a small neural network with 2-dimensional embeddings on the problem of modular addition. I observe that embedding vectors tend to organize into two types of structures: grids and circles. I study these structures and explain their emergence as a result of two simple tendencies exhibited by pairs of embeddings: clustering and alignment. I propose explicit formulae for these tendencies as interaction forces between different pairs of embeddings. To show that my formulae can fully account for the emergence of these structures, I construct an equivalent particle simulation where I show that identical structures emerge. I discuss the role of weight decay in my setup and reveal a new mechanism that links regularization and training dynamics. To support my findings, I also release an interactive demo available at https://modular-addition.vercel.app/.

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 13 of its 19 references that are in the map. First posted on arXiv 18 Aug 2024.

Builds on

13 of 19 references.

References · 13

  1. 2017Towards A Rigorous Science of Interpretable Machine Learningcited by 1,400
  2. 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
  3. 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 229
  4. 2022Hidden Progress in Deep Learning: SGD Learns Parities Near the Computational Limitcited by 184
  5. 2023The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networkscited by 153
  6. 2018Three Mechanisms of Weight Decay Regularizationcited by 112
  7. 2023Grokking modular arithmeticcited by 77
  8. 2023Why Do We Need Weight Decay in Modern Deep Learning?cited by 70
  9. 2023Understanding Addition in Transformerscited by 34
  10. 2023Learning the greatest common divisor: explaining transformer predictionscited by 33
  11. 2022How Much Does Attention Actually Attend? Questioning the Importance of Attention in Pretrained Transformerscited by 20
  12. 2024When Representations Align: Universality in Representation Learning Dynamicscited by 10
1 more
  1. 2024GenEFT: Understanding Statics and Dynamics of Model Generalization via Effective Theorycited by 4

Built on by

Cited by year (2026 to 7 Oct)

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

5 papers.