summaries: The paper propose to inject inductive bias (IB) for vision tasks to boost the performance of vision transformers (ViT). The main contributions of the paper are two-fold: a reduction cell that aggregate the features from different scales by controlling the dilation of a  few of parallel convolution branches and a parallel convolution branch with the multi-head self-attention (MHSA) block. The results on ImageNet is promising compared with the selected baselines but I found it is hard to get a conclusive result on downstream classification tasks.  This paper proposed two types of basic cells to modify the vanilla vision transformer structure: reduction cell (RC) and normal cell (NC). RCs are used to down-sample and embed the input images into tokens and NCs are to jointly model locality and global dependencies in the token sequence. Specifically, they used paralleled attention module and convolutional layers followed by a feed-forward network (FFN) to construct these two cells. Experiments on ImageNet and downstream tasks verified the superiority of the proposed network design. The standard vision transformer model lacks the capability to model inductive biases desirable for images e.g., local features encoding, and scale invariance. It, therefore, requires large-scale training data (300 million images), or other variants (e.g., Data Efficient ViT) distilling Knowledge from a pertained CNN. The paper proposes an architecture, which tries to take care of these inductive biases. The architecture comprises of 3 “Reduction cells” at the beginning followed by multiple “Normal Cells”. A reduction cell gets a pyramid effect using dilated convolutions at the beginning which gradually downsamples features. The normal cell doesn’t have any dilated convolutions. Each block has Convolution and attention running in parallel.  The assumption here is that convolution captures local relationships, pyramid structure (via diluted convolutions) captures scale invariance, and attention captures global relationships.  A new vision transformer architecture VITAE, with a better use of intrinsic inductive bias IB via a new architecture using convolutional dillated layers. Both scale and locality IB are enabled by that architecture. Empirical results show that the new method can achieve excellent results with much less parameters than other recent methods. This work incorporates two architecture changes which induce the inductive biases of 1) locality and 2) scale-invariance. It does so though a sequence of Reduction Cells followed by Normal Cells. In doing so, the authors demonstrate comparable performance to strong CNN baselines and improvements over Transformer-based ImageNet models -- the top performing ViTAE model achieves a 83.0% Top-1 accuracy. 
abstractText: Transformers have shown great potential in various computer vision tasks owing to their strong capability in modeling long-range dependency using the self-attention mechanism. Nevertheless, vision transformers treat an image as 1D sequence of visual tokens, lacking an intrinsic inductive bias (IB) in modeling local visual structures and dealing with scale variance. Alternatively, they require large-scale training data and longer training schedules to learn the IB implicitly. In this paper, we propose a new Vision Transformer Advanced by Exploring intrinsic IB from convolutions, i.e., ViTAE. Technically, ViTAE has several spatial pyramid reduction modules to downsample and embed the input image into tokens with rich multi-scale context by using multiple convolutions with different dilation rates. In this way, it acquires an intrinsic scale invariance IB and is able to learn robust feature representation for objects at various scales. Moreover, in each transformer layer, ViTAE has a convolution block in parallel to the multi-head selfattention module, whose features are fused and fed into the feed-forward network. Consequently, it has the intrinsic locality IB and is able to learn local features and global dependencies collaboratively. Experiments on ImageNet as well as downstream tasks prove the superiority of ViTAE over the baseline transformer and concurrent works. Source code and pretrained models will be available at code.
authors.name: Yufei Xu
authors.name: Qiming Zhang
authors.name: Jing Zhang
authors.name: Dacheng Tao
references.authors: E.H. Adelson C.H. Anderson J.R. Bergen P.J. Burt J.M. Ogden
references.title: Pyramid methods in image processing
references.venue: RCA engineer, 29(6):33–41
references.authors: J.L. Ba J.R. Kiros G.E. Hinton
references.title: Layer normalization
references.venue: arXiv preprint arXiv:1607.06450
references.authors: H. Bay T. Tuytelaars L. Van Gool
references.title: Surf: Speeded up robust features
references.venue: European conference on computer vision, pages 404–417. Springer
references.authors: P.J. Burt E.H. Adelson
references.title: The laplacian pyramid as a compact image code
references.venue: Readings in computer vision, pages 671–679. Elsevier
references.authors: Z. Cai N. Vasconcelos
references.title: Cascade r-cnn: Delving into high quality object detection
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6154–6162
references.authors: C.-F. Chen Q. Fan R. Panda
references.title: Crossvit: Cross-attention multi-scale vision transformer for image classification
references.venue: arXiv preprint arXiv:2103.14899
references.authors: H. Chen Y. Wang T. Guo C. Xu Y. Deng Z. Liu S. Ma C. Xu C. Xu W. Gao
references.title: Pre-trained image processing transformer
references.venue: arXiv preprint arXiv:2012.00364
references.authors: L.-C. Chen G. Papandreou F. Schroff H. Adam
references.title: Rethinking atrous convolution for semantic image segmentation
references.venue: arXiv preprint arXiv:1706.05587
references.authors: X. Chen S. Xie K. He
references.title: An empirical study of training self-supervised vision transformers
references.venue: arXiv preprint arXiv:2104.02057
references.authors: X. Chu Z. Tian Y. Wang B. Zhang H. Ren X. Wei H. Xia C. Shen
references.title: Twins: Revisiting spatial attention design in vision transformers
references.venue: arXiv preprint arXiv:2104.13840
references.authors: X. Chu Z. Tian B. Zhang X. Wang X. Wei H. Xia C. Shen
references.title: Conditional positional encodings for vision transformers
references.venue: arXiv preprint arXiv:2102.10882
references.authors: M. Contributors
references.title: MMSegmentation: Openmmlab semantic segmentation toolbox and benchmark
references.venue: https: //github.com/open-mmlab/mmsegmentation
references.authors: M. Contributors
references.title: Openmmlab pose estimation toolbox and benchmark
references.venue: https://github.com/ open-mmlab/mmpose
references.authors: Z. Dai Z. Yang Y. Yang J. Carbonell Q.V. Le R. Salakhutdinov
references.title: Transformer-xl: Attentive language models beyond a fixed-length context
references.venue: arXiv preprint arXiv:1901.02860
references.authors: S. d’Ascoli H. Touvron M. Leavitt A. Morcos G. Biroli L. Sagun
references.title: Convit: Improving vision transformers with soft convolutional inductive biases
references.venue: arXiv preprint arXiv:2103.10697,
references.authors: H. Demirel G. Anbarjafari
references.title: Image resolution enhancement by using discrete and stationary wavelet decomposition
references.venue: IEEE transactions on image processing, 20(5):1458–1460
references.authors: J. Devlin M.-W. Chang K. Lee K. Toutanova
references.title: Bert: Pre-training of deep bidirectional transformers for language understanding
references.venue: arXiv preprint arXiv:1810.04805
references.authors: X. Ding X. Zhang J. Han G. Ding
references.title: Repmlp: Re-parameterizing convolutions into fully-connected layers for image recognition
references.venue: arXiv preprint arXiv:2105.01883
references.authors: A. Dosovitskiy L. Beyer A. Kolesnikov D. Weissenborn X. Zhai T. Unterthiner M. Dehghani M. Minderer G. Heigold S. Gelly
references.title: et al
references.venue: An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929
references.authors: A. El-Nouby H. Touvron M. Caron P. Bojanowski M. Douze A. Joulin I. Laptev N. Neverova G. Synnaeve J. Verbeek
references.title: et al
references.venue: Xcit: Cross-covariance image transformers. arXiv preprint arXiv:2106.09681
references.authors: B. Graham A. El-Nouby H. Touvron P. Stock A. Joulin H. Jégou M. Douze
references.title: Levit: a vision transformer in convnet’s clothing for faster inference
references.venue: arXiv preprint arXiv:2104.01136
references.authors: M.-H. Guo Z.-N. Liu T.-J. Mu S.-M. Hu
references.title: Beyond self-attention: External attention using two linear layers for visual tasks
references.venue: arXiv preprint arXiv:2105.02358
references.authors: K. Han A. Xiao E. Wu J. Guo C. Xu Y. Wang
references.title: Transformer in transformer
references.venue: arXiv preprint arXiv:2103.00112
references.authors: K. He G. Gkioxari P. Dollár R. Girshick
references.title: Mask r-cnn
references.venue: Proceedings of the IEEE international conference on computer vision, pages 2961–2969
references.authors: K. He X. Zhang S. Ren J. Sun
references.title: Spatial pyramid pooling in deep convolutional networks for visual recognition
references.venue: IEEE transactions on pattern analysis and machine intelligence, 37(9):1904–1916
references.authors: K. He X. Zhang S. Ren J. Sun
references.title: Deep residual learning for image recognition
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778
references.authors: L. He Y. Dong Y. Wang D. Tao Z. Lin
references.title: Gauge equivariant transformer
references.venue: Thirty-Fifth Conference on Neural Information Processing Systems
references.authors: B. Heo S. Yun D. Han S. Chun J. Choe S.J. Oh
references.title: Rethinking spatial dimensions of vision transformers
references.venue: International Conference on Computer Vision (ICCV)
references.authors: B. Heo S. Yun D. Han S. Chun J. Choe S.J. Oh
references.title: Rethinking spatial dimensions of vision transformers
references.venue: arXiv preprint arXiv:2103.16302
references.authors: G. Hinton O. Vinyals J. Dean
references.title: Distilling the knowledge in a neural network
references.venue: NIPS Deep Learning and Representation Learning Workshop
references.authors: A.G. Howard M. Zhu B. Chen D. Kalenichenko W. Wang T. Weyand M. Andreetto H. Adam
references.title: Mobilenets: Efficient convolutional neural networks for mobile vision applications
references.venue: arXiv preprint arXiv:1704.04861
references.authors: G. Huang Z. Liu L. Van Der Maaten K.Q. Weinberger
references.title: Densely connected convolutional networks
references.venue: In Proceedings of the IEEE conference on computer vision and pattern recognition,
references.authors: Z. Huang Y. Ben G. Luo P. Cheng G. Yu B. Fu
references.title: Shuffle transformer: Rethinking spatial shuffle for vision transformer
references.venue: arXiv preprint arXiv:2106.03650
references.authors: S. Ioffe C. Szegedy
references.title: Batch normalization: Accelerating deep network training by reducing internal covariate shift
references.venue: International conference on machine learning, pages 448–456. PMLR
references.authors: Y. Ke R. Sukthankar
references.title: Pca-sift: A more distinctive representation for local image descriptors
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, volume 2, pages II–II. IEEE
references.authors: J. Krause M. Stark J. Deng L. Fei-Fei
references.title: 3d object representations for fine-grained categorization
references.venue: 4th International IEEE Workshop on 3D Representation and Recognition (3dRR-13), Sydney, Australia
references.authors: A. Krizhevsky G. Hinton
references.title: Learning multiple layers of features from tiny images
references.authors: A. Krizhevsky I. Sutskever G.E. Hinton
references.title: Imagenet classification with deep convolutional neural networks
references.venue: Advances in neural information processing systems, 25:1097–1105
references.authors: W.-S. Lai J.-B. Huang N. Ahuja M.-H. Yang
references.title: Deep laplacian pyramid networks for fast and accurate super-resolution
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 624–632
references.authors: Z. Lan M. Chen S. Goodman K. Gimpel P. Sharma R. Soricut
references.title: Albert: A lite bert for self-supervised learning of language representations
references.venue: arXiv preprint arXiv:1909.11942
references.authors: Y. LeCun Y. Bengio
references.title: et al
references.venue: Convolutional networks for images, speech, and time series. The handbook of brain theory and neural networks, 3361(10):1995
references.authors: Y. LeCun Y. Bengio G. Hinton
references.title: Deep learning
references.venue: nature, 521(7553):436–444
references.authors: Y. Li K. Zhang J. Cao R. Timofte L. Van Gool
references.title: Localvit: Bringing locality to vision transformers
references.venue: arXiv preprint arXiv:2104.05707
references.authors: G. Lin C. Shen
references.title: A
references.venue: Van Den Hengel, and I. Reid. Efficient piecewise training of deep structured models for semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3194–3203
references.authors: T.-Y. Lin P. Dollár R. Girshick K. He B. Hariharan S. Belongie
references.title: Feature pyramid networks for object detection
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2117–2125
references.authors: Y. Liu M. Ott N. Goyal J. Du M. Joshi D. Chen O. Levy M. Lewis L. Zettlemoyer V. Stoyanov
references.title: Roberta: A robustly optimized bert pretraining approach
references.venue: arXiv preprint arXiv:1907.11692
references.authors: Z. Liu Y. Lin Y. Cao H. Hu Y. Wei Z. Zhang S. Lin B. Guo
references.title: Swin transformer: Hierarchical vision transformer using shifted windows
references.venue: arXiv preprint arXiv:2103.14030
references.authors: I. Loshchilov F. Hutter
references.title: Decoupled weight decay regularization
references.venue: International Conference on Learning Representations
references.authors: W. Luo Y. Li R. Urtasun R.S. Zemel
references.title: Understanding the effective receptive field in deep convolutional neural networks
references.venue: Proceedings of the 30th International Conference on Neural Information Processing Systems, volume 29, pages 4898–4906
references.authors: L. Melas-Kyriazi
references.title: Do you even need attention? a stack of feed-forward layers does surprisingly well on imagenet
references.venue: arXiv: Computer Vision and Pattern Recognition
references.authors: H. Nam J.-W. Ha J. Kim
references.title: Dual attention networks for multimodal reasoning and matching
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 299–307
references.authors: P.C. Ng S. Henikoff
references.title: Sift: Predicting amino acid changes that affect protein function
references.venue: Nucleic acids research, 31(13):3812–3814
references.authors: M.-E. Nilsback A. Zisserman
references.title: Automated flower classification over a large number of classes
references.venue: In Indian Conference on Computer Vision, Graphics and Image Processing,
references.authors: S.W. Oh J.-Y. Lee N. Xu S.J. Kim
references.title: Video object segmentation using space-time memory networks
references.venue: Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9226–9235
references.authors: H. Olkkonen P. Pesola
references.title: Gaussian pyramid wavelet transform for multiresolution analysis of images
references.venue: Graphical Models and Image Processing, 58(4):394–398
references.authors: O.M. Parkhi A. Vedaldi A. Zisserman C.V. Jawahar
references.title: Cats and dogs
references.venue: IEEE Conference on Computer Vision and Pattern Recognition
references.authors: A. Paszke S. Gross F. Massa A. Lerer J. Bradbury G. Chanan T. Killeen Z. Lin N. Gimelshein L. Antiga A. Desmaison A. Kopf E. Yang Z. DeVito M. Raison A. Tejani S. Chilamkurthy B. Steiner L. Fang J. Bai S. Chintala
references.title: Pytorch: An imperative style
references.venue: high-performance deep learning library. In Advances in Neural Information Processing Systems, volume 32, pages 8026–8037
references.authors: Z. Peng W. Huang S. Gu L. Xie Y. Wang J. Jiao Q. Ye
references.title: Conformer: Local features coupling global representations for visual recognition
references.venue: arXiv preprint arXiv:2105.03889
references.authors: F. Perazzi J. Pont-Tuset B. McWilliams L. Van Gool M. Gross A. Sorkine-Hornung
references.title: A benchmark dataset and evaluation methodology for video object segmentation
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 724–732
references.authors: J. Pont-Tuset F. Perazzi S. Caelles P. Arbeláez A. Sorkine-Hornung L. Van Gool
references.title: The 2017 davis challenge on video object segmentation
references.venue: arXiv preprint arXiv:1704.00675
references.authors: A. Radford J. Wu R. Child D. Luan D. Amodei I. Sutskever
references.title: Language models are unsupervised multitask learners
references.venue: OpenAI blog, 1(8):9
references.authors: I. Radosavovic R.P. Kosaraju R. Girshick K. He P. Dollár
references.title: Designing network design spaces
references.venue: In Proceedings of the IEEE conference on computer vision and pattern recognition,
references.authors: E. Rublee V. Rabaud K. Konolige G. Bradski
references.title: Orb: An efficient alternative to sift or surf
references.venue: Proceedings of the IEEE international conference on computer vision, pages 2564–2571. Ieee
references.authors: S. Sabour N. Frosst G.E. Hinton
references.title: Dynamic routing between capsules
references.venue: arXiv preprint arXiv:1710.09829
references.authors: M. Sandler A. Howard M. Zhu A. Zhmoginov L.-C. Chen
references.title: Mobilenetv2: Inverted residuals and linear bottlenecks
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4510–4520
references.authors: R.R. Selvaraju M. Cogswell A. Das R. Vedantam D. Parikh D. Batra
references.title: Grad-cam: Visual explanations from deep networks via gradient-based localization
references.venue: Proceedings of the IEEE international conference on computer vision, pages 618–626
references.authors: P. Shaw J. Uszkoreit A. Vaswani
references.title: Self-attention with relative position representations
references.venue: arXiv preprint arXiv:1803.02155
references.authors: K. Simonyan A. Zisserman
references.title: Very deep convolutional networks for large-scale image recognition
references.venue: arXiv preprint arXiv:1409.1556
references.authors: A. Srinivas T.-Y. Lin N. Parmar J. Shlens P. Abbeel A. Vaswani
references.title: Bottleneck transformers for visual recognition
references.venue: arXiv preprint arXiv:2101.11605
references.authors: C. Szegedy S. Ioffe V. Vanhoucke A. Alemi
references.title: Inception-v4
references.venue: inception-resnet and the impact of residual connections on learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 31
references.authors: C. Szegedy W. Liu Y. Jia P. Sermanet S. Reed D. Anguelov D. Erhan V. Vanhoucke A. Rabinovich
references.title: Going deeper with convolutions
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1–9
references.authors: C. Szegedy V. Vanhoucke S. Ioffe J. Shlens Z. Wojna
references.title: Rethinking the inception architecture for computer vision
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818–2826
references.authors: M. Tan Q. Le
references.title: Efficientnet: Rethinking model scaling for convolutional neural networks
references.venue: International Conference on Machine Learning, pages 6105–6114. PMLR
references.authors: I. Tolstikhin N. Houlsby A. Kolesnikov L. Beyer X. Zhai T. Unterthiner J. Yung D. Keysers J. Uszkoreit M. Lucic A. Dosovitskiy
references.title: Mlp-mixer: An all-mlp architecture for vision
references.venue: arXiv preprint arXiv:2105.01601
references.authors: H. Touvron P. Bojanowski M. Caron M. Cord A. El-Nouby E. Grave A. Joulin G. Synnaeve J. Verbeek H. Jégou
references.title: Resmlp: Feedforward networks for image classification with data-efficient training
references.venue: arXiv preprint arXiv:2105.03404
references.authors: H. Touvron M. Cord M. Douze F. Massa A. Sablayrolles H. Jégou
references.title: Training data-efficient image transformers & distillation through attention
references.venue: arXiv preprint arXiv:2012.12877
references.authors: H. Touvron M. Cord A. Sablayrolles G. Synnaeve H. Jégou
references.title: Going deeper with image transformers
references.venue: arXiv preprint arXiv:2103.17239
references.authors: H. Touvron A. Sablayrolles M. Douze M. Cord H. Jégou
references.title: Grafit: Learning fine-grained image representations with coarse labels
references.venue: arXiv preprint arXiv:2011.12982
references.authors: A. Vaswani N. Shazeer N. Parmar J. Uszkoreit L. Jones A.N. Gomez L. Kaiser I. Polosukhin
references.title: Attention is all you need
references.venue: Proceedings of the 31st International Conference on Neural Information Processing Systems, volume 30, pages 5998–6008
references.authors: W. Wang E. Xie X. Li D.-P. Fan K. Song D. Liang T. Lu P. Luo L. Shao
references.title: Pyramid vision transformer: A versatile backbone for dense prediction without convolutions
references.venue: arXiv preprint arXiv:2102.12122
references.authors: X. Wang R. Girshick A. Gupta K. He
references.title: Non-local neural networks
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7794–7803
references.authors: R. Wightman
references.title: Pytorch image models
references.venue: https://github.com/rwightman/pytorch-image-models
references.authors: H. Wu B. Xiao N. Codella M. Liu X. Dai L. Yuan L. Zhang
references.title: Cvt: Introducing convolutions to vision transformers
references.venue: arXiv preprint arXiv:2103.15808
references.authors: B. Xiao H. Wu Y. Wei
references.title: Simple baselines for human pose estimation and tracking
references.venue: In Proceedings of the European Conference on Computer Vision (ECCV),
references.authors: T. Xiao Y. Liu B. Zhou Y. Jiang J. Sun
references.title: Unified perceptual parsing for scene understanding
references.venue: Proceedings of the European Conference on Computer Vision (ECCV), pages 418–434
references.authors: J. Xie R. Zeng Q. Wang Z. Zhou P. Li
references.title: So-vit: Mind visual tokens for vision transformer
references.venue: arXiv preprint arXiv:2104.10935
references.authors: S. Xie R. Girshick P. Dollár Z. Tu K. He
references.title: Aggregated residual transformations for deep neural networks
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1492–1500
references.authors: W. Xu Y. Xu T. Chang Z. Tu
references.title: Co-scale conv-attentional image transformers
references.venue: In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV),
references.authors: H. Yan Z. Li W. Li C. Wang M. Wu
references.title: and C
references.venue: Zhang. Contnet: Why not use convolution and transformer at the same time? arXiv preprint arXiv:2104.13497
references.authors: F. Yu V. Koltun
references.title: Multi-scale context aggregation by dilated convolutions
references.venue: ICLR 2016 : International Conference on Learning Representations 2016
references.authors: F. Yu V. Koltun T. Funkhouser
references.title: Dilated residual networks
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 472–480
references.authors: K. Yuan S. Guo Z. Liu A. Zhou F. Yu W. Wu
references.title: Incorporating convolution designs into visual transformers
references.venue: arXiv preprint arXiv:2103.11816
references.authors: L. Yuan Y. Chen T. Wang W. Yu Y. Shi Z. Jiang F.E. Tay J. Feng S. Yan
references.title: Tokens-to-token vit: Training vision transformers from scratch on imagenet
references.venue: arXiv preprint arXiv:2101.11986
references.authors: M.D. Zeiler R. Fergus
references.title: Visualizing and understanding convolutional networks
references.venue: European conference on computer vision, pages 818–833. Springer
references.authors: X. Zhang X. Zhou M. Lin J. Sun
references.title: Shufflenet: An extremely efficient convolutional neural network for mobile devices
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6848–6856
references.authors: H. Zhao J. Shi X. Qi X. Wang J. Jia
references.title: Pyramid scene parsing network
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2881–2890
references.authors: S. Zheng J. Lu H. Zhao X. Zhu Z. Luo Y. Wang Y. Fu J. Feng T. Xiang P.H.S. Torr L. Zhang
references.title: Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers
references.venue: arXiv preprint arXiv:2012.15840
references.authors: B. Zhou H. Zhao X. Puig S. Fidler A. Barriuso A. Torralba
references.title: Scene parsing through ade20k dataset
references.venue: Proceedings of the IEEE conference on computer vision and pattern recognition, pages 633–641
references.authors: B. Zhou H. Zhao X. Puig T. Xiao S. Fidler A. Barriuso A. Torralba
references.title: Semantic understanding of scenes through the ade20k dataset
references.venue: International Journal of Computer Vision, 127(3):302–321
references.authors: X. Zhu W. Su L. Lu B. Li X. Wang J. Dai
references.title: Deformable detr: Deformable transformers for end-to-end object detection
references.venue: International Conference on Learning Representations
sections.text: 1 Introduction
  Transformers [79, 17, 40, 14, 46, 61] have shown a domination trend in NLP studies owing to their strong ability in modeling long-range dependencies by the self-attention mechanism [67, 81, 51]. Such success and good properties of transformers has inspired following many works that apply them in various computer vision tasks [19, 100, 97, 80, 7]. Among them, ViT [19] is the pioneering pure transformer model that embeds images into a sequence of visual tokens and models the global dependencies among them with stacked transformer blocks. Although it achieves promising performance on image classification, it requires large-scale training data and a longer training schedule. One important reason is that ViT
  ∗Equal Contribution. Interns at JD Explore Academy.
  35th Conference on Neural Information Processing Systems (NeurIPS 2021).
  lacks intrinsic inductive bias (IB) in modeling local visual structures (e.g., edges and corners) and dealing with objects at various scales like convolutions. Alternatively, ViT has to learn such IB implicitly from large-scale data.
  Unlike vision transformers, Convolution Neural Networks (CNNs) naturally equip with the intrinsic IBs of scale-invariance and locality and still serve as prevalent backbones in vision tasks [26, 70, 62, 8, 96]. The success of CNNs inspires us to explore intrinsic IBs in vision transformers. We start by analyzing the above two IBs of CNNs, i.e., locality and scale-invariance. Convolution that computes local correlation among neighbor pixels is good at extracting local features such as edges and corners. Consequently, CNNs can provide plentiful low-level features at the shallow layers [94], which are then aggregated into high-level features progressively by a bulk of sequential convolutions [32, 68, 71]. Moreover, CNNs have a hierarchy structure to extract multi-scale features at different layers [68, 38, 26]. Besides, intra-layer convolutions can also learn features at different scales by varying their kernel sizes and dilation rates [25, 70, 8, 45, 96]. Consequently, scale-invariant feature representation can be obtained via intra- or inter-layer feature fusion. Nevertheless, CNNs are not well suited to model long-range dependencies2, which is the key advantage of transformers. An interesting question comes up: Can we improve vision transformers by leveraging the good properties of CNNs? Recently, DeiT [76] explores the idea of distilling knowledge from CNNs to transformers to facilitate training and improve the performance. However, it requires an off-the-shelf CNN model as the teacher and consumes extra training cost.
  Different from DeiT, we explicitly introduce intrinsic IBs into vision transformers by re-designing the network structures in this paper. Current vision transformers always obtain tokens with singlescale context [19, 93, 80, 86, 47, 69, 77] and learn to adapt to objects at different scales from data. For example, T2T-ViT [93] improves ViT by delicately generating tokens in a soft split manner. Specifically, it uses a series of Tokens-to-Token transformation layers to aggregate single-scale neighboring contextual information and progressively structurizes the image to tokens. Motivated by the success of CNNs in dealing with scale variance, we explore a similar design in transformers, i.e., intra-layer convolutions with different receptive fields [70, 91], to embed multi-scale context into tokens. Such a design allows tokens to carry useful features of objects at various scales, thereby naturally having the intrinsic scale-invariance IB and explicitly facilitating transformers to learn scale-invariant features more efficiently from data. On the other hand, low-level local features are fundamental elements to generate high-level discriminative features. Although transformers can also learn such features at shallow layers from data, they are not skilled as convolutions by design. Recently, [89, 43, 21] stack convolutions and attention layers sequentially and demonstrate that locality is a reasonable compensation of global dependency. However, this serial structure ignores the global context during locality modeling (and vice versa). To avoid such a dilemma, we follow the “divide-and-conquer” idea and propose to model locality and long-range dependencies in parallel and then fuse the features to account for both. In this way, we empower transformers to learn local and long-range features within each block more effectively.
  Technically, we propose a new Vision Transformers Advanced by Exploring Intrinsic Inductive Bias (ViTAE), which is a combination of two types of basic cells, i.e., reduction cell (RC) and normal cell (NC). RCs are used to downsample and embed the input images into tokens with rich multi-scale context while NCs aim to jointly model locality and global dependencies in the token sequence. Moreover, these two types of cells share a simple basic structure, i.e., paralleled attention module and convolutional layers followed by a feed-forward network (FFN). It is noteworthy that RC has an extra pyramid reduction module with atrous convolutions of different dilation rates to embed multi-scale context into tokens. Following the setting in [93], we stack three reduction cells to reduce the spatial resolution by 1/16 and a series of NCs to learn discriminative features from data. ViTAE outperforms representative vision transformers in terms of data efficiency and training efficiency (see Figure 1), as well as classification accuracy and generalization on downstream tasks.
  Our contributions are threefold. First, we explore two types of intrinsic IB in transformers, i.e., scale invariance and locality, and demonstrate the effectiveness of this idea in improving the feature learning ability of transformers. Second, we design a new transformer architecture named ViTAE based on two new reduction and normal cells to intrinsically incorporate the above two IBs. The proposed ViTAE embeds multi-scale context into tokens and learns both local and long-range features
  2Despite projection in transformer can be viewed as 1 × 1 convolution [9], the term of convolution here refers to those with larger kernels, e.g., 3× 3, which are widely used in typical CNNs to extract spatial features.
  effectively. Third, ViTAE outperforms representative vision transformers regarding classification accuracy, data efficiency, training efficiency, and generalization on downstream tasks. ViTAE achieves 75.3% and 82.0% top-1 accuracy on ImageNet with 4.8M and 23.6M parameters, respectively.
