Pith. sign in

REVIEW 3 major objections 6 minor 1 cited by

Uncovering a Universal Abstract Algorithm for Modular Addition in Neural Networks

T0 review · 3 major / 6 minor · reviewed 2026-08-07 · deepseek-v4-flash

Pith's one-line read The paper claims that every neural network trained on modular addition—across architectures, depths, and hyperparameters—implements one abstract algorithm, the approximate Chinese Remainder Theorem, in which neurons detect approximate…

desk verdict Real empirical finding on O(log n) frequency scaling, but the central theorem is defanged by a definition loose enough to fit anything; needs a size bound and a real proof before the universality claim holds. read the letter →

arxiv 2505.18266 v1 pith:RS27RAQC submitted 2025-05-23 cs.LG cs.AI

classification cs.LGcs.AI
keywords modularadditionapproximateChineseRemainderTheoremcosetssimpleneuronmodeluniversalityhypothesismechanisticinterpretabilitygrokkingneuralnetwork
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper sets out to establish a universality claim: multilayer perceptrons and transformers trained on modular addition, across architectures, depths, and hyperparameters, converge to one abstract algorithm, which the authors call the approximate Chinese Remainder Theorem (aCRT). The crucial new object is the approximate coset, a set of residues lying close together on the Cayley graph generated by a neuron's learned frequency; exact cosets are the special case where the distance is zero. The authors prove that neurons with single-frequency sinusoidal preactivations fire on approximate cosets containing the correct answer $(a+b) \bmod n$ (Theorem 4.4), and that $O(\log n)$ distinct frequencies give a logit margin of $\Omega(\log n)$, so each incorrect answer receives at most $n^{-\Omega(1)}$ probability mass after softmax (Corollary 4.8). A sympathetic reader would care because prior work reported clock and pizza circuits, Fourier-multiplication, and group-composition algorithms as evidence of divergent mechanisms; this paper recasts all of them as implementations of one template, and predicts the observable consequence that deep networks and trainable embeddings learn only $O(\log n)$ features.

What carries the argument

The load-bearing machinery has three parts. First, the simple neuron model: weights from input embeddings and to output logits follow $\cos(2\pi f(i-s_A)/n)$, $\cos(2\pi f(j-s_B)/n)$, and $\alpha\cos(2\pi f(k-s_A-s_B)/n)$ for one frequency $f$ and phase shifts $s_A,s_B$; the paper's theorems assume this model, and Section 4.4 is devoted to validating it empirically across architectures, depths, and moduli. Second, the approximate coset (Definition 4.3): for step size $d$, the set $\{c-k_1 d,\ldots,c-d,c,c+d,\ldots,c+k_2 d\}$ of residues reachable by few $d$-steps on the Cayley graph; a frequency with $\gcd(f,n)>1$ reproduces ordinary cosets, while $\gcd(f,n)=1$ produces arcs, unifying both cases. Third, the frequency-remapping isomorphism (Definition 4.2), which normalizes any learned frequency to 1 so that neurons of different frequencies become qualitatively comparable. Theorem 4.4 converts these objects into an algorithm: because a neuron's positive region is an approximate coset containing $a$ or $b$, the output-layer weights can concentrate on approximate cosets containing $c=a+b \bmod n$, and the network's computation is the intersection of approximate cosets—exactly the role exact cosets play in the Chinese Remainder Theorem.

What would settle it

Three concrete checks would settle the claim. First, scale $n$ over many orders of magnitude and count the distinct frequencies in trained networks: if the count grows faster than logarithmically, Corollary 4.8 fails. Second, inspect load-bearing neurons (those whose ablation breaks test accuracy) with high-resolution DFTs: if a substantial fraction have positive activation spread across separated arcs of the Cayley graph rather than one contiguous approximate coset, Theorem 4.4's confinement claim is contradicted. Third, measure the worst-case margin between correct and incorrect logits as a function of $n$ at fixed frequency count $m$: a margin that does not grow logarithmically would falsify Theorem 4.7's concentration model.

Watch

Extended reading notes

Core claim

In the paper's own terms, the discovery is that the approximate Chinese Remainder Theorem is the universal abstract algorithm for modular addition. A simple neuron—one whose preactivations match $\cos(2\pi f(x-s)/n)$ for a single frequency $f$ and phase $s$—has a positive (post-ReLU) region that the authors characterize as an approximate coset: the set of residues within a bounded number of step-size $d$ moves from a center, where $d=(f/\gcd(f,n))^{-1} \bmod (n/\gcd(f,n))$. Theorem 4.4 states that such neurons activate on an approximate coset containing the correct answer $c=(a+b)\bmod n$, and that deeper-layer neurons activate on linear combinations of approximate cosets. Because each frequency decomposes the circle into approximate cosets exactly as the CRT decomposes $\mathbb{Z}_n$ into exact cosets, the network computes the answer by intersecting these membership patterns; Algorithm 4.6 formalizes the template as: choose $O(\log n)$ random frequencies, and let neurons of each frequency pick out the approximate coset containing the answer. Theorem 4.7 and Corollary 4.8 provide the quantitative backbone: with probability at least $\rho$, $m > (2\log_e n - 2\log_e(2-2\rho))/(\log_e(\pi/\delta)-1)$ distinct random frequencies separate the correct logit from all incorrect ones by more than $\delta m$, which yields the $\Omega(\log n)$ margin and the $n^{-\Omega(1)}$ softmax bound. The paper also reports that networks prefer exact cosets when the modulus allows them, and frames Conjecture 4.9 that all group-multiplication learning is coset-based.

Load-bearing premise

