REVIEW 3 minor 27 references
Provably Learning Multi-Head Attention with Queries
T0 review · 0 major / 3 minor · reviewed 2026-08-10 · deepseek-v4-flash
Pith's one-line read Repeated-token trick recovers multi-head attention exactly.
desk verdict A genuinely nontrivial theoretical advance in query-based learning of multi-head attention, with an honest exact-arithmetic premise and a sound central proof. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing object is the repeated-token identity $R(m)=\sum_{h=1}^H c_h r_h/(m+r_h)$, where $r_h=\exp(t u^\top W_h q)$ and $c_h=t u^\top v_h$. Varying the number $m$ of repeated tokens makes each hidden head appear as a simple pole of a rational function; rational interpolation and denominator factorization return the unordered set $\{(u^\top W_h q, u^\top v_h)\}$ for each direction pair $(u,q)$. Additive queries on sums of direction vectors then exploit bilinearity, for example $s_h(u_1+u_i,q_1)=s_h(u_1,q_1)+s_h(u_i,q_1)$, to match entries across local decoders, after which solving linear systems recovers $W_h$ and $v_h$.
What would settle it
Run Algorithm 1 on a fixed canonical model with rational parameters and an exact oracle, and test whether any draw of the random directions $(U,Q)$ with positive probability violates the distinctness or matching conditions of Lemma 4.3; finding such a draw would disprove the probability-one recovery claim, and exhibiting two distinct canonical models with identical scalar outputs on all length-three inputs would disprove Proposition 3.1.
Extended reading notes
Core claim
The central claim is that scalar final-token outputs uniquely determine, and an explicit query algorithm recovers, the canonical representation of a multi-head softmax attention model: heads sharing the same key-query matrix $W_h$ are merged by summing their value vectors $v_h$, and merged heads whose sum is zero are discarded. Equality on length-three inputs already pins down this representation. Algorithmically, a sequence with one perturbed token $q+tu$ followed by $m$ copies of $q$ makes the subtracted response $R(m)=F_M(X)-F_M([q])$ equal a rational function $\sum_{h=1}^H c_h r_h/(m+r_h)$; sampling $m=1,\dots,2H$, interpolating to recover the denominator, and factoring it separates the heads as an unordered set. Queries on sums of directions then give each head a consistent label, and linear systems recover every pair $(W_h,v_h)$. Under exact real arithmetic this succeeds with probability one over random orthogonal query directions, at the stated query cost.
Load-bearing premise
The whole guarantee rests on the oracle returning exact real values and the learner performing exact real arithmetic, including exact polynomial factorization; under ordinary IEEE 754 arithmetic, the authors' own experiments show recovery collapsing from near-perfect to zero for several configurations.
Editorial extensions
If this is right
- Multi-head attention can be provably recovered from black-box scalar queries without orthogonal-subspace assumptions or known subspace bases.
- The parameter count $H(d^2+d)$ and the query count $4Hd^2-2H+1$ are both order $H d^2$, so the recovery scales polynomially with the token dimension.
- When only an upper bound $H_0$ on the raw head count is known, the same algorithm works with $H_0$ replacing $H$ and determines the true canonical head count from the smallest consistent denominator degree.
- Under conditions guaranteeing separation and conditioning, an output error $\tau$ propagates to parameter error at most $C_{\mathrm{stab}}\tau$, so small oracle noise does not destroy recovery.
- The same queries recover the effective attention heads of a one-layer ReLU Transformer via the odd-component reduction, and under extra conditions a functionally equivalent Transformer is constructed without a separate feed-forward learner.
Reading between the lines
- Going beyond the paper, replacing the exact polynomial-factorization step with certified numerical root isolation would convert the probability-one guarantee into a finite-precision routine with explicit error bounds.
- Going beyond the paper, the same separation-and-matching strategy should apply to any attention kernel whose repeated-token response is a rational function with simple poles; if such kernels satisfy the analogous matching identities, the query count carries over unchanged.
- Going beyond the paper, the near-total failure under IEEE 754 binary64 outputs for larger head counts suggests the exact-arithmetic oracle, not the subspace assumption, is the operative boundary; a practical deployment would need either high-precision oracles or a conditioning-aware variant.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper studies exact recovery of the parameters of a multi-head softmax attention model from black-box value queries that return only the scalar output at the final token. It defines a canonical representation obtained by merging heads with the same query-key matrix W_h, summing their value vectors, and discarding zero aggregates. It proves (Proposition 3.1) that this canonical representation is identifiable from outputs on length-three inputs, and presents a randomized, nonadaptive algorithm (Algorithm 1) that, under exact oracle responses and exact real arithmetic, recovers every canonical pair (W_h, v_h) up to permutation with probability one, using exactly 4H d^2 - 2H + 1 value queries of maximum length 2H+1 (Theorem 5.1). The algorithm uses repeated-token queries to observe samples of a rational function whose poles and residues encode the per-head contributions, then uses additive identities from summed query directions to assign a common labeling across local decoders, after which linear systems recover the parameter pairs. The paper also proves a conditional stability bound for approximate oracle outputs (Theorem 5.2), shows that no model-independent stability constant exists, extends the recovery to a one-layer ReLU Transformer (Theorem 5.3), and provides variants for a known upper bound on the head count, low-rank W_h, and binary membership queries.
Significance. The result is a substantial advance over the prior art of Bhattamishra et al. (2026), which required pairwise orthogonal head subspaces and known orthonormal bases for those subspaces. The rational-interpolation technique is elegant and the proof chain, including the probability-one nondegeneracy argument in Appendix B and the rational-interpolation uniqueness lemma, appears sound. The paper is unusually honest about its computational model: it explicitly assumes exact real arithmetic and reports its own negative binary64 results. The conditional stability theorem and the lower bound showing that no uniform stability constant follows from the qualitative identifiability assumptions are valuable. The extension to a one-layer ReLU Transformer, while more involved and conditional, broadens the applicability of the query-based recovery approach.
minor comments (3)
- [Section 6 / G.4] The paper reports that rounding oracle responses to IEEE 754 binary64 collapses the success rate from 100/100 to 0/100 for (d,H)=(3,8) and (8,4) even when offline arithmetic is 180-digit. A brief statement in the main text, rather than only in the appendix, that Theorem 5.1 is an exact-arithmetic statement and that the binary64 results are outside its scope would help calibrate reader expectations.
- [Appendix D] The symbol A is used both for the set of query pairs in (29) and for the interpolation matrix A(y) in (38). This dual use makes the stability proof harder to follow; a different symbol for one of the two objects is advisable.
- [Section 5, Theorem 5.2] The statement assumes exact subsequent computations, but the experiments use 180-digit arithmetic. The paper could note explicitly that the stability bound is a property of the exact algebraic reconstruction and does not by itself account for offline rounding errors.
Circularity Check
No significant circularity: the recovery proof is self-contained and does not reduce to fitted inputs or self-citations.
full rationale
The paper's derivation chain is self-contained against an external oracle. The canonical identifiability result (Proposition 3.1) is proved in Appendix A using the linear-independence lemmas A.1 and A.2, not imported from prior work. The rational interpolation lemma (Lemma 4.2) is a direct polynomial-degree argument, and the head-matching construction (Lemma 4.3) uses bilinear identities (10)-(11) together with probability-one nondegeneracy conditions proved in Appendix B. Query directions U and Q are drawn independently of the target model, and no fitted parameter is inserted into the recovery equations. The one-token outputs computed from the recovered v_h are derived consequences of those recovered values, not assumed inputs; they are used only after v_h has been determined from independent local decoders. The stability theorem (Theorem 5.2) is explicitly conditional on quantitative separation and conditioning constants, and the paper proves that no uniform bound can follow from the qualitative assumptions alone. The Transformer extension re-derives the odd-component reduction rather than merely citing it. The exact-real-arithmetic assumption is a clearly stated scope limitation, and the binary64 experimental collapse is honestly reported as a finite-precision phenomenon, not hidden or repackaged as a success. No load-bearing step reduces to its own inputs, and no self-citation chain is used to force the conclusion.
Assumptions & free parameters
free parameters (1)
- repeated-token scale t =
1 (fixed; any nonzero t valid)
assumptions (8)
- domain assumption Oracle returns exact real values and the learner can perform exact real arithmetic, evaluate exponentials/logarithms, solve linear systems, and factor polynomials.
- domain assumption The target model has H canonical heads with pairwise distinct W_h and nonzero v_h.
- domain assumption The learner knows d and H (or a known upper bound H0).
- domain assumption Random query matrices U = Lambda_U O_U and Q = O_Q Lambda_Q are drawn from continuous distributions with singular values in [1,2].
- domain assumption Exact univariate polynomial factorization is available as a primitive operation.
- standard math Standard algebraic facts: rational interpolation uniqueness (Lemma 4.2), identity theorem for meromorphic functions (Appendix A), and Gaussian/orthogonal measure-zero arguments (Appendix B).
- domain assumption For approximate outputs, positive separation and conditioning margins exist (r_min, delta_r, c_min, gamma_int, gamma_c, Delta_match) and downstream computations are exact.
- domain assumption For the one-layer ReLU Transformer extension, assumptions (i)-(iv) of Theorem 5.3 hold, including nonzero weights and directions, no proportional b_j, and Z one-to-one; termination is finite but non-uniform.
Cite this review
Pith. "Pith review of Provably Learning Multi-Head Attention with Queries." pith.science (2026). https://pith.science/paper/C76NBRQ6
@misc{pith2026260803294,
author = {Pith},
title = {Pith review of: Provably Learning Multi-Head Attention with Queries},
year = {2026},
howpublished = {\url{https://pith.science/paper/C76NBRQ6}},
note = {Machine review of arXiv:2608.03294}
}
abstract
We study the problem of learning multi-head softmax attention from black-box input-output access. The learner may query arbitrary real-valued token sequences and observe only the scalar output at the final token. Recent work gives an algorithm using $O(d^2)$ value queries to recover the single-head parameters $(W,v)$. For multiple heads, the same work establishes identifiability under the assumption that the heads occupy pairwise orthogonal subspaces. Applying the single-head recovery algorithm separately to the heads additionally requires bases for these subspaces to be known. We recover a canonical representation by merging heads with the same $W_h$, summing their corresponding $v_h$, and discarding a merged head when this sum is zero, without these subspace assumptions. By varying the number of copies of a token, our algorithm obtains samples of a rational function whose interpolation separates the canonical heads. Additional queries formed by adding selected token vectors then match the same head across different queries. When the oracle outputs and all subsequent computations are exact, the learner chooses its query vectors at random and recovers the canonical pairs $\{(W_h,v_h):h\in[H]\}$ up to permutation with probability one. When $H$ is known, it uses exactly $4Hd^2-2H+1$ value queries of maximum length $2H+1$. If only a known upper bound $H_0$ is available, the algorithm uses $4H_0d^2-2H_0+1$ value queries of maximum length $2H_0+1$. For approximate oracle outputs, we give conditions under which the parameter error is at most a model- and query-dependent constant multiple of the output error. Finally, we extend our result to a one-layer Transformer with multi-head attention followed by a bias-free ReLU feed-forward network. Under additional conditions, we recover a functionally equivalent Transformer without relying on a separate algorithm for learning the feed-forward network.
Reference graph
Works this paper leans on
-
[1]
Provably Learning Attention with Queries , author =. 2026 , note =. 2601.16873 , archivePrefix =
arXiv 2026
-
[2]
Advances in neural information processing systems , volume=
Attention is all you need , author=. Advances in neural information processing systems , volume=
-
[3]
Tony and Zhang, Anru , title =
Cai, T. Tony and Zhang, Anru , title =. The Annals of Statistics , volume =. 2015 , doi =
2015
-
[4]
International Conference on Learning Representations , year =
Equivariant Neural Functional Networks for Transformers , author =. International Conference on Learning Representations , year =
-
[5]
Forty-third International Conference on Machine Learning , year=
Functional Equivalence in Attention: A Comprehensive Study with Applications to Linear Mode Connectivity , author=. Forty-third International Conference on Machine Learning , year=
-
[6]
Proceedings of the 57th Annual ACM Symposium on Theory of Computing , year =
Chen, Sitan and Li, Yuanzhi , title =. Proceedings of the 57th Annual ACM Symposium on Theory of Computing , year =
-
[7]
2025 , eprint =
Finite Samples for Shallow Neural Networks , author =. 2025 , eprint =
2025
-
[8]
2025 , eprint =
Provably Extracting the Features from a General Superposition , author =. 2025 , eprint =
2025
Show all 27 references
-
[9]
Linear Algebra and its Applications , volume =
Matrix Methods for Pade Approximation: Numerical Calculation of Poles, Zeros and Residues , author =. Linear Algebra and its Applications , volume =. 2018 , doi =
2018
-
[10]
Applied and Computational Harmonic Analysis , volume =
On the Accuracy of Prony's Method for Recovery of Exponential Sums with Closely Spaced Exponents , author =. Applied and Computational Harmonic Analysis , volume =. 2024 , doi =
2024
-
[11]
Proceedings of the 42nd International Conference on Machine Learning , pages =
Interpreting the Repeated Token Phenomenon in Large Language Models , author =. Proceedings of the 42nd International Conference on Machine Learning , pages =. 2025 , volume =
2025
-
[12]
Advances in Neural Information Processing Systems , volume=
Learning linear attention in polynomial time , author=. Advances in Neural Information Processing Systems , volume=
-
[13]
Machine Learning , volume =
Queries and Concept Learning , author =. Machine Learning , volume =. 1988 , doi =
1988
-
[14]
Advances in Neural Information Processing Systems , editor =
Recovering a Feed-Forward Net From Its Output , author =. Advances in Neural Information Processing Systems , editor =. 1993 , url =
1993
-
[15]
and Meka, Raghu , booktitle =
Chen, Sitan and Klivans, Adam R. and Meka, Raghu , booktitle =. Efficiently Learning One Hidden Layer
-
[16]
An Exact Poly-Time Membership-Queries Algorithm for Extracting a Three-Layer
Daniely, Amit and Granot, Elad , booktitle =. An Exact Poly-Time Membership-Queries Algorithm for Extracting a Three-Layer
-
[17]
Stealing Machine Learning Models via Prediction
Tram. Stealing Machine Learning Models via Prediction. 25th USENIX Security Symposium (USENIX Security 16) , pages =. 2016 , isbn =
2016
-
[18]
29th USENIX Security Symposium (USENIX Security 20) , pages =
High Accuracy and High Fidelity Extraction of Neural Networks , author =. 29th USENIX Security Symposium (USENIX Security 20) , pages =. 2020 , isbn =
2020
-
[19]
Proceedings of the 41st International Conference on Machine Learning , series =
Stealing Part of a Production Language Model , author =. Proceedings of the 41st International Conference on Machine Learning , series =. 2024 , url =
2024
-
[20]
Advances in Cryptology -- EUROCRYPT 2025 , editor =
Polynomial Time Cryptanalytic Extraction of Deep Neural Networks in the Hard-Label Setting , author =. Advances in Cryptology -- EUROCRYPT 2025 , editor =. 2025 , doi =
2025
-
[21]
2026 , howpublished =
Cryptanalytic Extraction of Deep Neural Networks with Non-Linear Activations , author =. 2026 , howpublished =
2026
-
[22]
2026 , howpublished =
Cryptanalytic Extraction of Recurrent Neural Network Models , author =. 2026 , howpublished =
2026
-
[23]
IEEE Std 754-2019 (Revision of IEEE 754-2008) , year =
2019
-
[24]
Dragan and Moritz Hardt , title =
Smitha Milli and Ludwig Schmidt and Anca D. Dragan and Moritz Hardt , title =. Proceedings of the Conference on Fairness, Accountability, and Transparency , pages =. 2019 , publisher =
2019
-
[25]
International Conference on the Theory and Application of Cryptology and Information Security , pages=
Hard-label cryptanalytic extraction of neural network models , author=. International Conference on the Theory and Application of Cryptology and Information Security , pages=. 2024 , organization=
2024
-
[26]
arXiv preprint arXiv:1908.04211 , year=
On identifiability in transformers , author=. arXiv preprint arXiv:1908.04211 , year=
1908 arXiv
-
[27]
Annual international cryptology conference , pages=
Cryptanalytic extraction of neural network models , author=. Annual international cryptology conference , pages=. 2020 , organization=
2020
Reviewed August 10, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.