potentialpaper

Assign and Add: A Mechanistic Study of Compositional Arithmetic

Brady Exoo, Alberto Bietti, John Sous

Mech Interp @ ICML 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Modern large language models are able to compose skills in order to perform complex tasks, many of which might not have been seen during training. The details of how exactly this composition occurs remain elusive. In this paper, we study a mechanism for compositional generalization in transformers by considering a simple controlled setting involving variable assignment and modular addition. By partitioning our training data into disjoint sets, we observe that small transformers are able to generalize to previously unseen combinations of variables and numbers. Our mechanistic analysis shows that the same ``modular addition'' MLP module is used whether the inputs are given directly or indirectly through a separate variable assignment mechanism. We also analyze the training dynamics from an empirical lens, which reveals three phases of learning: first, modular addition is learned, then the structure required for variable assignment, and finally a refinement phase where the model generalizes to sequences not seen in training. Finally, we provide a theoretical framework to explain how compositionality emerges from training dynamics. These results suggest that compositional generalization can be a natural consequence of the compositionality of internal mechanisms in transformers.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

FromAToBDateVersionSubmitted toPDFEvidence
5 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]—[1]
7 May 2026Mech Interp @ ICML 2026submittedMech Interp @ ICML 2026Accepted—[1]
Their titles, abstracts and, where both have a PDF, the text.Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:45 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

The paper explores an important emerging ability of transformers: variable binding and compositionality in simple mathematical operations (+). Variable binding is a missing capability of transformers and, more generally, of neural networks. Hence, from this perspective, the study is extremely important.

The paper is an important observational study that aims to show the emerging ability of simple transformers, and it is in line with the Grokking studies of Gromov. There are some issues to be fixed :

  1. Understanding the stability of the results: single run vs. multiple runs with multiple initializations (Reviewers UJZo, wXje). Here showing some of the experiments the authors did with different initializations may be a plus.
  2. The mechanistic evidence is still largely correlational and lacks stronger causal intervention (Reviewer wXje). Read the comment carefully and try to defend your position.
  3. The most positive supporter of the paper asks: "Could you help me understand the reasoning behind Theorem 7.1 a little bit more?" (Reviewer 8rzU)

The AC has a major concern instead: what is the inner mechanism that guarantees variable binding? If this is shown, this paper can be a major breakthrough. In the other case, it will be simply another observational study.

Final justification

The paper has gained three positive reviews.

Area Chair ueHd · Meta-reviewOpenReview ↗
Final justification
The paper has gained three positive reviews.
Read meta-review
Meta-review

The paper explores an important emerging ability of transformers: variable binding and compositionality in simple mathematical operations (+). Variable binding is a missing capability of transformers and, more generally, of neural networks. Hence, from this perspective, the study is extremely important.

The paper is an important observational study that aims to show the emerging ability of simple transformers, and it is in line with the Grokking studies of Gromov. There are some issues to be fixed :

  1. Understanding the stability of the results: single run vs. multiple runs with multiple initializations (Reviewers UJZo, wXje). Here showing some of the experiments the authors did with different initializations may be a plus.
  2. The mechanistic evidence is still largely correlational and lacks stronger causal intervention (Reviewer wXje). Read the comment carefully and try to defend your position.
  3. The most positive supporter of the paper asks: "Could you help me understand the reasoning behind Theorem 7.1 a little bit more?" (Reviewer 8rzU)

The AC has a major concern instead: what is the inner mechanism that guarantees variable binding? If this is shown, this paper can be a major breakthrough. In the other case, it will be simply another observational study.

1 comment
Authors · CommentOpenReview ↗

Thank you for your guidance in identifying the primary concerns for this discussion period. We have now responded to all reviewer comments. In particular, the stability of our results is addressed in our response to Reviewer UJZo's Q2 and Q3, and Reviewer wXje's W4. The stronger causal intervention experiments are presented in our response to Reviewer wXje's Q2, and we explain Theorem 7.1 in more detail in our response to Reviewer 8rzU's Q3.

