atlas

Research map / Learning theory and algorithms / Combinatorial and search optimization

Uncovering a Universal Abstract Algorithm for Modular Addition in Neural Networks

NeurIPS 2025 · Learning theory and algorithms › Combinatorial and search optimization · approach: Differentiable and symbolic reasoning · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes that MLPs and transformers trained on modular addition all implement a common abstract algorithm, the approximate Chinese Remainder Theorem, built on approximate cosets, and predicts O(log n) frequencies suffice for deep networks.

Problem

Prior interpretability work reported disjoint mechanisms (Clock, Pizza, coset circuits, GCR) for modular addition and group multiplication, casting doubt on the universality hypothesis; the paper asks whether these solutions share a common abstract algorithm across architectures and depths.

Approach

Generalizes cosets to approximate cosets (sets of elements close in the Cayley graph generated by a step size), shows neurons with sinusoidal preactivations activate on approximate cosets, and unifies prior mechanisms under an abstract approximate Chinese Remainder Theorem (aCRT) requiring O(log n) random frequencies.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace MLP neurons with simple-neuron fits (ablation)MLPs · Modular additiontest accuracy: 100%No clear effect
Fit deeper transformer neurons using only first-order sinusoids instead of allowing order-two terms (ablation)Transformers · Modular additiontest accuracyHurt
Add trainable input embeddings (ablation)One-hidden-layer MLPs · Modular additionnumber of learned frequency types: from learning \lfloor\frac{n}{2}\rfloor types to much fewer typesMixed
Add depth (ablation)One-hot encoded MLPs · Modular additionnumber of learned frequency types: from learning \lfloor\frac{n}{2}\rfloor types to much fewer typesMixed
Increase network width (ablation)One-layer architectures · Modular additionpresence of secondary frequencies in neuron fitsHelped
Use precise coset-aligned frequencies rather than approximate coset frequenciesAll architectures · Modular addition, n=66frequency preferenceHelped

Surprising findings

Limitations

Experimental setup

Datasets: modular addition dataset (all n^2 pairs)

Benchmarks: modular addition (mod n across primes, composites, powers of 2)

Metrics: R^2 of sinusoidal fits to neuron preactivations number of learned frequencies R^2 of logarithmic fit (frequencies vs modulus) test accuracy

Baselines: Clock Pizza GCR coset circuits

Builds on: Fourier Multiplication Algorithm (Clock) Pizza circuit Group Composition via Representations (GCR) Chinese Remainder Theorem

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy