GraViT-E: Gradient-based Vision Transformer Search with Entangled Weights

Rhea Sanjay Sukthanker, Arjun Krishnakumar, Sharat Patil, Frank HutterMetaLearn @ NeurIPS 2022

TL;DR

This paper introduces GraViT-E, a novel method for efficiently searching optimal Vision Transformer architectures. By combining gradient-based optimization with weight entanglement, GraViT-E achieves better performance and significantly improved parameter efficiency compared to existing methods, particularly for large transformer models.

What Problem Does This Paper Address?

Designing optimal neural network architectures, especially for complex models like Vision Transformers (ViTs), is a challenging and time-consuming task. Neural Architecture Search (NAS) aims to automate this process. Traditional differentiable one-shot NAS methods, while efficient, struggle with the massive memory requirements of large models like ViTs due to their parameter-heavy nature. Existing weight-sharing techniques in NAS can lead to high memory consumption, limiting their application to smaller architectures. While weight entanglement methods reduce memory, they often rely on black-box optimizers that can lead to suboptimal architecture selection due to poor rank correlation between surrogate performance and actual performance. This paper addresses the need for a NAS method that is both memory-efficient and capable of gradient-based optimization for ViTs.

Methods

GraViT-E introduces a novel approach by combining two key ideas:

  • Continuous Relaxation of Weight Entanglement: This is the core innovation. Instead of just using weight entanglement (where sub-network weights are sampled from the largest model), GraViT-E adds learnable architectural parameters to this entangled structure. This allows for a continuous search space, similar to traditional differentiable NAS.
  • Gradient-Based One-Shot Optimization: By introducing architectural parameters, GraViT-E enables the use of gradient-based optimizers (like DARTS, GDAS, and DrNAS) to directly search for optimal architectures within the entangled weight space. This contrasts with black-box optimizers used in some weight entanglement methods.

Essentially, GraViT-E bridges the gap between memory-efficient weight entanglement and the powerful gradient-based search capabilities of differentiable NAS, specifically tailored for Vision Transformers.

Datasets

The paper uses the following datasets for training and evaluation:

  • CIFAR-10
  • CIFAR-100
  • ImageNet-1k

The experiments involve searching on CIFAR-10 and CIFAR-100, and then transferring the best-found architectures to ImageNet-1k for final evaluation.

Key Insights and Ideas

  • Bridging the Gap: The most significant insight is the successful combination of weight entanglement (for memory efficiency) and gradient-based search (for effective optimization) in a single framework. This allows for efficient exploration of large ViT search spaces.
  • Regularization Effect: The paper observes that finetuning models discovered by GraViT-E yields better accuracy than retraining from scratch. This suggests that the supernet training scheme imparts a beneficial regularization effect, which warrants further investigation.
  • Pareto Dominance: GraViT-E's discovered architectures consistently Pareto-dominate existing baseline models (like AutoFormer) in terms of accuracy, parameter count, and FLOPS, indicating a superior trade-off.

Key Results

  • Improved Accuracy and Efficiency: GraViT-E consistently finds architectures that outperform baselines. On ImageNet-1k, improvements of up to 1.5% accuracy are reported compared to AutoFormer for comparable model sizes.
  • Parameter Efficiency: The method achieves significant parameter efficiency, being up to 35% more parameter efficient on ImageNet-1k compared to AutoFormer.
  • Optimizer Versatility: GraViT-E demonstrates that it can be effectively used with various off-the-shelf one-shot optimizers (DARTS, GDAS, DrNAS), highlighting its general applicability.
  • Pareto Front Performance: On CIFAR-100, the GDAS optimizer with GraViT-E Pareto-dominates other models. For CIFAR-10, GDAS and DrNAS lie on the Pareto front.

Limitations and Future Work

  • Limited Search Space: The current study is based on a lightweight Vision Transformer search space. The authors acknowledge that further investigation on larger and more diverse ViT search spaces is needed.
  • Application Diversity: The current work focuses on image classification. Future work could extend GraViT-E to other transformer applications like language modeling and semantic image segmentation.
  • Weight Entanglement Dynamics: The paper suggests further investigation into how the weight entanglement scheme specifically impacts gradient-based search, both positively and negatively.
  • Broader Optimizer and Search Space Support: The authors plan to extend their work to support a wider range of one-shot optimizers and different types of transformer architectures and convolutional networks.

Summary updated

BibTeX
@inproceedings{sukthanker2022gravit,
  author = {Rhea Sanjay Sukthanker and Arjun Krishnakumar and Sharat Patil and Frank Hutter},
  title = {{GraViT-E: Gradient-based Vision Transformer Search with Entangled Weights}},
  booktitle = {MetaLearn @ NeurIPS},
  year = {2022},
  url = {https://openreview.net/forum?id=dm8WcWiuvd},
}
Figure