We thank the AC also for emphasizing the need to understand the inner mechanism guaranteeing variable binding. We interpret this as asking what enables the model to retrieve the correct assigned value for every variable–constant pairing. In our setting, this is accomplished through the modified induction head, using the layer 1 attention QK and OV matrices. This circuit allows the model to generalize to even unseen variable positions. In this work, we study how this circuit emerges in our specific setup, but we agree that in real LLMs, this is a more complex question and an interesting area of future research that would require understanding the robustness of our circuit in deeper models.

We would be grateful for your thoughts on whether these additions address the main concerns you identified.

Reviewer 8rzUOpenReview ↗
Rating
5/6
Confidence
3/5
Quality
4/4
Clarity
4/4
Significance
3/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The authors study a task where models must compose variable binding with modular arithmetic. After an analysis of the model's training dynamics, they study the mechanisms the final model learned in detail, showing that it uses the same addition mechanism for constants and variables. They then show the development of some of these mechanisms over training and provide a theoretical justification for why models might learn this compositional solution.

Strengths and weaknesses

Strengths:

  • The setup of the model, its training, and hold-outs for evaluation are very meticulous and well-thought out. I like the concept of holding out specific addition pairs, and the Figure 2 results.
  • Figure 3 is a nice experiment that provides a more systematic view on the holding-out of random addition pairs in Figure 2.
  • The analysis of a shared addition mechanism at the MLP is very clean, combining attention analysis with straightforward/intuitive cosine similarity analysis (Figure 4).

Weaknesses:

  • I'm not sure if Theorem 7.1 provides much additional insight into how models learn to generalize to variables after learning addition with constants. If this is focused on the development of the layer 2 QK circuit (getting it to attend to variables, not just constants), then don't the layer 1 heads have to develop previous-token behavior first? If so, how does this theorem explain/predict that? This is largely a lack of understanding of this section on my part.
  • The results of this paper are not particularly surprising given prior literature, and results are on a toy model. However, I think this weakness is outweighed by the fact that the work is thorough, and provides a bit more depth beyond what we already know from prior work.
Questions
  1. Do you think that a larger or smaller model would still learn a shared addition mechanism for both variables and constants?
  2. There are a couple of prior works that may be interesting to you. First, Todd et al. (2025) run similar experiments on in-context algebraic questions, with figures that are similar in flavor to your Figure 2. Second, there is also a recent/concurrent paper on modular addition with a similar take-away result: they find that models re-use the same "addition module" (which is also an MLP) for different formulations of the same task. They include an interesting analysis of the neurons responsible, which I think complements your results nicely. There is also Brinkmann et al. (2024), which discovers induction-like behavior where models use previous-token heads to "load" information into a variable, for it to be copied later. Finally, Yang et al. (2025) find more general induction heads that seem similar to the heads that you describe in the paragraph in line 94.
  3. Could you help me understand the reasoning behind Theorem 7.1 a little bit more? (Regarding my first weakness).
Limitations

Yes.

Final justification

I maintain my positive score after discussion with the authors and reading other reviews.

Formatting concerns

None

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

Thank you for the thoughtful questions and encouraging review of our work; we are glad you found it compelling.

Q1: Larger or smaller model

Thanks for raising this important point. From our experiments, our model was the smallest size that reliably generalized on this task. In particular, we had trouble finding one-layer models that succeeded at this task, while two layers seemed sufficient.

Regarding whether larger models also use a shared addition component, this is a great question. In preliminary experiments, we trained models of up to 10 layers with 8 attention heads, which displayed training patterns similar to Figure 2, although a mechanistic analysis of these models was not performed. For smaller changes (3 layers, re-adding the layer-1 MLP, increasing dmodeld_{\text{model}} to 256) we recover a shared representation before MLP2\text{MLP}_2 (Figure 4). Furthermore, we find that, for the architectural variants of the model, linear probes trained identically to those discussed in Section 5.1 achieve only 0.16 ±\pm 0.13% accuracy before MLP2\text{MLP}_2, compared with 99.16 ±\pm 0.59% after MLP2\text{MLP}_2. Together, these findings suggest a shared addition module in all models.