sections.heading: 2 Related Work
sections.heading: 2.1 CNNs with intrinsic IB
sections.text: CNNs have led to a series of breakthroughs in image classification [38, 94, 26, 95, 87] and downstream computer vision tasks. The convolution operations in CNNs extract local features from the neighbor pixels within the receptive field determined by the kernel size [42]. Following the intuition that local pixels are more likely to be correlated in images [41], CNNs have the intrinsic IB in modeling locality. In addition to the locality, another critical topic in visual tasks is scale-invariance, where multi-scale features are needed to represent the objects at different scales effectively [49, 90]. For example, to effectively learn features of large objects, a large receptive field is needed by either using large convolution kernels [90, 91] or a series of convolution layers in deeper architectures [26, 32, 68, 71]. To construct multi-scale feature representation, the classical idea is using image pyramid [8, 1, 55, 4, 39, 16], where features are hand-crafted or learned from a pyramid of images at different resolutions respectively [44, 8, 52, 63, 35, 3]. Accordingly, features from the small scale image mainly encode the large objects while features from the large scale image respond more to small objects. In addition to the above inter-layer fusion way, another way is to aggregate multi-scale context by using multiple convolutions with different receptive fields within a single layer, i.e., intra-layer fusion [96, 71, 70, 70, 72]. Either inter-layer fusion or intra-layer fusion empower CNNs an intrinsic IB in modeling scale-invariance. This paper introduces such an IB to vision transformers by following the intra-layer fusion idea and utilizing multiple convolutions with different dilation rates in the reduction cells to encode multi-scale context into each visual token.
sections.heading: 2.2 Vision transformers with learned IB
sections.text: ViT [19] is the pioneering work that applies a pure transformer to vision tasks and achieves promising results. However, since ViT lacks intrinsic inductive bias in modeling local visual structures, it indeed learns the IB from amounts of data implicitly. Following works along this direction are to simplify the model structures with fewer intrinsic IBs and directly learn them from large scale data [50, 74, 75, 22, 18, 20, 27] which have achieved promising results and been studied actively. Another direction is to leverage the intrinsic IB from CNNs to facilitate the training of vision transformers, e.g., using less training data or shorter training schedules. For example, DeiT [76] proposes to distill knowledge from CNNs to transformers during training. However, it requires an off-the-shelf CNN model as a teacher, introducing extra computation cost during training. Recently, some works try to introduce the intrinsic IB of CNNs into vision transformers explicitly [23, 58, 21, 43, 15, 89, 83, 92, 6, 47, 11]. For example, [43, 21, 83] stack convolutions and attention layers sequentially, resulting in a serial structure and modeling the locality and global dependency accordingly. [80, 28] design sequential stage-wise structures while [47, 33] apply attention within local windows. However, these serial structure may ignore the global context during locality modeling (and vice versa). [88] establishes connection across different scales at the cost of heavy computation. Instead, we follow the “divide-and-conquer” idea and propose to model locality and global dependencies simultaneously via a parallel structure within each transformer layer. Conformer [58], the most relevant concurrent work to us, employs a unit to explore inter-block interactions between parallel convolution and transformer blocks. In contrast, in ViTAE, the convolution and attention modules are designed to be complementary to each other within the transformer block. In addition, Conformer is not designed to have inherent scale invariance IB.
sections.heading: 3 Methodology
sections.heading: 3.1 Revisit vision transformer
sections.text: We first give a brief review of vision transformer in this part. To adapt transformers to vision tasks, ViT [19] first splits an image x ∈ RH×W×C into tokens with a reduction ratio of p (i.e., xt ∈ R((H×W )/p 2)×D), where H , W and C denote the height, width, and channel dimensions of
  the input image, D = Cp2 denotes the token dimension. Then, an extra class token is concatenated to the visual tokens before adding position embeddings in an element-wise manner. The resulting tokens are fed into the following transformer layers. Each transformer layer is composed of two parts, i.e., a multi-head self-attention module (MHSA) and a feed forward network (FFN).
  MHSA Multi-head self-attention extends single-head self-attention (SHSA) by using different projection matrices for each head. Specifically, the input tokens xt are first projected to queries (Q), keys (K) and values (V ) using projection matrices, i.e., Q,K, V = xtWQ, xtQK , xtQV , where WQ/K/V ∈ RD×D denotes the projection matrix for query, key, and value, respectively. Then, the self-attention operation is calculated as:
  Attention(Q,K, V ) = softmax( QKT√
  D )V. (1)
  This SHSA module is repeated for h times to formulate the MHSA module, where h is the number of heads. The output features of the h heads are concatenated along the channel dimension and formulate the output of the MHSA module.
  FFN FFN is placed on top of the MHSA module and applied to each token identically and separately. It consists of two linear transformations with an activation function in between. Besides, a layer normalization [2] and a shortcut are added before and aside from the MHSA and FFN, respectively.
