Skip to main content
QUICK REVIEW

[Paper Review] Getting ViT in Shape: Scaling Laws for Compute-Optimal Model Design

Ibrahim Alabdulmohsin, Xiaohua Zhai|arXiv (Cornell University)|May 22, 2023
Domain Adaptation and Few-Shot LearningComputer Science4 citations
TL;DR

This paper introduces SoViT, a compute-optimal vision transformer architecture derived via joint optimization of depth, width, and MLP dimension, achieving performance on par with much larger models like ViT-g/14 using only half the inference cost. By applying scaling laws to model shape rather than just parameter count, SoViT-400m/14 attains 90.3% accuracy on ImageNet-1K and outperforms larger models in zero-shot and downstream tasks with equivalent compute.

ABSTRACT

Scaling laws have been recently employed to derive compute-optimal model size (number of parameters) for a given compute duration. We advance and refine such methods to infer compute-optimal model shapes, such as width and depth, and successfully implement this in vision transformers. Our shape-optimized vision transformer, SoViT, achieves results competitive with models that exceed twice its size, despite being pre-trained with an equivalent amount of compute. For example, SoViT-400m/14 achieves 90.3% fine-tuning accuracy on ILSRCV2012, surpassing the much larger ViT-g/14 and approaching ViT-G/14 under identical settings, with also less than half the inference cost. We conduct a thorough evaluation across multiple tasks, such as image classification, captioning, VQA and zero-shot transfer, demonstrating the effectiveness of our model across a broad range of domains and identifying limitations. Overall, our findings challenge the prevailing approach of blindly scaling up vision models and pave a path for a more informed scaling.

Motivation & Objective

  • To address the inefficiency of blindly scaling vision models by optimizing not just parameter count but also architectural shape (depth, width, MLP size) for compute efficiency.
  • To develop a method that identifies compute-optimal model shapes with far fewer experiments than brute-force search.
  • To challenge the prevailing assumption that larger models always outperform smaller ones by demonstrating that shape-optimized small models can match or exceed larger models under the same compute budget.
  • To provide empirical and theoretical insights into how different architectural dimensions scale in vision transformers across diverse vision tasks.

Proposed method

  • The authors derive scaling laws that jointly optimize depth, width, and MLP dimension of vision transformers, using a small number of initial experiments to extrapolate optimal configurations.
  • They apply a systematic grid sweep over shape dimensions to identify the compute-optimal frontier, minimizing the number of required training runs.
  • The method uses power-law extrapolation to predict performance across different model shapes, enabling efficient search without full training of all candidates.
  • The approach is validated by training SoViT-400m/14, a 400M-parameter model, to match the performance of ViT-g/14 (1.8B parameters) under identical compute budgets.
  • The model is evaluated across image classification, captioning, VQA, zero-shot transfer, and panoptic segmentation to assess generalization.
  • Flexification is applied to test robustness across patch sizes, confirming that SoViT-400m/14 maintains strong performance beyond its original configuration.

Experimental results

Research questions

  • RQ1Can model shape (depth, width, MLP dimension) be optimized jointly to achieve compute-optimal performance in vision transformers?
  • RQ2Does a smaller, shape-optimized vision transformer outperform larger models when trained with the same compute budget?
  • RQ3How do scaling laws for shape dimensions differ across vision tasks such as image classification, captioning, and VQA?
  • RQ4Is the optimal model shape robust to changes in input resolution or patch size, as demonstrated by flexification?
  • RQ5What are the limitations of the compute-optimal shape in dense prediction tasks like panoptic segmentation?

Key findings

  • SoViT-400m/14 achieves 90.3% fine-tuning accuracy on ImageNet-2012, surpassing ViT-g/14 and approaching ViT-G/14 under identical compute settings.
  • In zero-shot transfer, SoViT-400m/14 attains 82.2% accuracy on the LiT benchmark, outperforming ViT-L/16 and matching ViT-g/14.
  • On multitask decoding, SoViT-400m/14 matches or exceeds ViT-g/14 in CIDEr (67.7 vs. 68.8), VQAv2 (56.0% vs. 58.0%), and GQA (52.9% vs. 52.5%) accuracy.
  • In panoptic segmentation, SoViT-400m/14 achieves 43.7 PQ, slightly below ViT-g/14 (44.8 PQ), indicating potential shape limitations in dense prediction tasks.
  • Flexification of SoViT-400m/14 maintains strong performance across varying patch sizes, confirming robustness beyond the original configuration.
  • The method requires only 115 experiments to identify optimal scaling, significantly fewer than prior work that required over 400 experiments for single-dimensional optimization.

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.