acceptodds
Under review as a conference paper at ICLR 2027

The Factorization Was the Circuit: Chinese Remainder Theorem in Transformers

Abstract

Emergent algorithms can arise in neural networks trained on simple tasks. Twenty small transformers (1-layer, no LayerNorm) trained to solve over a range of primes exhibit perfect generalization after grokking. We reverse engineer the emergent mechanism and find that the model first rewrites the answer as , and , where and is a primitive root of . It then splits that product using the (CRT): computing on independent streams, where are the prime-power factors of ; then recombining the residues in the unembedding. Similar to prior work, we learn that the model uses a sparse set of "key" frequencies, which index the irreducible representations. Unlike prior work, this set is completely deterministic, as it is the union of disjoint bands of the Fourier spectrum at the multiples of . We call these bands the CRT bands. Through causal tests, we show that each band controls its own corresponding stream independently. Furthermore, for prime-power streams (e.g., ), the irreducible representations of these groups are filtered by order, dual to the quotient tower: . With the a priori knowledge of these irreducible representations and their frequencies, we are able to show the streams' independence causally, as well as isolate and observe the mechanism's circuitry formation during grokking.

Primary area:
interpretability and explainable AI
Keywords:
interpretability, grokking, mechanistic interpretability, circuits, number theory

Reviews

Among:
Shape:
1234this paper, Top 15%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 3.00 over 3 reviews, above 85% of the others.
Reviewer_7DANOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
2
Soundness
3
Read review
Paper summary

The authors test whether one layer transformer models with no layer norm represent particular intermediate values when calculating a^b mod p, with p prime for 4 different prime numbers. They call these intermediate values the CRT decomposition (since they are derived from the Chinese Remainder Theorem) and they are related to the original problem though the discrete log. Relating to previous work by Nanda et. al., they also look for the presence of specific sparse Fourier components in the output of the models’ MLP– and find frequencies that are consistent with their predictions. They also do causal test to establish that the subspaces found by projecting the MLP output onto these Fourier components each carry the relevant intermediate value. Additionally, they show that the predicted fourier bands are the “grokked” circuits y showing that their frequencies are relatively boosted during the grokking phase of learning, when compared to the rest of the frequencies.

Critical strengths

The theoretical framework the authors lay out allows for the key frequencies to be predicted, rather than discovered post hoc. The authors can say in advance which residue of the answer should break when a given band is removed, which provides a satisfying prediction -> verification.

The causal tests are carefully done and match the predictions. They do both ablation and patching and the evidence is largely in favor of of their predicted outcomes.

Critical weaknesses

The manuscript leaves open some questions of the robustness of the findings. Every control is one that no hypothesis predicts will succeed: the control modulus for the probes, the random token orders for the spectra, and the randomly initialized network for restriction. Nothing tests a competing implementation, such as probing α mod m, b mod m, or (α + b) mod m. Such an investigation seems prudent, but it could be argued that it lies outside of the scope of the paper. If this is the case, the authors might want to indicate this in their “limitations section”. The evidence base also appears narrow: the authors only use 4 hand-picked primes, and the reason is left to the reader to imagine. Additionally, it is not clear wether the investigation was 20 models in which 20 showed the grokking solution-- or if 20 is just the number that did show the circuit out of an unspecified total.

The theoretical backbone of the paper is important for the study, but I found its presentation to be very confusing. Section 3 will be a roadblock for any reader not already familiar with all of the content. This is partly due to sloppy notation, for example equation 1 seems to have "mod p" as a condition for the congruence-- but equation 2 uses "mod p" as an operator that is specific to one side of the equation. However, I also think it could be remedied by offloading some more of the "mathy" stuff to the appendices. For the purpose of the investigation, the specifics the reader needs is actually quite straightforward. In 3.1: after relabeling tokens by discrete log, the prediction is that the model should represent an exponent mod each prime factor of p − 1 (the important thing is that you can make a quantitative prediction, not the math behind it). In 3.2: each of these residues has its own characteristic Fourier band. The details of the group isomorphisms and irreps are mostly a distraction here, in my opinion. If they are not, perhaps more time could be spent explaining why. I also found some of the experimental details to be obfuscated by the writing: the probe paragraph before Section 4.1 never says the target is γ mod m. More time can be spent explaining the setup in plain-language -- and I think it would make the paper much easier to apprecoate.

Questions for authors

The references section seems quite short for an academic paper, especially for a topic that has been heavily studied in recent years. For example a quick search for modular arithmetic and grokking revealed a 2024 paper on the arXiv: "Grokking Modular Polynomials" by Doshi et. al. This might very well not be relevant, but a quick glance makes it at least appear so. Did the authors do much of a literature review for this project? If so, why not include more references? The paper above, for example.

Why only 4 primes? I'd like to have seen a case with more factors (p = 2·3·5·7 + 1) or multiple prime powers (p = 4·9·11 + 1)

Did you only test 20 models, or was this circuit only observed in 20 models among many more tested?

3 comments

We thank reviewer 7DAN for recognizing the predictive framework and the careful causal tests. We have made significant adjustments to improve presentation, wording, and experimental data. We have added §6 on neurons and tori, which extends the experiments inside the MLP. We will address your concerns below.


Competing implementation:

Nothing tests a competing implementation, such as probing α mod m, b mod m, or (α + b) mod m.

  • New in App. O: after the MLP, the product reads at 0.9990.999 to 1.0001.000. At p=83p = 83, the sum (α+b) mod 41(\alpha + b) \bmod 41 reads at 0.0230.023 to 0.0290.029, its chance level. For small mm, we compare the sum with random partitions of the m×mm \times m grid of residue pairs (rα,rb)(r_\alpha, r_b) into mm classes of equal size. Such a partition is an arbitrary function of the two residues, and the MLP output makes many of them readable (up to 0.9980.998). The sum reads worse than this arbitrary partition in four of the five cases (Table 13).
  • α mod m\alpha \bmod m and b mod mb \bmod m are readable before the MLP, at 0.9650.965 to 1.0001.000 for every component in all nine models. The product is readable only after the MLP (except mod 2, the AND of the two parities; App. J).
  • In §6.4, the torus rotation is a causal test that relies on the theory that the product is formed there. (α+b) mod m(\alpha + b) \bmod m would not follow the prediction we have.

"4 hand-picked primes", "20 of how many":

The 4 primes: Initially, we started with p=131p=131 and walked backwards. (113, 127, 131 are consecutive primes). 83 was added in because of the large mod-41 band. 127 has mod-9 and 113 has mod-16, which are prime powers. We could not explain them at first and had to extend the research to cover these "special cases" (which is now §7 Inside a Prime Power). We don't handpick these based on behavior. We also trained at 4747, 5959 and 107107 (Table 2).

