Skip to main content
QUICK REVIEW

[论文解读] Locally Enhanced Self-Attention: Combining Self-Attention and Convolution as Local and Context Terms

Chenglin Yang, Siyuan Qiao|arXiv (Cornell University)|Jul 12, 2021
Advanced Neural Network Applications参考文献 52被引用 4
一句话总结

该论文提出了一种新型注意力机制——局部增强自注意力(LESA),通过共享的查询/键/值投影将自注意力分解为局部(一元)和上下文(二元)两项。该方法利用分组卷积增强局部项,并引入一种动态融合模块,以自适应地结合两项,从而在ImageNet、COCO目标检测和实例分割任务上实现最先进性能,且参数量少于基线模型。

ABSTRACT

Self-Attention has become prevalent in computer vision models. Inspired by fully connected Conditional Random Fields (CRFs), we decompose self-attention into local and context terms. They correspond to the unary and binary terms in CRF and are implemented by attention mechanisms with projection matrices. We observe that the unary terms only make small contributions to the outputs, and meanwhile standard CNNs that rely solely on the unary terms achieve great performances on a variety of tasks. Therefore, we propose Locally Enhanced Self-Attention (LESA), which enhances the unary term by incorporating it with convolutions, and utilizes a fusion module to dynamically couple the unary and binary operations. In our experiments, we replace the self-attention modules with LESA. The results on ImageNet and COCO show the superiority of LESA over convolution and self-attention baselines for the tasks of image recognition, object detection, and instance segmentation. The code is made publicly available.

研究动机与目标

  • 为解决标准自注意力中局部项贡献有限的问题,该问题虽对精确特征表示至关重要,但因Softmax归一化而被低估。
  • 通过与分组卷积结合,提升自注意力中一元(局部)项的表征能力,克服身份旁路连接的局限性。
  • 利用输入相关的注意力权重,动态耦合局部与上下文项,实现自适应融合,从而在各类视觉任务中提升性能。
  • 证明通过并行、可学习的融合机制结合卷积与自注意力,可获得比现有方法更优的准确率与效率。

提出的方法

  • 通过共享的查询、键和值投影,将自注意力分解为一元(局部)和二元(上下文)项,受全连接CRF启发。
  • 通过用分组卷积替代身份旁路连接,增强一元项,实现更丰富的局部特征学习。
  • 通过分组卷积实现多头注意力,随后接投影层,以保持多头容量。
  • 提出一种动态融合模块,计算可学习的、空间与通道自适应的权重 ωˡ(x),在逐元素相加前调制二元项。
  • 对一元项和二元项使用相同的输入特征,确保参数效率的同时支持端到端训练。
  • 在ResNet和WRN主干网络的最后两个阶段,用LESA替换空间卷积层,并在ImageNet、COCO目标检测和实例分割上进行评估。

实验结果

研究问题

  • RQ1能否显著增强自注意力中的局部项,以提升特征表示能力,同时不损害全局上下文建模?
  • RQ2在自注意力的一元项中整合卷积操作,是否能带来优于标准自注意力或单独卷积的性能提升?
  • RQ3动态的、输入相关的融合机制能否优于静态或固定权重的局部与上下文项融合?
  • RQ4所提出的局部增强自注意力(LESA)是否在有效性与参数效率上优于现有的混合卷积-自注意力架构?

主要发现

  • 在ResNet50上,LESA在ImageNet上达到79.55%的top-1准确率,优于自注意力(78.69%)和注意力增强(78.74%),且参数更少。
  • 在COCO目标检测与实例分割任务中,使用WRN50主干的LESA在所有物体尺度(小、中、大)上均优于卷积、自注意力和可变形卷积基线。
  • 消融实验表明,动态融合模块至关重要,因为LESA(79.55% top-1)显著优于静态LESA(79.12%)。
  • 通过增强局部特征,LESA减少了对大型相似度矩阵的依赖,可能有助于缓解自注意力模型中常见的内存低效问题。
  • 模型在实例分割中表现出更优的掩码质量与物体细节检测能力,表明局部-上下文联合学习带来了更好的语义一致性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。