arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2204.04667cs.LGcs.CLcs.CV
收藏

线性复杂度随机自注意力机制

Linear Complexity Randomized Self-attention Mechanism

The University of Hong Kong(香港大学);ByteDance Inc.(字节跳动公司);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室)

Lin Zheng, Chong Wang, Lingpeng Kong

摘要:

最近,随机特征注意力(RFAs)被提出来近似softmax注意力的线性时间和空间复杂度通过线性化的指数核。在本文中,我们首先提出了一个新的角度来理解这种近似的偏见,通过重新铸造RFAs作为自归一化的重要性采样器。这种观点进一步揭示了整个softmax注意力的\emph{unbiased}估计量,称为随机注意力(RA)。RA通过查询特定的分布构造正随机特征,并极大地提高了近似保真度,尽管表现出二次复杂性。通过结合RA的表达能力和RFA的效率,我们开发了一种新的线性复杂性自注意力机制,称为线性随机注意(LARA)。在各个领域的广泛实验表明,RA和LARA显着提高了RFA的性能,由一个相当大的利润。

英文摘要:

Recently, random feature attentions (RFAs) are proposed to approximate the softmax attention in linear time and space complexity by linearizing the exponential kernel. In this paper, we first propose a novel perspective to understand the bias in such approximation by recasting RFAs as self-normalized importance samplers. This perspective further sheds light on an \emph{unbiased} estimator for the whole softmax attention, called randomized attention (RA). RA constructs positive random features via query-specific distributions and enjoys greatly improved approximation fidelity, albeit exhibiting quadratic complexity. By combining the expressiveness in RA and the efficiency in RFA, we develop a novel linear complexity self-attention mechanism called linear randomized attention (LARA). Extensive experiments across various domains demonstrate that RA and LARA significantly improve the performance of RFAs by a substantial margin.

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

↑