Provably Learning Attention with Queries
Not on the map. Why?
Abstract (arXiv)
We study the problem of learning Transformer-based sequence models with black-box access to their outputs. In this setting, a learner may adaptively query the oracle with any sequence of vectors and observe the output of the target function. We begin with studying the learnability of the simplest formulation, that is, learning a single-head attention-based regressor with queries. We show that for a model with width d, there is an elementary algorithm to learn the parameters of single-head attention with O(d2) queries. Further, we show that if there exists an algorithm to learn ReLU feedforward networks (FFNs), then the single-head algorithm can be easily adapted to learn one-layer Transformers with single-head attention. Next, we show that, in the common regime where the head dimension r ll d, single-head attention-based models can be learned with O(rd) queries via compressed sensing arguments. We also study robustness to noisy oracle access, proving that under mild norm and margin conditions, the parameters can be estimated to varepsilon accuracy with a polynomial number of queries even when outputs are only provided up to additive tolerance. Finally, we consider the learnability of multi-head attention and show that they are not identifiable from queries, and hence, learnability in the same sense is not feasible without additional assumptions. We discuss potential approaches to learn multi-head attention-based models under certain structural assumptions.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 22 of its 31 references that are in the map. First posted on arXiv 23 Jan 2026.
Builds on
22 of 31 references.
References · 22
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2016Stealing Machine Learning Models via Prediction APIscited by 619
- 2018Knockoff Nets: Stealing Functionality of Black-Box Modelscited by 292
- 2019High Accuracy and High Fidelity Extraction of Neural Networkscited by 214
- 2024Stealing Part of a Production Language Modelcited by 159
- 2023In-Context Convergence of Transformerscited by 115
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 102
- 2018Model Reconstruction from Model Explanationscited by 86
- 2023Transformers as Support Vector Machinescited by 74
- 2023Max-Margin Token Selection in Attention Mechanismcited by 58
10 more
- 2024Transformers Provably Learn Sparse Token Selection While Fully-Connected Nets Cannotcited by 22
- 2024Provably learning a multi-head attention layercited by 21
- 2024Implicit Regularization of Gradient Flow on One-Layer Softmax Attentioncited by 19
- 2013ROP: Matrix recovery via rank-one projectionscited by 18
- 2024Attention layers provably solve single-location regressioncited by 17
- 2024Benign Overfitting in Single-Head Attentioncited by 12
- 2021An Exact Poly-Time Membership-Queries Algorithm for Extraction a three-Layer ReLU Networkcited by 11
- 2025Asymptotics of SGD in Sequence-Single Index Models and Single-Layer Attention Networkscited by 9
- 2025High-Dimensional Analysis of Single-Layer Attention for Sparse-Token Classificationcited by 6
- 2024Learning Linear Attention in Polynomial Timecited by 5
Built on by
Citing papers per year: 2026: 1.
1 paper.