sections.heading: 3.2 Overview architecture of ViTAE
sections.text: ViTAE aims to introduce the intrinsic IB in CNNs to vision transformers. As shown in Figure 2, ViTAE is composed of two types of cells, i.e., RCs and NCs. RCs are responsible for embedding multi-scale context and local information into tokens, and NCs are used to further model the locality and long-range dependencies in the tokens. Taken an image x ∈ RH×W×C as input, three RCs are used to gradually downsample x by 4×, 2×, and 2×, respectively. Thereby, the output tokens of the RCs are of size [H/16,W/16, D] where D is the token dimension (64 in our experiments). The output tokens of RCs are then flattened as RHW/256×D, concatenated with the class token, and added by the sinusoid position encoding. Next, the tokens are fed into the following NCs, which keep the length of the tokens. Finally, the prediction probability is obtained using a linear classification layer on the class token from the last NC.
sections.heading: 3.3 Reduction cell
sections.text: Instead of directly splitting and flatten images into visual tokens based on a linear image patch embedding layer, we devise the reduction cell to embed multi-scale context and local information into visual tokens, which introduces the intrinsic scale-invariance and locality IBs from convolutions. Technically, RC has two parallel branches responsible for modeling locality and long-range dependency, respectively, followed by an FFN for feature transformation. We denote the input feature of the ith RC as fi ∈ RHi×Wi×Di . The input of the first RC is the image x. In the global dependencies branch, fi is firstly fed into a Pyramid Reduction Module (PRM) to extract multi-scale context, i.e.,
  fmsi , PRMi(fi) = Cat([Convij(fi; sij , ri)|sij ∈ Si, ri ∈ R]), (2)
  where Convij(·) indicates the jth convolutional layer in the PRM (PRMi(·)). It uses a dilation rate sij from the predefined dilation rate set Si corresponding to the ith RC. Note that we use stride convolution to reduce the spatial dimension of features by a ratio ri from the predefined reduction ratio setR. The conv features are concatenated along the channel dimension, i.e., fmsi ∈ R(Wi/p)×(Hi/p)×(|Si|D), where |Si| denotes the number of dilation rates in Si. fmsi is then processed by an MHSA module to model long-range dependencies, i.e.,
  fgi = MHSAi(Img2Seq(f ms i )), (3)
  where Img2Seq(·) is a simple reshape operation to flatten the feature map to a 1D sequence. In this way, fgi embeds the multi-scale context in each token. In addition, we use a Parallel Convolutional Module (PCM) to embed local context within the tokens, which are fused with fgi as follows:
  f lgi = f g i + PCMi(fi). (4)
  Here, PCMi(·) represents the PCM, which is composed of three stacked convolution layers and an Img2Seq(·) operation. It is noteworthy that the parallel convolution branch has the same spatial downsampling ratio as the PRM by using stride convolutions. In this way, the token features can carry both local and multi-scale context, implying that RC acquires the locality IB and scale-invariance IB by design. The fused tokens are then processed by the FFN, reshaped back to feature maps, and fed into the following RC or NC, i.e.,
  fi+1 = Seq2Img(FFNi(f lg i ) + f lg i ), (5)
  where the Seq2Img(·) is a simple reshape operation to reshape a token sequence back to feature maps. FFNi(·) represents the FFN in the ith RC. In our ViTAE, three RCs are stacked sequentially to gradually reduce the input image’s spatial dimension by 4×, 2×, and 2×, respectively. The feature maps generated by the last RC are of a size of [H/16,W/16, D], which are then flattened into visual tokens and fed into the following NCs.
