Patches Are All You Need?

By Asher Trockman, J. Kolter. 2022

538 citations recorded by the source corpus.

Although convolutional networks have been the dominant architecture for vision tasks for many years, recent experiments have shown that Transformer-based models, most notably the Vision Transformer (ViT), may exceed their performance in some settings. However, due to the quadratic runtime of the self-attention layers in Transformers, ViTs require the use of patch embeddings, which group together small regions of the image into single input features, in order to be applied to larger image sizes. This raises a question: Is the performance of ViTs due to the inherently-more-powerful Transformer architecture, or is it at least partly due to using patches as the input representation? In this paper, we present some evidence for the latter: specifically, we propose the ConvMixer, an extremely simple model that is similar in spirit to the ViT and the even-more-basic MLP-Mixer in that it operates directly on patches as input, separates the mixing of spatial and channel dimensions, and maintains equal size and resolution throughout the network. In contrast, however, the ConvMixer uses only standard convolutions to achieve the mixing steps. Despite its simplicity, we show that the ConvMixer outperforms the ViT, MLP-Mixer, and some of their variants for similar parameter counts and data set sizes, in addition to outperforming classical vision models such as the ResNet. Our code is available at https://github.com/locuslab/convmixer.

Subfields: Cognitive Neuroscience, Computer Vision and Pattern Recognition, Electrical and Electronic Engineering

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. Lu Yuan
  2. Jingdong Wang
  3. Shahaf E. Finder
  4. Trevor Darrell
  5. Saining Xie
  6. Roy Amoyal
  7. Christoph Feichtenhofer
  8. Oren Freifeld

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Dacheng Tao
  3. Ming-Hsuan Yang
  4. Xiaogang Wang
  5. Trevor Darrell
  6. Jitendra Malik
  7. Yi Yang
  8. Jiashi Feng

In Electrical and Electronic Engineering

  1. Lu Yuan
  2. Haixu Wu
  3. Mingsheng Long
  4. Bin Xiao
  5. Jianmin Wang
  6. Shahaf E. Finder
  7. Trevor Darrell
  8. X. Zhang

Citations in the corpus