Do Vision Transformers See Like Convolutional Neural Networks?
arXiv:2108.08810
Abstract
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.
References in corpus (16)
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MLP-Mixer: An all-MLP Architecture for Vision
- Transfusion: Understanding Transfer Learning for Medical Imaging
- Convolutional Neural Networks as a Model of the Visual System: Past, Present, and Future
- Similarity of Neural Network Representations Revisited
- Algorithms for Learning Kernels Based on Centered Alignment
- Visual Transformers: Token-based Image Representation and Processing for Computer Vision
- Intriguing Properties of Vision Transformers
- What you can cram into a single vector: Probing sentence embeddings for linguistic properties
- Stand-Alone Self-Attention in Vision Models
- Do Wide and Deep Networks Learn the Same Things? Uncovering How Neural Network Representations Vary with Width and Depth
- Are Pre-trained Convolutions Better than Pre-trained Transformers?
- Emerging Cross-lingual Structure in Pretrained Language Models
- Supervised Transfer Learning at Scale for Medical Imaging
- The Bottom-up Evolution of Representations in the Transformer: A Study with Machine Translation and Language Modeling Objectives
- Investigating Multilingual NMT Representations at Scale
Cited by in corpus (11)
- Universal Paralinguistic Speech Representations Using Self-Supervised Conformers
- MetaFormer Is Actually What You Need for Vision
- Comparison Analysis of Traditional Machine Learning and Deep Learning Techniques for Data and Image Classification
- Similarity of Neural Network Models: A Survey of Functional and Representational Measures
- Pruning Self-attentions into Convolutional Layers in Single Path
- Multi-Scale High-Resolution Vision Transformer for Semantic Segmentation
- TransMix: Attend to Mix for Vision Transformers
- Self-supervised pseudo-colorizing of masked cells
- Do Self-Supervised and Supervised Methods Learn Similar Visual Representations?
- Hybrid BYOL-ViT: Efficient approach to deal with small datasets
- Physics-Augmented Learning: A New Paradigm Beyond Physics-Informed Learning