sections.heading: 3.4 Normal cell
sections.text: As shown in the bottom right part of Figure 2, NCs share a similar structure with the reduction cell except for the absence of the PRM. Due to the relatively small ( 116×) spatial size of feature maps after RCs, it is unnecessary to use PRM in NCs. Given f3 from the third RC, we first concatenate it with the class token tcls, and then add it to the positional encodings to get the input tokens t for the following NCs. Here we ignore the subscript for clarity since all NCs have an identical architecture but different learnable weights. tcls is randomly initialized at the start of training and fixed during the inference. Similar to the RC, the tokens are fed into the MHSA module, i.e., tg = MHSA(t). Meanwhile, they are reshaped to 2D feature maps and fed into the PCM, i.e., tl = Img2Seq(PCM(Seq2Img(t))). Note that the class token is discarded in PCM because it has no spatial connections with other visual tokens. To further reduce the parameters in NCs, we use group convolutions in PCM. The features from MHSA and PCM are then fused via element-wise sum, i.e., tlg = tg + tl. Finally, tlg are fed into the FFN to get the output features of NC, i.e., tnc = FFN(tlg) + tlg. Similar to ViT [19], we apply layer normalization to the class token generated by the last NC and feed it to the classification head to get the final classification result.
  3.5 Model details
  We use two variants of ViTAE in our experiments for a fair comparison of other models with similar model sizes. The details of them are summarized in Table 1. In the first RC, the default convolution kernel size is 7× 7 with a
  stride of 4 and dilation rates of S1 = [1, 2, 3, 4]. In the following two RCs, the convolution kernel size is 3× 3 with a stride of 2 and dilation rates of S2 = [1, 2, 3] and S3 = [1, 2], respectively. Since the spatial dimension of tokens decreases, there is no need to use large kernels and dilation rates. PCM in both RCs and NCs comprises three convolutional layers with a kernel size of 3× 3.