Why only 4 primes? I'd like to (see) ... p= 2·3·5·7 + 1 (=211) ... p = 4·9·11 + 1 (=397)

We thank you for the suggestion and have extended the experiments to cover these. App. P covers this. For p=211p=211, the framework applies (with a few deviations). For p=397p = 397, the filtration for prime-power streams applies (App. S), while its mod-11 stream is not carried by its CRT band alone. We report that as an anomaly.

20 models, or ... 20 models among many more

We have documented this fully in the new App. C, Table 2. A total of 40 models with different activations (ReLU, GELU), seeds and primes were trained. 20 (now 25) have grokked (100% generalization) and were reported. We select models only by grokking (100% on all pairs), never by whether they show the circuit.


Presentation: §3 too mathematical

We agree that the math portion is taking valuable space and dilutes the paper from its results. Therefore, §3 The CRT Decomposition has been trimmed down. The new space is dedicated to §6, which brings more qualitative results. The setup is now in the main text (§4), in plain language, with full details in App. B.

The isomorphisms play an important role in the paper and are discussed in §9 Discussion. That being said, we have kept them to a minimum in the new revision.

sloppy notation ... "mod p" as a condition for the congruence...

Congruences are now written with (modp)\pmod{p} throughout (Eqs. 1-2).

the probe paragraph before Section 4.1 never says the target is γ mod m

Every probe reads γ mod m\gamma \bmod m. Fig. 1's caption names it, and the new App. D states it with the probe details.


Questions:

Literature review: Thank you for pointing this out. This concern is also shared by other reviewers. We have reviewed the literature and cited it properly, as well as showing our delta in more detail in §2 Related Work. The number of cited works has increased from 10 to 34. Doshi et al. [1] is now included and credited for the discrete-log reindexing (§1, §3.2, §9).


References

[1] Darshil Doshi, Tianyu He, Aritra Das, Andrey Gromov. Grokking Modular Polynomials. arXiv:2406.03495, 2024. https://arxiv.org/abs/2406.03495

Thanks for the response; I appreciate the concision and clarity in addressing the points I raised.

My primary concern re: competing implementations has been somewhat answered. I suppose that my suggestion of (a+b) mod m as an alternative strategy might have been taken too literally-- I am not sure that is even a viable solution to the problem here, so perhaps looking for it doesn't make a lot of sense to begin with? Also, the fact that arbitrary functions of the residuals can be read off but not the sum feels like a contradiction. I remain somewhat unconvinced that alternatives have been ruled out by these tests.

The above, along with the fact that the additionally tested primes deviate somewhat from the framework is worth noting, but not enough for me to lower my overall positive assessment of the work. I will maintain my recommendation.

Other points:

The authors are now more transparent about the number of models tested in total. Filtering by grokking actually may provide a nice control group: I am curious if the authors have tried running the same tests on the models that fail to grok. This might provide some strong signal to support the authors main points, though perhaps it would simply replicate the data on the grokking models right before the onset of grokking?

The updated section 3 is significantly more readable for me. Thanks!

AuthorsOpenReview ↗

Analysis on non-grokked models

Thank you, we are glad §3 reads better.

Due to time constraints, we could not dive deeper into competing implementations analysis. However, we ran the un-grokked models through the analysis pipeline:

TL/DR: Almost all un-grokked models have their wrong answers wrong in exactly 1 residue

ppmodelsaccuracywrong answers confined to one residueMLP prominence (compared to grokked counterpart)streams at baseline after own-band ablation
5959274.7674.76 to 99.76%99.76\%9999 to 100%100\%1.91.9 to 2.22.2 (n/a)4 of 4
8383298.5098.50 to 99.75%99.75\%9696 to 100%100\%2.02.0 to 2.12.1 (1.91.9 to 2.02.0)4 of 4
131131499.7799.77 to 99.99%99.99\%100%100\%3.43.4 to 4.54.5 (4.54.5 to 4.74.7)7 of 12
211211299.9699.96 to 99.98%99.98\%9595 to 100%100\%4.64.6 to 6.16.1 (5.45.4 to 6.06.0)4 of 8
397397550.0650.06 to 99.99%99.99\%7777 to 93%93\%4.24.2 to 8.08.0 (7.27.2)7 of 15

The bands are there, with prominence close to their grokked counterparts. Through ablation, the models with small primes (p = 59, 83 and 131) seem to have the errors coming from 1 fail stream. Larger models (p = 211 and 397), the error seems to be compounded by many streams.

Reviewer_8jNFOpenReview ↗
Rating
3(+1)
Confidence
3
Informativeness
2
Presentation
1
Soundness
2
Read review
Paper summary

The paper asks how a one-layer transformer computes ab mod pa^b \bmod p after grokking. The starting point is to write every input as a power of a primitive root gg, so a=gαa = g^\alpha. Then ab=gαba^b = g^{\alpha b}. By Fermat's little theorem gp−1≡1(modp)g^{p-1} \equiv 1 \pmod p, so the exponent αb\alpha b only matters modulo q=p−1q = p - 1. The answer is therefore gγg^\gamma with γ=αb mod q\gamma = \alpha b \bmod q, and the model only needs to get γ\gamma right. Since qq is composite, the Chinese Remainder Theorem splits Z/qZ\mathbb{Z}/q\mathbb{Z} into prime-power pieces Z/miZ\mathbb{Z}/m_i\mathbb{Z}. The paper's claim is that the model computes each residue γ mod mi\gamma \bmod m_i on its own "stream", and each stream lives on a fixed band of Fourier frequencies Fmi={jq/mi}F_{m_i} = \{j q/m_i\}. These bands are known in advance from the factorization of qq alone, and the unembedding recombines the residues into the answer. The idea of a stream is clear from the Chinese Remainder Theorem. What I'm less sure about is how the streams are split inside the network and how their outputs are combined into the final prediction. My best reading is that the residues are formed in the MLP and put back together by the unembedding, but the paper never quite pins this down (more in Weakness 3 and Question 10).