The theorems assume the simple neuron model—that trained neurons are well approximated by sinusoids of a single integer frequency—and the paper's own Appendix G.4 documents multi-frequency 'fine-tuning' neurons that fall outside the integer-frequency theory, so if such neurons are common and load-bearing enough, the approximate-coset picture is a fitted description rather than a proven mechanism.

Editorial extensions

If this is right

  • Corollary 4.8 gives a concrete prediction: a network that learns $O(\log n)$ distinct frequencies suppresses every incorrect softmax probability to at most $n^{-\Omega(1)}$, so near-deterministic answers need only logarithmically many features, not $\lfloor n/2 \rfloor$.
  • The phase transition from $\lfloor n/2 \rfloor$ frequencies to $O(\log n)$ is caused by trainable embeddings or additional hidden layers; the paper demonstrates this across moduli 59–66 and reports that the scaling in $n$ stays logarithmic.
  • Previously reported circuit diversity—clock vs. pizza, Fourier multiplication vs. group composition—is reframed as low-level implementation of a single abstract algorithm, so mechanistic disagreement at the circuit level no longer counts as evidence against universality.
  • The universality hypothesis becomes testable beyond cyclic groups: Conjecture 4.9 predicts coset circuits, or approximate-coset circuits, in networks learning any group multiplication, which is consistent with the existing coset-circuit finding on permutation groups.
  • Because later layers reuse first-order sinusoidal neurons, depth acts like a repetition code: the correct logit grows linearly in the number of layers while incorrect logits grow at most logarithmically, and the paper conjectures the softmax mass of incorrect classes drops to $n^{-\Omega(L)}$ for $L$ layers.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • An extension the paper does not pursue: the multi-frequency 'fine-tuning' neurons documented in Appendix G.4 are the clearest stress test, since the integer-frequency proof of Theorem 4.4 does not literally apply to them; if such neurons are abundant at small widths, the true invariant may be that positive regions are unions of approximate cosets, with the single-frequency theorem as the special c
  • The paper reports the $O(n)\to O(\log n)$ phase transition but not its mechanism; Appendix D's finding that embeddings store scaled projections of representations suggests a testable explanation—one frequency can encode many cosets through the embedding projection—which would predict that the number of learned frequencies tracks the effective rank of the embedding.
  • Theorem 4.7 models frequencies as uniform random draws with equal amplitudes, but trained clusters have unequal sizes and strengths; comparing the empirical distribution of worst-case margins across seeds with the theorem's concentration bound would localize where the uniform-random model fails.
  • Conjecture 4.9 is directly checkable with the paper's own toolkit: running the DFT and clustering pipeline on existing modular-multiplication checkpoints would show whether the aCRT template extends beyond addition or is a cyclic-group phenomenon.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 6 minor

Summary. The paper proposes a universality hypothesis for neural networks trained on modular addition: all ReLU MLPs and transformers, across widths, depths, architectures, and moduli, are claimed to implement a single abstract algorithm, the approximate Chinese Remainder Theorem (aCRT). The theoretical core consists of a 'simple neuron' model (sinusoidal preactivations), a definition of approximate cosets on Cayley graphs, Theorem 4.4 asserting that simple neurons activate exactly on approximate cosets, and Theorem 4.7 asserting that O(log n) random frequencies suffice to obtain an Omega(log n) logit margin, so that after softmax incorrect classes receive at most n^{-Omega(1)} probability mass. The empirical sections report frequency counts, R^2 fits, ablation and noise studies, and scaling experiments across many architectures and seeds, including 100k-seed frequency histograms in the appendix.

Significance. If the central claims held, the paper would provide a genuinely unifying abstraction for the previously disparate clock, pizza, GCR, and coset mechanisms, and would give a clean explanation of why trainable embeddings and depth reduce the number of learned frequencies from Theta(n) to O(log n). The empirical effort is substantial: thousands of trained models, multiple moduli including prime and composite, multiple depths, and detailed appendices. The observation that trainable embeddings cause a phase transition in the number of learned frequencies is interesting and potentially valuable regardless of the theoretical framework. However, the two load-bearing theoretical components—the approximate-coset theorem and the margin theorem—are currently too weak or too heuristic to support the paper's strong universality claims. The definition of approximate coset is so permissive that Theorem 4.4 is close to vacuous, and the proof of Theorem 4.7 explicitly relies on approximations the authors themselves describe as 'quite bad.' The empirical breadth is a strength, but it is not yet matched by a rigorous or even well-posed formal framework.

major comments (3)
  1. [Section 4.1, Definition 4.3 and Theorem 4.4] Definition 4.3 imposes no upper bound on k1 and k2, allowing 1 <= k1,k2 <= n. As a result, any subset of C_n is contained in some approximate coset: take k1 and k2 large enough so that the path {c-k1 d, ..., c+k2 d} covers the entire cycle. Theorem 4.4's assertion that simple neurons 'activate exclusively on approximate cosets' is therefore vacuously true for any neuron whatsoever and does not constrain learned structure. Even with the natural choice dictated by a cosine, a simple neuron with gcd(f,n)=1 has a ReLU-positive set of about n/2 consecutive elements, which is an approximate coset with k1,k2 about n/4; this is a very weak notion of 'approximate coset.' To make the claim contentful, the definition needs a size bound on k1+k2 relative to n and f (e.g., k1+k2 = o(n) or O(n/gcd(f,n))), and the empirical sections need to demonstrate that learned activation sets are small approximate cosets under such a bound. Appendix B's statement that the proof's simplicity 'results from the fact that we came up with a very powerful definition' makes the circularity explicit, not a discovered constraint.
  2. [Section 4.3 and Appendix C, Theorem 4.7] Despite its name, Theorem 4.7 is not proved. Appendix C says the Taylor approximation 'is quite bad', replaces the exact cosine difference m - h(k) by a quadratic approximation, asserts the failure probability is 'approximately' one minus a volume bound, and applies a union bound that is not justified. Furthermore, the model h(k) = sum_l cos(2 pi f_l (k-i-j)/n) assumes that all cluster contributions have equal amplitude, that frequencies are drawn uniformly at random, and that contributions add linearly; none of these assumptions is derived from trained networks. Thus Corollary 4.8, which predicts O(log n) frequencies and n^{-Omega(1)} incorrect probability mass, is a heuristic conjecture rather than a theorem. The authors should either provide a rigorous proof or explicitly reframe Theorem 4.7 as a heuristic with supporting numerics.
  3. [Appendix G.4 and Section 4.4] The paper documents 'fine-tuning' neurons whose DFTs contain multiple harmonic frequencies (e.g., 7,14,21,28,35,42 for modulus 91) and asserts that 'Theorem 4.4 covers their existence' without proof. A sum of such cosines is periodic with period n/gcd(f,n) but typically has multiple separated positive lobes within one period; in the Cayley graph ordered by step size d these lobes are not a single contiguous interval unless k1+k2 is allowed to grow to Theta(n), in which case the approximate coset is essentially the whole cycle. Since these multi-frequency neurons occur in trained networks, the claim that 'all neurons' activate on approximate cosets is not established for the very examples the paper itself identifies as breaking the simple neuron model. The gap between the integer-frequency proof of Theorem 4.4 and the multi-frequency case needs to be closed or explicitly acknowledged as an open problem.