sections.heading: 4 Experiments
sections.heading: 4.1 Implementation details
sections.text: We train and test the proposed ViTAE model on the standard ImageNet [38] dataset, which contains about 1.3 million images and covers 1k classes. Unless explicitly stated, the image size during training is set to 224× 224. We use the AdamW [48] optimizer with the cosine learning rate scheduler and uses the data augmentation strategy exactly the same as T2T [93] for a fair comparison, regarding the training strategies and the size of models. We use a batch size of 512 for training all our models and set the initial learning rate to be 5e-4. The results of our models can be found in Table 2, where all the models are trained for 300 epochs on 8 V100 GPUs. The models are built on PyTorch [57] and TIMM [82].
sections.heading: 4.2 Comparison with the state-of-the-art
sections.text: We compare our ViTAE with both CNN models and vision transformers with similar model sizes in Table 2. Both Top-1/5 accuracy and real Top-1 accuracy on the ImageNet validation set are reported. We categorize the methods into CNN models, vision transformers with learned IB, and vision transformers with introduced intrinsic IB. Compared with CNN models, our ViTAE-T achieves a 75.3% Top-1 accuracy, which is better than ResNet-18 with more parameters. The real Top-1 accuracy of the ViTAE model is 82.9%, which is comparable to ResNet-50 that has four more times of parameters than ours. Similarly, our ViTAE-S achieves 82.0% Top-1 accuracy with half of the parameters of ResNet-101 and ResNet-152, showing the superiority of learning both local and longrange features from specific structures with corresponding intrinsic IBs by design. Similar phenomena can also be observed when comparing ViTAE-T with MobileNetV1 [31] and MobileNetV2 [65], where ViTAE obtains better performance with fewer parameters. When compared with larger models which are searched according to NAS [73], our ViTAE-S achieves a similar performance when using 384× 384 images as input, which further shows the potential of vision transformers with intrinsic IB. In addition, among the transformers with learned IB, ViT is the first pure transformer model for visual recognition. DeiT shares the same structure with ViT but uses different data augmentation and training strategies to facilitate the learning of transformers. DeiT⚗denotes using an off-the-shelf CNN model as the teacher model to train DeiT, which introduces the intrinsic IB from CNN to transformer implicitly in a knowledge distillation manner, showing better performance than the vanilla ViT on the ImageNet dataset. It is exciting to see that our ViTAE-T with fewer parameters even outperforms the distilled model DeiT⚗, demonstrating the efficacy of introducing intrinsic IBs in transformers by design. Besides, compared with other transformers with explicit intrinsic IB, our ViTAE with fewer parameters also achieves comparable or better performance. For instance, ViTAE-T achieves comparable performance with LocalVit-T but has 1M fewer parameters, demonstrating the superiority of the proposed RCs and NCs in introducing intrinsic IBs.
sections.heading: 4.3 Ablation study
sections.text: We use T2T-ViT [93] as our baseline model in the following ablation study of our ViTAE. As shown in Table 3, we investigate the hyper-parameter settings in RCs and NCs by isolating them separately. All the models are trained for 100 epochs on ImageNet and follow the same training setting and data augmentation strategy as described in Section 4.1.
  We use X and× to denote whether or not the corresponding module is enabled during the experiments. If all columns under the RC and NC are marked × as shown in the first row, the model becomes the standard T2T-ViT model. “Pre” indicates the output features of PCM and MHSA are fused before FFN while “Post” indicates a late fusion strategy correspondingly. “BN” indicates whether PCM uses BN after the convolutional layer or not. “×3” in the first column denotes that the dilation rate set is the same in the three RCs. “[1, 2, 3, 4] ↓” denotes using lower dilation rates in deeper RCs, i.e., S1 = [1, 2, 3, 4], S2 = [1, 2, 3], S3 = [1, 2].
  As can be seen, using a pre-fusion strategy and BN achieves the best 69.9% Top-1 accuracy among other settings. It is noteworthy that all the variants of NC outperform the vanilla T2T-ViT, implying the effectiveness of PCM, which introduces the intrinsic locality IB in transformers. It can also be observed that BN plays an important role in improving the model’s performance as it can help to alleviate the scale deviation between convolution’s and attention’s features. For the RC, we first investigate the impact of using different dilation rates in the PRM, as shown in the first column. As can be seen, using larger dilation rates (e.g., 4 or 5) does not deliver better performance. We suspect that larger dilation rates may lead to plain features in the deeper RCs due to the smaller resolution of feature maps. To
  validate the hypothesis, we use smaller dilation rates in deeper RCs as denoted by [1, 2, 3, 4] ↓. As can be seen, it achieves comparable performance as [1, 2, 3]×. However, compared with [1, 2, 3, 4] ↓, [1, 2, 3]× increases the amount of parameters from 4.35M to 4.6M. Therefore, we select [1, 2, 3, 4] ↓ as the default setting. In addition, after using PCM in the RC, it introduces the intrinsic locality IB, and the performance increases to 71.7% Top-1 accuracy. Finally, the combination of RCs and NCs achieves the best accuracy at 72.6%, demonstrating the complementarity between our RCs and NCs.