Critical strengths
  1. Convincing causal evidence that each band carries its own residue (Sec. 4.5). The three interventions on the MLP output tell a consistent story. Ablating a band drops its own residue to about chance (e.g. A41A_{41} goes to 0.020.02–0.050.05 against a baseline of 0.0480.048) while the other residues stay at 0.960.96 or above. Patching a band from another input moves exactly that residue, with 0.760.76–1.01.0 of inputs following the source. Keeping only the CRT bands preserves the answer at 0.9660.966–1.01.0 joint accuracy, compared with at most 0.0180.018 for a random network, so the bands together carry the whole answer. The effects are large and hold across all nine models, and this is the main reason I lean toward acceptance.
  2. Honest reporting and good reproducibility. I appreciate the authors being upfront about where their story doesn't fully hold. App. J lists the exceptions, including a few ablations that land below baseline, mod-5 resisting ablation on two p=131p = 131 seeds, and one seed leaking under patching. They also catch their own probe false positive for mod-2 and explain it with a clean XOR control (App. F).
  3. The training dynamics give independent support for the bands (Sec. 6, Fig. 8). Besides showing what the trained model does, the paper also shows how this structure emerges during training, and the picture agrees with the rest of the paper. Right at the grok epoch, the weights on the off-band frequencies collapse in WEW_E, WUW_U and the CRT-aligned heads, while the weights on the CRT bands survive. So grokking is the moment the model throws away everything except the CRT bands, which matches the cleanup phase described by Nanda et al. (2023). This evidence comes from the weights alone, without any intervention, so it is a nice cross-check on Sec. 4.5. It also agrees with the per-head result in Sec. 4.4, since the two heads that aren't CRT-aligned show no preference for the bands and get pruned at grokking.
Critical weaknesses
  1. The mechanism is still only half explained. The paper is convincing about where the residues end up, but much less about how the network gets them there.
    • Sec. 4.2 shows that γ mod m\gamma \bmod m becomes readable after the MLP, and Sec. 4.3 shows what the MLP output looks like spectrally. Neither shows how the MLP turns features of α\alpha and bb into features of γ=αb mod q\gamma = \alpha b \bmod q. There is no neuron-level analysis, e.g. whether neurons are band-specific or whether a product-to-sum structure is visible.
    • Where the streams split and where they recombine is never located. Eq. 3 needs α mod mi\alpha \bmod m_i and b mod mib \bmod m_i, but these are only checked before the MLP for mod 2 (App. F, Table 7). For the larger components the authors explicitly leave it open. On the attention side only the OV circuits are studied spectrally (Sec. 4.4), and the QK circuit, i.e. how the heads route aa and bb, is not analyzed. The recombination by WUW_U ("constructive interference across the bands") is asserted but never shown at the logits.
    • Inside a prime-power component the authors concede they "have not yet found the algorithm" (Limitations). The Clock/Pizza diagnostics for the prime components rest on one neuron per component (Table 5).
  2. The spectral measurements are underspecified (Sec. 3.2, 4.3, 4.4, 6). Sec. 3.2 only defines characters for scalar functions on Z/qZ\mathbb{Z}/q\mathbb{Z}, but everything measured is a matrix. Unclear points:
    • How the "per-frequency norm" of a q×512q \times 512 matrix (WEW_E, WUW_U, Wneur(h)W_{\text{neur}}^{(h)}) is computed. How are the cos⁡\cos and sin⁡\sin coefficient vectors combined, are columns mean-centered, and how are cos⁡\cos and sin⁡\sin normalized?
    • How the MLP output is "projected" in Sec. 4.3. γ\gamma is non-uniform over input pairs (Sec. 4.1), so cos⁡(2πkγ/q)\cos(2\pi k\gamma/q) and sin⁡(2πkγ/q)\sin(2\pi k\gamma/q) aren't orthogonal over the data, and inner products and least squares give different spectra. Sec. 4.5 orthonormalizes over the dataset, but Sec. 4.3 doesn't say whether it does the same, or which pairs it uses.
    • What the spectrum of WEW_E means. WEW_E has one row per token, and the same row is used whether the token appears as aa or as bb. The model needs log⁡ga\log_g a from the first input but bb itself from the second, so sorting the rows by discrete log only matches the role of aa. A single log-order spectrum of WEW_E therefore mixes the two roles. (Minor: is the row for the "=" token dropped?)
    • Wneur(h)=WEWV(h)WO(h)WinW_{\text{neur}}^{(h)} = W_E W_V^{(h)} W_O^{(h)} W_{\text{in}} ignores the attention pattern and positional embeddings, so it can't say whether a head reads from the aa or the bb position.
    • Different sections summarize the spectrum differently. Sec. 4.3–4.4 use CRT prominence (a ratio of mean norms), while Sec. 6 uses the RMS of the norms, which weights large bars more, so the two aren't directly comparable. Table 3's Gini coefficient is "of the same spectrum", but it isn't said over which values.
  3. Some claims go beyond the evidence. There are several places where the text says more than the tables support. Below are the three I find most significant, though there are others.
    • The abstract says the model uses a "sparse set of key frequencies", but the Table 3 caption says "the spectra are not sparse in absolute terms". More broadly, the spectra prefer the CRT bands but are far from concentrated on them. About 43%43\% of the MLP output's energy sits on the CRT set for p=127p = 127 and p=131p = 131, and for p=83p = 83, where the CRT set already covers half the spectrum, a prominence of 1.91.9 is weak.
    • "Each band controls its own corresponding stream independently" and "every causal intervention ... can be predicted before any weight is inspected" (p. 9) sit awkwardly with App. J, where roughly 5 of about 22 component-seed pairs deviate.
    • Sec. 5's "novel finding" is mostly the textbook character theory of cyclic groups, and the lower half of the staircase is close to automatic for a linear readout. The main-text Fig. 7 uses a GELU model. In the ReLU model used everywhere else, the order-2 ablation has no effect at all (1.000/1.000/1.000/0.9991.000/1.000/1.000/0.999, Table 6), and this appears only in an appendix caption.
  4. Missing related work. The paper relies heavily on Fourier analysis of networks trained on group tasks, but it leaves out several related works in this line. These include He et al., On the Mechanism and Dynamics of Modular Addition: Fourier Features, Lottery Ticket, and Grokking (arXiv:2602.16849, 2026) and He et al., Neural Networks Provably Learn Spectral Representations for Group Composition (arXiv:2606.02993, 2026), which study how single-frequency or irreducible-representation features emerge and combine. Earlier Fourier-based analyses such as Gromov (2023) and Morwani et al. (2024) are also missing. Separately, the discrete-log reindexing is attributed to Nguyen (2026), but Doshi, He, Das & Gromov, Grokking Modular Polynomials (arXiv:2406.03495, 2024) already use primitive-root reshuffling to turn modular multiplication into addition. It should be cited.