minor comments (6)
  1. [Appendix D] There are two broken cross-references to 'Fig. ??' in Appendix D, where the distribution of embedding weights is discussed; these need to be resolved.
  2. [Appendix F] Appendix F begins with 'These plots ended up below as Figure 35 and Figure 36. This section will be removed in future versions.' This is an unfinished-manuscript artifact and should be removed before resubmission.
  3. [Section 4.4] The term 'fine-tuning neurons' is used in the main text but is only defined in Appendix G.4; it should be defined where it first appears.
  4. [Section 4.3, preamble to Theorem 4.7] The variable m' is defined as the maximum output logit value but is not used in the statement or proof of Theorem 4.7; either use it or delete the definition.
  5. [Figure 3 and Section 4.3] The main text says logarithmic fits have 'very high R2 scores' and shows only a small inset R2 value; for a reproducibility-oriented paper, the R2 values, error bars, and fitting procedure for all moduli should be reported in the main text or clearly referred to in the appendix.
  6. [General] The paper contains no code or data availability statement. Given the large-scale empirical claims (100k seeds, many architectures), a code/data link is important for verification.

Circularity Check

1 steps flagged · score 8.0 of 10

Approximate cosets are defined with unbounded k1,k2, so Theorem 4.4's claim that neurons activate exclusively on approximate cosets holds for every neuron by construction; the aCRT universality claim is installed by definition.

  1. self definitional [Definition 4.3; Theorem 4.4; Appendix B]
    "Definition 4.3 (Approximate cosets). Let 1 ≤ k1 ≤ n and 1 ≤ k2 ≤ n. We call the set {c−k1d, . . . , c−2d, c−d, c, c+d, c+2d, . . . , c+k2d} an approximate coset. ... Theorem 4.4. Simple neurons in layer 1 activate (ReLU > 0) on an approximate coset containing the correct answer c ... In reality, all sinusoidal functions, i.e. our simple neuron assumption, will satisfy this theorem. The simplicity of this proof therefore results from the fact that we came up with a very powerful definition for approximate cosets that actually reflects what neurons in the network are learning."

    Because k1 and k2 may each be as large as n, and the Cayley graph on the reachable cycle has at most n vertices, one can choose k1 + k2 large enough that the 'path' covers the entire cycle. Every subset of the modulus, in particular the ReLU-positive set of any neuron, is therefore contained in some approximate coset. Theorem 4.4 then holds for every neuron regardless of learned weights, frequencies, or training; the conclusion follows directly from Definition 4.3 rather than from the trained mechanism. Appendix B concedes that the definition was chosen to make the proof simple and to match learned behavior, which is the definitional analogue of fitting the answer. The abstract's universality claim therefore rests on a vacuous containment rather than on a discovered constraint.

full rationale

The central mathematical step connecting the empirical observations to the aCRT is Theorem 4.4, and that step is vacuous: with k1 and k2 permitted to range up to n, any subset of the modulus cycle is contained in some approximate coset, so 'neurons activate exclusively on approximate cosets' is true by definition for every neuron, including the multi-frequency fine-tuning neurons of Appendix G.4 that the paper says Theorem 4.4 covers. Appendix B confirms the definition was crafted to match learned behavior. This is a genuine definitional reduction rather than a discovered mechanism. The paper also contains independent content that is not circular: the margin theorem for random cosine sums is a self-contained probabilistic calculation, and the empirical frequency and R2 analyses are real measurements. The O(log n) claim, however, is only connected to trained networks through the unproven assumption that trained logits behave like the random cosine model; that is an extrapolation, not a circular reduction. The use of prior work by other authors is external and not load-bearing in a circular way. Weighting the vacuous foundation of the paper's central theorem against the independent peripheral results, the appropriate score is 8: the headline claim is forced by the definition of approximate cosets.

Assumptions & free parameters 4 free parameters · 5 assumptions · 2 invented entities

This ledger captures what the central aCRT claim actually needs: the simple neuron model, which the paper states as an assumption; the random-frequency model in Theorem 4.7; a Taylor approximation without error control; and an unproved claim that ReLU preserves approximate-coset structure in later layers. The two invented entities, approximate cosets and the aCRT, have no independent evidence outside the paper's own measurements.

