Skip to main content
QUICK REVIEW

[Paper Review] Vision Transformer Architecture Search

Xiu Su, Shan You|arXiv (Cornell University)|Jun 25, 2021
Advanced Neural Network ApplicationsComputer Science10 citations
TL;DR

This paper proposes ViTAS, a neural architecture search method for vision transformers that uses a super-transformer with shared weights and private class tokens to efficiently explore diverse architectures. By jointly searching depth, width, sequence length, and attention heads under hardware constraints, ViTAS achieves 74.7% top-1 accuracy on ImageNet at 1.3G FLOPs—2.5% better than the baseline ViT.

ABSTRACT

Recently, transformers have shown great superiority in solving computer vision tasks by modeling images as a sequence of manually-split patches with self-attention mechanism. However, current architectures of vision transformers (ViTs) are simply inherited from natural language processing (NLP) tasks and have not been sufficiently investigated and optimized. In this paper, we make a further step by examining the intrinsic structure of transformers for vision tasks and propose an architecture search method, dubbed ViTAS, to search for the optimal architecture with similar hardware budgets. Concretely, we design a new effective yet efficient weight sharing paradigm for ViTs, such that architectures with different token embedding, sequence size, number of heads, width, and depth can be derived from a single super-transformer. Moreover, to cater for the variance of distinct architectures, we introduce extit{private} class token and self-attention maps in the super-transformer. In addition, to adapt the searching for different budgets, we propose to search the sampling probability of identity operation. Experimental results show that our ViTAS attains excellent results compared to existing pure transformer architectures. For example, with $1.3$G FLOPs budget, our searched architecture achieves $74.7\%$ top-$1$ accuracy on ImageNet and is $2.5\%$ superior than the current baseline ViT architecture. Code is available at \url{this https URL}.

Motivation & Objective

  • To address the suboptimal design of vision transformers (ViTs) inherited from NLP models without vision-specific optimization.
  • To enable efficient architecture search across multiple architectural dimensions—depth, width, sequence length, number of attention heads—under fixed hardware budgets.
  • To design a weight-sharing mechanism that allows a single super-transformer to represent diverse ViT architectures.
  • To introduce private class tokens and attention maps to handle architectural variance in the super-network.
  • To adapt search to different FLOP budgets by learning sampling probabilities for identity operations.

Proposed method

  • Design a super-transformer with shared attention and feed-forward weights across all architecture variants.
  • Introduce private class tokens and self-attention maps for each architecture variant to handle architectural diversity.
  • Implement a differentiable architecture search strategy using learnable sampling probabilities for identity operations.
  • Use a search space that includes variations in token embedding size, sequence length, number of attention heads, width, and depth.
  • Optimize the super-network using a differentiable search objective that balances accuracy and FLOP budget.
  • Apply early stopping and pruning to reduce search cost while maintaining performance.

Experimental results

Research questions

  • RQ1Can a unified super-network effectively represent diverse vision transformer architectures with varying depth, width, and sequence length?
  • RQ2How does the inclusion of private class tokens and attention maps improve performance in a shared architecture search space?
  • RQ3To what extent can differentiable architecture search with learnable sampling probabilities improve ViT accuracy under fixed FLOP budgets?
  • RQ4How does ViTAS compare to existing ViT architectures in terms of accuracy and efficiency on ImageNet?
  • RQ5Can the proposed weight-sharing scheme enable efficient and effective architecture search without compromising performance?

Key findings

  • ViTAS achieves 74.7% top-1 accuracy on ImageNet under a 1.3G FLOPs budget, outperforming the baseline ViT by 2.5 percentage points.
  • The searched architecture demonstrates superior accuracy compared to existing pure transformer models under the same hardware constraints.
  • The use of private class tokens and attention maps significantly improves performance by reducing interference between diverse architectures in the super-network.
  • The differentiable search with adaptive sampling probabilities enables efficient exploration of the architecture space with minimal computational overhead.
  • The weight-sharing mechanism allows for effective architecture search across depth, width, sequence length, and number of attention heads within a single super-network.
  • The method achieves state-of-the-art performance among pure transformer models on ImageNet at the specified FLOP budget.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.