Q2: Other papers

Many thanks for the suggested references, those indeed seem very related to our work, and we will make sure to include them in the final revision.

Q3: Theorem 7.1

Our goal was primarily to show that gradient dynamics in a transformer can lead to composition of different modules that are already in-place, making it easier to learn complex mechanisms by "stitching" simpler ones together using a form of curriculum learning (see also our response to reviewer wXje, W5).

One other thing to note which we haven't highlighted in the analysis but is an easy extension: even if the gradient step is taken on data that only involves a subset of numbers in the assignments, the same result holds, i.e., variable binding will still work even on held-out numbers. This highlights the data-efficiency of learning by composition.

The assumption that the previous-token behavior at the first layer is already in place was mainly a simplification for the analysis, since it is somewhat orthogonal to the question of compositionality we study here. We also note that previous works on induction heads have studied the emergence of such a previous-token behavior, so we expect a similar analysis could work here as well. In real LLM training, such a previous-token mechanism may be even easier to learn early in training given its prevalent use in very basic language tasks such as trigram modeling.

Thank you again for your encouraging review and helpful references. We hope that these responses have clarified your questions about different model sizes and Theorem 7.1. Please let us know if you have any further questions, clarifications, or issues during the discussion phase.

Reviewer 8rzU · CommentOpenReview ↗

Thank you so much for the thoughtful reply, and sharing your observations about larger and smaller models! Good luck in the discussion phase, I will maintain my positive score.

Reviewer wXjeOpenReview ↗
Rating
4/6
Confidence
4/5
Quality
4/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper studies how small Transformers compose variable-assignment mechanisms with modular-addition mechanisms in a controlled synthetic setting. The task requires the model to process sequences containing variable assignments and addition modulo 59: the model must first retrieve the value assigned to a variable from the context and then perform the corresponding modular addition.

The authors construct held-out addition pairs and held-out variable positions to evaluate whether the model generalizes to combinations not seen during training. They then conduct a mechanistic analysis of a trained 2-layer single-head Transformer. Their main interpretation is that the model first learns a reusable modular-addition MLP/Fourier circuit, and then uses a modified induction-head-like attention routing mechanism to feed the values assigned to variables into this arithmetic module.

The paper also analyzes the training dynamics, showing that modular addition is learned before variable assignment and that later training stages refine the routing mechanism for harder variable-position cases. Finally, the authors provide a simplified theoretical analysis suggesting why gradients on one-variable examples can encourage the second-layer QK matrix to develop a variable-identity matching structure.

Strengths and weaknesses

Strength

  1. The problem setup is clear and well controlled. The authors choose two substantially different mechanisms—variable assignment and modular addition and design a synthetic setting that is amenable to mechanistic analysis. This allows the paper to go beyond black-box evaluation and examine how a Transformer internally composes these two mechanisms.

  2. Mechanistic analysis is fairly systematic. The paper does not only report accuracy, but also analyzes attention patterns, QK/OV matrices, residual-stream similarity, an isolated OV-MLP circuit, linear probes, and Fourier features. Together, these analyses support a coherent mechanistic account: the variable-binding mechanism retrieves the values assigned to variables, while the second-layer MLP/Fourier circuit performs modular addition.

  3. The analysis of training dynamics is valuable. The paper shows that the model does not learn the whole task at once; rather, it first learns 0-variable modular addition, then learns variable binding/routing, and finally corrects difficult var-restricted cases. This staged learning process provides useful insight into how skill composition can emerge in small Transformers.

  4. The theoretical analysis is connected to the empirical observations. Although simplified and not fully rigorous, the theory attempts to explain why, once a modular-addition module is already present, gradients on 1-variable examples can induce the second-layer QK matrix to form a variable-identity matching structure. This strengthens the paper’s mechanistic interpretation.

