FAST:用于加速Transformers的可因式分解注意力
FAST: Factorizable Attention for Speeding up Transformers
AI总结:
受快速多极子法启发,提出可因式分解的FAST注意力机制,将Transformer复杂度降至$O(N)$,在保持注意力矩阵完整表示与全对全关系的同时实现稳健性能。
摘要:
受原始快速多极子法和改进的快速高斯变换中固有的因式分解启发,我们引入了一种可因式分解的注意力形式,该形式在高维空间中高效运行。这种方法将transformers中注意力机制的计算和内存复杂度从$O(N^2)$降低到$O(N)$。与之前的尝试相比,我们的工作提出了一种线性缩放的注意力机制,该机制保持了注意力矩阵的完整表示,没有在稀疏化上妥协,并且包含了token之间的全对全关系。我们探索了这种新注意力度量的性质,并在各种标准设置下进行了测试。结果表明,我们的注意力机制具有稳健的性能,并在使用自注意力的各种应用中具有广阔的前景。
英文摘要:
Motivated by the factorization inherent in the original fast multipole method and the improved fast Gauss transform we introduce a factorable form of attention that operates efficiently in high dimensions. This approach reduces the computational and memory complexity of the attention mechanism in transformers from $O(N^2)$ to $O(N)$. In comparison to previous attempts, our work presents a linearly scaled attention mechanism that maintains the full representation of the attention matrix without compromising on sparsification and incorporates the all-to-all relationship between tokens. We explore the properties of our new attention metric and conduct tests in various standard settings. Results indicate that our attention mechanism has a robust performance and holds significant promise for diverse applications where self-attention is used.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。