sections.heading: 4.4 Data efficiency and training efficiency
sections.text: To validate the effectiveness of the introduced intrinsic IBs in improving data efficiency and training efficiency, we compare our ViTAE with T2T-ViT at different training settings: (a) training them using 20%, 60%, and 100% ImageNet training set for equivalent 100 epochs on the full ImageNet training set, e.g., we employ 5 times epochs when using 20% data for training compared with using 100% data; and (b) training them using the full ImageNet training set for 100, 200, and 300 epochs respectively. The results are shown in Figure 1. As can be seen, ViTAE consistently outperforms the T2T-ViT baseline by a large margin in terms of both data efficiency and training efficiency. For example, ViTAE using only 20% training data achieves comparable performance with T2T-ViT using all data. When 60% training data are used, ViTAE significantly outperforms T2T-ViT using all data by about an absolute 3% accuracy. It is also noteworthy that ViTAE trained for only 100 epochs has outperformed T2T-ViT trained for 300 epochs. After training ViTAE for 300 epochs, its performance is significantly boosted to 75.3% Top-1 accuracy. With the proposed RCs and NCs, the transformer layers in our ViTAE only need to focus on modeling long-range dependencies, leaving the locality and multi-scale context modeling to its convolution counterparts, i.e., PCM and PRM. Such a “divide-and-conquer” strategy facilitates the training of vision transformers, making it possible to learn more efficiently with less training data and fewer training epochs.
  To further validate the data efficiency of ViTAE model, we train the ViTAE model from scratch on the smaller datasets, i.e., Cifar10 and Cifar100. The results are summarized in Table 4. It can be viewed that with only 1/7 number of epochs, the ViTAE-T model achieves better classification
  performance on Cifar10 dataset, with far fewer parameters (4.8M v.s. 86M), which further confirms ViTAE model’s data efficiency.