Questions for authors
  1. The "baseline chance" in Section 4.1 is badly presented. I can understand it as a probability baseline, namely the frequency of the most common residue of γ mod m\gamma \bmod m over all input pairs, i.e., the accuracy of always predicting 00. But the main text never states this directly. It does not say what distribution the rate is computed over, and the reason a probe or an ablated model should end up at this rate is left to Appendix B. Please state the definition explicitly in Section 4.1 and say which tests (probes, ablations, patching) it applies to. Please also explain how to read results that fall below it, since several ablations do (e.g., A9=0.080A_9 = 0.080 against 0.2590.259 in App. J).
  2. What exactly is γ^\hat\gamma? As I understand it, γ\gamma is an intermediate quantity in your proposed mechanism, and the network itself only outputs the answer token gγ mod pg^\gamma \bmod p. Eq. (5) defines γ^\hat\gamma as "the discrete logarithm of the answer the model predicts". Is this log⁡g\log_g applied to the argmax output token at the answer position? If so, AmA_m is a property of the final output written in exponent coordinates, and it does not directly measure whether the network computes γ mod m\gamma \bmod m internally. The linear probes, on the other hand, read residues from the hidden state. Please define AmA_m separately for probes, ablations and patching, and say what happens if the predicted token lies outside (Z/pZ)∗(\mathbb{Z}/p\mathbb{Z})^*, where log⁡g\log_g is undefined.
  3. What is the off-band energy in Fig. 3? The restriction test (Sec. 4.5) suggests it isn't needed for the output, so what does it consist of (e.g., cross terms created by the nonlinearity, or dependence on α\alpha and bb beyond γ\gamma)? Relatedly, the off-band frequencies are mixed characters that are just as valid for encoding γ\gamma. Is the real finding a preference for single-component characters over mixed ones, and if so, why would training favor them?
  4. What is the CRT prominence of W_E and W_U under the natural token order? If natural order is comparably prominent (expected for the b pathway), please revise the "multiplicative basis" claim for W_E and discuss how the two orderings coexist in a shared embedding.
  5. Please reconcile Fig. 17's "zero the MLP" row (A_2 = 0.92 at p = 127, 0.77 at p = 131) with the claim that the mod-2 residue is computed in the MLP. How much of each residue is carried by the attention/skip path? Does F_2-ablation landing exactly on 0.750 reflect loss of information or interference from the remaining MLP content?
  6. How exactly is the "non-CRT control band" constructed for a control modulus c with q/c ∉ Z? Which frequencies, and why those (rank 2 or 4 in Table 6)?
  7. How many models were trained in total, at which primes, and how many failed to grok? Which six grokked models beyond the fourteen described make up "twenty"?
  8. (suggestion) Report a null for the MLP-output prominence (random frequency sets of the same size), show the ReLU p = 113 filtration result next to the GELU one in the main text, and state which part of the staircase follows from the projection algebra versus the readout.
  9. The on-/off-band weight-norm curves in Fig. 8 separate long before the grok epoch (≈300 vs 4,700). Does the separation exist at initialization or appear during memorization? This seems to argue against bands being "carved out" during cleanup.
  10. Where does the per-component split happen? App. F shows α mod 2\alpha \bmod 2 and b mod 2b \bmod 2 are readable before the MLP. Does the same hold for the larger components (e.g., α mod 41\alpha \bmod 41, b mod 13b \bmod 13), and which head carries which component? On the output side, can you show the recombination directly, for example by decomposing the logit of each candidate γ′\gamma' into per-band contributions and checking that each band peaks at γ′≡γ(modmi)\gamma' \equiv \gamma \pmod{m_i}?
7 comments

We thank reviewer 8jNF for the critical yet constructive feedback. We will address your concerns below:


W1. Mechanism half explained

no neuron-level analysis ... Where the streams split and where they recombine is never located ... Clock/Pizza diagnostics rest on one neuron per component

Neurons: We have a new §6, Inside a stream, which is dedicated to neurons and tori. Each neuron belongs to one stream: the CRT bands hold 0.960.96 to 1.001.00 of the neurons' spectral energy, against 0.120.12 to 0.510.51 in untrained networks (§6.2). Inside its stream, each neuron is one harmonic of the stream logarithm, which turns the product into a sum (Eqs. 6-7).

Split: The split is visible before the MLP. WEW_E carries the CRT bands in discrete-log order for aa and in natural order for bb, and two of the four heads carry them (§5.4). At resid_mid, the answer position before the MLP, both operand residues are linearly readable for every component in all nine models: α mod m\alpha \bmod m and b mod mb \bmod m read at 0.9650.965 to 1.0001.000 (mod 41: 0.9870.987 to 1.0001.000 and 0.9880.988 to 0.9990.999; mod 13: 1.0001.000 and 1.0001.000). The product is not. Its probe stays at the ceiling (3m−2)/m2(3m-2)/m^2 set by the operands' zero pattern, since γ≡0\gamma \equiv 0 whenever either residue is 00 (mod 41: 0.050.05 to 0.080.08 against 0.0720.072; mod 13: 0.200.20 to 0.220.22 against 0.2190.219). Mod 2 is the exception: its product is the AND of the two parities, which a linear probe reads directly (App. J). After the MLP, every product reads at 0.9870.987 or above (§5.2). The probes locate the residues; how attention routes them is the QK circuit, which we do not analyze (§9 Limitations).

Recombination: New App. M decomposes each candidate's logit into one share per stream (Eq. 14), as you suggested in Q10. Each share peaks at the answer's residue: the peak test gives 0.660.66 to 1.001.00 for every stream except mod 2, whose share works as an AND gate (explained there). The shares alone pick the answer on 0.9970.997 to 1.0001.000 of inputs. Swapping one stream's neurons from another input gives the CRT composite of the two answers, a token neither input produces, on 0.650.65 to 1.001.00 of inputs (Tables 9-10).

Clock/Pizza: App. K now tests each prime stream's read-out over all its neurons, not one neuron. The difference diagonal, the Pizza signature of Zhong et al. [1], holds at most 0.080.08 of the energy in all 12 prime streams (Table 8).

W2. Spectral measurements underspecified

App. D (Methods) now defines every measurement. Point by point:

How the "per-frequency norm" of a q×512q \times 512 matrix ( WEW_E, WUW_U, Wneur(h)W_{\text{neur}}^{(h)}) is computed.

We project the rows onto the real basis {1,cos⁡(2πkx/q),sin⁡(2πkx/q)}\{1, \cos(2\pi k x/q), \sin(2\pi k x/q)\}, each basis vector normalized to unit length. The per-frequency norm is ∥ck∥2+∥sk∥2\sqrt{\lVert c_k \rVert^2 + \lVert s_k \rVert^2}, where ckc_k and sks_k are vectors over the model dimension. The constant (k=0k = 0) is projected out. At the Nyquist frequency only the cosine counts (App. D, Per-frequency norm, prominence and nulls).

How the MLP output is "projected" in Sec. 4.3.

Over all (p−1)2(p-1)^2 inputs, we mean-center the activation; ckc_k and sks_k are the means of the activation times cos⁡(2πkγ/q)\cos(2\pi k\gamma/q) and sin⁡(2πkγ/q)\sin(2\pi k\gamma/q). These are inner products, so each value of γ\gamma is weighted by how often it occurs (App. D). As you note, the basis is not orthogonal over the data. Q3 below shows the effect: part of each stream's energy moves onto mixed frequencies, so the prominence understates the bands.