Weaknesses

  1. The organization and presentation of the paper could be improved. The Related Work section is rather brief and does not sufficiently position the paper with respect to prior work on compositional generalization, variable binding, grokking, and mechanistic interpretability. In contrast, Section 2 spends too much space introducing basic Transformer architecture. It would be more helpful to move the background on induction heads and modular addition earlier, either into the Introduction or Related Work. In addition, Figure 2 is difficult to read because several curves overlap, especially the 2-var var-restricted curves, which makes the results less clear.

  2. The compositional generalization setting is limited. The current OOD evaluations mainly involve changes in variable positions and held-out addition pairs, while the underlying task remains binary modular addition with a fixed modulus, fixed number domain, fixed variable set, and fixed sequence length. In essence, the task tests change in the form of the addition expression rather than generalization to a different underlying reasoning structure. The experiments convincingly show that, in this controlled modular-addition task, Transformers can combine a variable-binding mechanism with a modular-addition mechanism and remain stable under limited formal variations. However, the evidence is limited for broader compositional generalization, such as transfer to new number domains, new variable sets, longer sequences, or more complex combinations.

  3. The mechanistic evidence is still largely correlational and lacks stronger causal intervention. The attention/QK heatmaps, residual similarity, and circuit-level analyses support the proposed mechanism, but they do not fully establish that the model actually relies on these paths. To strengthen the claim, the authors should consider more direct causal interventions, such as attention ablation, activation patching, path patching, replacing assigned variable values and observing the output change, or retaining only the claimed circuit and systematically testing performance.

  4. The empirical robustness and statistical evidence are limited. The main analysis is based primarily on one training run, with only one additional initialization reported in the appendix. For claims about training spikes, hard-variable effects, and data-threshold phenomena, the paper currently lacks multi-seed statistics, error bars, or confidence intervals. Since these dynamics and mechanistic findings may be sensitive to initialization, data sampling, held-out splits, and hyperparameters, this weakens the robustness of the empirical conclusions.

  5. The theoretical analysis is insightful but limited in scope. It assumes that the first-layer variable-assignment mechanism and the modular-addition MLP are already in place, and it relies on simplifying conditions such as orthogonal/disentangled embeddings and approximately uniform initial predictions. As a result, the theory is better understood as explaining how existing modules can become connected, rather than as a full account of how the compositional mechanism emerges from random initialization.

Questions
  1. The paper states that approximately 30% of the addition pairs are removed. Were these pairs removed randomly? Was a fixed random seed used? Are the results stable across different held-out splits? In addition, is the training data the full legal sequence space satisfying both the addition-pair restriction and the variable-position restriction, or is it dynamically sampled from this space? What are the sizes of the training and evaluation subsets?

  2. The current mechanistic explanation mainly relies on attention patterns, QK scores, residual similarity, and OV-MLP circuit analysis. Have the authors performed more direct causal validations, such as path patching, attention-edge ablation, OV-output ablation, or disrupting the variable-identity block and measuring the resulting performance drop? Without such interventions, are the current analyses sufficient to establish that the proposed circuit is necessary for the final output?

  3. The paper evaluates add-restricted and var-restricted generalization separately. Has the intersectional OOD setting been tested, where the variable position is unseen and the underlying addition pair is also held out? If performance drops under this combined OOD setting, should the claim about compositional generalization be narrowed?

  4. What explains the thresholds f≳0.25f \gtrsim 0.25 and r≳0.2r \gtrsim 0.2 in Figure 3? Are they determined by the sample complexity of the Fourier-feature addition module, the coverage required for variable routing, optimization dynamics, model size, or specific hyperparameter choices? Are these thresholds stable across different random seeds, held-out splits, moduli, or model widths?

Limitations

No. Although the authors briefly acknowledge that the paper studies a simplified task and a small model, the limitations discussion is still insufficient.

The paper should more clearly restrict its compositional generalization claims to a fixed modulus, fixed variable set, fixed sequence length, and fixed binary modular-addition task. The current OOD evaluations mainly involve changes in variable positions and held-out addition pairs, which are not sufficient to support broad extrapolation to general mathematical reasoning or more complex compositional generalization.