free parameters (4)
  • Approximate coset widths k1, k2 = Unspecified (1 <= k1, k2 <= n)
    Definition 4.3 allows any path length, so every contiguous positive-support arc of a sinusoid is an approximate coset; the width is chosen after the fact to match neuron activations.
  • DFT fine-tuning detection threshold = 7.5
    Appendix G.5 counts frequencies with DFT magnitude above 7.5 to identify fine-tuning neurons and cautions the plots 'should not be considered accurate'.
  • Margin and success parameters delta, rho = Not fitted; e.g., delta = pi/e^3 is about 0.156 when rho = 0.5
    Theorem 4.7's bound depends on user-chosen delta and rho; the O(log n) conclusion does not, but the required constant does.
  • Cluster amplitude equality = 1 per frequency cluster
    Appendix C assumes all frequency clusters contribute equal amplitude to h(k); the paper notes this is a heuristic simplification.
assumptions (5)
  • domain assumption Simple neuron model: each ReLU neuron's preactivation is well-approximated by a single-frequency sinusoid with integer frequency f.
    Stated in Section 4.1 and used by Theorems 4.4 and 4.7. The paper validates it empirically, but Appendix G.4 documents fine-tuning neurons with multiple harmonic frequencies that violate integer-frequency sinusoid form.
  • domain assumption Frequencies in the margin theorem are drawn uniformly at random from {1,...,n/2}.
    Theorem 4.7's random model; Appendix G.5 reports roughly uniform frequency histograms in trained MLPs for mod 89 and 91, giving partial empirical support.
  • domain assumption Quadratic Taylor expansion of cos(x) with no global error bound.
    Appendix C: 'the Taylor approximation is quite bad when f_l d/n is far from an integer'; the subsequent volume estimate is stated as approximately equal, so the theorem's proof is not a rigorous derivation.
  • domain assumption ReLU preserves the approximate-coset property in later layers.
    In Appendix B, 'all neurons in the following layers activate on linear combinations of approximate cosets (follows from networks being fully connected, and ReLU only having the potential to make the cosets smaller)' is asserted without proof and is not obviously true for arbitrary linear combinations.
  • standard math Standard group theory and the Chinese Remainder Theorem background.
    Definitions of groups, cosets, Cayley graphs, and CRT in Section 3 and Appendix A are standard mathematical facts used as groundwork.
invented entities (2)
  • Approximate cosets
    purpose: Replace exact cosets, which require strict modular equivalence, with arcs of behaviorally similar elements so that sinusoidal ReLU supports can be described uniformly.
    The definition (Definition 4.3) is parameterized by free k1 and k2 and is tailored so that any contiguous cosine support qualifies; no independent falsifiable prediction is attached to the object itself.
  • Abstract approximate CRT (aCRT)
    purpose: Proposed universal algorithmic template: use O(log n) random frequencies, each picking out approximate cosets that contain the answer, then intersect them.
    The margin prediction (Corollary 4.8) is tested in the same paper on the same type of task used to motivate the framework, so there is no external handle independent of the paper's own measurements.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Uncovering a Universal Abstract Algorithm for Modular Addition in Neural Networks." pith.science (2026). https://pith.science/paper/RS27RAQC

@misc{pith2026250518266,
  author       = {Pith},
  title        = {Pith review of: Uncovering a Universal Abstract Algorithm for Modular Addition in Neural Networks},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/RS27RAQC}},
  note         = {Machine review of arXiv:2505.18266}
}
read the original 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.

Figures

Figures reproduced from arXiv: 2505.18266 by the authors.