What the spectrum of WEW_E means ... (Minor: is the row for the "=" token dropped?)

§5.4 now reads WEW_E in both orders; see Q4. The "=" row and the unused value 00 are dropped (App. D, Reindexing by the discrete logarithm).

Wneur(h)W_{\text{neur}}^{(h)} ... ignores the attention pattern and positional embeddings

Agreed. Wneur(h)W_{\text{neur}}^{(h)} shows what head hh delivers to the MLP, not from which position. The position is set by the QK circuit, which we did not analyze for lack of time (§9 Limitations).

Different sections summarize the spectrum differently ... Table 3's Gini coefficient

§8 uses the RMS per set so that both curves sit on one per-frequency scale. Fig. 27 (App. T) shows the same trajectory as the mean-based prominence of §5. The Gini coefficient is computed over the ⌊q/2⌋\lfloor q/2 \rfloor per-frequency norms (App. D).

W3. Claims beyond the evidence

We have adjusted our wording to better reflect the results.

The abstract says the model uses a "sparse set of key frequencies"

We removed "sparse" from the abstract, so it now agrees with the Table 4 caption. We are aware that the CRT set can occupy a large fraction of the frequencies. This is why we use CRT prominence: it measures whether the bands are favored, and it equals 11 when they are not. For p=83p = 83, where the bands hold 21 of 41 frequencies, we added a size-matched null. Every model's prominence (1.911.91 to 2.032.03) exceeds all 2,0002{,}000 random frequency sets of the same size (null maximum 1.461.46 to 1.521.52; App. O, Table 11). The 43%43\% you computed is the share of the summed norms; Q3 shows that in energy, the bands hold as much as a perfectly separated output would.

Independence and prediction: In the nine-model analysis set, independence holds in every model but one ( p=131p = 131 seed 67; App. Q). The closing sentence of §9 now says that every causal test comes with a prediction stated before any weight is inspected. The bands follow from the factorization of qq alone. In modular addition, by contrast, the key frequencies are found after training and differ from seed to seed (Nanda et al. [2]).

"novel finding" is mostly the textbook character theory...

The character theory is textbook, and we do not claim it. What we show is that a trained transformer follows it: ablating each order breaks exactly its own digit, and the damage tracks the order's rank (§7, Table 16). We removed "novel". This also differs from He et al. [3], whose gradient-flow analysis of group composition predicts no preference by order.

In the ReLU model ... the order-2 ablation has no effect at all

The ReLU model of p=113p = 113 now sits next to the GELU model in the main text (Fig. 8), and the caption states that its order-2 ablation removes nothing measurable. New App. S extends the analysis to p=397=4×9×11p = 397 = 4 \times 9 \times 11, a ReLU model with two prime-power streams. Both mod 4 and mod 9 show the staircase, and there the order-2 level matters: ablating it takes A2A_2 and A4A_4 down together to 0.8420.842 (Table 17).

W4. Related work

We have reviewed this literature and updated §2 Related Work and App. A. Both papers by He et al. [3, 4], Gromov [5] and Morwani et al. [6] are now cited. The discrete-log reindexing is credited to Doshi et al. [7] (§1, §3.2, §9).

  1. Baseline chance: §5.1 now defines it: the majority-residue rate of γ mod m\gamma \bmod m over all (p−1)2(p-1)^2 pairs, that is, the accuracy of always answering residue 00. It also lists the tests it applies to (ablation, patching, restriction, stream swaps and rotations), and it is the dotted line on every probe plot. App. F derives it in closed form. Results below it are discussed in App. Q: removing a subspace also perturbs what remains, so the rate is a reference point rather than a hard floor.

  2. γ^\hat\gamma: It is log⁡g\log_g of the model's argmax output token, taken mod mm for AmA_m. The candidates are the tokens 1,…,p−11, \ldots, p-1, so log⁡g\log_g is always defined.

AmA_m is a property of the final output ... does not directly measure whether the network computes γ mod m\gamma \bmod m internally.

It is true that AmA_m is not a probe of the residual stream. We use AmA_m only for the causal tests, where an intervention inside the network must show up in the output. The probes are a separate measurement of the hidden state (§5.2). Both are compared with the same baseline chance, the majority-residue rate (§5.1, App. F).

  1. Off-band energy: Most of it comes from the projection, not from the model. γ\gamma is not uniform over the inputs, so under the data-weighted projection (W2), a function of γ mod m\gamma \bmod m alone also has weight on mixed characters. We checked this on a synthetic output that is an exact function of the residues: a one-hot of each γ mod mi\gamma \bmod m_i, with no mixing between streams. Its energy share on the CRT set is 0.620.62 to 0.810.81 at p=127p = 127 and 0.690.69 to 0.890.89 at p=131p = 131, depending on how the energy splits among the streams. The models give 0.680.68 to 0.720.72 and 0.720.72 to 0.730.73. At p=83p = 83, the mod-41 stream alone gives 0.800.80; the models give 0.790.79 to 0.810.81. So the models put as much energy on the bands as a perfectly separated output would. To your second question: yes, the CRT bands are exactly the single-component characters, and the model computes on them.

  2. WEW_E under natural order: We thank the reviewer for this suggestion. WEW_E is "bilingual": it carries the CRT bands in both orders, with prominence 1.61.6 to 2.62.6 in discrete-log order (serving aa) and 1.41.4 to 2.72.7 in natural order (serving bb). WUW_U carries them in discrete-log order only (2.02.0 to 5.45.4, against 0.90.9 to 1.01.0 in natural order). The two orders coexist because each neuron reads them separately: its aa-side concentrates on the bands in discrete-log order and its bb-side in natural order (median CRT share 0.950.95 to 1.001.00; §5.4, Fig. 3, App. O, Table 12). The "multiplicative basis" claim is removed.

  3. Zeroing the MLP: With the MLP zeroed, A2A_2 is 0.780.78 to 0.930.93 at p=127p = 127 and 131131, and 0.620.62 to 0.740.74 at p=83p = 83, against a baseline of 0.750.75 (App. L, Fig. 18). Both parities are linearly readable before the MLP, and their AND is linearly separable (App. J). So the unembedding reads part of the parity from the attention and skip path, and the MLP completes it to 1.0001.000. With the MLP zeroed, the other residues stay at most 0.110.11 above their baselines, except mod 5 at p=131p = 131 seeds 67 and 69 (0.540.54 and 0.500.50, against 0.360.36). These are the two seeds where the mod-5 band resists ablation (App. Q). With F2F_2 ablated, nothing offsets the other streams' push toward even candidates (0.920.92 to 1.001.00 of inputs; App. M). So A2A_2 lands on the share of even answers, 0.7500.750: it reflects the remaining MLP content, not only lost information.

