An Empirical Study of Spatial Attention Mechanisms in Deep Networks

By Xizhou Zhu, Dazhi Cheng, Zheng Zhang, Stephen Lin, Jifeng Dai. 2019

543 citations recorded by the source corpus.

Attention mechanisms have become a popular component in deep neural networks, yet there has been little examination of how different influencing factors and methods for computing attention from these factors affect performance. Toward a better general understanding of attention mechanisms, we present an empirical study that ablates various spatial attention elements within a generalized attention formulation, encompassing the dominant Transformer attention as well as the prevalent deformable convolution and dynamic convolution modules. Conducted on a variety of applications, the study yields significant findings about spatial attention in deep networks, some of which run counter to conventional understanding. For example, we find that the query and key content comparison in Transformer attention is negligible for self-attention, but vital for encoder-decoder attention. A proper combination of deformable convolution with key content only saliency achieves the best accuracy-efficiency tradeoff in self-attention. Our results suggest that there exists much room for improvement in the design of attention mechanisms.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Model Architectures

How researchers see this paper

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

In Artificial Intelligence

  1. Alan L. Yuille
  2. Jianfeng Gao
  3. Ping Luo
  4. Chen Change Loy
  5. Xiaogang Wang
  6. Chunhua Shen
  7. Luc Van Gool
  8. Liang-Chieh Chen

In Computer Vision and Pattern Recognition

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

In Model Architectures

  1. Alan L. Yuille
  2. Xiaogang Wang
  3. Hongsheng Li
  4. Chen Change Loy
  5. Liang-Chieh Chen
  6. Gao Huang
  7. Ping Luo
  8. X. Zhang

Citations in the corpus