ViTAS: Vision Transformer Architecture Search
arXiv:2106.13700
Abstract
Vision transformers (ViTs) inherited the success of NLP but their structures have not been sufficiently investigated and optimized for visual tasks. One of the simplest solutions is to directly search the optimal one via the widely used neural architecture search (NAS) in CNNs. However, we empirically find this straightforward adaptation would encounter catastrophic failures and be frustratingly unstable for the training of superformer. In this paper, we argue that since ViTs mainly operate on token embeddings with little inductive bias, imbalance of channels for different architectures would worsen the weight-sharing assumption and cause the training instability as a result. Therefore, we develop a new cyclic weight-sharing mechanism for token embeddings of the ViTs, which enables each channel could more evenly contribute to all candidate architectures. Besides, we also propose identity shifting to alleviate the many-to-one issue in superformer and leverage weak augmentation and regularization techniques for more steady training empirically. Based on these, our proposed method, ViTAS, has achieved significant superiority in both DeiT- and Twins-based ViTs. For example, with only G FLOPs budget, our searched architecture has ImageNet-k accuracy than the baseline DeiT. With G FLOPs, our results achieve accuracy on ImageNet-k, and mAP on COCO which is superior than other ViTs.
References in corpus (12)
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Decoupled Weight Decay Regularization
- Language Models are Few-Shot Learners
- DARTS: Differentiable Architecture Search
- Transformer in Transformer
- Rethinking the Value of Network Pruning
- Contrastive Multiview Coding
- Conditional Positional Encodings for Vision Transformers
- CvT: Introducing Convolutions to Vision Transformers
- Locally Free Weight Sharing for Network Width Search
- K-shot NAS: Learnable Weight-Sharing for NAS with K-shot Supernets
- GreedyNASv2: Greedier Search with a Greedy Path Filter