论文标题

有效的注意力网络:通过搜索插入地点来加速注意力

Efficient Attention Network: Accelerate Attention by Searching Where to Plug

论文作者

Huang, Zhongzhan, Liang, Senwei, Liang, Mingfu, He, Wei, Yang, Haizhao

论文摘要

最近,提出了许多插件的自我发场模块,以通过利用深卷积神经网络(CNN)的内部信息来增强模型的概括。以前的作品重点是针对特定功能的注意力模块的设计,例如轻度加权或以任务为导向的注意力。但是,他们忽略了在哪里插入注意模块的重要性,因为他们将模块与整个CNN主链的每个块分别连接在一起,从而导致计算成本和参数数量随着网络深度的增长。因此,我们提出了一个称为有效注意网络(EAN)的框架,以提高现有注意模块的效率。在EAN中,我们利用共享机制(Huang等,2020)在主链中共享注意力模块,并通过增强学习来搜索在哪里连接共享注意力模块。最后,我们获得了主链和模块之间稀疏连接的注意力网络,而(1)保持准确性(2)降低额外的参数增量和(3)加速推理。广泛使用基准和流行注意力网络的广泛实验表明了EAN的有效性。此外,我们从经验上说明,我们的EAN具有转移到其他任务并捕获内容丰富的功能的能力。该代码可从https://github.com/gbup-group/ean-ean-force-prestion-network获得。

Recently, many plug-and-play self-attention modules are proposed to enhance the model generalization by exploiting the internal information of deep convolutional neural networks (CNNs). Previous works lay an emphasis on the design of attention module for specific functionality, e.g., light-weighted or task-oriented attention. However, they ignore the importance of where to plug in the attention module since they connect the modules individually with each block of the entire CNN backbone for granted, leading to incremental computational cost and number of parameters with the growth of network depth. Thus, we propose a framework called Efficient Attention Network (EAN) to improve the efficiency for the existing attention modules. In EAN, we leverage the sharing mechanism (Huang et al. 2020) to share the attention module within the backbone and search where to connect the shared attention module via reinforcement learning. Finally, we obtain the attention network with sparse connections between the backbone and modules, while (1) maintaining accuracy (2) reducing extra parameter increment and (3) accelerating inference. Extensive experiments on widely-used benchmarks and popular attention networks show the effectiveness of EAN. Furthermore, we empirically illustrate that our EAN has the capacity of transferring to other tasks and capturing the informative features. The code is available at https://github.com/gbup-group/EAN-efficient-attention-network.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源