Reviewer_fdpeOpenReview ↗
Rating
3(+1)
Confidence
3
Informativeness
3
Presentation
3
Soundness
2
Read review
Paper summary

The paper claims that 1-layer transformers learn the Chinese Remainder Theorem in order to fit modular exponentiation datasets, abmod  pa^b \mod p. A key insight follows from reindexing the token basis via the discrete logarithm, a group isomorphism to mod (p -1) instead of mod p. Under this view, primitive roots of (p-1) are shown to be learned in order to represent the data as gγg^\gamma, with γ=log⁡g(a)⋅bmod  (p−1)\gamma = \log_g(a)\cdot b \mod (p-1) and the Chinese Remainder Theorem then decomposes this product via the prime factors of (p-1). This is backed via linear probe inspections of the network and ablations and some causal tests.

Critical strengths
  1. This paper inspects an appealing modular task, modular exponentiation, which is an Abelian group with significantly different characteristics to modular addition and other abelian groups that have been studied.
  2. The main result could be an interesting addition to the existing literature on how DNNs and transformers learn group-theoretic datasets.
Critical weaknesses
  1. Related to strength 2. above: this paper only cites 10 papers from the existing literature, which is substantially more vast, and thus, fails to sell itself on why it is an important contribution and an interesting problem to study. It thus not only fails to sell its importance, but also fails to provide a constructive discussion on how the results and observations of the work fit into the overall picture being established by the literature studying and interpreting networks trained on related tasks (both modular tasks and group datasets (both Abelian and non-abelian)). I suggest rewriting both the related work section, and the discussion.

i) the core literature on modular addition should all be cited. Some of this is cited, e.g. Nanda et al, Chughtai et al, Nguyen et al, Power et al and Zhong et al. Noteably, it is missing citations to

i) papers that made progress on modular addition

Gromov (https://arxiv.org/abs/2301.02679)

Morwani et al (https://arxiv.org/abs/2311.07568)

Mohamadi et al (https://arxiv.org/abs/2407.12332)

Moisescu-Pareja et al (https://arxiv.org/abs/2512.25060)

  • other stuff

ii) the core literature on neural networks learning group tasks, as well as other modular tasks should be cited, while stander et al and chughtai et al are cited, the paper misses:

Kvinge et al (https://openreview.net/forum?id=74Xpma3Lha) [groups]

Wu et al (https://arxiv.org/abs/2410.07476) [groups]

Doshi et al (https://arxiv.org/abs/2406.03495) [modular polynomials]

iii) critically, work interpreting both abelian (and non abelian) groups and finding networks learn the chinese remainder theorem across these group tasks (which are different to your task) should be cited:

McCracken et al (https://proceedings.mlr.press/v321/mccracken26a.html) [networks trained on other abelian groups (elementary p groups, homocyclic groups, possibly a third type of abelian group) learn the multidimensional Chinese Remainder theorem]

Wei et al (https://openreview.net/forum?id=hFmWsd2m6w) networks learning a non-abelian group, dihedral groups, learn a chinese remainder-like algorithm

Hilgert et al (https://openreview.net/pdf?id=2DHyXOmR9I) non-abelian group, coset schier graphs are learned (still satisfies a Chinese remainder-like algorithm intersecting cosets despite being on alternating groups which arent cyclic at all)

Many of these papers were accepted at conferences (some weren't despite being high impact e.g. Gromov above), and when citing them you should find the correct citation to reference them with, e.g. whatever conference they were in, and not just the arxiv links or whatever I quickly collected above. I am also certain that I missed some papers, so I would suggest reading the related work sections in some of the papers above. Do not trust an LLM to handle the citations for you, it will hallucinate something and give you a fake citation.

This leads to weaknesses 2 and 3, which can be resolved by utilizing some experimental ideas other work in the literature on group tasks has used to make their claims convincing and show that they're robust.

  1. I think the work lacks sufficient quantitative tests to convince a reader that its claims are broad, and robust under different training settings and over enough seeds. i) few seeds tested ii) few primes tested, no composite numbers tested iii) only one set of training hyper parameters tested (weight decay x learning rate), which are the same for all primes tested. I would like to see additional combinations, if training is a bottleneck, it is fine to train with more data on group tasks so that the networks generalize earlier, e.g. use an 80%/20% train/test split. iv) a 1-layer MLP, or at least transformer with linear attention (which is basically equivalent) could be inspected since it likely learns the same thing. v) different widths (larger) vi) R^2 fits through the preactivations of a neuron, what has it learned? See e.g. Gromov's Figure 2, which shows qualitatively that for modular addition, the learned preactivations are sin(fa +phi_a) + sin(fb +phi_b) with some frequency f and different phase shifts phi_ a and phi_b. Naturally, it is better to fit this quantitatively and report the quality of the fit, but I think it would greatly strengthen the paper to include some neuron preactivation plots, as well as fit them. Since this is an abelian group, I think it should certainly be possible to do this.

  2. The claim that transformers are learning the Chinese Remainder Theorem is a global claim and I do not believe the experiments performed are fully sufficient to argue that networks have implemented a global algorithmic strategy. i) since it is a 1 layer network, and the primary experimental evidence comes from linear probing at the logits and the network was trained to successful generalization, the neural representations at the logits obviously hold the computational answer. But by the Chinese Remainder Theorem, that answer could be broken down into the prime factors (it is equivalent and bidirectional; i.e. it is iff). So I am not fully convinced linear probing can show that the Chinese remainder theorem has been learned here. Thus, I suggest a few additional experiments that are simple and would resolve other questions I had while reading the paper anyway (like e.g. what do the preactivations of different neurons look like, do they align with the frequencies found by your linear probes? If yes, then are the neurons superimposing different frequencies, or are they just learning a single one (your paper claims the CRT streams are independent, so this does need to be checked). Furthermore, this leads to: what do the manifolds corresponding to neural representations look like? The neural representations here should be (I guess) just the independent CRT streams, which if they are truly independent, should be very easy to pull out and analyze with PCA using the methods in papers above). To be explicit:

The paper talks at length about how neurons are learning sinusoidal functions with different frequencies, and indeed, all prior work on networks learning various (but different) abelian groups has found neurons to be sinusoidal (Gromov, Morwani et al, Mohamadi et al above on modular addition, and McCracken et al on other abelian groups above). I would like to see plots of neuron preactivations, showing individual neurons are sinusoidal and R^2 fits confirming they're sinusoidal quantitatively. I would also like to see all neurons with the same sinusoidal frequency grouped together into a preactivation matrix like Moisescu et al performs (the manifolds of modular addition paper), and some PCAs of these matrices shown. How many principal components are needed (likely either 2 or 4, the PCA will tell you), and what is the qualitative geometry/shape of the manifold, e.g. torus or disc, or something else (plotting the dataset on the first three principal components should show you)? If you can show the neurons that learned the same frequency sinusoidal functions, when grouped in this way, span a full preactivation manifold for each chinese remainder theorem stream or component (as they're called by the paper) this would provide constructive evidence that directly shows that the CRT is being learned and used by the network to compute the answer to the modular exponentiation task. The manifolds may not be tori or discs, I don't know what you will find, since this dataset is different to modular addition. Overall, these experiments would pair nicely with the current experiments and fully convince me that the network has learned the CRT (as long as something weird doesn't happen, but that's also why I'm asking for these experiments, to convince me of your claims)

  1. The discussion and conclusion section for the paper is basically one paragraph + a limitations paragraph. I suggest summarizing the results and how they relate to the other papers that found the chinese remainder theorem to be learned and making it clear and concise how your results fit into the literature and explain clearly how the results build on and agree with or disagree with what's currently known on similar tasks. I think this would be a good place to talk about the group isomorphism from mod p to mod q that you rely on, and if you inspect the neural representations as I suggested above, you can contrast how they may be different (or the same) when training on this task.

  2. The experimental section is in the appendix A, this needs to be in the main paper. Otherwise the reader is not told clearly what the experimental setup is, and that is a fundamental flaw.