Figure 1
Figure 1. Preactivation values over a fixing b = 5 on c = (a + b) mod 59 of a neuron from an MLP, pizza and clock show qualitative equivalence after remapping (Def. 4.2): they all have frequency 1. Approximate cosets. The CRT relies on cosets. A neuron with frequency f will only take values on a coset when gcd(f, n) > 1. Since our experiments suggest neural networks approximate the CRT’s decomposition even when the learned fr… view at source ↗
Figure 2
Figure 2. Visualizing how neurons learn approximate coset structure. Panel 1 shows the circle graph on 66 elements generated by starting at a = 0 and taking 6 steps of ±11, creating the 66 11 = 6 cosets of points {a (mod 6) ≡ 0}, {a (mod 6) ≡ 1}, . . . , {a (mod 6) ≡ 5}. The graph distance to each coset from coset {a (mod 6) ≡ 0} (in yellow) is given. 2: the neuron learned cos( 11(2π)a 66 ); the distances annotated on points … view at source ↗
Figure 3
Figure 3. The number of frequencies found in clocks, pizzas, and MLPs as the modulus [PITH_FULL_IMAGE:figures/full_fig_p006_3.png] view at source ↗
Figures from the paper (44 more)
Figure 4
Figure 4. Figure 4: Average number of frequencies found in MLPs over moduli 59-66. One-hot encoded MLPs. Previous work shows ⌊ n 2 ⌋ types of neurons are found, each specializing to a sinu￾soid with one frequency with 1 hidden layer [6, 7]. We show that adding either depth, or a trainable…
Figure 5
Figure 5. Figure 5: Left: cluster preactivations from a clock with small but present secondary spikes in the [PITH_FULL_IMAGE:figures/full_fig_p007_5.png]
Figure 6
Figure 6. Figure 6: R2 of fitting each neuron in layer 1 as a simple neuron and fitting a sum of sines of each frequency in layer 1 through layers 2-4 for 1,2,3 and 4 layer MLPs. The large volume of green checkmarks implies replacing neurons with simple neurons does not decrease the netwo…
Figure 7
Figure 7. Figure 7: R2 of fitting order 1 sines through neurons in layer 1, then fitting a sum of length equal to the number of unique frequencies in layer 1, of order one or order two sines for layers 2, 3, 4. The large volume of green checkmarks tells us that our abstraction doesn’t aff…
Figure 8
Figure 8. Figure 8: The percent of neurons with their best fit involving only order 1 sines. The result can be [PITH_FULL_IMAGE:figures/full_fig_p008_8.png]
Figure 9
Figure 9. Figure 9: Histograms of the number of times each frequency was learned while training on [PITH_FULL_IMAGE:figures/full_fig_p009_9.png]
Figure 1
Figure 1. Figure 1: simple neurons and remapped simple neurons . . . . . . . . . . . . . . . . . . . . . . . . . 23 [PITH_FULL_IMAGE:figures/full_fig_p013_1.png]
Figure 10
Figure 10. Figure 10: Cosine functions centered at 0, with f = 1, f = 2, f = 3. The points are colored based on their coset membership, i.e. equivalence class. We can calculate the step size, Definition 4.1, and in all three cases we get d = 1. We will visualize these sets in a figure comi…
Figure 11
Figure 11. Figure 11: In row 1 we show the Cayley graphs and the distances, which is a bit confusing in panel [PITH_FULL_IMAGE:figures/full_fig_p019_11.png]
Figure 12
Figure 12. Figure 12: Empirically, 1 hidden layer, 1 trainable embedding matrix, networks have margins grow [PITH_FULL_IMAGE:figures/full_fig_p020_12.png]
Figure 13
Figure 13. Figure 13: DFT of neurons in each of the four clusters in this random seed. Cluster 0 has frequency [PITH_FULL_IMAGE:figures/full_fig_p028_13.png]
Figure 14
Figure 14. Figure 14: PCA and DFT for PC1 vs PC2 showing a circular embedding clustered into cosets. The x [PITH_FULL_IMAGE:figures/full_fig_p029_14.png]
Figure 15
Figure 15. Figure 15: PCA and DFT for PC1 (f = 35) vs PC3 (f = 8), a non-circular embedding. (a) PC1 vs PC4 Scatter Plot (b) PC1 vs PC4 DFT [PITH_FULL_IMAGE:figures/full_fig_p029_15.png]
Figure 16
Figure 16. Figure 16: PCA and DFT for PC1 (f = 35) vs PC4 (f = 8), a non-circular embedding. 29 [PITH_FULL_IMAGE:figures/full_fig_p029_16.png]
Figure 17
Figure 17. Figure 17: PCA and DFT for PC2 (f = 35) vs PC3 (f = 8), a non-circular embedding. (a) PC3 vs PC4 Scatter Plot (b) PC3 vs PC4 DFT [PITH_FULL_IMAGE:figures/full_fig_p030_17.png]
Figure 18
Figure 18. Figure 18: PCA and DFT for PC3 (f = 8) vs PC4 (f = 8), which is a circular embedding because both PC’s come from the same frequency cluster. (a) PC3 vs PC5 Scatter Plot (b) PC3 vs PC5 DFT [PITH_FULL_IMAGE:figures/full_fig_p030_18.png]
Figure 19
Figure 19. Figure 19: PCA and DFT for PC3 (f = 8) vs PC5 (f = 25), a non-circular embedding. 30 [PITH_FULL_IMAGE:figures/full_fig_p030_19.png]
Figure 20
Figure 20. Figure 20: PCA and DFT for PC3 (f = 8) vs PC6 (f = 25), a non-circular embedding. (a) PC4 vs PC5 Scatter Plot (b) PC4 vs PC5 DFT [PITH_FULL_IMAGE:figures/full_fig_p031_20.png]
Figure 21
Figure 21. Figure 21: PCA and DFT for PC4 (f = 8) vs PC5 (f = 25), a non-circular embedding. (a) PC5 vs PC6 Scatter Plot (b) PC5 vs PC6 DFT [PITH_FULL_IMAGE:figures/full_fig_p031_21.png]
Figure 22
Figure 22. Figure 22: PCA and DFT for PC4 (f = 25) vs PC5 (f = 25), a circular embedding as both PCs come from the same frequency cluster. 31 [PITH_FULL_IMAGE:figures/full_fig_p031_22.png]
Figure 23
Figure 23. Figure 23: an example cluster of 14 simple neurons of frequency 21. [PITH_FULL_IMAGE:figures/full_fig_p032_23.png]
Figure 24
Figure 24. Figure 24: A cluster of simple neurons (from Fig. 23) transformed by group isomorphism so that all [PITH_FULL_IMAGE:figures/full_fig_p032_24.png]
Figure 25
Figure 25. Figure 25: Histogram of phases (top) and 2D scatter plot of phases (bottom) for a simple neuron [PITH_FULL_IMAGE:figures/full_fig_p033_25.png]
Figure 26
Figure 26. Figure 26: Here’s an example where the phases aren’t in a nice grid like they were in Figure 25. [PITH_FULL_IMAGE:figures/full_fig_p034_26.png]
Figure 27
Figure 27. Figure 27: Comparing a simple neuron and fine-tuning neuron before and after transformation by a [PITH_FULL_IMAGE:figures/full_fig_p035_27.png]
Figure 28
Figure 28. Figure 28: This shows a cluster of fine-tuning neurons and shows the preactivations of the first two [PITH_FULL_IMAGE:figures/full_fig_p036_28.png]
Figure 29
Figure 29. Figure 29: This shows the DFT’s of the preactivations of the fine-tuning neurons seen in Fig. 28. [PITH_FULL_IMAGE:figures/full_fig_p036_29.png]
Figure 30
Figure 30. Figure 30: Constructing a fine-tuning neuron. This diagram illustrates the step-by-step process of [PITH_FULL_IMAGE:figures/full_fig_p037_30.png]
Figure 31
Figure 31. Figure 31: (a) Histograms of frequencies found across 100k random seeds in MLPs mod 91 (factors [PITH_FULL_IMAGE:figures/full_fig_p038_31.png]
Figure 32
Figure 32. Figure 32: Histogram of frequencies (0–45) associated with fine [PITH_FULL_IMAGE:figures/full_fig_p039_32.png]
Figure 33
Figure 33. Figure 33: Histogram of frequencies (0–44) associated with fine [PITH_FULL_IMAGE:figures/full_fig_p040_33.png]
Figure 34
Figure 34. Figure 34: Fine-tuning neuron additive relations for two different cases. If a neuron with frequency [PITH_FULL_IMAGE:figures/full_fig_p041_34.png]
Figure 35
Figure 35. Figure 35: (a + b mod 59): The first three rows show the histograms of learned frequencies and the bottom three rows show histograms of the average length of a cluster, i.e. number of neurons in the cluster. We check the goodness of fit as a function of frequency, and find that …
Figure 36
Figure 36. Figure 36: (a + b mod 66): The first three rows show the histograms of learned frequencies and the bottom three rows show histograms of the average length of a cluster, i.e. number of neurons in the cluster; note that learning precise cosets results in less neurons being require…
Figure 37
Figure 37. Figure 37: Neural network robustness to injected multiplicative noise. The loss remains stable even [PITH_FULL_IMAGE:figures/full_fig_p044_37.png]
Figure 38
Figure 38. Figure 38: Ablation study results. Loss and accuracy metrics highlight the impact of randomly [PITH_FULL_IMAGE:figures/full_fig_p045_38.png]
Figure 39
Figure 39. Figure 39: This figure shows that the scaling is always [PITH_FULL_IMAGE:figures/full_fig_p046_39.png]
Figure 40
Figure 40. Figure 40: Adding depth causes the network to learn slightly less frequencies. [PITH_FULL_IMAGE:figures/full_fig_p047_40.png]
Figure 41
Figure 41. Figure 41: The number of frequencies found in the network decays as we add layers across almost all [PITH_FULL_IMAGE:figures/full_fig_p048_41.png]
Figure 42
Figure 42. Figure 42: The loss and margins improve as layers are added, yet figure 41 shows that less frequencies [PITH_FULL_IMAGE:figures/full_fig_p049_42.png]
Figure 43
Figure 43. Figure 43: Clusters of neurons are approximately equivariant to shifts in the inputs, meaning coset [PITH_FULL_IMAGE:figures/full_fig_p050_43.png]
Figure 44
Figure 44. Figure 44: This figure shows three neurons and their DFT’s, each from one of three clusters in model [PITH_FULL_IMAGE:figures/full_fig_p051_44.png]
Figure 45
Figure 45. Figure 45: Remapping the pizza neurons shown in Figure 44 shows that they look identical to simple [PITH_FULL_IMAGE:figures/full_fig_p052_45.png]
Figure 46
Figure 46. Figure 46: A view of the approximate CRT within a clock-transformer. We cluster all neurons [PITH_FULL_IMAGE:figures/full_fig_p053_46.png]

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. (How) Can Transformers Predict Pseudo-Random Numbers?

    cs.LG 2025-02 conditional novelty 7.0 of 10

    Transformers predict LCG sequences in-context for fixed moduli up to 2^32 and unseen moduli up to 2^16 by learning the modulus factorization and digit-wise periodic structure.

Reference graph

Works this paper leans on

44 extracted references · 18 canonical work pages · cited by 1 Pith paper

  1. [1]

    Zoom in: An introduction to circuits.Distill, 5(3):e00024–001, 2020

    Chris Olah, Nick Cammarata, Ludwig Schubert, Gabriel Goh, Michael Petrov, and Shan Carter. Zoom in: An introduction to circuits.Distill, 5(3):e00024–001, 2020

  2. [2]

    Convergent learning: Do different neural networks learn the same representations?arXiv preprint arXiv:1511.07543, 2015

    Yixuan Li, Jason Yosinski, Jeff Clune, Hod Lipson, and John Hopcroft. Convergent learning: Do different neural networks learn the same representations?arXiv preprint arXiv:1511.07543, 2015

  3. [3]

    The platonic representation hypothesis.arXiv preprint arXiv:2405.07987, 2024

    Minyoung Huh, Brian Cheung, Tongzhou Wang, and Phillip Isola. The platonic representation hypothesis.arXiv preprint arXiv:2405.07987, 2024

  4. [4]

    Progress mea- sures for grokking via mechanistic interpretability

    Neel Nanda, Lawrence Chan, Tom Lieberum, Jess Smith, and Jacob Steinhardt. Progress mea- sures for grokking via mechanistic interpretability. InThe Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=9XFSbDPmdW

  5. [5]

    The clock and the pizza: Two stories in mechanistic explanation of neural networks

    Ziqian Zhong, Ziming Liu, Max Tegmark, and Jacob Andreas. The clock and the pizza: Two stories in mechanistic explanation of neural networks. InThirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id= S5wmbQc1We

  6. [6]

    Grokking modular arithmetic.arXiv preprint arXiv:2301.02679, 2023

    Andrey Gromov. Grokking modular arithmetic.arXiv preprint arXiv:2301.02679, 2023

  7. [7]

    Edelman, Costin-Andrei Oncescu, Rosie Zhao, and Sham M

    Depen Morwani, Benjamin L. Edelman, Costin-Andrei Oncescu, Rosie Zhao, and Sham M. Kakade. Feature emergence via margin maximization: case studies in algebraic tasks. In The Twelfth International Conference on Learning Representations, 2024. URL https:// openreview.net/forum?id=i9wDX850jR

  8. [8]

    A toy model of universality: Reverse engineering how networks learn group operations

    Bilal Chughtai, Lawrence Chan, and Neel Nanda. A toy model of universality: Reverse engineering how networks learn group operations. InInternational Conference on Machine Learning, pages 6243–6267. PMLR, 2023

Show all 44 references
  1. [9]

    Grokking group multiplication with cosets

    Dashiell Stander, Qinan Yu, Honglu Fan, and Stella Biderman. Grokking group multiplication with cosets. InForty-first International Conference on Machine Learning, 2024

  2. [10]

    Neural networks learn representation theory: Reverse engineering how networks perform group operations

    Bilal Chughtai, Lawrence Chan, and Neel Nanda. Neural networks learn representation theory: Reverse engineering how networks perform group operations. InICLR 2023 Workshop on Physics for Machine Learning, 2023

  3. [11]

    Grokking: Generalization beyond overfitting on small algorithmic datasets, 2022

    Alethea Power, Yuri Burda, Harri Edwards, Igor Babuschkin, and Vedant Misra. Grokking: Generalization beyond overfitting on small algorithmic datasets, 2022. URL https://arxiv. org/abs/2201.02177

  4. [12]

    Grokking modular arithmetic can be explained by margin maximization

    Mohamad Amin Mohamadi, Zhiyuan Li, Lei Wu, and Danica Sutherland. Grokking modular arithmetic can be explained by margin maximization. InNeurIPS 2023 Workshop on Math- ematics of Modern Machine Learning, 2023. URL https://openreview.net/forum?id= QPMfCLnIqf. 10

  5. [13]

    Michaud, Stephen Casper, Max Tegmark, William Saunders, David Bau, Eric Todd, Atticus Geiger, Mor Geva, Jesse Hoogland, Daniel Murfet, and Tom McGrath

    Lee Sharkey, Bilal Chughtai, Joshua Batson, Jack Lindsey, Jeff Wu, Lucius Bushnaq, Nicholas Goldowsky-Dill, Stefan Heimersheim, Alejandro Ortega, Joseph Bloom, Stella Biderman, Adria Garriga-Alonso, Arthur Conmy, Neel Nanda, Jessica Rumbelow, Martin Wattenberg, Nandi Schoots, ...

  6. [14]

    Thread: Circuits.Distill, 2020

    Nick Cammarata, Shan Carter, Gabriel Goh, Chris Olah, Michael Petrov, Ludwig Schubert, Chelsea V oss, Ben Egan, and Swee Kiat Lim. Thread: Circuits.Distill, 2020. doi: 10.23915/ distill.00024. https://distill.pub/2020/circuits

  7. [15]

    A mathematical framework for transformer circuits.Transformer Circuits Thread,

    Nelson Elhage, Neel Nanda, Catherine Olsson, Tom Henighan, Nicholas Joseph, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Nova DasSarma, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dari...

  8. [16]

    In-context learning and induction heads.Transformer Circuits Thread, 2022

    Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Scott Johnston, Andy Jones, Jackson Kernion, Liane Lovitt, Kam...

  9. [17]

    Toy models of superposition.arXiv preprint arXiv:2209.10652, 2022

    Nelson Elhage, Tristan Hume, Catherine Olsson, Nicholas Schiefer, Tom Henighan, Shauna Kravec, Zac Hatfield-Dodds, Robert Lasenby, Dawn Drain, Carol Chen, et al. Toy models of superposition.arXiv preprint arXiv:2209.10652, 2022

  10. [18]

    From understanding computation to understanding neural circuitry

    D Marr and T Poggio. From understanding computation to understanding neural circuitry. Neuroscience Research Program Bulletin, 15(3):470–488, 1979

  11. [19]

    Levels of analysis for machine learning.arXiv preprint arXiv:2004.05107, 2020

    Jessica Hamrick and Shakir Mohamed. Levels of analysis for machine learning.arXiv preprint arXiv:2004.05107, 2020

  12. [20]

    Multilevel interpretability of artificial neural networks: Leveraging framework and methods from neuroscience.arXiv preprint arXiv:2408.12664, 2024

    Zhonghao He, Jascha Achterberg, Katie Collins, Kevin Nejad, Danyal Akarca, Yinzhu Yang, Wes Gurnee, Ilia Sucholutsky, Yuhan Tang, Rebeca Ianov, et al. Multilevel interpretability of artificial neural networks: Leveraging framework and methods from neuroscience.arXiv preprint a...

  13. [21]

    Vilas, Federico Adolfi, David Poeppel, and Gemma Roig

    Martina G. Vilas, Federico Adolfi, David Poeppel, and Gemma Roig. Position: An inner interpretability framework for AI inspired by lessons from cognitive neuroscience. InForty-first International Conference on Machine Learning, 2024. URL https://openreview.net/ forum?id=66KmnMhGU5

  14. [22]

    Salsa: Attacking lattice cryptography with transformers, 2023

    Emily Wenger, Mingjie Chen, François Charton, and Kristin Lauter. Salsa: Attacking lattice cryptography with transformers, 2023. URLhttps://arxiv.org/abs/2207.04785

  15. [23]

    Towards understanding grokking: An effective theory of representation learning.Advances in Neural Information Processing Systems, 35:34651–34663, 2022

    Ziming Liu, Ouail Kitouni, Niklas S Nolte, Eric Michaud, Max Tegmark, and Mike Williams. Towards understanding grokking: An effective theory of representation learning.Advances in Neural Information Processing Systems, 35:34651–34663, 2022

  16. [24]

    To grok or not to grok: Disen- tangling generalization and memorization on corrupted algorithmic datasets.arXiv preprint arXiv:2310.13061, 2023

    Darshil Doshi, Aritra Das, Tianyu He, and Andrey Gromov. To grok or not to grok: Disen- tangling generalization and memorization on corrupted algorithmic datasets.arXiv preprint arXiv:2310.13061, 2023

  17. [25]

    Emergence in non-neural models: grokking modular arithmetic via average gradient outer product, 2024

    Neil Mallinar, Daniel Beaglehole, Libin Zhu, Adityanarayanan Radhakrishnan, Parthe Pandit, and Mikhail Belkin. Emergence in non-neural models: grokking modular arithmetic via average gradient outer product, 2024. URLhttps://arxiv.org/abs/2407.20199. 11

  18. [26]

    Towards empirical interpretation of internal circuits and properties in grokked transformers on modular polynomials,

    Hiroki Furuta, Gouki Minegishi, Yusuke Iwasawa, and Yutaka Matsuo. Towards empirical interpretation of internal circuits and properties in grokked transformers on modular polynomials,

  19. [27]

    Du, Jason D

    Kaifeng Lyu, Jikai Jin, Zhiyuan Li, Simon S. Du, Jason D. Lee, and Wei Hu. Dichotomy of early and late phase implicit biases can provably induce grokking, 2024. URL https: //arxiv.org/abs/2311.18817

  20. [28]

    Gershman, and Cengiz Pehlevan

    Tanishq Kumar, Blake Bordelon, Samuel J. Gershman, and Cengiz Pehlevan. Grokking as the transition from lazy to rich training dynamics, 2024. URL https://arxiv.org/abs/2310. 06110

  21. [29]

    Grokking modular polynomials

    Darshil Doshi, Tianyu He, Aritra Das, and Andrey Gromov. Grokking modular polynomials. arXiv preprint arXiv:2406.03495, 2024

  22. [30]

    Learning to grok: Emergence of in-context learning and skill composition in modular arithmetic tasks.arXiv preprint arXiv:2406.02550, 2024

    Tianyu He, Darshil Doshi, Aritra Das, and Andrey Gromov. Learning to grok: Emergence of in-context learning and skill composition in modular arithmetic tasks.arXiv preprint arXiv:2406.02550, 2024

  23. [31]

    The evolution of statistical induction heads: In-context learning markov chains.Advances in Neural Information Processing Systems, 37:64273–64311, 2024

    Ezra Edelman, Nikolaos Tsilivis, Benjamin Edelman, Eran Malach, and Surbhi Goel. The evolution of statistical induction heads: In-context learning markov chains.Advances in Neural Information Processing Systems, 37:64273–64311, 2024

  24. [32]

    Emergent properties with repeated examples.arXiv preprint arXiv:2410.07041, 2024

    François Charton and Julia Kempe. Emergent properties with repeated examples.arXiv preprint arXiv:2410.07041, 2024

  25. [33]

    Self-improving transformers overcome easy-to-hard and length generalization challenges.arXiv preprint arXiv:2502.01612, 2025

    Nayoung Lee, Ziyang Cai, Avi Schwarzschild, Kangwook Lee, and Dimitris Papailiopoulos. Self-improving transformers overcome easy-to-hard and length generalization challenges.arXiv preprint arXiv:2502.01612, 2025

  26. [34]

    Length generalization in arithmetic transformers.arXiv preprint arXiv:2306.15400, 2023

    Samy Jelassi, Stéphane d’Ascoli, Carles Domingo-Enrich, Yuhuai Wu, Yuanzhi Li, and François Charton. Length generalization in arithmetic transformers.arXiv preprint arXiv:2306.15400, 2023

  27. [35]

    Learning the greatest common divisor: explaining transformer predictions,

    François Charton. Learning the greatest common divisor: explaining transformer predictions,

  28. [36]

    Ruiz, Julian Schrittwieser, Grzegorz Swirszcz, et al

    Alhussein Fawzi, Matej Balog, Aja Huang, Thomas Hubert, Bernardino Romera-Paredes, Mohammadamin Barekatain, Alexander Novikov, Francisco J R. Ruiz, Julian Schrittwieser, Grzegorz Swirszcz, et al. Discovering faster matrix multiplication algorithms with reinforcement learning.N...

  29. [37]

    Faster sorting algorithms discovered using deep reinforcement learning.Nature, 618(7964):257–263, 2023

    Daniel J Mankowitz, Andrea Michi, Anton Zhernov, Marco Gelmi, Marco Selvi, Cosmin Paduraru, Edouard Leurent, Shariq Iqbal, Jean-Baptiste Lespiau, Alex Ahern, et al. Faster sorting algorithms discovered using deep reinforcement learning.Nature, 618(7964):257–263, 2023

  30. [38]

    URLhttps://arxiv.org/abs/2308.15594

  31. [39]

    Can deep reinforcement learning solve erdos-selfridge-spencer games? InInternational Conference on Machine Learning, pages 4238–4246

    Maithra Raghu, Alex Irpan, Jacob Andreas, Bobby Kleinberg, Quoc Le, and Jon Kleinberg. Can deep reinforcement learning solve erdos-selfridge-spencer games? InInternational Conference on Machine Learning, pages 4238–4246. PMLR, 2018

  32. [40]

    algorithm

    Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization, 2017. URL https://arxiv.org/abs/1412.6980. 12 Table of Contents for the Appendix A. Additional Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  33. [41]

    McGill University (Canada), 2021

    Gavin McCracken.Using Exact Models to Analyze Policy Gradient Algorithms. McGill University (Canada), 2021

  34. [44]

    error correct

    can be interpreted as the network constructing an error correcting code. We see in Figure 41 that deeper networks learn less frequencies. While this is true, they simultaneously achieve lower cross entropy loss (and better margins) with less frequencies than shallower networks...

  35. [2021]

    https://transformer-circuits.pub/2021/framework/index.html

  36. [2024]

    URLhttps://arxiv.org/abs/2402.16726

Pith tools

Reviewed August 7, 2026 · model on record in the stance chip above.