支持基:超越有限条目的快速注意力
Support Basis: Fast Attention Beyond Bounded Entries
AI总结:
本文提出支持基分解技术,无需有限条目假设实现高效注意力推理与训练,理论证明其亚二次运行时间并验证其计算效率与任务性能。
摘要:
大型语言模型(LLMs)在广泛任务上表现出色,但softmax注意力的二次复杂度仍是可扩展性的瓶颈。Alman和Song(NeurIPS 2023a; NeurIPS 2024a)提出了亚二次时间的注意力推断和训练算法,但依赖于限制性的有限条目假设。我们证明该假设在实践中很少成立,显著限制了其在现代LLMs中的应用。本文引入支持基分解,一种无需有限条目假设的准确高效注意力推断和训练技术。我们实证显示查询和键矩阵的条目呈现亚高斯行为。利用这一广泛观察到的性质,我们对稀疏成分进行精确计算,对密集成分进行多项式近似。不依赖限制性假设,我们理论证明算法实现亚二次运行时间并匹配先前工作的近似误差,且实证验证其计算效率和下游任务性能。我们进一步将方法推广到多阈值设置,消除所有分布假设,提供多项式注意力经验成功的首个理论依据。此外,我们证明softmax注意力可以由多个多项式注意力近似,具有显著更小的ℓp误差。
英文摘要:
Large language models (LLMs) have demonstrated remarkable performance across a wide range of tasks. However, the quadratic complexity of softmax attention remains a central bottleneck that limits their scalability. Alman and Song (NeurIPS 2023a; NeurIPS 2024a) proposed sub-quadratic time algorithms for attention inference and training, respectively, but they rely on the restrictive bounded-entry assumption. We show that this assumption rarely holds in practice, which significantly limits their applicability to modern LLMs. In this paper, we introduce support-basis decomposition, a new technique for accurate and efficient attention inference and training without the bounded-entry assumption. We empirically show that the entries of the query and key matrices exhibit sub-Gaussian behavior. Leveraging this widely observed property, we perform exact computation on sparse components and polynomial approximation on dense components. Without relying on restrictive assumptions, we theoretically show that our algorithm achieves sub-quadratic runtime while matching the approximation error of prior work, and we empirically validate its computational efficiency and downstream task performance. We further generalize our method to a multi-threshold setting that eliminates all distributional assumptions, providing the first theoretical justification for the empirical success of polynomial attention. Moreover, we show that softmax attention can be closely approximated by multiple polynomial attentions with significantly smaller $\ell_p$ error.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。