How Do Vision Transformers Work?

By Namuk Park, Songkuk Kim. International Conference on Learning Representations, 2022

695 citations recorded by the source corpus.

The success of multi-head self-attentions (MSAs) for computer vision is now indisputable. However, little is known about how MSAs work. We present fundamental explanations to help better understand the nature of MSAs. In particular, we demonstrate the following properties of MSAs and Vision Transformers (ViTs): (1) MSAs improve not only accuracy but also generalization by flattening the loss landscapes. Such improvement is primarily attributable to their data specificity, not long-range dependency. On the other hand, ViTs suffer from non-convex losses. Large datasets and loss landscape smoothing methods alleviate this problem; (2) MSAs and Convs exhibit opposite behaviors. For example, MSAs are low-pass filters, but Convs are high-pass filters. Therefore, MSAs and Convs are complementary; (3) Multi-stage neural networks behave like a series connection of small individual models. In addition, MSAs at the end of a stage play a key role in prediction. Based on these insights, we propose AlterNet, a model in which Conv blocks at the end of a stage are replaced with MSA blocks. AlterNet outperforms CNNs not only in large data regimes but also in small data regimes. The code is available at https://github.com/xxxnell/how-do-vits-work.

Subfields: Cognitive Neuroscience, Computer Vision and Pattern Recognition

View Paper: https://www.semanticscholar.org/paper/430bab3890e1e52c4c1f74900b0e408e47a1cb8f

How researchers see this paper

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

In Cognitive Neuroscience

  1. Xinchao Wang
  2. Shuicheng Yan
  3. Yu Qiao
  4. Salman Hameed Khan
  5. Jianfei Cai
  6. Shahaf E. Finder
  7. Roy Amoyal
  8. Oren Freifeld

In Computer Vision and Pattern Recognition

  1. Dacheng Tao
  2. Luc Van Gool
  3. Jiashi Feng
  4. Fahad Shahbaz Khan
  5. Ming-Hsuan Yang
  6. Shuicheng Yan
  7. Yu Qiao
  8. Xiaogang Wang

Citations in the corpus