arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.08045quant-phcs.LG
收藏

超越经典注意:用于可扩展计算的量子注意

Beyond Classical Attention: Quantum Attention for Scalable Computation

Department of XXX, University of YYY, Location, Country(YYY大学XXX系);School of ZZZ, Institute of WWW, Location, Country(WWW研究所ZZZ学院)

Xuyang Guo, Zhao Song, Xin Yang, Ruizhe Zhang

AI总结:

本文提出利用Grover算法高效计算稀疏注意矩阵,实现量子加速并展示低秩结构优势。

摘要:

随着大型语言模型(LLMs)在各种任务中表现出色,基于注意的模型已深刻改变了机器学习领域。由于注意计算在模型推理和训练中占主要计算开销,高效计算注意矩阵已成为加速大型语言模型的核心挑战之一。众所周知,量子机器在计算上有优势,但量子计算在LLMs中的作用仍鲜为人知。在本工作中,我们专注于利用Grover搜索算法高效计算稀疏注意矩阵。通过与经典算法的比较,我们证明我们的方法在多项式时间内实现了量子加速。此外,我们发现生成的量子注意矩阵自然表现出低秩结构,为高效建模提供了进一步的理论支持。此外,在特定的注意矩阵计算背景下,我们对所提出算法的误差和时间复杂度进行了系统和详细的分析。

英文摘要:

As large language models (LLMs) demonstrate outstanding performance across various tasks, attention-driven models have profoundly transformed the field of machine learning. Since attention computations account for the primary computational overhead in both model inference and training, efficiently computing attention matrices has become one of the core challenges in accelerating large language models. It is well-known that quantum machines possess computational advantages over classical machines, and the role of quantum computing in LLMs remains largely unexplored. In this work, we focus on leveraging the Grover search algorithm to efficiently compute a sparse attention matrix. Through comparisons with classical algorithms, we demonstrate that our method achieves quantum acceleration in polynomial time. Additionally, we observe that the generated quantum attention matrices naturally exhibit low-rank structures, providing further theoretical support for efficient modeling. Moreover, within the specific context of attention matrix computation, we conduct a systematic and detailed analysis of the error and time complexity of the proposed algorithm.

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

↑