Skip to content
OpenTrain AIFor AI Companies

On the Mechanism and Dynamics of Modular Addition: Fourier Features, Lottery Ticket, and Grokking

Jianliang He, Leda Wang, Siyu Chen, Zhuoran YangPublished Feb 18, 2026
arXiv PDF
Researcher verdict
Context only
Use as context only
Benchmark evidence
Missing
Not verified yet
Time to first repro
A few days
Plan setup time
Risk flags
2
Review before use

Abstract

Domain fit: Niche / domain-specific · No strong AI-core implementation/artifact signals were detected from current providers.

We present a comprehensive analysis of how two-layer neural networks learn features to solve the modular addition task. Our work provides a full mechanistic interpretation of the learned model and a theoretical explanation of its training dynamics. While prior work has identified that individual neurons learn single-frequency Fourier features and phase alignment, it does not fully explain how these features combine into a global solution. We bridge this gap by formalizing a diversification condition that emerges during training when overparametrized, consisting of two parts: phase symmetry and frequency diversification. We prove that these properties allow the network to collectively approximate a flawed indicator function on the correct logic for the modular addition task. While individual neurons produce noisy signals, the phase symmetry enables a majority-voting scheme that cancels out noise, allowing the network to robustly identify the correct sum. Furthermore, we explain the emergence of these features under random initialization via a lottery ticket mechanism. Our gradient flow analysis proves that frequencies compete within each neuron, with the "winner" determined by its initial spectral magnitude and phase alignment. From a technical standpoint, we provide a rigorous characterization of the layer-wise phase coupling dynamics and formalize the competitive landscape using the ODE comparison lemma. Finally, we use these insights to demystify grokking, characterizing it as a three-stage process involving memorization followed by two generalization phases, driven by the competition between loss minimization and weight decay.

Results and benchmarks

Freshness tier: warm
We present a comprehensive analysis of how two-layer neural networks learn features to solve the modular addition task.

Implementation

No direct implementation yet

Maintained implementation evidence is not confirmed for this paper yet.

Use the implementation status and reproduction sections for the current action plan.

Implementation evidence summary
Confidence: low

Recommendation evidence is currently too limited for a maintained-repo choice. Use Implementation Status and Reproduction Path for a practical baseline plan.

Reproduction risks
  • Estimate is based on paper-only reproduction flow

Compare implementation paths

Compare maintenance quality, reproducibility coverage, and evidence confidence before choosing a reproduction baseline.

Maintenance
Recently updated
Confidence
Low
Reproducibility
Moderate
Stars
0
Last push
Apr 7, 2026 (140d)

Matched via arXiv identifier search

  • No CI pipeline detected
  • No tagged releases
  • No Docker setup
Maintenance
Stale risk
Confidence
Medium
Reproducibility
Limited
Stars
7
Last push
Feb 20, 2026 (186d)

Matched via arXiv identifier search · Strong overlap with paper title keywords

  • No CI pipeline detected
  • No tagged releases
  • No Docker setup
Maintenance
Active
Confidence
Low
Reproducibility
Moderate
Stars
0
Last push
Aug 23, 2026 (2d)

Matched via arXiv identifier search

  • No tagged releases
  • No Docker setup
  • Low confidence match

Reproduction readiness

Time to first repro: days
Last checked: Aug 24, 2026

No repo

No verified implementation available

  • No maintained repository has been identified for this paper. Check adjacent implementations or HF artifacts below.

Hardware requirements

  • Expect multi-day setup/compute for meaningful reproduction based on current guidance.

Repositories and ecosystem

Official

No additional official repositories detected.

Community

  • Codes for On the Mechanism and Dynamics of Modular Addition: Fourier Features, Lottery Ticket, and Grokking

    7 stars · 1 forks · Last push Feb 20, 2026

Hugging Face artifacts

No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.

Tip: start with models, then check datasets and spaces if you need evaluation data or demos.

Research context

Evaluation and human feedback data

Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.

Open in HFEPX