Do Vision Transformers See Like Convolutional Neural Networks?
Maithra Raghu, Thomas Unterthiner, Simon Kornblith, Chiyuan Zhang, Alexey Dosovitskiy
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
233 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Self-Supervised Pre-Training of Swin Transformers for 3D Medical Image Analysis cites Emerging Properties in Self-Supervised Vision Transformers
- Self-Supervised Pre-Training of Swin Transformers for 3D Medical Image Analysis cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Self-Supervised Pre-Training of Swin Transformers for 3D Medical Image Analysis cites An Empirical Study of Training Self-Supervised Vision Transformers
- MLP-Mixer: An all-MLP Architecture for Vision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Emerging Properties in Self-Supervised Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- U-KAN Makes Strong Backbone for Medical Image Segmentation and Generation cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNs cites MLP-Mixer: An all-MLP Architecture for Vision
- Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNs cites Emerging Properties in Self-Supervised Vision Transformers
- Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNs cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNs cites MetaFormer is Actually What You Need for Vision
- MetaFormer is Actually What You Need for Vision cites MLP-Mixer: An all-MLP Architecture for Vision
- MetaFormer is Actually What You Need for Vision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MetaFormer is Actually What You Need for Vision cites How Do Vision Transformers Work?
- How Do Vision Transformers Work? cites MetaFormer is Actually What You Need for Vision
- MetaFormer is Actually What You Need for Vision cites Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
- How Do Vision Transformers Work? cites MLP-Mixer: An all-MLP Architecture for Vision
- How Do Vision Transformers Work? cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- An Empirical Study of Training Self-Supervised Vision Transformers cites Emerging Properties in Self-Supervised Vision Transformers
- An Empirical Study of Training Self-Supervised Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Cited by top-tier papers233
- Scaling Up Your Kernels to 31×31: Revisiting Large Kernel Design in CNNsXiaohan Ding, Xiangyu Zhang, Jungong Han, Guiguang DingCVPR 2022 · 1,298 citations
- MetaFormer is Actually What You Need for VisionWeihao Yu, Mi Luo, Pan Zhou, Chenyang Si et al.CVPR 2022 · 1,114 citations
- Self-Supervised Pre-Training of Swin Transformers for 3D Medical Image AnalysisYucheng Tang, Dong Yang, Wenqi Li, Holger R. Roth et al.CVPR 2022 · 736 citations
- How Do Vision Transformers Work?Namuk Park, Songkuk KimICLR 2022 · 653 citations
- U-KAN Makes Strong Backbone for Medical Image Segmentation and GenerationChenxin Li, Xinyu Liu, Wuyang Li, Cheng Wang et al.AAAI 2025 · 452 citations
Builds on16
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Emerging Properties in Self-Supervised Vision TransformersMathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou et al.ICCV 2021 · 8,921 citations
- MLP-Mixer: An all-MLP Architecture for VisionIlya O. Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer et al.NeurIPS 2021 · 3,862 citations
- Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetLi Yuan, Yunpeng Chen, Tao Wang, Weihao Yu et al.ICCV 2021 · 2,462 citations
- An Empirical Study of Training Self-Supervised Vision TransformersXinlei Chen, Saining Xie, Kaiming HeICCV 2021 · 2,340 citations
Related papers
- Vision Transformers provably learn spatial structureSamy Jelassi, Michael E. Sander, Yuanzhi LiNeurIPS 2022 · 115 citations
- Understanding Robustness of Transformers for Image ClassificationSrinadh Bhojanapalli, Ayan Chakrabarti, Daniel Glasner, Daliang Li et al.ICCV 2021 · 501 citations
- RegionViT: Regional-to-Local Attention for Vision TransformersChun-Fu Chen, Rameswar Panda, Quanfu FanICLR 2022 · 246 citations
- Are Transformers more robust than CNNs?Yutong Bai, Jieru Mei, Alan L. Yuille, Cihang XieNeurIPS 2021 · 365 citations
- CvT: Introducing Convolutions to Vision TransformersHaiping Wu, Bin Xiao, Noel Codella, Mengchen Liu et al.ICCV 2021 · 2,397 citations
