Lune

NeurIPS2025Top-tier venue

Uncovering a Universal Abstract Algorithm for Modular Addition in Neural Networks

Gavin McCracken, Gabriela Moisescu-Pareja, Vincent Létourneau, Doina Precup, Jonathan Love

Abstract

We propose a testable universality hypothesis, asserting that seemingly disparate neural network solutions observed in the simple task of modular addition are unified under a common abstract algorithm. While prior work interpreted variations in neuron-level representations as evidence for distinct algorithms, we demonstrate - through multi-level analyses spanning neurons, neuron clusters, and entire networks - that multilayer perceptrons and transformers universally implement the abstract algorithm we call the approximate Chinese Remainder Theorem. Crucially, we introduce approximate cosets and show that neurons activate exclusively on them. Furthermore, our theory works for deep neural networks (DNNs). It predicts that universally learned solutions in DNNs with trainable embeddings or more than one hidden layer require only O(log n) features, a result we empirically confirm. This work thus provides the first theory-backed interpretation of multilayer networks solving modular addition. It advances generalizable interpretability and opens a testable universality hypothesis for group multiplication beyond modular addition.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • On The Geometry and Topology of Representations: the Manifolds of Modular Addition cites The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networks
  • On The Geometry and Topology of Representations: the Manifolds of Modular Addition cites A Toy Model of Universality: Reverse Engineering how Networks Learn Group Operations
  • Gradient Flow Through Diagram Expansions: Learning Regimes and Explicit Solutions cites Towards Understanding Grokking: An Effective Theory of Representation Learning
  • Gradient Flow Through Diagram Expansions: Learning Regimes and Explicit Solutions cites The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networks
  • Gradient Flow Through Diagram Expansions: Learning Regimes and Explicit Solutions cites A Toy Model of Universality: Reverse Engineering how Networks Learn Group Operations
  • The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networks cites Towards Understanding Grokking: An Effective Theory of Representation Learning
  • The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networks cites A Toy Model of Universality: Reverse Engineering how Networks Learn Group Operations
  • A Toy Model of Universality: Reverse Engineering how Networks Learn Group Operations cites Towards Understanding Grokking: An Effective Theory of Representation Learning
  • Grokking as the transition from lazy to rich training dynamics cites Towards Understanding Grokking: An Effective Theory of Representation Learning
  • The Evolution of Statistical Induction Heads: In-Context Learning Markov Chains cites Grokking as the transition from lazy to rich training dynamics
  • Sequential Group Composition: A Window into the Mechanics of Deep Learning cites On The Geometry and Topology of Representations: the Manifolds of Modular Addition
  • Sequential Group Composition: A Window into the Mechanics of Deep Learning cites The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networks
  • Sequential Group Composition: A Window into the Mechanics of Deep Learning cites A Toy Model of Universality: Reverse Engineering how Networks Learn Group Operations
  • Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time cites Pretrain–Test Task Alignment Governs Generalization in In-Context Learning
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and TimeBlake Bordelon, Mary I. Letey, Cengiz PehlevanICLR 2026 · 14 citations
  2. Sequential Group Composition: A Window into the Mechanics of Deep LearningGiovanni Luca Marchetti, Daniel Kunin, Adele Myers, Francisco Acosta et al.ICML 2026 · 8 citations
  3. Pretrain–Test Task Alignment Governs Generalization in In-Context LearningMary Letey, Jacob A Zavatone-Veth, Yue M. Lu, Cengiz PehlevanICLR 2026 · 6 citations
  4. On The Geometry and Topology of Representations: the Manifolds of Modular AdditionGabriela Moisescu-Pareja, Gavin McCracken, Harley Wiltzer, Colin Daniels et al.ICLR 2026 · 3 citations
  5. Gradient Flow Through Diagram Expansions: Learning Regimes and Explicit SolutionsDmitry Yarotsky, Eugene Golikov, Yaroslav GusevICML 2026 · 1 citation

Builds on15

  1. Towards Understanding Grokking: An Effective Theory of Representation LearningZiming Liu, Ouail Kitouni, Niklas Nolte, Eric J. Michaud et al.NeurIPS 2022 · 299 citations
  2. The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural NetworksZiqian Zhong, Ziming Liu, Max Tegmark, Jacob AndreasNeurIPS 2023 · 181 citations
  3. A Toy Model of Universality: Reverse Engineering how Networks Learn Group OperationsBilal Chughtai, Lawrence Chan, Neel NandaICML 2023 · 144 citations
  4. The Evolution of Statistical Induction Heads: In-Context Learning Markov ChainsEzra Edelman, Nikolaos Tsilivis, Benjamin L. Edelman, Eran Malach et al.NeurIPS 2024 · 140 citations
  5. Grokking as the transition from lazy to rich training dynamicsTanishq Kumar, Blake Bordelon, Samuel J. Gershman, Cengiz PehlevanICLR 2024 · 86 citations

Related papers

  1. Deep neural networks divide and conquer dihedral multiplicationSihui Wei, Gavin McCracken, Gabriela Moisescu-Pareja, Harley Wiltzer et al.ICML 2026
  2. Emergence in non-neural models: grokking modular arithmetic via average gradient outer productNeil Mallinar, Daniel Beaglehole, Libin Zhu, Adityanarayanan Radhakrishnan et al.ICML 2025
  3. CoFrNets: Interpretable Neural Architecture Inspired by Continued FractionsIsha Puri, Amit Dhurandhar, Tejaswini Pedapati, Karthikeyan Shanmugam et al.NeurIPS 2021 · 13 citations
  4. Composing Global Solutions to Reasoning Tasks via Algebraic Objects in Neural NetsYuandong TianNeurIPS 2025 · 4 citations
  5. Feature emergence via margin maximization: case studies in algebraic tasksDepen Morwani, Benjamin L. Edelman, Costin-Andrei Oncescu, Rosie Zhao et al.ICLR 2024 · 35 citations
Dusk over the sea between two cliffs drawn in fine vertical lines