Twins: Revisiting the Design of Spatial Attention in Vision Transformers

By Xiangxiang Chu, Zhi Tian, Yuqing Wang, Haibing Ren, Xiaolin Wei, Huaxia Xia, Chunhua Shen. 2021

1,341 citations recorded by the source corpus.

Very recently, a variety of vision transformer architectures for dense prediction tasks have been proposed and they show that the design of spatial attention is critical to their success in these tasks. In this work, we revisit the design of the spatial attention and demonstrate that a carefully-devised yet simple spatial attention mechanism performs favourably against the state-of-the-art schemes. As a result, we propose two vision transformer architectures, namely, Twins-PCPVT and Twins-SVT. Our proposed architectures are highly-efficient and easy to implement, only involving matrix multiplications that are highly optimized in modern deep learning frameworks. More importantly, the proposed architectures achieve excellent performance on a wide range of visual tasks, including image level classification as well as dense detection and segmentation. The simplicity and strong performance suggest that our proposed architectures may serve as stronger backbones for many vision tasks. Our code is released at https://github.com/Meituan-AutoML/Twins .

Subfields: Computer Vision and Pattern Recognition, Electrical and Electronic Engineering, Geology

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Dacheng Tao
  3. Ming-Hsuan Yang
  4. Xiaogang Wang
  5. Chunhua Shen
  6. Chen Change Loy
  7. Alan L. Yuille
  8. Trevor Darrell

In Electrical and Electronic Engineering

  1. Fahad Shahbaz Khan
  2. Christoph Feichtenhofer
  3. Yanghao Li
  4. Yu Qiao
  5. Ming-Hsuan Yang
  6. Luc Van Gool
  7. Radu Timofte
  8. Dacheng Tao

In Geology

  1. Li Jiang
  2. Hongsheng Li
  3. Jiaya Jia
  4. Hengshuang Zhao
  5. Shu Liu
  6. Mohammed Bennamoun
  7. Hao Xiang
  8. Jiaqi Ma

Citations in the corpus