- Rating
- 1
- Confidence
- 3
- Informativeness
- 1
- Presentation
- 3
- Soundness
- 3
Read review
Paper summary
This paper studies how attention maskes can enabled "Generalization on the Unseen (GOTU)" in transformers learning logical functions. Prior theoretical work on GOTU (Abbe et al. 2024) showed that transformers learn a minimum-degree interpolator, a specific inductive bias that determines whether transformers can generalize to unseen inputs when learning logical functions. This paper studies whether incorporating an additive mask, , with initialized by hand with knowledge of the interaction structure of the task, can modify the inductive bias and lead to generalization to unseen examples in logical functions. The paper shows success in generalization across several logical functions.
Critical strengths
- The question this paper studies is very clear, specific, and is well-posed. I personally like the Abbe et al. 2024 paper, so I'm glad to see follow-up work on the topic, including empirical work.
- The observation that the way the inductive bias is encoded (e.g., via the query/key params vs additive mask) can be critical to the learned solution at the end of learning, even if it has similar behavior at initialization.
- The paper's results are clear and clean. GOTU goes from 0% to 100% on severl boolean tasks.
Critical weaknesses
Overall, while the paper seems sound, it is very modest in scope, and the contributions are limited.
- The masks are chosen by hand, so they're not really "learned". They explicitly constrain the task structure into the model. This makes successful generalization a somewhat unsurprising finding, and makes the significance limited.
- The experiments are quite limited in scope.
- A key point emphasized in the paper is the comparison between encoding the inductive bias through the query/key matrices vs a mask, showing that the mask's effects persist throughout training whereas the query/key matrices get "washed out". However, the fact that the mask persists is almost guaranteed by construction, since with the choice of initialization (App G.1) the mask is essentially a hard mask with near-zero gradient.
- The "local gradient-level" analysis (contribution 3) is modest and shallow. It's just computing a derivative and a norm bound.
Questions for authors
- How does a hard mask compare to the results you report? Given that the mask is initialized to be nearly hard with near zero gradients, what is the significance of keeping it differentiable and learnable at all?
- What happens when the mask is misspecified? for example extra or missing allowed interactions?
- Do you have an empirical or theoretical explanation for how the mask avoids the minimum-degree interpolating solution (e.g., by building on Abbe et al's analysis with the masks), and whether you can characterize the modified inductive bias with masking?
3 comments
Thank you to the authors for their rebuttal. Please see my responses below to each section of their rebuttal.
Q: How does a hard mask compare to the results you report?
It seems the authors may have misunderstood my question, since I do not see a direct answer in their response. My question is simply: the experiments in the paper use an additive "soft mask", but the it is initialized at large enough values that it is nearly a hard mask and it's gradient is very small. In that case, why use a learnable soft mask at all rather than simply encoding it as a hard mask?
What happens when the mask is misspecified? For example extra or missing interactions?
Thank you for these results. They are interesting supplemental results that I think would be interesting to incorporate into the paper. The results are intuitive: if you remove an interaction that is needed, the model fails, if you allow an interaction that is not needed, the model could learn to ignore it but may fail to generalize.
If the authors find this interesting, they could consider varying the "level of misspecification" and seeing whether results improve as the level of misspecification decreases. For example, for a higher-order target function, you could add more and more unneeded interaction terms in the mask, and see whether the model can learn to ignore them. You could try to investigate when the model succeeds vs fails in such settings.
Q: Do you have an empirical or theoretical explanation for how the mask avoids the minimum-degree interpolating solution (e.g., by building on Abbe et al's analysis with the masks)?
Thank you for this response. The intuitive explanation makes sense. I will leave the evaluation of the new theory section in the appendix to reviewer eHSe since they seem to have spent more time on it.
Overall: my impression of this work is that it is an interesting direction to explore, as I mentioned in my review. However, I view the level of contribution to be too modest for a top publication venue like ICLR. While the soundness and presentation seem good, the paper's contributions are limited to simple synthetic experiments in a narrow domain. In its current form, the paper feels more like a strong course project, or perhaps a workshop paper. I encourage the authors to continue to develop this work.
We thank the reviewer for their constructive comments and are pleased that they found this research direction interesting.
How does a hard mask compare to the results you report?
In our experiments, we found that for the Boolean problems, there is indeed no difference between using a hard mask and using large initialization values for an additive mask. However, as the Boolean problem is not the only one that has structure in the dataset, we would like to investigate whether we can inject the desired structure while allowing certain flexibility. We take the vision task as an example to demonstrate that a soft additive mask can have a broader application scenario even if they show similar behaviour on Boolean problems.
What happens when the mask is misspecified? For example extra or missing interactions?
We thank the reviewer for their question. We also find this question interesting and would like to put it into one section in Appendix J, highlighted in red.
Do you have an empirical or theoretical explanation for how the mask avoids the minimum-degree interpolating solution
We extend our previous proof to an idealized multilayer random-feature model in Section 6 and Appendix I, highlighted in red. For each target monomial within the supported degree range, we can construct a target-dependent, layerwise mask that restricts each masked feature’s Fourier support to the desired monomial. The resulting minimum-norm interpolator therefore recovers the target on the interpolator solution space, including both the seen and unseen domains.
Finally, we thank the reviewer for their continuous engagement and constructive feedback, which have helped us improve the paper.
We thank the reviewer and are pleased that they found the question studied clear, specific, and well-posed. The Abbe et al. (2024) paper is a key inspiration for our work and we are glad they have encouraged follow up work in this direction.
Q: How does a hard mask compare to the results you report?
The second contribution in our paper is to highlight the difference between encoding inductive priors through an attention mask and through initialization. In prior literature (see: Zheng et al. 2025, Structured Initialization for Vision Transformers) it was shown that incorporating a convolutional prior by initializing Q and K matrices in attention can improve on sample efficiency in vision problems.
We show that (because this prior is non-persistent) it can be washed out during training, particularly in the GOTU setting where a key extrapolation feature is not observed during training (see Figure 7). This makes encoding a prior more applicable with a logical mask than encoding the same attention prior through initialization.
To show how this relates to prior literature and a less structured domain, we demonstrate it on a vision problem (Section 5.3 Image Classification). As this is less structured than boolean problems (with explicit token interactions) explored earlier in the paper, we expect that a 'soft' mask will have improved performance over a hard mask. We test this in Appendix (B2) and show the learned logical mask has an improvement over a strict hard logical mask.
What happens when the mask is misspecified? For example extra or missing interactions?
We thank the reviewer for this suggestion. To test this we look at the 2-parity experiment.
In this paper we define the 2-parity logical mask to contain the desired f(x)=x1x2 interaction.
We try two misspecifications. 1) Which blocks the interaction term x1x2, and 2) which includes an additional term. We can see that blocking the desired interaction causes performance on the unseen domain drop to 0%, while an additional interaction causes a significant drop in performance.
Q: Do you have an empirical or theoretical explanation for how the mask avoids the minimum-degree interpolating solution (e.g., by building on Abbe et al's analysis with the masks)?
The intuitive empirical explanation is perhaps best shown through Figure 7 in the paper which visually shows the decision boundaries for the 2-Parity problem. Under the GOTU setting a key part of the domain is unobserved during training. As a result the model will fit the observe parts of the domain, and converges to a simple decision boundary (an interpolative MDI solution). The use of a persistent logical mask enforces the desired token interaction and blocks convergence to the interpolative MDI solution.
In the Appendix we have included a new section (in red) which provides a theoretical explanation for how the mask avoids the MDI solution. By necessity, this is a fairly involved argument directly built on Abbe et al. (2024)'s construction. The intuition behind this approach is that the use of an idealised mask can block lower-order interactions from the pre-activation attention while retaining the desired higher-order interactions (e.g. under two parity, the desired x1x2 term). When viewed in the spectrum the masked model can directly remove the lower-order Fourier components which characterizes the MDI solution under the Fourier-Walsh transform of the interpolator. Please let us know if you would like any more details on this approach.