arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.16101cs.CVcs.AI
收藏

一种适用于多种骨干神经网络的通用共享注意力机制

A Generic Shared Attention Mechanism for Various Backbone Neural Networks

School of Computer Science and Engineering, Sun Yat-sen University(中山大学计算机科学与工程学院);Purdue University(普渡大学);Northwestern University(西北大学)

Zhongzhan Huang, Senwei Liang, Mingfu Liang, Liang Lin

AI总结:

针对各层重复部署自注意力模块造成参数浪费的问题,本文提出跨层共享SAM并用LSTM桥接注意力图的DIA,在多种骨干和视觉任务上实现一致增强。

摘要:

自注意力机制已成为提升各类骨干神经网络性能的关键组成部分。然而,当前主流方法想当然地在网络的每一层分别嵌入新设计的自注意力模块(SAM),而没有充分挖掘其参数潜力。这会导致性能次优,并且随着网络深度增加,参数消耗也随之上升。为改进这一范式,本文首先呈现了一个反直觉但内在固有的现象:SAM在不同层之间往往会产生强相关的注意力图,其平均Pearson相关系数最高可达0.85。受这一内在观察启发,我们提出了Dense-and-Implicit Attention(DIA,稠密隐式注意力),它直接在各层之间共享SAM,并采用长短期记忆模块来校准并桥接不同层的高相关注意力图,从而提升SAM的参数利用效率。DIA的这一设计也与神经网络的动力系统视角相一致。通过大量实验,我们证明了简单而有效的DIA能够在图像分类、目标检测以及使用扩散模型的图像生成等任务中,持续增强包括ResNet、Transformer和UNet在内的多种网络骨干。

英文摘要:

The self-attention mechanism has emerged as a critical component for improving the performance of various backbone neural networks. However, current mainstream approaches individually incorporate newly designed self-attention modules (SAMs) into each layer of the network for granted without fully exploiting their parameters' potential. This leads to suboptimal performance and increased parameter consumption as the network depth increases. To improve this paradigm, in this paper, we first present a counterintuitive but inherent phenomenon: SAMs tend to produce strongly correlated attention maps across different layers, with an average Pearson correlation coefficient of up to 0.85. Inspired by this inherent observation, we propose Dense-and-Implicit Attention (DIA), which directly shares SAMs across layers and employs a long short-term memory module to calibrate and bridge the highly correlated attention maps of different layers, thus improving the parameter utilization efficiency of SAMs. This design of DIA is also consistent with the neural network's dynamical system perspective. Through extensive experiments, we demonstrate that our simple yet effective DIA can consistently enhance various network backbones, including ResNet, Transformer, and UNet, across tasks such as image classification, object detection, and image generation using diffusion models.

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

↑