# Modular addition (`modular-addition`)

- **Canonical ID**: `bmk_6579712a6e7d979f`
- **Task**: modular-addition · **Modality**: unspecified
- **Coverage**: 13 papers · 38 observations
- **Tasks Evaluated**: Modular Addition (`?task=modular-addition`, 10 papers), Mathematical Reasoning (`?task=mathematical-reasoning`, 2 papers), Modular Arithmetic (`?task=modular-arithmetic`, 1 papers)
- **Aliases**: modular-addition

## Comparable Cohort Leaderboards

### Modular Addition · Test accuracy ↑ (%) · test (5 papers)

| # | Method | Score | Year | Settings | Paper |
| ---: | --- | ---: | --- | --- | --- |
| 1 | Network in the Forgetting phase | 100% | 2024-01-01 | - | [To Grok or not to Grok: Disentangling Generalization and Memorization on Corrupted Algorithmic Datasets](/work/to-grok-or-not-to-grok-disentangling-generalization) |
| 2 | Random transformer (width 1024; input embeddings and unembedding trained, other parameters fixed) | 100% | 2024-01-01 | width=1024, layers=2, restarts=10; median, training=input-embeddings-and-unembedding-only | [Algorithmic Capabilities of Random Transformers](/work/algorithmic-capabilities-of-random-transformers) |
| 3 | FACT-RFM (geometric averaging) | 100% | 2026-01-01 | operation=(x+y) mod 61, iterations=75, training-data=50% | [FACT: a first-principles alternative to the Neural Feature Ansatz for how networks learn representations](/work/fact-a-first-principles-alternative-to-the-neural) |
| 4 | Custom Loss (α=1e-4) | 99.5% | 2025-01-01 | N=32, q=974269, α=1e-4, loss=Custom Loss | [Making Hard Problems Easier with Custom Data Distributions and Loss Regularization: A Case Study in Modular Arithmetic](/work/teaching-transformers-modular-arithmetic-at-scale) |
| 5 | 1-layer Transformer | 83% | 2023-09-01 | modulus=113, condition=semi-grokking, training-data-size=approximately critical dataset size | [Explaining grokking through circuit efficiency](/work/explaining-grokking-through-circuit-efficiency) |

## Recent Extracted Observations