Overall, I think the idea is good and I like the result (that the networks learn an efficient divide and conquer strategy to solve this task, and I like that the different branches in that recursion can be explicitly pointed to (these are your CRT streams, which you claim are independent)). I think it will fit into the literature nicely if more experiments are added and the story is made more broad over more training parameters, and etc. I think this research is worthy of being published at ICLR/NeurIPS/ICML, but I do think it needs to argue more quantitatively and also with more experiments over more settings, especially because you are just looking at 1 hidden layer networks. In this limited case, I would really hope for no questions about what's being learned to be left open, because I don't think there should be multiple papers interpreting the same task for 1-layer networks.

Questions for authors

Basically just my suggestions above for how I think this paper could bring itself to completion. I am very curious about the neural representations and what PCAs of them look like, if they can be obtained, as well as what happens when the original modulus is a composite number (not a prime).

Depth would be nice, but I understand it could be difficult, as the paper currently states about the 2 hidden layer case. It could be the case that when inspecting neural representations via PCA the depth case becomes much easier to handle however (I genuinely don't know, but it could be worth looking at during this review period).

Overall I'd be willing to increase my score, perhaps significantly, based on the rebuttal, but the current version of the paper leaves a significant amount of additions to be desired.

In case you are time constrained in rebuttals, the experiments I very much would like to see are both qualitative and quantitative preactivations of the neurons, and PCAs of the preactivation manifolds corresponding to the neural representations, which should be groups of neurons that are independently in each CRT stream without superposition if your claims hold up. Otherwise, I'm left with questions like where are the bands; Are the bands distributed across many neurons that collaborate with the same frequency or one neuron or what? Are the bands going to nicely show up in the neural representations corresponding to their CRT stream? Etc.

Other than this, there is a lot of stuff that I suggested to make your arguments robust, but it is lower priority (e.g. try other hyperparameters) and needs to be done to show this isn't only learned with those exact hyperparameters, etc.

I look forward to continued discussion and seeing what other reviewers had to say.

5 comments

We thank reviewer fdpe for the very constructive feedback. We appreciate that you find the topic and result interesting. We will refer to data from our latest revision. We will address your concerns below:


W1. Related work and discussion

this paper only cites 10 papers ... I suggest rewriting both the related work section, and the discussion.

Citations: We have carefully checked these sources and have cited them properly in this new revision. Many of them helped us extend our experiments. §2 Related Work now highlights the delta more clearly. App. A discusses each work in more detail. §9 Discussion is now centered on the isomorphisms.

W2. Robustness

i) few seeds ii) few primes, no composite numbers iii) one set of hyperparameters iv) MLP/linear attention v) widths vi) R^2 fits

Seed (i) & primes (ii): We extended our tests to cover 4040 1-layer runs over 9 primes, 25 grokked (Table 2). Full analysis on 3 primes × 3 seeds, plus p=113p = 113 (filtration), p=211p = 211 (4 seeds, four streams, App. P) and p=397p = 397 (two prime powers, App. S).

Composite number (ii): We have reasons to believe that composite number moduli will not be supported by our framework. This is based on Chen et al. [1], who found monoids in modular multiplication with a composite modulus. Therefore, we never chased this direction.

Hyperparameters & MLP/linear attention (iii & iv): Due to time constraints, we could not pursue this. This is stated in the §9 Limitations.

Widths (v): nine half-width runs (d=256d = 256, same recipe); 5 grokked; every test holds in all five (App. P, Table 15): ablating a band takes its own decode to baseline, other decodes ≥0.994\geq 0.994, patching 0.950.95 to 1.001.00. Larger widths are not tested.

R^2 fits: see W3

W3. Is the CRT really learned? Neurons, R², PCA

I would like to see plots of neuron preactivations ... R^2 fits ... grouped together into a preactivation matrix like Moisescu et al ... How many principal components ... torus or disc

We thank the reviewer for these suggestions. A new §6, Inside a stream, is dedicated to neurons and tori.

Neuron plots: Fig. 6 shows a mod-2 neuron, and Figs. 28-29 show mod-7 and mod-13 neurons. They all have a distinctive plaid pattern when aa is reindexed to α\alpha, the axes are ordered by the stream logarithm, and the inputs are grouped by residue mod mm.

Superposition / independence: Each neuron belongs to one stream. CRT bands hold 0.960.96 to 1.001.00 of the neurons' spectral energy (untrained: 0.120.12 to 0.510.51); a neuron's α\alpha part and bb part pick the same stream for 0.860.86 to 1.001.00 (§6.2).

R²: Gromov's template [2] returns in the stream logarithm LL (Eq. 7). Single-harmonic median R2≥0.88R^2 \geq 0.88 in 8 of 12 prime streams, up to 0.990.99; untrained ≤0.10\leq 0.10 (§6.2, Table 19).

PCA (Moisescu-Pareja et al. [3]): Neurons of one stream and one harmonic span rank 4. At p=83p = 83, five of six clusters need exactly 4 PCs to explain 99% of their variance; the torus fit gives R2≥0.999R^2 \geq 0.999; operand planes 75∘75^\circ to 87∘87^\circ apart (torus); a few clusters are discs (planes coincide) (Fig. 7, Table 20).