In addition, the authors should further clarify the limitations of their mechanistic evidence. The attention/QK analyses, residual similarity results, and OV-MLP circuit analysis still lack stronger causal intervention. The empirical robustness is also limited: the main results rely on only a small number of training runs and lack multi-seed results, error bars, and stability analyses across different splits.

Finally, the theoretical analysis relies on strong simplifying assumptions and is better understood as an explanatory analysis rather than a full theory of training dynamics. Addressing these limitations would make the scope of the paper’s contributions more precise.

Formatting concerns

no

1 comment
Authors · RebuttalOpenReview ↗
Rebuttal

Thank you for your review, and we appreciate the detailed and constructive feedback. The concerns you raised motivated additional experiments that we believe strengthen the paper.

W1: Organization & presentation

Thank you for the thorough suggestions. We will do our best to incorporate these in the final manuscript, if the paper is accepted.

W2: Weak compositional generalization

We agree that we do not establish compositional generalization across broad changes to sequence length, modulus, or variable set. Rather, our goal is to study in detail the mechanics of compositional generalization. In our case, how a model learns variable binding and modular addition, how these mechanisms are connected in training, and whether they can combine to generalize on out-of-distribution samples. In addition, we do observe generalization to the more difficult intersectional case (see Q3 response below.)

Importantly, even in this simplified setting, models trained mostly on zero- and one-variable examples often fail to generalize to two-variable sequences, demonstrating that the simplicity of this task eases mechanistic analysis, but does not make generalization automatic.

W3: Causal analysis

See Q2 response below.

W4: Robustness study

Thanks for raising this important point. Please see the point "Single-run mechanistic analysis" in our response to reviewer UJZo. In particular, we found that out of 12 training runs with different seeds, all the runs where training succeeds lead to the same findings.

W5: Theoretical analysis

Indeed, our goal was primarily to show that gradient dynamics in a transformer can lead to composition of different modules that are already in-place. This is an instance of "curriculum learning," where complex mechanisms (1-variable addition) can be learned efficiently by relying on pre-existing ones that have been already learned on easier data (0-variable addition).

We agree that a full analysis from initialization could be interesting, however, it would lead to many of the complexities from deep learning theory that are beyond the scope of this study and would unnecessarily make the analysis much longer and less readable. In fact, many of these aspects have already been studied before in isolation, e.g.: modular addition, previous-token heads, non-orthogonal embeddings.

Q1: Addition Pairs

Addition pairs are removed based off a fixed random seed. In the new experiments described in other responses, we vary this seed alongside the model initialization. We partition tuples that determine the variables, constants, and sequence type into training and test sets based off the rules described in the Data Distribution paragraph of Section 3. Training sequences are then dynamically generated using the tuples in this space with additional padding and distractor assignments during training.

Specifically, 102,312 tuples satisfy both criteria to be in the training set, whereas 64,776 tuples remain in one or more of the evaluation sets. Each evaluation set uses a fixed pool of 2,000 sequences for evaluation.

Q2: Causal interventions

Thank you for this comment. While we believe that our analysis in Section 5 provides good causal support for the modular addition component, we agree that the variable binding mechanism could benefit from a stronger interventional analysis. In order to address this, we ran two additional experiments to provide more causal support for our proposed circuits.

Consider the "clean" prompt a 7 ; b 2 ; + a 18 = (25)\texttt{a 7 ; b 2 ; + a 18 = (25)} and the "dirty" prompt b 7 ; a 2 ; + b 18 = (25)\texttt{b 7 ; a 2 ; + b 18 = (25)}. For the clean prompt, the model should use the value 7\texttt{7} associated with a\texttt{a}, giving 7+18=257+18=25. According to our proposed circuit, replacing the internal representation of 7\texttt{7} with the representation in the "dirty" prompt such that 7\texttt{7} is associated with b\texttt{b} and 2\texttt{2} is associated with a\texttt{a} should lead to the model outputting 2+18=202+18=20. Then replacing the representation at =\texttt{=} should make the model once again output 2525.

