When Do We Not Need Larger Vision Models?

Baifeng Shi, Ziyang Wu, Maolin Mao, Xin Wang, Trevor Darrell

Introduction

Instead of building ever-larger vision models with billions of parameters, we can achieve state-of-the-art performance by running smaller, pre-trained models over multiple image scales. This approach, termed Scaling on Scales ($S^2$), allows a "base" model to outperform "giant" models on tasks ranging from semantic segmentation to robotic manipulation, often using less than 10% of the parameters.

The Problem: The Parameter Tax of Scaling Up

The dominant trend in computer vision is "scaling up": more parameters, more data, and more compute. While this leads to more powerful representations, it comes with a massive "parameter tax"—gigantic models are expensive to train, store, and deploy.

The authors ask a fundamental question: Is a larger model always necessary for better visual understanding? They hypothesize that much of the advantage of large models comes from their ability to resolve fine-grained details, which might be achievable by simply looking at images at higher resolutions using smaller, more efficient models.

Methods: The $S^2$-Wrapper

The researchers introduce the $S^2$-Wrapper, a parameter-free mechanism that can be applied to any pre-trained vision model (like a Vision Transformer or ViT) with a single line of code.

The S2-Wrapper architecture
  1. Multi-Scale Input: An image is interpolated into multiple scales (e.g., $224^2, 448^2, 672^2$).
  2. Sub-image Splitting: To avoid the quadratic computational explosion of self-attention on large images, the higher-resolution versions are split into $224^2$ sub-images (the size the model was originally trained on).
  3. Feature Extraction: The same frozen, smaller model processes all sub-images and the original image.
  4. Merging & Pooling: Features from the larger scales are merged back into a single map, average-pooled to match the original spatial dimensions, and concatenated.
  5. Result: A multi-scale feature descriptor that has the same spatial dimensions as a standard output but a deeper channel dimension, capturing both global context and local detail.

Key Insights and Ideas

  • The "Capacity" Surprise: Through reconstruction experiments, the authors found that the features of a "Large" model can be almost perfectly approximated by a linear transformation of the multi-scale features of a "Base" model. This suggests that smaller models already have the capacity to learn what big models learn; they just need to see the data at the right scales.
  • Generalization vs. Resolution: Large models typically generalize better on "hard" examples (rare objects or ambiguous labels). The authors found that while $S^2$ helps smaller models catch up on detail, they still lag on these rare cases unless they are specifically pre-trained with the $S^2$ mechanism.
  • Parameter Efficiency: $S^2$ allows a model with only 300M parameters to match or beat a model with several billion parameters. This is a massive win for deployment on edge devices or in memory-constrained environments.

Key Results

The authors evaluated $S^2$ across a diverse array of benchmarks, including General Vision (ImageNet-1k, ADE20k, NYUv2), Multimodal LLMs (MLLMs), and Robotics.

  • Beating the Giants: A ViT-Base (86M params) using $S^2$ outperformed a ViT-Giant (1B params) in semantic segmentation and depth estimation while using comparable GFLOPs.
Semantic segmentation performance (mIoU) vs GFLOPs
  • State-of-the-Art MLLMs: By applying $S^2$ to LLaVA-1.5, the researchers achieved SOTA performance on the $V^*$ benchmark, surpassing commercial heavyweights like GPT-4V and Gemini Pro in detailed visual understanding.
  • Robotic Success: In a custom cube-picking task, scaling the image resolution ($S^2$) improved the success rate by 19%, whereas scaling the model size from Base to Large only provided a 6% boost.

Limitations and Future Work

  • Inference Latency: While GFLOPs are comparable to larger models, running multiple passes (or sub-images) through a model can introduce overhead that isn't captured by raw operation counts, depending on how well the hardware parallelizes the tasks.
  • Scale-Selective Processing: Currently, $S^2$ processes every part of the image at every scale. The authors suggest future work could involve "scale-selective processing"—only looking at complex regions in high resolution, similar to how human attention works.
  • Pre-training is still key: To truly replace giant models in terms of "common sense" and rare-case generalization, smaller models still need to be pre-trained with $S^2$ rather than just having it "wrapped" around them after the fact.

Summary updated

BibTeX
@inproceedings{shi2024when,
  author = {Baifeng Shi and Ziyang Wu and Maolin Mao and Xin Wang and Trevor Darrell},
  title = {{When Do We Not Need Larger Vision Models?}},
  booktitle = {SSL @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=998NbPvfrD},
}
Figure