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
翻译:最近,提出了许多插子自控模块,以通过利用深层神经神经网络的内部信息加强模式的普及。以前的工作重点是为特定功能设计关注模块,例如轻量度或任务导向的注意模块。然而,它们忽视了将模块单独与整个CNN骨干每个块连接起来的注意模块的重要性,因为模块与全CNN骨干中的每个块连接在一起,导致计算成本和参数数量的递增,从而随着网络深度的增长而加快。因此,我们提议了一个称为高效关注网络的框架,以提高现有关注模块的效率。在EAN中,我们利用共享机制(Huang等人,2020年)在骨干中分享关注模块,并搜索如何通过强化学习将共享关注模块连接到共同关注模块。最后,我们获得关注网络,骨干和模块之间联系甚少,同时(1) 保持准确性(2) 减少额外参数的递增,(3) 加速推论。对广泛使用的基准和大众关注网络的广泛实验显示了EAN的有效性。此外,我们从经验上表明,我们的共享机制(Huang等人,HO-AEA)具有向其他指令/网络传输能力。