We then perform the 6 following activation patching experiments across 512 similar prompt pairs per model and 8 models with different random initializations:

  • Replacing the Layer 1 attention output at 7\texttt{7} and 2\texttt{2} (outputs 20 for 99.2% of the pairs)
  • Replacing the Layer 1 attention output at =\texttt{=} (outputs 20 for 90.1% of the pairs).
  • Replacing both of the above Layer 1 attention outputs (outputs 25 for 90.1% of the pairs).
  • Replacing the Layer 2 query vector at =\texttt{=} (outputs 20 for 90.2% of the pairs)
  • Replacing the Layer 2 key vectors at 7\texttt{7} and 2\texttt{2} (outputs 20 for 99.1% of the pairs)
  • Replacing the Layer 2 query and key vectors above (outputs 25 for 90.2% of the pairs)

Thus, changing the internal representations indeed affects the output in the manner that is predicted by our circuit. Specifically, this experiment establishes variable assignment is carried out through matching "variable tags", rather than by looking at specific positions.

To determine the necessity of our claimed circuit, we also tested ablating certain attention edges. Target accuracy represents the accuracy when the variable in the removed edge is involved in the addition, and control accuracy represents the accuracy when the corresponding variable is not involved in the addition.

Removed attention edge Target accuracy Control accuracy
Assigned constant →\to preceding variable (Layer 1) $23.5 % $ $92.2 % $
=→\texttt{=} \to variable in addition (Layer 1) $5.0 % $ $99.0 % $
=→\texttt{=} \to assigned constant (Layer 2) $1.56 % $ $99.3 % $

We believe these experiments provide causal evidence that the proposed circuit is indeed necessary for the output. If accepted, we will incorporate these into the final draft.

Q3: Unseen pairs and variable position

Yes, we tested the model on sequences with both addition pairs and variable sequences that were unseen in the training data. On these sequences, the model discussed in the paper achieves over 99% accuracy.

Q4: Figure 3 threshholds

This is an interesting question, and we agree it deserves further study. Even in simpler settings such as modular addition alone, determining the when and why behind the thresholds for generalization is an important area of research and not well understood. However, our results do show that even the present task proves challenging for the model when only a small fraction of addition pairs or two-variable examples are observed.

Given the time and compute constraints during the rebuttal period, we will do a more extensive analysis of these thresholds across multiple seeds before the final revision.

We hope that the new experiments address your main concerns. Please let us know if there are any clarifications you wish to be made or remaining issues.

Reviewer UJZoOpenReview ↗
Rating
4/6
Confidence
3/5
Quality
3/4
Clarity
2/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper studies how small transformers compose variable assignment (variable binding) with modular addition to achieve compositional generalization. The paper trains a minimal 2-layer, single-head transformer (no layer-1 MLP, no LayerNorm, no biases; dmodel=128d_\mathrm{model} = 128, N=59N = 59, 12 variables) on a synthetic task that composes two well-studied mechanisms: in-context variable binding and modular addition. Operands of a modular-addition query may be given directly as numbers or indirectly through in-context variable assignments. By holding out ~30% of addition pairs and constraining certain variables to certain operand positions, the authors construct OOD test splits and show the model generalizes (>98% across 0/1/2-variable settings).

The mechanistic claims are: (a) a layer-1 previous-token head performs variable binding; (b) a modified layer-2 induction head routes the correct assigned values to the "=" position; (c) the layer-2 MLP computes modular addition through Fourier features and is reused whether operands arrive as numbers or through variable lookup. The paper reports three training phases (addition first, then binding, then a refinement phase that fixes held-out variable positions) and provides a gradient-dynamics theorem showing the layer-2 QK update is dominated by the associative-memory term that enables composition.

Strengths and weaknesses

Strengths