Persistent homology: Betti (1,2,1)(1, 2, 1) on the four dense p=83p = 83 tori (§6.3, Table 20).

Torus rotation causal test (new): We rotate one operand's circle on its torus; the answer moves as the stream's product predicts (0.970.97 to 1.001.00); turning the two operands in opposite directions leaves it unchanged (0.910.91 to 1.001.00); controls ≤0.03\leq 0.03 (§6.4, App. V).

Probing caveat ("iff"): We fully agree that probes cannot show mechanism. The claim rests on the causal tests (§5.5), the new torus rotation test (§6.4) and the logit-level swaps (App. M).

W4. Discussion

  • §9 Discussion now provides a fuller summary and is centered on the three isomorphisms (log, CRT, stream log).
  • Where we agree with prior work: In the stream logarithm, a prime stream computes like modular addition. Each neuron carries one frequency, as Gromov [2] and Morwani et al. [4] find (§6.2). Each harmonic cluster is a torus or a disc, as Moisescu-Pareja et al. [3] predict (§6.3). Each stream reads out as a Clock (Zhong et al. [5]; App. K). The split by the CRT matches the per-prime factoring that McCracken et al. [6, 7] find in modular addition.
  • Where we differ: The CRT acts in the exponent ring Z/qZ\mathbb{Z}/q\mathbb{Z}, which the model reaches through the discrete logarithm. Each stream computes a product, which the stream logarithm turns into a sum. Prime-power streams follow the order filtration (§7), while He et al. [8] predict no preference by order.

W5. Setup in the main text

  • New §4 (Setup), full details in App. B, every run in Table 2.

Questions:

We hope that the answers above could bring the paper "itself to completion". One question left is the 2-layer case:

2-layer models: 3 models (weight decay 2.0, 45% split) reach 100%. Testing the CRT bands at layer 0's MLP output at the bb position: p=67p = 67 fits (ablation and patching behave as in one layer, probes after layer 0 read 0.860.86 to 1.001.00); p=41p = 41 partly (probes 0.870.87 to 0.920.92, the control band also matters); p=59p = 59 forms the product elsewhere (its layer-1 heads read aa). Layer 1's MLP is also necessary in all three. We did not find a unified story to describe this.

AuthorsOpenReview ↗

References

[1] Zitong Andrew Chen, Junaid Hasan, Akhil Srinivasan, Hemkesh Bandi, Jarod Alper. Multiplication Beyond Groups: Stratified Fourier Mechanisms in Transformer Circuits. Mechanistic Interpretability Workshop at ICML 2026 (spotlight). https://openreview.net/forum?id=26C2wzldtJ

[2] Andrey Gromov. Grokking Modular Arithmetic. arXiv:2301.02679, 2023. https://arxiv.org/abs/2301.02679

[3] Gabriela Moisescu-Pareja, Gavin McCracken, Harley Wiltzer, Colin Daniels, Vincent Létourneau, Doina Precup, Jonathan Love. On the Geometry and Topology of Representations: The Manifolds of Modular Addition. ICLR 2026. https://openreview.net/forum?id=2olkCiSELH

[4] Depen Morwani, Benjamin L. Edelman, Costin-Andrei Oncescu, Rosie Zhao, Sham Kakade. Feature Emergence via Margin Maximization: Case Studies in Algebraic Tasks. ICLR 2024. https://arxiv.org/abs/2311.07568

[5] Ziqian Zhong, Ziming Liu, Max Tegmark, Jacob Andreas. The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networks. NeurIPS 2023.

[6] Gavin McCracken, Gabriela Moisescu-Pareja, Vincent Letourneau, Doina Precup, Jonathan Love. Uncovering a Universal Abstract Algorithm for Modular Addition in Neural Networks. NeurIPS 2025.

[7] Gavin McCracken, Arthur Ayestas Hilgert, Sihui Wei, Gabriela Moisescu-Pareja, Zhaoyue Wang, Jonathan Love. Interpreting Deep Neural Networks Trained on Elementary p Groups Reveals Algorithmic Structure. TAG-DS 2025, PMLR 321:389-402, 2026. https://proceedings.mlr.press/v321/mccracken26a.html

[8] Jianliang He, Leda Wang, Fengzhuo Zhang, Siyu Chen, Zhuoran Yang. Neural Networks Provably Learn Spectral Representations for Group Composition. arXiv:2606.02993, 2026. https://arxiv.org/abs/2606.02993

Comments on the paper

1 comment
AuthorsOpenReview ↗

To all Reviewers

We thank all reviewers for their efforts and very constructive feedback. Many of those have helped extend our experiments both qualitatively and quantitatively. We have uploaded the revised paper. Here is the summary of the main changes:

All code and models for the rebuttal can be found using the same link provided in the Reproducibility Statement section.

  • Inside the MLP (fdpe, 8jNF): A new §6 Inside a stream is dedicated to investigating the MLP's neurons.
    • Each neuron belongs to one CRT stream and is one harmonic of the stream logarithm (R2R^2 fits, §6.2).
    • PCA and persistent homology show that neurons that share a harmonic form a torus.
    • A new causal test rotates the torus on each circle's plane, showing each circle represents an operand and the stream's product moves correspondingly.
  • Recombination at the logits (8jNF): A new App. M assesses the logit output of each stream. Swapping one stream's neurons' activations from another input results in the CRT composite of the 2 answers.
  • Controls (8jNF, 7DAN): New App. O adds:
    • A size-matched null for the prominence and both token orders for WEW_E and WUW_U.
    • The competing implementation (α+b) mod m(\alpha + b) \bmod m.
  • More primes and models (fdpe, 7DAN): Table 2 lists all 4040 runs over 9 primes; 2525 grokked. New appendices assess more models:
    • p=211p = 211 with 4 CRT streams (App. P)
    • Half-width models, dmodel=256d_{\text{model}} = 256 (App. P)
    • p=397p = 397 with two prime-power streams (App. S)
  • Training dynamics (8jNF): The bands are absent at initialization and appear by epoch 100100; grokking amplifies them (§8, Table 18).
  • Setup (fdpe, 7DAN): Now in the main text (§4), with full details in App. B and every measurement defined in App. D.
  • Related work and discussion (fdpe, 8jNF, 7DAN):
    • §2 Related Work and §9 Discussion are rewritten.
    • App. A discusses each work.
    • The number of cited works has increased from 10 to 34.
    • Doshi et al. are credited for the discrete-log reindexing.
  • Presentation (7DAN): §3 is trimmed, and the notation is fixed.

We appreciate that you find the problem and result interesting. We decided to pursue this problem because we believed that the models have learned interpretable algorithms when they grokked. Your feedback has helped us push this effort further.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.