How do Small Transformer Models Learn Hard Math Tasks?
Eshika Saxena, Kristin E. Lauter
AI4Math @ ICML 2026
TL;DR. Interpretability analysis of transformers trained on hard math tasks
Abstract. Recent works have demonstrated that transformers can be trained to recover sparse, binary cryptographic secrets in the Learning With Errors (LWE) problem, a foundational problem that underlies many post-quantum cryptographic schemes. However, as architectures have evolved to efficient encoder-only models, the mechanism by which these models recover the cryptographic secret has become more opaque. In this paper, we present the first layer-wise and embedding-level mechanistic interpretability analysis of encoder-only transformers trained on LWE samples. We reveal a surprising phenomenon: despite achieving near-zero exact prediction accuracy on the training objective, the models successfully recover the secret by bypassing the standard predictive pathways. We use dimensionality reduction, causal intervention, and linear probing and find that the secret is implicitly present in the positional embedding. Building on this mechanistic understanding, we introduce an architectural intervention that applies sparsity regularization directly to the positional embeddings. This modification forces the model to explicitly isolate the latent secret, transforming the computationally expensive post-hoc secret recovery process into a direct, human-interpretable parameter inspection. Our findings provide fundamental insights into how transformers allocate representational capacity when faced with high-noise, structured combinatorial problems.
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 paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:49 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
The paper presents a mechanistic study of how encoder-only transformers can recover sparse LWE secrets despite almost zero exact prediction accuracy. The reviews appear to agree that the main finding is novel. Causal ablation of secret-position positional embeddings is good evidence.
The author feedback should prioritize three issues. Current intervention shows that positional embeddings are causally important. But it seems less clear whether the secret is specifically localized there rather than represented more broadly. Also, the authors should clarify how much of observed structure remains after controlling for asymmetry due to lattice-reduction preprocessing. Last, intervention appears to narrow candidate support. But is it justifying the stronger claim of direct secret recovery from parameter inspection?
The experimental scope is narrow, but this is fine for a paper like this if the claims are properly scoped accordingly. A clear response on the three points above plus any of the other points indicated in the reviews, can help a robust discussion.
Final justification
The author feedback addressed most concerns which came up in the reviews. The author comments and experiments support the high level argument that positional-embedding phenomena is not just a result of preprocessing. One of the reviewers who engaged with the authors and in the discussion was satisfied. The other reviewer also acknowledged these improvements, but was unconvinced on a few points.
I also agree with the unresolved concern in that review. The authors narrowed the localization claim in that the intervention shows that positional embeddings at secret indices are necessary for recovery. But the secret does not exclusively live there. The intervention does not recover the secret (it narrows the candidate set). The discussion gives some argument for how this could reduce the cost but these savings are not yet evaluated. I also checked PICANTE and Alfarano (2026) cited in the author response. In context of these works, I think the mechanistic result is interesting, but do not feel that the current paper fully shows that the intervention gives the advance. Nonetheless, reviewers found enough to like in the paper and the only negative reviewer also agrees that the paper is above the acceptance threshold. I agree and recommend accept.
Read meta-review
Meta-review
The paper presents a mechanistic study of how encoder-only transformers can recover sparse LWE secrets despite almost zero exact prediction accuracy. The reviews appear to agree that the main finding is novel. Causal ablation of secret-position positional embeddings is good evidence.
The author feedback should prioritize three issues. Current intervention shows that positional embeddings are causally important. But it seems less clear whether the secret is specifically localized there rather than represented more broadly. Also, the authors should clarify how much of observed structure remains after controlling for asymmetry due to lattice-reduction preprocessing. Last, intervention appears to narrow candidate support. But is it justifying the stronger claim of direct secret recovery from parameter inspection?
The experimental scope is narrow, but this is fine for a paper like this if the claims are properly scoped accordingly. A clear response on the three points above plus any of the other points indicated in the reviews, can help a robust discussion.
Final justification
The author feedback addressed most concerns which came up in the reviews. The author comments and experiments support the high level argument that positional-embedding phenomena is not just a result of preprocessing. One of the reviewers who engaged with the authors and in the discussion was satisfied. The other reviewer also acknowledged these improvements, but was unconvinced on a few points.
I also agree with the unresolved concern in that review. The authors narrowed the localization claim in that the intervention shows that positional embeddings at secret indices are necessary for recovery. But the secret does not exclusively live there. The intervention does not recover the secret (it narrows the candidate set). The discussion gives some argument for how this could reduce the cost but these savings are not yet evaluated. I also checked PICANTE and Alfarano (2026) cited in the author response. In context of these works, I think the mechanistic result is interesting, but do not feel that the current paper fully shows that the intervention gives the advance. Nonetheless, reviewers found enough to like in the paper and the only negative reviewer also agrees that the paper is above the acceptance threshold. I agree and recommend accept.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- use_inspired
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper presents a experimental evaluation of the behaviour of transformer models trained to solve the Learning With Errors (LWE) problem. In particular, these models are trained to predict a variable from a vector related by where is called the vector of secrets and is some noise. The goal is to use perturbation techniques (a distinguisher) to obtain from the trained model by observing how changes in the coordinates of affect the output .
The experimental evaluation consists on training 30 models with increasing number of coordinates in being . From these, 13 are able to recover the secret vectors, and 17 are not. With these models, the authors observe the following phenomena:
- Accuracy of the models during training does not correlate with their ability to recover the secrets
- Linear probes trained on the embeddings of the last layer show slightly better performance distinguishing between coordinates that correspond to (secret) or (no secret), and a finer cluster where we additionally add whether the coordinates are in the cruel or cool regions (something related to the preprocessing of the data) in the models that recover the secret
- A study of feature importance based on the MaxPool before the linear embedding layers that reduces dimensionality to 2, shows a slight increase in importance in the secret coordinates for the classification
- In my opinion, the biggest contribution of the paper: a PCA accross layers that shows that the clustering patter between secret and non-secret coordinates appears just before the embedding layer, and in fact the transformer obfuscates this clusters (all the previous analysis were based on the embeddings in the last layer)
- In addition, also part of the most important contibution of the paper: the causal test where the coordinates of the positional encodings corresponding to secret positions are zeroed out, and control of random non-secret coordinates are also zeroed out, and then the distinguisher is re run, shows that the first case destroys the performance while the second leaves it mostly unaffected
Strengths and weaknesses
I think this paper is really well written, it was easy to follow and understand even though I am not an expert in this specific problem. From the positioning of the paper, its study seems original and presenting novel insights about an important problem. This use case seems real and meaningful, and the overall quality of this contribution is good in my opinion. In general, all four aspects of quality, clarity, originality and significance are mostly well-covered.
I only have three questions about two of these points where I believe that the paper could be improved (see the Questions below). If these are addresses, and those small weaknesses are fixed, I'd be happy to increase my score.
Questions
In terms of clarity
- On my first read, the experimental design of section 4.1 (in particular, lines 179--180) was a bit unclear. I was not sure of what the points of the embeddings represented, and what their dimensionality was. I believe this could be clarified if you explicitly expressed what your point clouds of embeddings represent: if I understood correctly, each point is associated with a coordinate , where I think , because each token has an embedding, and then you average the corresponding embedding vectors across samples. I believe that adding a more explicit explanation along these lines would increase the clarity of these experiments.
- I was also a bit confused with the explanation of the definition of the attribution scores (line 200): can the attribution of a given coordinate index have several components, depending on how many times is the argmax of the column ? When I read the following sentence for the first time, I didn't fully understand it, because I didn't understand how the positions were related to the definition of the attribution score:
By summing these attribution scores across all dimensions $ d \in 1, . . . , d_{\mathrm{hidden}}$ for each position, we obtain a more accurate measure of which input positions drive the final prediction Maybe you could consider also trying to explain this definition in more detail to clarify this confusion.
Finally, I believe the significance of the cluster analysis could also be improved by answering the following question:
- Although the results in tables 2 (performance of linear probes in clustering the last layer embeddings), and 4 (silhouette scores of the clustering of the embedings in the input layer) are better for the models that are able to recover the secret, the improvement in performance is quite small and not very conclusive. For instance, the results of table 2 are almost overlapping, and the silhouette scores of table 4 are around 0, which generally indicates significant overlaps in the clusters and not a very nice clustering structure. How do you interpret these results, and why should we care about these differences even when they are small? Understanding better this point would help improve the significance of these contributions.
Limitations
They are addressed.
Final justification
The authors have addressed my questions and I believe this to be a solid contribution.
Formatting concerns
None
4 comments
Answer to rebuttals
I thank the authors for their response to my questions. I think they successfully answer some of the concerns that I hav. However, ffter reading the meta review and the other reviews and answers so far, I have new concerns in line with those raised by the reviewer BrM4 regarding whether the experiments show that we can recover the secret or only a list of candidates positions where this secret lives. This concern weakens the significance of what I thought to be the main contribution of the paper. What of an advantage is to know that the secret lies on the top h to 2h positions?
These concerns regarding the relevance of the contribution prevent me at present from raising my score. I am happy to hear the authors' thoughts on this to reconsider my position. Thank you again for your efforts.
Thanks for your response!
Thank you for your question. We intend to clarify the proposed method in the revised version of the paper, by explaining it in a bit more detail. The output of the method is a set of alpha values, which we show in a graph (left hand side of Figure 5), and appears to be a set of steps down. Assuming we know , we check that the top step is just the first bits, and the second “step” down is the next to bits.
Experimental evidence is showing that the second “step” is roughly all the “active” or secret bits, and we can guess this is the secret, directly from this inspection of the model parameters. This is excellent because it does not require the many (thousands of) forward passes of the model to output predictions used in the ranking methods of the current distinguishers. We use a very simple statistical distinguisher to detect whether this “guess” for the secret bits is correct.
Next, in the case that the bits in the positions are not the exact correct guess for the secret bits, then we can check the “edge cases”, which are the bits around and . So the second step of the method would take our narrowed candidate set and run through a set of possible guesses for “edge bits” to be the correct secret (# guesses linear in the # of edge bits and , where in our experiments). Hardness of the cryptographic LWE problem is assumed to be exponential in (i.e. ), so this algorithm is a big improvement. We can also add citations to cryptographic protocol papers proposing LWE systems with specific choices for (in those cases, is publicly known).
We hope that this helps to explain the significance of this proposed architectural modification.
Answer to comment
I thank the authors for their answers. From their explanations, the importance of their contribution feels more clear to me, and I do believe that the mechanism that their are proposing entails a significant improvement with respect to other methods for locating the secret positions. If these explanations are included in the paper, I am happy to raise my score to 5.
- Rating
- 3/6
- Confidence
- 3/5
- Quality
- 2/4
- Clarity
- 3/4
- Significance
- 2/4
- Originality
- 2/4
- Contribution type
- use_inspired
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper studies the mechanisms by which encoder-only transformers recover sparse secrets in the LWE problem. The paper then propose an L1-sparse positional embedding to make the recovered secret more directly interpretable from the model parameters.
Strengths and weaknesses
Strength
-
The main finding is surprising and to some extended supported (but not fully). The observation that a model can achieve 0% exact prediction accuracy while still enabling recovery of the secret is interesting. Importantly, the paper do not rely only on qualitative PCA visualizations. The causal ablation in Table 5, where zeroing the positional embeddings at secret positions nearly eliminates recovery while zeroing the same number of random non-secret positions has little effect, provides some intervention-based evidence for the claim.
-
The paper examines the same phenomenon from different aspects, including dimensionality reduction, linear probes, logit attribution, residual-stream tracing, and causal ablation. The fact that these analyses point to a consistent conclusion makes the result more promising. The layer-wise analysis, showing that the relevant structure appears early and becomes less clear through later attention layers, is also interesting.
-
The paper also attempts to close the loop from mechanistic observation to architectural intervention by introducing an L1-sparse positional embedding. This paper not only describes what the model is doing, but also try to design an architecture that makes the mechanism inspectable.
Weaknesses
-
The main concern is that the analysis depends heavily on lattice-reduction preprocessing. The cool/cruel variance asymmetry appears to drive much of the observed structure, so it is difficult to separate what the model learns from what the preprocessing makes easy to detect.
-
The causal intervention only ablates positional embeddings. To support the stronger conclusion that the secret specifically resides there, the paper should include ablations on input embeddings or other relevant components. Otherwise, the result is also consistent with the model simply relying on secret-relevant positions in a broader representation.
-
The four distinct clusters claim seems overstated. In the PCA plots, the cool clusters overlap substantially, and the input stage representation may actually appear most separated, which complicates the narrative that later layers primarily obfuscate the structure.
-
The experimental scope is narrow. The analysis is limited to one parameter regime, sparse binary secrets with Hamming weights 20–22, and settings where SALSA-style recovery already succeeds. It remains unclear whether the mechanism generalizes to harder or more realistic LWE settings.
-
The architectural intervention is weaker than it suggests. The L1 penalty does not isolate the secret in the top-h magnitudes. Secret indices appear mostly in the top-h to top-2h range, while cruel non-secret positions dominate the largest values. The method also assumes knowledge of h, which makes the recovery framing somewhat circular.
-
The proposed intervention combines existing ideas, namely L1 sparsity and magnitude/direction factorization. This is reasonable, but the paper should include ablations removing the sparsity penalty, removing the factorization, and comparing to a standard learnable positional embedding to clarify what each component contributes.
-
Training across 30 secrets is useful, but the qualitative figures appear to be single-seed examples, and there are no same-secret, multiple-initialization studies. Together with the lack of released code, this makes the mechanistic picture harder to fully trust.
Questions
Stated above.
Limitations
The main claim that the secret resides specifically in the positional embeddings feels weak. The analysis does not fully disentangle what the model learns from the signal introduced by lattice-reduction preprocessing, especially the cool/cruel variance asymmetry, and the causal ablation only tests positional embeddings without matched interventions on the input representation or cool/cruel structure. The experimental scope is also narrow: one parameter regime, sparse secrets with Hamming weights 20–22, and only settings where recovery already succeeds. Single-seed figures and unreleased code further limit confidence in robustness. Finally, the L1-sparse intervention is weaker than it suggests. Secret indices fall mostly in the top-h to top-2h range rather than the top-h, and the method assumes prior knowledge of the Hamming weight. Finally, the quality of figures are not great; it is hard to read the legends occasionally.
Final justification
Explained below in the comment.
Formatting concerns
None.
4 comments
We thank the reviewer for the detailed review and feedback. We have run new experiments to address the concerns, which we will add into the final version.
-
Dependence on lattice preprocessing:
We ran new experiments to address this concern, showing the results of our approach when applied to unreduced data. We find the outcome to be similar to our results on reduced data.
Specifically, we ran an additional experiment on unreduced LWE data with , which has no lattice reduction and thus no cool/cruel regions. We ran this on secrets with hamming weights=3, 4, 5 (10 per ). Results are as follows and we will add this table to the paper:
(no lattice reduction, no cool/cruel; , 30 secrets).
Ablating secret positional embeddings collapses recovery; the control does not.
| Status | # Models | Baseline | Ablate secret | Ablate non-secret |
|---|---|---|---|---|
| Recovered | 13 | 3.2 ± 0.4 | 0.4 ± 1.1 | 3.2 ± 0.4 |
| Not recovered | 17 | 0.4 ± 0.5 | 0.0 ± 0.0 | 0.5 ± 0.6 |
The key findings are that the causal ablation still collapses recovery when the secret positional embeddings are zeroed. Since there is no cool/cruel asymmetry here, this localization to the positional embeddings can’t be a preprocessing artifact.
This helps address the concern that the cool/cruel is driving much of the observed structure. We also note that in the reduced setting the cool/cruel asymmetry is identical across all 30 models, however only recovered models show the secret-specific collapse. Thus, preprocessing alone never explained the secret-specific findings.
-
Causal intervention only ablates positional embeddings:
Architecturally, the positional embeddings are the only per-position learnable parameters as the input embedding is the fixed angular map followed by a position-shared linear projection, which doesn’t have a per-position capacity to store the secret. The unreduced-data ablation above supports this idea. With the cool/cruel regions removed, the collapse under secret position ablation localizes the secret to the positional embeddings specifically rather than to a distributed representation. We can make this architectural argument explicit alongside the new evidence.
-
Four distinct clusters claim seems overstated; input stage most separated:
We agree that "four distinct clusters" seems to overstate the geometry, and we will soften this wording. In Figure 2 (left, input embeddings), we see a clear separation along PC1 between the cool and cruel regions, with some separation of the secret/non-secret clusters within those regions along PC2 (this is misstated in the caption, we will update that in the revision). In Figure 3, there is an observable separation between the secret and non-secret clusters but with some overlap.
The input stage appearing most clustered is in fact our intended claim as the secret structure seems more present at the input/positional stage (before any self-attention) than the later layers. We also emphasize that the PCA visualizations are supporting the quantitative evidence and results provided in the subsequent sections.
-
Narrow experimental scope:
Based on this feedback, we ran an additional set of experiments with (larger dimension, higher reduction rate, many cool bits) and found that similar trends hold for the interpretability results. Similar to the case, we ran experiments on 30 secrets with . We deliberately choose to focus on hamming weights near the learnability threshold as it yields the matched recovered/non-recovered model pairs the correlational comparisons require. For harder parameter settings (smaller ), the maximum hamming weights that are recoverable are so low that it is challenging to run this analysis with a similar number of recovered/non-recovered models. With regard to model size, Alfarano et al. (2026, Fig. 1) show recovery is invariant to embedding dimension (256 to 1024) and depth (4 to 12) in our exact regime, so the findings are not tied to an under-parameterized model.
. Secret-position ablation sharply reduces the number of bits recovered, and positional-weight clustering is stronger in recovered models.
Causal intervention (correct bits recovered):
| Status | # Models | Baseline | Ablate secret | Ablate non-secret |
|---|---|---|---|---|
| Recovered | 16 | 20.8 ± 0.8 | 6.6 ± 8.4 | 20.8 ± 0.9 |
| Not recovered | 14 | 0.4 ± 0.5 | 0.0 ± 0.0 | 0.4 ± 0.5 |
Positional-embedding weight clustering:
| Status | Silhouette (2-cluster) | Sep. ratio (2-cluster) | Silhouette (4-cluster) | Sep. ratio (4-cluster) |
|---|---|---|---|---|
| Recovered | 0.0462 ± 0.0502 | 0.85 ± 0.17 | 0.0253 ± 0.0259 | 0.20 ± 0.04 |
| Not recovered | -0.0006 ± 0.0040 | 0.39 ± 0.03 | -0.0102 ± 0.0058 | 0.13 ± 0.00 |
-
Architectural intervention has limited scope:
We agree and do report that the secret indices concentrate in the top- to top- range, while the very top magnitudes are dominated by the high-variance cruel, non-secret positions. Still, the finding is that the intervention narrows the search from positions to an -sized candidate set, which can be verified by the standard distinguisher test. The intervention enables the use of the learnable position-based parameter rather than a set of black box forward-passes.
In addition, knowledge of is assumed in some SALSA-family attacks (such as Alfarano et al., 2026). Assuming the attacker knows is reasonable, as implementation papers specify exact proposals for Hamming weight, sparsity, and active bit distributions. This is not circular as is only the count but not the localization of the secret bits. The attack can still be run for a range of but at the expense of additional computation, as in prior distinguisher-based attacks, so knowledge of is not essential.
Regarding more ablations for the intervention, the natural baseline (standard learnable positional embedding) is the architecture we use and analyze in the prior sections. In our experience, the secret isolation does not emerge without the L1 sparsity penalty, and without the factorization the learned embedding is not directly interpretable. This is why the two components, which play distinct, complementary roles, are presented together. We can add this discussion to the final version.
-
Single-seed figures, no multiple-initialization study; unreleased code; figure legibility.
To address this concern, we ran 150 additional experiments: 5 new initialization seeds for each of the 30 secrets (6 seeds per secret in total). For a given secret, the seeds fall into one of three outcomes: all recover the secret, a subset recover while the rest do not, or none recover.
The key finding is that our interpretability findings track the recovery outcome, not the initialization. When we group models by outcome, the interpretability metrics are highly consistent within each group (standard deviation close to 0): recovering models show the clustering/separation structure we report, and non-recovering models do not. The mixed case makes this especially clear, as there the only difference between seeds is the model initialization (same secret, same data), but the seeds that recover exhibit the structure while those that do not lack it.
We therefore conclude that our interpretability results are not an artifact of any single initialization: they depend on whether the model recovers the secret, not on the particular seed. We will add a bar chart summarizing these outcomes in the final version.
On reproducibility: our pipeline builds on the open-sourced LWE-benchmarking repository and the publicly released TAPAS dataset (CC-BY-4.0), with all hyperparameters in Appendix A. We intend to release our code with the camera-ready version, but the public repo, dataset, and full hyperparameters make the experiments reproducible.
We will redo all figures with larger fonts and readable legends, thanks for that feedback.
We believe these additional results and responses help address the core concerns mentioned in the review. We are happy to continue the discussion in the discussion period.
References
[1] Alfarano, A., Saxena, E., Wenger, E., Charton, F., & Lauter, K. (2026). Improving ML attacks on LWE with data repetition and stepwise regression. arXiv preprint arXiv:2604.03903.
[2] Saxena, E., Alfarano, A., Charton, F., Wenger, E., & Lauter, K. E. (2026). TAPAS: Datasets for Learning the Learning with Errors Problem. Advances in Neural Information Processing Systems, 38.
Thanks for the rebuttal
Thank you for the detailed rebuttal and for running the additional experiments. The unreduced-data experiment goes a long way toward addressing my concern that the results might mainly reflect the cool/cruel asymmetry introduced by lattice reduction. The larger-parameter experiments and the multiple-initialization study also make the main empirical finding more convincing.
I still have two concerns. First, ablating the positional embeddings at the secret indices shows that those position-specific parameters are necessary for recovery, but it does not fully establish that the secret is stored specifically in those parameters. They may instead provide the positional information needed to access a representation distributed elsewhere in the network. I therefore think the localization claim should be stated more cautiously.
Second, the architectural intervention is still not fully supported. Since the secret indices mostly appear between the top-h and top-2h positions, the method seems to narrow the candidate set rather than directly recover the secret from the parameters. I also still think the paper needs the requested ablations separating the effects of the L1 penalty and the magnitude–direction factorization. The explanation in the rebuttal is reasonable, but it does not replace those experiments.
Overall, the rebuttal meaningfully strengthens the paper and addresses several of my concerns, so I increase my score to 3. The remaining uncertainty around the localization claim and the incomplete evaluation of the architectural intervention prevent me from being more positive.
Thanks for your response!
Thanks for acknowledging our additional experiments, increasing the score, and explaining the remaining concerns.
For the first point, we do agree that the ablation shows that the parameters are necessary for recovery but that there could be representations distributed elsewhere in the network. We will revise the statements in lines 243-251 to state this more cautiously as you suggest.
We also did find that just a simple one-layer positional embedding model isn’t enough to solve the LWE task, so we agree that a better way to represent the findings is that the positional embeddings are necessary but not sufficient for the secret recovery task.
For the architectural invention, we agree with your characterization that “the method narrows the candidate set” rather than directly recovers the secret. We will revise the language throughout to make this more clear.
For the ablations, we did experiments with the factorization alone without the sparsity penalty, but the models weren’t successful in isolating the secret indices or narrowing the candidate set. This is why we added the sparsity penalty. If it would make a difference in the acceptance of the paper, we are happy to add those experiments back into the final version.
To disentangle in the other direction, it is not clear how to implement the sparsity without the factorization, as the penalty applies to the factorized magnitudes, and to design a way to implement the sparsity without the factorization would be a new line of inquiry that is not necessarily comparable to the rest of the experiments.
- Rating
- 5/6
- Confidence
- 3/5
- Quality
- 3/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
The paper investigates how encoder models are able to help solve the LWE problem. Using mechanistic interpretability techniques, this paper sheds light on the internal mechanisms of a model trained for this task. The analysis discovers that the LWE secret is stored in the positional embeddings, and the authors further demonstrate this by doing architectural interventions.
Strengths and weaknesses
Strengths:
- Relevant problem and interesting findings.
- Solid experimental setup and clean analysis.
- The intervention experiments are very interesting.
Weakness/Questions:
- The title of the paper is too broad. The paper investigates a very specific math problem, and it is not clear how these findings would transfer to other math problems, neither does the paper make any attempt to do so. Given this, the title of the paper could be more specific.
- In Table1, it is unclear what is the eval loss threshold for correctly guessing the secret. does it depend on the magnitude of the noise?
- Would be interesting to see how the behaviour changes as model size is increased.
Questions
see strength/weakness section
Limitations
yes
Final justification
I am satisfied by the author response, and support acceptance of this work.
Formatting concerns
NA
1 comment
We thank the reviewer for the positive score and for highlighting the relevance of the problem, the “clean analysis,” and the intervention experiments. We address the three questions below:
- Title: Thanks for the feedback, we are happy to revise the title in the camera-ready version. One possible revision is: “How do Small Transformers Learn a Hard Cryptographic Task?”
- Table 1: To clarify, there is no eval loss threshold governing recovery. As Table 1 shows, eval loss can be quite similar between recovered and non-recovered models, although it is slightly better for the recovered models ( vs. ). Recovery is instead decided by the post-hoc distinguisher (see Section 3): a candidate secret s* is accepted when the standard deviation of the residuals , computed over held-out LWE samples, is approximately equal to the known error parameter . In that sense, recovery does depend on the noise magnitude (here \sigma \= 3.0), since it checks whether residuals match the expected error/noise distribution. We will add a sentence to Section 4.1 along these lines to clarify this.
- Model size scaling: This is an interesting direction. Although outside the scope of this work, it has been explored by prior works like Alfarano et al. (2026, Figure 1) and PICANTE (Li et al., 2023, Table 11), which found that secret recovery is seemingly invariant to model size. This motivates our use of the standard encoder-only configuration used in Alfarano et al. (2026) (4 layers, 4 heads, hidden dimension 256), so our mechanistic findings can apply to the SOTA attack architecture.
References
[1] Alfarano, A., Saxena, E., Wenger, E., Charton, F., & Lauter, K. (2026). Improving ML attacks on LWE with data repetition and stepwise regression. arXiv preprint arXiv:2604.03903.
[2] Li, C. Y., Sotáková, J., Wenger, E., Malhou, M., Garcelon, E., Charton, F., & Lauter, K. (2023, November). Salsa Picante: A machine learning attack on LWE with binary secrets. In Proceedings of the 2023 ACM SIGSAC conference on computer and communications security (pp. 2606-2620).
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
We thank the reviewer for the thoughtful questions and for finding the paper clear, original, and significant. We address the questions below:
Your understanding is correct, and we will clarify this in the final version. For each test sample k (of 1,000) and each position index j∈0,…,N−1 for N=256, the model produces an embedding Ej,k∈Rdhidden where the hidden dimension is 256. Averaging over all the samples gives us one mean embedding per position j with dimension dhidden, so the final dimension is a 256×256 matrix (N positions x hidden dim). We then apply PCA over the 256 position-points to reduce the 256-dim features to 2-D for visualization.
Yes, one position index can accumulate several components. We will rewrite the definition and add some more explanation to make this explicit. The per-position attribution sums over every dimension that position wins, so a single position index can accumulate contributions from all the dimensions for which it is the argmax. We can also formalize this in the definition by including the summation in the definition: Attribution(j)=∑d s.t. pd=j∥W:,d∥⋅∣Ej,d∣
Here j is a position index (as above), E∈RN×dhidden is the mean embedding matrix so that Ej,d is the activation at position j and hidden dimension d, and pd=argmaxiEi,d is the position that wins hidden dimension d under max-pooling. The sum is therefore over every hidden dimension whose max-pool winner is position j.
This is an important point, and we will clarify the interpretation of these results. We acknowledge in the text that the metrics do not indicate strong clustering, however we still see a relative difference between the recovered and unsuccessful models.
One reason is that the silhouette scores and centroid separation are global metrics that are computed over all N=256 vectors, but in our case the clusters have a severe class imbalance as only ~20 out of 256 (~8%) are secret positions and a subset of those are cruel secret positions. In this case, the global silhouette is dominated by the majority cloud and is known to read low even when the minority subcluster is cleanly separable.
For example, in Figure 3, we can see a separation between secret and non-secret points along PC1, but there is major asymmetry in the size of the clusters and there is some overlap (e.g. 4 purple dots appear in the secret side). The quantitative results in Tables 2 and 4 reflect what we see in Figures 2 and 3.
In addition, we see that across multiple metrics/techniques and all 30 models, the direction of the results are consistent, generally indicating more separation/clustering in the recovered models. While the probe accuracy results on their own may not be decisive, we see that the results do corroborate the findings from the causal intervention and the layer-wise PCA. Also, the separation ratios have roughly 2x gaps with 0.56 vs. 0.28 (2-cluster) and 2.34 vs. 1.24 (4-cluster) in Table 2, and 0.43 vs. 0.28 (2-cluster) and 0.81 vs 0.52 (4-cluster) in Table 4.
We will add these clarifications to the text in the paper. Thank you for these suggestions that will improve the paper!