Lune

ICLR2026顶会

Subquadratic Algorithms and Hardness for Attention with Any Temperature

Shreya Gupta, Boyang Huang, Barna Saha, Yinzhan Xu, Christopher Ye

2026年份
5被引次数
1顶会引用

摘要

Despite the popularity of the Transformer architecture, the standard algorithm for computing Attention suffers from quadratic time complexity in context length nn. Alman and Song showed that when the head dimension d=Θ(log⁡n)d = \Theta(\log n), subquadratic Attention is possible if and only if the inputs have small entries bounded by B=o(log⁡n)B = o(\sqrt{\log n}) in absolute values, under the Strong Exponential Time Hypothesis (SETH\mathsf{SETH}). Equivalently, subquadratic Attention is possible if and only if the softmax is applied with high temperature for d=Θ(log⁡n)d=\Theta(\log n). Running times of these algorithms depend exponentially on BB and thus they do not lead to even a polynomial-time algorithm outside the specific range of BB.

This naturally leads to the question: when can Attention be computed efficiently without strong assumptions on temperature? Are there fast attention algorithms that scale polylogarithmically with entry size BB? In this work, we resolve this question and characterize when fast Attention for arbitrary temperatures is possible. First, for all constant d=O(1)d = O(1), we give the first subquadratic O~(n2−1/d⋅polylog(B))\tilde{O}(n^{2 - 1/d} \cdot \mathrm{polylog}(B)) time algorithm for Attention with large BB. Our result holds even for matrices with large head dimension if they have low rank. Combined with a reduction from Gradient Computation to Attention, we obtain a subquadratic algorithm for the full LLM training process. Furthermore, we show that any substantial improvement on our algorithm is unlikely. In particular, we show that even when d=2Θ(log⁡∗n)d = 2^{\Theta(\log^* n)}, Attention requires n2−o(1)n^{2 - o(1)} time under SETH\mathsf{SETH}.

Finally, in the regime where d=poly(n)d = \mathrm{poly}(n), the standard algorithm requires O(n2d)O(n^{2} d) time while previous lower bounds only ruled out algorithms with truly subquadratic time in nn. We close this gap and show that the standard algorithm is optimal under popular fine-grained complexity assumptions.

问问这篇 Paper

智能体会读完全文。

Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。

可以从这些问题问起

智能体调用

Luneget_paper_fulltext

在 Lune 里问

免费开始,无需绑卡

引用它的顶会 Paper1

问问它们各自怎么用它

它引用的顶会 Paper24

相关 Paper

黄昏的海面,两侧是细线勾勒的悬崖