Where Should I Spend My FLOPS? Efficiency Evaluations of Visual Pre-training Methods

Skanda Koppula, Yazhe Li, Evan Shelhamer, Andrew Jaegle, Nikhil Parthasarathy, Relja Arandjelovic, João Carreira, Olivier J. HénaffarXiv 2022 · DOI

Introduction

The current trajectory of computer vision research often follows a "more is better" philosophy, where state-of-the-art results are achieved by scaling datasets and compute. However, for most practitioners, computational resources are a strict constraint. This paper investigates the pragmatic trade-offs between various pre-training paradigms—including contrastive learning (SimCLR), self-distillation (DINO, BYOL), and masked reconstruction (MAE)—to determine which methods offer the best downstream performance for a fixed FLOP budget.

Experimental Framework

To ensure a fair comparison, the researchers profiled the actual computational cost of each method using a JAX-based profiler. The study controlled for:

  • Methods: Four self-supervised learning (SSL) techniques (BYOL, SimCLR, DINO, MAE) and two supervised baselines (CLIP and standard softmax classification).
  • Budgets: Training durations spanned four levels, from 62,500 to 750,000 steps.
  • Architectures: Vision Transformers (ViT-B and ViT-L) were evaluated to test whether scaling model size or training time is more effective.
  • Evaluation: Downstream performance was measured via fine-tuning for semantic segmentation (ADE20K) and object detection (COCO).

The Efficiency Pareto Front

The study reveals that supervised methods, particularly CLIP, define the upper bound of efficiency. When text-image pairs are available, CLIP provides the highest performance per FLOP. Among purely self-supervised methods, MAE emerges as the clear leader, significantly outperforming alternatives like DINO or BYOL in computational efficiency.

Efficiency of Supervised vs. Self-Supervised Methods on JFT-300M

MAE's efficiency stems from its reconstruction task, which allows it to be roughly an order of magnitude more efficient than other SSL methods when transferring to spatial tasks like segmentation.

The Curation Myth and Dataset Scale

A prevalent belief in the field is that SSL methods excel by leveraging massive, uncurated web data. However, the findings challenge this: when compute is fixed, most methods perform worse on web-scale uncurated datasets (like ALIGN) than on smaller, curated ones (like ImageNet-21K).

Comparison of Pre-training Efficiency on JFT-300M vs. ALIGN

As shown in the comparison between JFT-300M and ALIGN, the lack of curation in ALIGN leads to a noticeable drop in efficiency for many SSL methods. Curation remains a critical factor for maximizing the utility of a fixed computational budget.

Key Insights for Practitioners

  • Model Scaling: For a limited FLOP budget, it is generally better to train a smaller backbone (e.g., ViT-B) for more steps than a larger one (e.g., ViT-L) for fewer steps. Larger models only become advantageous once the capacity of the smaller model is fully saturated.
  • Complexity Costs: Methods requiring multiple views (DINO, SimCLR) or large batch sizes are "FLOP-heavy," making them less efficient per gradient step compared to MAE or supervised learning.
  • Stability: Some methods, notably DINO, showed significant training instability when scaled to long schedules on uncurated datasets like JFT.

Conclusion

This research underscores that not all pre-training FLOPs are created equal. Supervised language-image pre-training (CLIP) and masked autoencoding (MAE) represent the current state-of-the-art in efficiency. While the industry moves toward larger datasets, the importance of data curation and the strategic selection of pre-training tasks cannot be overlooked for those operating under finite compute budgets. Future work should focus on developing "compute-optimal" scaling laws for SSL to guide resource allocation more effectively.

Summary updated

Abstract

Self-supervised methods have achieved remarkable success in transfer learning, often achieving the same or better accuracy than supervised pre-training. Most prior work has done so by increasing pre-training computation by adding complex data augmentation, multiple views, or lengthy training schedules. In this work, we investigate a related, but orthogonal question: given a fixed FLOP budget, what are the best datasets, models, and (self-)supervised training methods for obtaining high accuracy on representative visual tasks? Given the availability of large datasets, this setting is often more relevant for both academic and industry labs alike. We examine five large-scale datasets (JFT-300M, ALIGN, ImageNet-1K, ImageNet-21K, and COCO) and six pre-training methods (CLIP, DINO, SimCLR, BYOL, Masked Autoencoding, and supervised). In a like-for-like fashion, we characterize their FLOP and CO$_2$ footprints, relative to their accuracy when transferred to a canonical image segmentation task. Our analysis reveals strong disparities in the computational efficiency of pre-training methods and their dependence on dataset quality. In particular, our results call into question the commonly-held assumption that self-supervised methods inherently scale to large, uncurated data. We therefore advocate for (1) paying closer attention to dataset curation and (2) reporting of accuracies in context of the total computational cost.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
COCO · 2017 object detectionSimCLRBox AP@[IoU=0.50:0.95|area=all|maxDets=100] (mAP)42.0split: val · fine-tuned · backbone=ViT-B/16 · detector=Mask R-CNN · finetuning-steps=22K · pretraining-data=ImageNet-1K
Source quote
L181: SimCLR │ 42.0 │ {41.7} │ {41.2} │ {40.3} │ {35.6}
COCO · 2017 object detectionSimCLRBox AP@[IoU=0.50:0.95|area=all|maxDets=100] (mAP)35.6split: val · fine-tuned · backbone=ViT-B/16 · detector=Mask R-CNN · finetuning-steps=22K · pretraining-data=ALIGN
Source quote
L181: SimCLR │ 42.0 │ {41.7} │ {41.2} │ {40.3} │ {35.6}
COCO · 2017 object detectionMAEBox AP@[IoU=0.50:0.95|area=all|maxDets=100] (mAP)44.8split: val · fine-tuned · backbone=ViT-B/16 · detector=Mask R-CNN · finetuning-steps=22K · pretraining-data=ImageNet-1K
Source quote
L182: MAE │ 44.8 │ {44.6} │ {43.1} │ {42.6} │ {44.2}
COCO · 2017 object detectionMAEBox AP@[IoU=0.50:0.95|area=all|maxDets=100] (mAP)44.2split: val · fine-tuned · backbone=ViT-B/16 · detector=Mask R-CNN · finetuning-steps=22K · pretraining-data=ALIGN
Source quote
L182: MAE │ 44.8 │ {44.6} │ {43.1} │ {42.6} │ {44.2}
COCO · 2017 object detectionBYOLBox AP@[IoU=0.50:0.95|area=all|maxDets=100] (mAP)40.0split: val · fine-tuned · backbone=ViT-B/16 · detector=Mask R-CNN · finetuning-steps=22K · pretraining-data=ImageNet-1K
Source quote
L180: BYOL │ 40.0 │ {39.2} │ 40.3 │ {39.1} │ {27.9}
COCO · 2017 object detectionBYOLBox AP@[IoU=0.50:0.95|area=all|maxDets=100] (mAP)40.3split: val · fine-tuned · backbone=ViT-B/16 · detector=Mask R-CNN · finetuning-steps=22K · pretraining-data=ImageNet-21K+1K
Source quote
L180: BYOL │ 40.0 │ {39.2} │ 40.3 │ {39.1} │ {27.9}
BibTeX
@misc{koppula2022where,
  author = {Skanda Koppula and Yazhe Li and Evan Shelhamer and Andrew Jaegle and Nikhil Parthasarathy and Relja Arandjelovic and João Carreira and Olivier J. Hénaff},
  title = {{Where Should I Spend My FLOPS? Efficiency Evaluations of Visual Pre-training Methods}},
  year = {2022},
  eprint = {2209.15589},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.15589},
}
Figure