| Year | Method | Role | Metric | Score | Split | Regime | Paper | Verbatim Quote |
| --- | --- | --- | --- | ---: | --- | --- | --- | --- |
| 2026 | FACT-RFM (geometric averaging) | proposed | Test accuracy | 100% % | test | - | [FACT: a first-principles alternative to the Neural Feature Ansatz for how networks learn representations](/work/fact-a-first-principles-alternative-to-the-neural) | Figure 5: We train FACT-RFM and NFA-RFM on (x + y) mod 61 for 75 iterations. Both methods achieve 100% test accuracy and exhibit delayed generalization aligned  |
| 2026 | Validation-accuracy reference (Gaussian HMM) | unclear | 5-fold CV Ridge R2 | 0.66 | - | - | [Tracking Training Phases in Compositional Learning with Task-Agnostic Measures](/work/tracking-training-phases-in-compositional-learning-with-task) | 0.66 |
| 2026 | Validation-accuracy reference (Gaussian HMM) | unclear | 5-fold CV Ridge R2 | 0.98 | - | - | [Tracking Training Phases in Compositional Learning with Task-Agnostic Measures](/work/tracking-training-phases-in-compositional-learning-with-task) | 0.98 |
| 2026 | Prediction churn (hard) | unclear | 5-fold CV Ridge R2 | 0.55 | - | - | [Tracking Training Phases in Compositional Learning with Task-Agnostic Measures](/work/tracking-training-phases-in-compositional-learning-with-task) | 0.55 |
| 2026 | Prediction churn (hard) | unclear | 5-fold CV Ridge R2 | 1.00 | - | - | [Tracking Training Phases in Compositional Learning with Task-Agnostic Measures](/work/tracking-training-phases-in-compositional-learning-with-task) | 1.00 |
| 2026 | Local Learning Coefficient (LLC) | unclear | 5-fold CV Ridge R2 | 0.58 | - | - | [Tracking Training Phases in Compositional Learning with Task-Agnostic Measures](/work/tracking-training-phases-in-compositional-learning-with-task) | 0.58 |
| 2026 | Local Learning Coefficient (LLC) | unclear | 5-fold CV Ridge R2 | 0.96 | - | - | [Tracking Training Phases in Compositional Learning with Task-Agnostic Measures](/work/tracking-training-phases-in-compositional-learning-with-task) | 0.96 |
| 2026 | NFA-RFM | baseline | Test accuracy | 100% % | test | - | [FACT: a first-principles alternative to the Neural Feature Ansatz for how networks learn representations](/work/fact-a-first-principles-alternative-to-the-neural) | Figure 5: We train FACT-RFM and NFA-RFM on (x + y) mod 61 for 75 iterations. Both methods achieve 100% test accuracy and exhibit delayed generalization aligned  |
| 2026 | bottlenecked ReLU network | baseline | median generalisation gap | 15000 steps | - | - | [Algebraic Representability as the Limiting Regime of Grokking: An Exactly Solvable Model with Holomorphic Activations](/work/algebraic-representability-as-the-limiting-regime) | 16 & grok & 15000 |
| 2026 | bottlenecked ReLU network | baseline | median generalisation gap | 7250 steps | - | - | [Algebraic Representability as the Limiting Regime of Grokking: An Exactly Solvable Model with Holomorphic Activations](/work/algebraic-representability-as-the-limiting-regime) | 32 & grok & 7250 |
| 2026 | bottlenecked ReLU network | baseline | median generalisation gap | 5500 steps | - | - | [Algebraic Representability as the Limiting Regime of Grokking: An Exactly Solvable Model with Holomorphic Activations](/work/algebraic-representability-as-the-limiting-regime) | 64 & grok & 5500 |
| 2026 | bottlenecked ReLU network | baseline | median generalisation gap | 5250 steps | - | - | [Algebraic Representability as the Limiting Regime of Grokking: An Exactly Solvable Model with Holomorphic Activations](/work/algebraic-representability-as-the-limiting-regime) | 128 & grok & 5250 |
| 2025 | RNN trained on modular addition | proposed | energy in retained components of embedding matrix W_E | 85.4% % | - | - | [Low Rank and Sparse Fourier Structure in Recurrent Networks Trained on Modular Addition](/work/low-rank-and-sparse-fourier-structure-in-recurrent) | \caption{Singular value spectra of model weights are low rank. The number of components r required to maintain 100% model accuracy as follows: embedding matrix  |
| 2025 | RNN trained on modular addition | proposed | energy in retained components of unembedding matrix W_fc | 95.5% % | - | - | [Low Rank and Sparse Fourier Structure in Recurrent Networks Trained on Modular Addition](/work/low-rank-and-sparse-fourier-structure-in-recurrent) | \caption{Singular value spectra of model weights are low rank. The number of components r required to maintain 100% model accuracy as follows: embedding matrix  |
| 2025 | RNN trained on modular addition | ablation | model accuracy after single-frequency ablation | 100% % | - | - | [Low Rank and Sparse Fourier Structure in Recurrent Networks Trained on Modular Addition](/work/low-rank-and-sparse-fourier-structure-in-recurrent) | k_3=54 & 100% & 87.3% |
| 2025 | RNN trained on modular addition | ablation | model accuracy after single-frequency ablation | 99.4% % | - | - | [Low Rank and Sparse Fourier Structure in Recurrent Networks Trained on Modular Addition](/work/low-rank-and-sparse-fourier-structure-in-recurrent) | k_4=6 & 99.4% & 28.3% |
| 2024 | LI basis (LIB) | proposed | apparently-irrelevant features (incoming edges but no outgoing edges) | 3 features | - | - | [The Local Interaction Basis: Identifying Computationally-Relevant and Sparsely Interacting Features in Neural Networks](/work/the-local-interaction-basis-identifying-computationally) | We indeed find more apparently-irrelevant features in the PCA basis (14) than in the LI basis (3). |
| 2024 | pizza ReLU transformer | proposed | Total numerical abs ∫_{−π}^{π} bound | 0.73 | - | - | [Modular addition without black-boxes: Compressing explanations of MLPs that compute numerical integration](/work/modular-addition-without-black-boxes-compressing) | Total numerical abs \int--\pi (\pi) bound & 0.73 & 0.59 & 0.56 & 0.50 & (\ref{eq:abs-bound}) + (\ref{eq:angle-approximation-error}) |
| 2024 | pizza ReLU transformer | proposed | Total numerical abs ∫_{−π}^{π} bound | 0.59 | - | - | [Modular addition without black-boxes: Compressing explanations of MLPs that compute numerical integration](/work/modular-addition-without-black-boxes-compressing) | Total numerical abs \int--\pi (\pi) bound & 0.73 & 0.59 & 0.56 & 0.50 & (\ref{eq:abs-bound}) + (\ref{eq:angle-approximation-error}) |
| 2024 | pizza ReLU transformer | proposed | Total numerical abs ∫_{−π}^{π} bound | 0.56 | - | - | [Modular addition without black-boxes: Compressing explanations of MLPs that compute numerical integration](/work/modular-addition-without-black-boxes-compressing) | Total numerical abs \int--\pi (\pi) bound & 0.73 & 0.59 & 0.56 & 0.50 & (\ref{eq:abs-bound}) + (\ref{eq:angle-approximation-error}) |
| 2024 | pizza ReLU transformer | proposed | Total numerical abs ∫_{−π}^{π} bound | 0.50 | - | - | [Modular addition without black-boxes: Compressing explanations of MLPs that compute numerical integration](/work/modular-addition-without-black-boxes-compressing) | Total numerical abs \int--\pi (\pi) bound & 0.73 & 0.59 & 0.56 & 0.50 & (\ref{eq:abs-bound}) + (\ref{eq:angle-approximation-error}) |
| 2024 | Random transformer (width 1024; input embeddings and unembedding trained, other parameters fixed) | proposed | Test accuracy | 100.0% % | test | - | [Algorithmic Capabilities of Random Transformers](/work/algorithmic-capabilities-of-random-transformers) | Modular Addition & 100.0% & 1.3% & 100.0% & 97.2% & 100.0% |
| 2024 | Custom Loss (α=1e-4) | proposed | τ=0.5% Accuracy | 99.5% % | test | - | [Making Hard Problems Easier with Custom Data Distributions and Loss Regularization: A Case Study in Modular Arithmetic](/work/teaching-transformers-modular-arithmetic-at-scale) | & 974269 & 99.5% & 98.9% & 91.0% |
| 2024 | PCA basis | baseline | apparently-irrelevant features (incoming edges but no outgoing edges) | 14 features | - | - | [The Local Interaction Basis: Identifying Computationally-Relevant and Sparsely Interacting Features in Neural Networks](/work/the-local-interaction-basis-identifying-computationally) | We indeed find more apparently-irrelevant features in the PCA basis (14) than in the LI basis (3). |
| 2024 | XE Loss | baseline | τ=0.5% Accuracy | 91.0% % | test | - | [Making Hard Problems Easier with Custom Data Distributions and Loss Regularization: A Case Study in Modular Arithmetic](/work/teaching-transformers-modular-arithmetic-at-scale) | & 974269 & 99.5% & 98.9% & 91.0% |
| 2023 | 1-layer Transformer | proposed | test accuracy | 83% % | test | - | [Explaining grokking through circuit efficiency](/work/explaining-grokking-through-circuit-efficiency) | \caption{Semi-grokking. When \numTrainExamples \sim \criticalDatasetSize, the memorising algorithm and generalising algorithm compete with each other at converg |
| 2023 | Network in the Forgetting phase | unclear | Test accuracy | 100% % | test | - | [To Grok or not to Grok: Disentangling Generalization and Memorization on Corrupted Algorithmic Datasets](/work/to-grok-or-not-to-grok-disentangling-generalization) | We saw in \Cref{fig:phase_diagrams}(a) (right-most panel, wd=20.0) that extremely high weight decay leads to Forgetting phase. This phase has random guessing ac |