Causal evidence for the central claim. The compositionality claim rests on causal evidence, not just representational similarity. The isolated-subcircuit test — computing WU(MLP2(OV2(a)+OV2(b)))W_U(\mathrm{MLP}_2(\mathrm{OV}_2(a)+\mathrm{OV}_2(b))) directly and recovering 99.94% of full-model accuracy — shows the addition function is actually carried by that path. Two further lines reinforce it: linear probes fail before the MLP and succeed after it, localizing where the nonlinear addition happens; and the pre-MLP residual is close to OV2(a)+OV2(b)\mathrm{OV}_2(a)+\mathrm{OV}_2(b) for matched operands and far from it for mismatched or shuffled ones, supporting operand-format invariance. Together, these triangulate the reused-addition-module conclusion.

Clean task design and a concrete dynamics account. Omitting "=" in assignments, moving "+" before operands to respect causal masking, and inserting random padding to block positional shortcuts make the binding mechanism a genuine requirement of the task, and the ST=SV∩SAS_T = S_V \cap S_A split is a tidy formalization. The three-phase decomposition of training is tied to specific, named progress measures (Appendix B) and to identifiable accuracy spikes, and the late-correction analysis of the "b as second operand" failure (Sec. 6, Fig. 9) explains one specific generalization gap in concrete terms.

Empirical results are supported by theoretical analysis and reproducibility experiments. The gradient-dynamics result (Thm 7.1 / C.1) targets exactly the second-layer QK update the empirical section identifies as the locus of composition, and its initialization assumption is justified against the observed zero-variable mechanism. Hyperparameters, optimizer, weight decay, and data construction are specified in Sec. 3; anonymized code is provided; and an alternate-seed run (Fig. 10) is included.


Weaknesses

Overall, I like this paper's research taste and insights. However, I do have some concerns about the main claim of this paper:

Algorithm identity might be overstated. The main weakness concerns the identity of the learned modular-addition algorithm. The paper claims the model converges to the known Fourier circuitry of Gromov [1] and supports this mainly through a single-neuron match (Neuron 70 against theoretical k=11k=11, Fig. 11). A single-neuron match cannot establish which algorithm the network uses. Zhong et al. [2] show that networks trained on modular addition can implement qualitatively different algorithms — the Clock algorithm, a distinct Pizza algorithm, and more complex non-circular solutions — and that which one emerges depends on the relative strength of the linear layers and the attention outputs, with sharp phase transitions across hyperparameters and initializations and occasional ensembling of several solutions. Clock and Pizza both rest on circular, Fourier-like embeddings; they differ in how those features are combined to read out the answer, not in whether individual neurons look sinusoidal. A near-perfect single-neuron fit is therefore exactly the evidence that work warns is insufficient to distinguish algorithms. That reference is not cited, which is a relevant gap given that the whole downstream-circuit claim is about algorithm identity. The concern is sharpened by the non-standard architecture: since Clock-versus-Pizza selection is governed by the balance of linear and attention strength, the removed layer-1 MLP, absent normalization, and single head place this model at an unexamined point in that phase space, and the paper assumes rather than shows that it lands in the Gromov regime. The existing alternate-seed run (Fig. 10) reproduces only the training-dynamics phases, not the identity of the learned algorithm. To be clear about scope, this undermines a specific secondary claim ("the model implements the known Fourier circuit"), not the paper's main contribution: even if the addition MLP implemented Pizza rather than Clock, the compositionality result — a fixed, reused addition module composed with a binding circuit — would stand, because it rests on the causal subcircuit, probe, and similarity evidence in Sec. 5.1, not on Fig. 11. The fix is to soften "implements the known Fourier circuit" to "is consistent with a Fourier-feature solution" and add the multi-seed check.

Single-run mechanistic analysis and no variability estimates. The mechanistic analysis relies on a single run while the paper claims the findings hold across initializations. The alternate seed (Fig. 10) is reassuring for the phase structure and shows that the hardest variable changes across seeds (b→kb \to k), but the mechanistic conclusions themselves (previous-token binding, induction-head routing, MLP reuse) would be more convincing if verified to recur across several seeds with a quantitative summary. As written, the generality is asserted more than it is shown. Relatedly, several quantitative claims — the f≳0.25f \gtrsim 0.25 and r≳0.2r \gtrsim 0.2 thresholds in Fig. 3, and the 99.6% / 99.4% curated-set figures — would benefit from across-seed variability, since thresholds for grokking-like transitions are known to be seed-sensitive; a few seeds per point with a shaded band would help.

