How Do Vision Transformers Work?
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 152 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Vision Transformer Adapter for Dense Predictions 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Vision Transformer Adapter for Dense Predictions 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Vision Transformer Adapter for Dense Predictions 引用了 Training data-efficient image transformers & distillation through attention
- MetaFormer is Actually What You Need for Vision 引用了 CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features
- MetaFormer is Actually What You Need for Vision 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MetaFormer is Actually What You Need for Vision 引用了 RandAugment: Practical Automated Data Augmentation with a Reduced Search Space
- MetaFormer is Actually What You Need for Vision 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- MetaFormer is Actually What You Need for Vision 引用了 Training data-efficient image transformers & distillation through attention
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 RandAugment: Practical Automated Data Augmentation with a Reduced Search Space
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Training data-efficient image transformers & distillation through attention
- Graph Inductive Biases in Transformers without Message Passing 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Graph Inductive Biases in Transformers without Message Passing 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- MB-TaylorFormer: Multi-branch Efficient Transformer Expanded by Taylor Formula for Image Dehazing 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- MB-TaylorFormer: Multi-branch Efficient Transformer Expanded by Taylor Formula for Image Dehazing 引用了 Training data-efficient image transformers & distillation through attention
- Training data-efficient image transformers & distillation through attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Fast Vision Transformers with HiLo Attention 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Fast Vision Transformers with HiLo Attention 引用了 Training data-efficient image transformers & distillation through attention
引用它的顶会 Paper152
- MetaFormer is Actually What You Need for VisionWeihao Yu, Mi Luo, Pan Zhou, Chenyang Si 等CVPR 2022 · 1,114 次引用
- Fast Vision Transformers with HiLo AttentionZizheng Pan, Jianfei Cai, Bohan ZhuangNeurIPS 2022 · 321 次引用
- MB-TaylorFormer: Multi-branch Efficient Transformer Expanded by Taylor Formula for Image DehazingYuwei Qiu, Kaihao Zhang, Chenxi Wang, Wenhan Luo 等ICCV 2023 · 224 次引用
- Vision Transformer Adapter for Dense PredictionsZhe Chen, Yuchen Duan, Wenhai Wang, Junjun He 等ICLR 2023 · 204 次引用
- Graph Inductive Biases in Transformers without Message PassingLiheng Ma, Chen Lin, Derek Lim, Adriana Romero-Soriano 等ICML 2023 · 185 次引用
它引用的 Paper36
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa 等ICML 2021 · 8,974 次引用
- CutMix: Regularization Strategy to Train Strong Classifiers With Localizable FeaturesSangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh 等ICCV 2019 · 5,843 次引用
- RandAugment: Practical Automated Data Augmentation with a Reduced Search SpaceEkin Dogus Cubuk, Barret Zoph, Jonathon Shlens, Quoc LeNeurIPS 2020 · 4,453 次引用
相关 Paper
- Revisiting Vision Transformer from the View of Path EnsembleShuning Chang, Pichao Wang, Hao Luo, Fan Wang 等ICCV 2023 · 8 次引用
- Do Vision Transformers See Like Convolutional Neural Networks?Maithra Raghu, Thomas Unterthiner, Simon Kornblith, Chiyuan Zhang 等NeurIPS 2021 · 1,553 次引用
- Rethinking Spatial Dimensions of Vision TransformersByeongho Heo, Sangdoo Yun, Dongyoon Han, Sanghyuk Chun 等ICCV 2021 · 733 次引用
- Scratching Visual Transformer's Back with Uniform AttentionNam Hyeon-Woo, Kim Yu-Ji, Byeongho Heo, Dongyoon Han 等ICCV 2023 · 39 次引用
- Model Editing for Vision TransformersXinyi Huang, Kangfei Zhao, Long-Kai HuangNeurIPS 2025 · 1 次引用
