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

少即是多:在视觉Transformer中少关注

Less is More: Pay Less Attention in Vision Transformers

Monash University(蒙纳士大学)

Zizheng Pan, Bohan Zhuang, Haoyu He, Jing Liu, Jianfei Cai

摘要:

Transformers已成为深度学习中的主导架构之一,特别是作为计算机视觉中卷积神经网络(CNN)的强大替代方案。然而,Transformer训练和推理在以前的作品中可能是昂贵的,由于在一个长序列的表示,特别是对于高分辨率密集预测任务的自我注意的二次复杂性。为此,我们提出了一种新的较少注意力的视觉Transformer(LIT),建立在Transformers中的早期自我注意力层仍然专注于局部模式的事实上,并在最近的分层视觉Transformer中带来了一些好处。具体来说,我们提出了一个层次化的Transformer,我们使用纯多层感知器(MLP)在早期阶段编码丰富的本地模式,同时应用自我注意模块来捕获更深层次的依赖关系。此外,我们进一步提出了一个学习的可变形令牌合并模块,以自适应融合信息补丁在一个非均匀的方式。LIT在图像识别任务中取得了很好的性能,包括图像分类,目标检测和实例分割,作为许多视觉任务的强大骨干。代码可在:https://github.com/zhuang-group/LIT

英文摘要:

Transformers have become one of the dominant architectures in deep learning, particularly as a powerful alternative to convolutional neural networks (CNNs) in computer vision. However, Transformer training and inference in previous works can be prohibitively expensive due to the quadratic complexity of self-attention over a long sequence of representations, especially for high-resolution dense prediction tasks. To this end, we present a novel Less attention vIsion Transformer (LIT), building upon the fact that the early self-attention layers in Transformers still focus on local patterns and bring minor benefits in recent hierarchical vision Transformers. Specifically, we propose a hierarchical Transformer where we use pure multi-layer perceptrons (MLPs) to encode rich local patterns in the early stages while applying self-attention modules to capture longer dependencies in deeper layers. Moreover, we further propose a learned deformable token merging module to adaptively fuse informative patches in a non-uniform manner. The proposed LIT achieves promising performance on image recognition tasks, including image classification, object detection and instance segmentation, serving as a strong backbone for many vision tasks. Code is available at: https://github.com/zhuang-group/LIT

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

↑