arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2601.16873cs.LG
收藏

通过查询证明学习注意力

Provably Learning Attention with Queries

University of Oxford(牛津大学);Saarland University(萨尔兰大学)

Satwik Bhattamishra, Kulin Shah, Michael Hahn, Varun Kanade

AI总结:

本文通过查询证明学习单头注意力模型的可行性,并探讨了多头注意力的不可识别性问题。

摘要:

我们研究了通过黑盒访问序列模型输出来学习基于Transformer的序列模型的问题。在这种情况下,学习者可以自适应地用任意向量序列查询 oracle 并观察相应的实值输出。我们从最简单的情况开始,即单头 softmax-attention 回归器。我们证明,对于宽度为 d 的模型,存在一个简单的算法,可以使用 O(d²) 次查询精确地学习单头注意力的参数。进一步,我们证明,如果存在一种算法可以学习 ReLU 前馈网络 (FFN),则单头算法可以轻松地适应于学习具有单头注意力的一层 Transformer。接下来,受头维度 r 远小于 d 的情形启发,我们提供了一种随机算法,通过压缩感知论证,使用 O(rd) 次查询学习基于单头注意力的模型。我们还研究了对噪声 oracle 访问的鲁棒性,证明在温和的范数和边距条件下,即使输出仅提供到加法容忍度,参数也可以在多项式数量的查询下被估计到 ε 准确度。最后,我们证明多头注意力参数一般无法从值查询中识别出来——不同的参数化可以诱导相同的输入-输出映射。因此,没有额外的结构假设,无法获得类似单头设置的保证。

英文摘要:

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 corresponding real-valued output. We begin with the simplest case, a single-head softmax-attention regressor. We show that for a model with width $d$, there is an elementary algorithm to learn the parameters of single-head attention exactly with $O(d^2)$ 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, motivated by the regime where the head dimension $r \ll d$, we provide a randomised algorithm that learns single-head attention-based models 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 show that multi-head attention parameters are not identifiable from value queries in general -- distinct parameterisations can induce the same input-output map. Hence, guarantees analogous to the single-head setting are impossible without additional structural assumptions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