sections.heading: 4.5 Generalization on downstream tasks
sections.text: We further investigate the generalization of the proposed ViTAE models on downstream tasks by finetuning them on the training sets of several fine-grained classification tasks3, including Flowers [53], Cars [36], Pets [56], and iNaturalist19. We also fine-tune the proposed ViTAE models on Cifar10 [37] and Cifar100 [37]. The results are shown in Table 5. It can be seen that ViTAE achieves SOTA performance on most of the datasets using comparable or fewer parameters. These results demonstrate that the good generalization ability of our ViTAE.
sections.heading: 4.6 Visual inspection of ViTAE
sections.text: To further analyze the property of our ViTAE, we first calculate the average attention distance of each layer in ViTAE-T and the baseline T2T-ViT-7 on the ImageNet test set, respectively. The results are shown in Figure 3. It can be observed that with the usage of PCM, which focuses on modeling locality, the transformer layers in the proposed NCs can better focus on modeling long-range dependencies, especially in shallow layers. In the deep layers, the average attention distances of ViTAE-T and T2T-ViT-7 are almost the same since modeling long-range dependencies is much more important.
  These results confirm the effectiveness of the adopted “divide-and-conquer” idea in the proposed ViTAE, i.e., introducing the intrinsic locality IB from convolutions into vision transformers makes it possible that transformer layers only need to be responsible to long-range dependencies, since locality can be well modeled by convolutions in PCM.
  Besides, we apply Grad-CAM [66] on the MHSA’s output in the last NC to qualitatively inspect ViTAE. The visualization results are provided in Figure 4. Compared with the baseline T2T-ViT, our ViTAE covers the single or multiple targets in the images
  more precisely and attends less to the background. Moreover, ViTAE can better handle the scale variance issue as shown in Figure 4(b). Namely, it can precisely cover the birds no matter they are in small, middle, or large size. Such observations demonstrate that introducing the intrinsic IBs of locality and scale-invariance from convolutions to transformers helps ViTAE learn more discriminate features than the pure transformers.
  3The performance of ViTAE on dense prediction tasks such as detection, segmentation, pose estimation, can be found in the supplementary material.
  (a) (b)
  Input
  T2T-ViT
  ViTAE
  Figure 4: Visual inspection of T2T-ViT and ViTAE using Grad-CAM [66]. (a) Images containing multiple or single objects and the heatmaps. (b) Images containing the same class of objects at different scales and the heatmaps (Best viewed in color).
