Skip to main content
QUICK REVIEW

[Paper Review] Searching for Efficient Multi-Stage Vision Transformers

Yi-Lun Liao, Sertaç Karaman|arXiv (Cornell University)|Sep 1, 2021
CCD and CMOS Imaging SensorsEngineering66 references12 citations
TL;DR

This paper proposes ViT-ResNAS, an efficient multi-stage Vision Transformer architecture that integrates residual spatial reduction to reduce sequence length and increase feature dimensionality across stages, combined with a novel weight-sharing NAS method using multi-architectural sampling. The approach achieves state-of-the-art accuracy-MACs and accuracy-throughput trade-offs on ImageNet, outperforming DeiT, PVT, and PiT baselines with significantly lower FLOPs and higher throughput.

ABSTRACT

Vision Transformer (ViT) demonstrates that Transformer for natural language processing can be applied to computer vision tasks and result in comparable performance to convolutional neural networks (CNN), which have been studied and adopted in computer vision for years. This naturally raises the question of how the performance of ViT can be advanced with design techniques of CNN. To this end, we propose to incorporate two techniques and present ViT-ResNAS, an efficient multi-stage ViT architecture designed with neural architecture search (NAS). First, we propose residual spatial reduction to decrease sequence lengths for deeper layers and utilize a multi-stage architecture. When reducing lengths, we add skip connections to improve performance and stabilize training deeper networks. Second, we propose weight-sharing NAS with multi-architectural sampling. We enlarge a network and utilize its sub-networks to define a search space. A super-network covering all sub-networks is then trained for fast evaluation of their performance. To efficiently train the super-network, we propose to sample and train multiple sub-networks with one forward-backward pass. After that, evolutionary search is performed to discover high-performance network architectures. Experiments on ImageNet demonstrate that ViT-ResNAS achieves better accuracy-MACs and accuracy-throughput trade-offs than the original DeiT and other strong baselines of ViT. Code is available at https://github.com/yilunliao/vit-search.

Motivation & Objective

  • To improve the efficiency and performance of Vision Transformers (ViT) by incorporating design principles from convolutional neural networks (CNNs), particularly spatial reduction and multi-stage architectures.
  • To address the challenge of high computational cost and training instability in deep ViT models by introducing residual connections during spatial reduction.
  • To develop a more efficient neural architecture search (NAS) framework tailored for multi-stage ViTs, enabling fast and accurate architecture discovery.
  • To achieve better accuracy-computation trade-offs than existing ViT models, including DeiT, PVT, and PiT, on the ImageNet benchmark.

Proposed method

  • Proposes residual spatial reduction: a multi-stage ViT design where each stage reduces spatial resolution and increases channel size, with skip connections to stabilize training and improve performance.
  • Introduces a super-network-based NAS framework with multi-architectural sampling, where multiple sub-networks are sampled and trained in a single forward-backward pass to accelerate super-network training.
  • Constructs a search space by expanding a base ViT-Res architecture in depth and width, enabling diverse sub-networks to be explored efficiently.
  • Employs evolutionary search on the trained super-network to discover high-performing architectures without retraining.
  • Uses weight-sharing across all sub-networks in the search space, allowing performance estimation via the super-network’s weights without individual training.
  • Leverages batch-independent properties of the architecture to improve training efficiency and search quality in the NAS pipeline.

Experimental results

Research questions

  • RQ1Can residual spatial reduction improve the accuracy and efficiency of Vision Transformers by enabling a multi-stage architecture similar to CNNs?
  • RQ2How can neural architecture search be made more efficient and effective for multi-stage Vision Transformers with reduced computational cost?
  • RQ3Can weight-sharing NAS with multi-architectural sampling outperform standard NAS methods in discovering high-performance ViT architectures?
  • RQ4To what extent does the proposed method improve the accuracy-MACs and accuracy-throughput trade-offs compared to state-of-the-art ViT models?
  • RQ5Does the integration of residual connections during spatial reduction stabilize training and enhance performance in deeper ViT models?

Key findings

  • ViT-ResNAS-Tiny achieves 8.6% higher top-1 accuracy than DeiT-Tiny while using only 0.5G more MACs and slightly lower throughput.
  • ViT-ResNAS-Small matches DeiT-Base's accuracy with 6.3× fewer MACs and 3.7× higher throughput on a single Titan RTX GPU.
  • Compared to PiT-S, ViT-ResNAS-Tiny achieves similar accuracy with 1.6× fewer MACs and 1.6× higher throughput.
  • ViT-ResNAS-Medium achieves 0.4% higher accuracy than PiT-B while using 2.8× fewer MACs and 2.4× higher throughput.
  • At low MAC regimes (~2.0G), ViT-ResNAS-Tiny outperforms ViL-Tiny in accuracy-MACs trade-off; at higher MACs (~5.0G), it matches ViL-Small’s performance.
  • The proposed weight-sharing NAS with multi-architectural sampling enables faster super-network training and leads to better-performing architectures than standard NAS approaches.

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.