arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2106.04263cs.CV
收藏

局部注意与动态深度卷积的关系

On the Connection between Local Attention and Dynamic Depth-wise Convolution

Peking University(北京大学);Microsoft Research Asia(微软亚洲研究院);Baidu Inc.(百度公司)

Qi Han, Zejia Fan, Qi Dai, Lei Sun, Ming-Ming Cheng, Jiaying Liu, Jingdong Wang

摘要:

视觉Transformer(ViT)在视觉识别方面达到了最先进的性能,而变体Local视觉Transformer则进一步改进。局部视觉Transformer中的主要组件局部注意力在小的局部窗口上单独执行注意力。我们将局部注意力重新表述为通道局部连接层,并从两种网络正则化方式,稀疏连接和权重共享以及权重计算来分析它。稀疏连接:通道之间没有连接,每个位置都连接到一个小的局部窗口内的位置。权重共享:一个位置的连接权重在通道之间或在每组通道内共享。动态权重:根据每个图像实例动态预测连接权重。我们指出,局部注意力类似于深度卷积及其在稀疏连接中的动态版本。主要区别在于权重共享-深度卷积在空间位置上共享连接权重(内核权重)。我们根据经验观察到,基于深度卷积和具有较低计算复杂度的动态变体的模型在ImageNet分类、COCO目标检测和ADE语义分割方面的表现与Swin Transformer相当,有时甚至略优于Swin Transformer,即Local视觉Transformer的实例。这些观察表明,局部视觉Transformer利用两种正则化形式和动态权重来增加网络容量。代码可在https://github.com/Atten4Vis/DemystifyLocalViT上获得。

英文摘要:

Vision Transformer (ViT) attains state-of-the-art performance in visual recognition, and the variant, Local Vision Transformer, makes further improvements. The major component in Local Vision Transformer, local attention, performs the attention separately over small local windows. We rephrase local attention as a channel-wise locally-connected layer and analyze it from two network regularization manners, sparse connectivity and weight sharing, as well as weight computation. Sparse connectivity: there is no connection across channels, and each position is connected to the positions within a small local window. Weight sharing: the connection weights for one position are shared across channels or within each group of channels. Dynamic weight: the connection weights are dynamically predicted according to each image instance. We point out that local attention resembles depth-wise convolution and its dynamic version in sparse connectivity. The main difference lies in weight sharing - depth-wise convolution shares connection weights (kernel weights) across spatial positions. We empirically observe that the models based on depth-wise convolution and the dynamic variant with lower computation complexity perform on-par with or sometimes slightly better than Swin Transformer, an instance of Local Vision Transformer, for ImageNet classification, COCO object detection and ADE semantic segmentation. These observations suggest that Local Vision Transformer takes advantage of two regularization forms and dynamic weight to increase the network capacity. Code is available at https://github.com/Atten4Vis/DemystifyLocalViT.

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

↑