arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1812.01243cs.CVcs.AIcs.LG
收藏

高效注意力:具有线性复杂度的注意力机制

Efficient Attention: Attention with Linear Complexities

SenseTime(商汤科技);SenseTime International(商汤国际);The Chinese University of Hong Kong(香港中文大学)

Zhuoran Shen, Mingyuan Zhang, Haiyu Zhao, Shuai Yi, Hongsheng Li

AI总结:

本文提出一种与点积注意力等效但具有线性复杂度的高效注意力机制,显著降低内存和计算成本,并在 MS-COCO 检测分割及 Scene Flow 立体深度估计上取得显著性能提升。

摘要:

点积注意力在计算机视觉和自然语言处理中有着广泛的应用。然而,其内存和计算成本随输入尺寸呈二次增长,这种增长阻碍了其在高分辨率输入上的应用。为了弥补这一缺陷,本文提出了一种新颖的高效注意力机制,该机制与点积注意力等效,但内存和计算成本显著降低。其资源效率使得注意力模块能够更广泛、更灵活地集成到网络中,从而获得更好的精度。实证评估证明了其优势的有效性。高效注意力模块在 MS-COCO 2017 上为物体检测器和实例分割器带来了显著的性能提升。此外,资源效率使注意力机制得以普及到复杂模型中,而在这些模型中,高昂的成本曾禁止使用点积注意力。作为一个示例,采用高效注意力的模型在 Scene Flow 数据集上实现了立体深度估计的最新精度。代码可在 https://github.com/cmsflash/efficient-attention 获取。

英文摘要:

Dot-product attention has wide applications in computer vision and natural language processing. However, its memory and computational costs grow quadratically with the input size. Such growth prohibits its application on high-resolution inputs. To remedy this drawback, this paper proposes a novel efficient attention mechanism equivalent to dot-product attention but with substantially less memory and computational costs. Its resource efficiency allows more widespread and flexible integration of attention modules into a network, which leads to better accuracies. Empirical evaluations demonstrated the effectiveness of its advantages. Efficient attention modules brought significant performance boosts to object detectors and instance segmenters on MS-COCO 2017. Further, the resource efficiency democratizes attention to complex models, where high costs prohibit the use of dot-product attention. As an exemplar, a model with efficient attention achieved state-of-the-art accuracies for stereo depth estimation on the Scene Flow dataset. Code is available at https://github.com/cmsflash/efficient-attention.

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

↑