Thin scope discussion and dense presentation. Given the broader framing about mathematical reasoning, a paragraph on which design choices are load-bearing (does the result survive reintroducing the layer-1 MLP or normalization, multiple heads, or larger N?) would help readers calibrate how far the claims extend, and these are the same ablations that bear on the Clock-versus-Pizza question. On presentation, several figures (Figs. 6–9) are dense and rely on small insets and outline-color coding that is hard to read in grayscale; the proof in Appendix C would benefit from a short roadmap sentence before the gradient expansion; and a few progress-measure names differ between the Sec. 6 text and the Appendix B list (for example the qk1/qk0 and attn_l0/attn_l1 indexing), which should be reconciled.

Questions

I believe each concern could be a question. Addressing my main concern (W1) would raise my overall score. Addressing W2 or W3 would raise my clarity or significance score.

Limitations

Yes

Final justification

My major concern has been resolved, hence I raise my score to borderline accept.

Formatting concerns

No major issues.

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

Thank you for the thoughtful review and helpful suggestions. Your comments have helped us identify places where our claims could be made more precise.

Q1: Algorithm identity

Thanks for bringing this up, we had indeed overlooked this point on which specific mechanism is being used for modular addition. We agree that a full understanding is desirable, and will include the clock-vs-pizza reference in the revised paper, as well as appropriate discussion and empirical analysis, if the paper is accepted. From preliminary experiments, we found that our models had distance irrelevance measures in [0.793,0.892][0.793, 0.892] and gradient symmetricities in [0.985,1.000][0.985, 1.000], which does not cleanly identify between Pizza or Clock algorithms. Thus, we will narrow our claim from saying that the model implements the previously identified Fourier circuit to saying that the model uses a Fourier-feature solution.

That said, we would like to note that the specific algorithm being used here is not crucial for studying compositionality, which is focused on how different algorithmic components interact in the transformer, as opposed to the details of each component. Such details have already appeared extensively in previous studies for the modular addition component.

Q2: "Single-run mechanistic analysis and no variability estimates"

We appreciate these suggestions. We agree that our initial submission did not properly study the robustness of our mechanistic analysis to different initializations. Based on your suggestion, we trained 12 additional runs with different model initializations and train-test data splits. Only 7 of these 12 training runs succeeded at reaching over 95% accuracy on sequences requiring variable assignment within 40,000 steps. However, for all of these 7 models, we recover the same results as in Figures 4-7. Furthermore, WU(MLP2(OV2(a)+OV2(b)))W_U(\text{MLP}_2(\text{OV}_2(a) + \text{OV}_2(b))) achieves over 99% accuracy on all 7 models, suggesting that our mechanistic analysis holds across initializations.

With regard to your comments on the thresholds in Figure 3, given the time and compute constraints during the rebuttal period, we will defer a more extensive study of these thresholds across multiple seeds to the final revision, if the paper is accepted.

Q3: "Thin scope discussion and dense presentation"

Thank you for these suggestions. For the architectural variants we tested (re-adding MLP1\text{MLP}_1, increasing to 3 layers, re-adding LayerNorm, and using multiple attention heads), we again observed a shared representation immediately before the final MLP (suggesting a shared addition module), a previous-token head performing variable binding, and the variable-variable identity pattern displayed in Figure 7 in a QK block. We will also revise the mentioned figures and notation to improve readability and consistency throughout the paper.

Many thanks once again for your suggestions and comments. Please let us know if we can provide any further clarifications during the discussion phase, and if there's anything else that would make you consider increasing your score.

Reviewer UJZo · CommentOpenReview ↗

Thank you for your detailed response. My major concern has been resolved. I will raise my score.

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

Missing a submission?

Loading the discussion…