Incorporating Convolution Designs into Visual Transformers
Kun Yuan, Shaopeng Guo, Ziwei Liu, Aojun Zhou, Fengwei Yu, Wei Wu
Abstract
Motivated by the success of Transformers in natural language processing (NLP) tasks, there emerge some attempts (e.g., ViT and DeiT) to apply Transformers to the vision domain. However, pure Transformer architectures often require a large amount of training data or extra supervision to obtain comparable performance with convolutional neural networks (CNNs). To overcome these limitations, we analyze the potential drawbacks when directly borrowing Transformer architectures from NLP. Then we propose a new Convolution-enhanced image Transformer (CeiT) which combines the advantages of CNNs in extracting lowlevel features, strengthening locality, and the advantages of Transformers in establishing long-range dependencies. Three modifications are made to the original Transformer: 1) instead of the straightforward tokenization from raw input images, we design an Image-to-Tokens (I2T) module that extracts patches from generated low-level features; 2) the feed-froward network in each encoder block is replaced with a Locally-enhanced Feed-Forward (LeFF) layer that promotes the correlation among neighboring tokens in the spatial dimension; 3) a Layer-wise Class token Attention (LCA) is attached at the top of the Transformer that utilizes the multi-level representations. Experimental results on ImageNet and seven downstream tasks show the effectiveness and generalization ability of CeiT compared with previous Transformers and stateof-the-art CNNs, without requiring a large amount of training data and extra CNN teachers. Besides, CeiT models also demonstrate better convergence with 3× fewer training iterations, which can reduce the training cost significantly 1 .
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.
85 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
- CoAtNet: Marrying Convolution and Attention for All Data Sizes cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- CoAtNet: Marrying Convolution and Attention for All Data Sizes cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- CoAtNet: Marrying Convolution and Attention for All Data Sizes cites Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
- Uformer: A General U-Shaped Transformer for Image Restoration cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Uformer: A General U-Shaped Transformer for Image Restoration cites CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows
- Uformer: A General U-Shaped Transformer for Image Restoration cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites CCNet: Criss-Cross Attention for Semantic Segmentation
- CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows cites CCNet: Criss-Cross Attention for Semantic Segmentation
- CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows cites Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
- CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows cites Deformable DETR: Deformable Transformers for End-to-End Object Detection
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions cites CCNet: Criss-Cross Attention for Semantic Segmentation
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions cites Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions cites Deformable DETR: Deformable Transformers for End-to-End Object Detection
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer cites CoAtNet: Marrying Convolution and Attention for All Data Sizes
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer cites Early Convolutions Help Transformers See Better
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer cites Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
- Early Convolutions Help Transformers See Better cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Early Convolutions Help Transformers See Better cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
- Early Convolutions Help Transformers See Better cites Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
- Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet 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 Deformable DETR: Deformable Transformers for End-to-End Object Detection
- Deformable DETR: Deformable Transformers for End-to-End Object Detection cites CCNet: Criss-Cross Attention for Semantic Segmentation
Cited by top-tier papers85
- MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision TransformerSachin Mehta, Mohammad RastegariICLR 2022 · 2,162 citations
- Uformer: A General U-Shaped Transformer for Image RestorationZhendong Wang, Xiaodong Cun, Jianmin Bao, Wengang Zhou et al.CVPR 2022 · 1,970 citations
- CoAtNet: Marrying Convolution and Attention for All Data SizesZihang Dai, Hanxiao Liu, Quoc V. Le, Mingxing TanNeurIPS 2021 · 1,747 citations
- CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped WindowsXiaoyi Dong, Jianmin Bao, Dongdong Chen, Weiming Zhang et al.CVPR 2022 · 1,207 citations
- Early Convolutions Help Transformers See BetterTete Xiao, Mannat Singh, Eric Mintun, Trevor Darrell et al.NeurIPS 2021 · 974 citations
Builds on19
- 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
- Deformable DETR: Deformable Transformers for End-to-End Object DetectionXizhou Zhu, Weijie Su, Lewei Lu, Bin Li et al.ICLR 2021 · 7,353 citations
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without ConvolutionsWenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan et al.ICCV 2021 · 4,909 citations
- CCNet: Criss-Cross Attention for Semantic SegmentationZilong Huang, Xinggang Wang, Lichao Huang, Chang Huang et al.ICCV 2019 · 2,972 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
Related papers
- Less Is More: Pay Less Attention in Vision TransformersZizheng Pan, Bohan Zhuang, Haoyu He, Jing Liu et al.AAAI 2022 · 109 citations
- CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image ClassificationChun-Fu (Richard) Chen, Quanfu Fan, Rameswar PandaICCV 2021 · 2,072 citations
- ViTAE: Vision Transformer Advanced by Exploring Intrinsic Inductive BiasYufei Xu, Qiming Zhang, Jing Zhang, Dacheng TaoNeurIPS 2021 · 429 citations
- Rethinking Spatial Dimensions of Vision TransformersByeongho Heo, Sangdoo Yun, Dongyoon Han, Sanghyuk Chun et al.ICCV 2021 · 733 citations
- RegionViT: Regional-to-Local Attention for Vision TransformersChun-Fu Chen, Rameswar Panda, Quanfu FanICLR 2022 · 246 citations