sections.heading: 5 Limitation and discussion
sections.text: In this paper, we explore two types of IBs and incorporate them into transformers through the proposed reduction and normal cells. With the collaboration of these two cells, our ViTAE model achieves impressive performance on the ImageNet with fast convergence and high data efficiency. Nevertheless, due to computational resource constraints, we have not scaled the ViTAE model and train it on largesize dataset, e.g., ImageNet-21K [38] and JFT-300M [30]. Although it remains unclear by now, we are optimistic about its scale property from the following preliminary evidence. As illustrated in Figure 2, our ViTAE model can be viewed as an intra-cell ensemble of complementary transformer layers and convolution layers owing to the skip connection and parallel structure. According to the attention distance analysis shown in Figure 3, the ensemble nature enables the transformer layers and convolution layers to focus on what they are good at, i.e., modeling long-range dependencies and locality. Therefore, ViTAE is very likely to learn better feature representation from large-scale data. Besides, we only study two typical IBs in this paper. More kinds of IBs such as constituting viewpoint invariance [64] can be explored in the future study.
sections.heading: 6 Conclusion
sections.text: In this paper, we re-design the transformer block by proposing two basic cells (reduction cells and normal cells) to incorporate two types of intrinsic inductive bias (IB) into transformers, i.e., locality and scale-invariance, resulting in a simple yet effective vision transformer architecture named ViTAE. Extensive experiments show that ViTAE outperforms representative vision transformers in various respects including classification accuracy, data efficiency, training efficiency, and generalization ability on downstream tasks. We plan to scale ViTAE to the large or huge model size and train it on large-size datasets in the future study. In addition, other kinds of IBs will also be investigated. We hope that this study will provide valuable insights to the following studies of introducing intrinsic IB into vision transformers and understanding the impact of intrinsic and learned IBs.
  Acknowledgement Dr. Jing Zhang is supported by the ARC project FL-170100117.
title: ViTAE: Vision Transformer Advanced by Exploring Intrinsic Inductive Bias