- Rating
- 5
- Clarity
- 4
- Confidence
- 3
- Originality
- 2
- Quality
- 4
- Significance
- 3
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
- Do you think that a larger or smaller model would still learn a shared addition mechanism for both variables and constants?
- 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.
- Could you help me understand the reasoning behind Theorem 7.1 a little bit more? (Regarding my first weakness).
Limitations
Yes.
Paper formatting concerns
None
Final justification
I maintain my positive score after discussion with the authors and reading other reviews.
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 dmodel to 256) we recover a shared representation before MLP2 (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 ± 0.13% accuracy before MLP2, compared with 99.16 ± 0.59% after MLP2. 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.