Do Vision Transformers See Like Convolutional Neural Networks?

08/19/2021
by   Maithra Raghu, et al.
33

Convolutional neural networks (CNNs) have so far been the de-facto model for visual data. Recent work has shown that (Vision) Transformer models (ViT) can achieve comparable or even superior performance on image classification tasks. This raises a central question: how are Vision Transformers solving these tasks? Are they acting like convolutional networks, or learning entirely different visual representations? Analyzing the internal representation structure of ViTs and CNNs on image classification benchmarks, we find striking differences between the two architectures, such as ViT having more uniform representations across all layers. We explore how these differences arise, finding crucial roles played by self-attention, which enables early aggregation of global information, and ViT residual connections, which strongly propagate features from lower to higher layers. We study the ramifications for spatial localization, demonstrating ViTs successfully preserve input spatial information, with noticeable effects from different classification methods. Finally, we study the effect of (pretraining) dataset scale on intermediate features and transfer learning, and conclude with a discussion on connections to new architectures such as the MLP-Mixer.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 3

page 7

page 8

page 16

page 23

page 24

page 25

page 29

12/20/2014

Visualizing and Comparing Convolutional Neural Networks

Convolutional Neural Networks (CNNs) have achieved comparable error rate...
11/02/2021

Can Vision Transformers Perform Convolution?

Several recent studies have demonstrated that attention-based networks, ...
11/23/2016

Multigrid Neural Architectures

We propose a multigrid extension of convolutional neural networks (CNNs)...
05/10/2021

AFINet: Attentive Feature Integration Networks for Image Classification

Convolutional Neural Networks (CNNs) have achieved tremendous success in...
11/12/2021

Convolutional Nets Versus Vision Transformers for Diabetic Foot Ulcer Classification

This paper compares well-established Convolutional Neural Networks (CNNs...
12/17/2021

Towards End-to-End Image Compression and Analysis with Transformers

We propose an end-to-end image compression and analysis model with Trans...
11/26/2014

Understanding Deep Image Representations by Inverting Them

Image representations, from SIFT and Bag of Visual Words to Convolutiona...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.