Billion-Scale Pretraining with Vision Transformers for Multi-Task Visual Representations

Josh Beal, Hao-Yu Wu, Dong Huk Park, Andrew Zhai, Dmitry Kislyuk

This research from the Pinterest engineering team provides a detailed look at the transition of massive-scale AI research into a high-stakes production environment. By pretraining Vision Transformers (ViT) on a custom 1.3-billion image dataset, the researchers demonstrated that ViTs significantly outperform traditional Convolutional Neural Networks (CNNs) as dataset scale increases. This work represents one of the first successful industrial deployments of pure ViT models for large-scale image retrieval.

The Challenge of Unified Visual Embeddings

In large-scale visual discovery platforms, a single "backbone" model must power dozens of downstream tasks simultaneously—ranging from skin-tone classification and object detection to visual search and recommendations. Historically, CNNs like ResNeXt have served as the industry standard for these "Unified Visual Embeddings."

However, as datasets grow to the billion-image scale, researchers have questioned whether CNNs hit a performance ceiling. The authors set out to determine if Vision Transformers could better leverage extreme-scale data and if the theoretical benefits of ViT translate to "real-world" production metrics like click-through rates (CTR) and human-rated relevance.

Methodology

The authors introduced a two-pronged approach involving a shift in model architecture and a novel data pipeline designed to handle noisy, web-scale annotations.

Architecture Shift

The core of the transition involved replacing the standard ResNeXt-101 backbone with Vision Transformers, specifically ViT-B/16 and ViT-B/32. While CNNs rely on local receptive fields, ViTs process images as sequences of patches, allowing for global self-attention across the entire image.

Comparison between (A) traditional CNN-based unified visual embedding and (B) the new ViT-based 1B+ pretraining pipeline.

As illustrated in Figure 1, the new pipeline (B) leverages a massive 1.3B image dataset for pretraining. The resulting model is then fine-tuned using a combination of multi-label classification and metric learning to ensure that semantically similar images are clustered together in the embedding space.

Weakly-Supervised Label Generation

To label 1.3 billion images without manual effort, the team extracted signals from image titles and descriptions. To clean this inherently noisy data, they implemented two key strategies:

  1. Visual Dictionary Restriction: They trained a classifier to assign a "concreteness score" to terms, filtering out abstract words (like "best") that lack a clear visual representation.
  2. Annotation Clustering: They used k-means clustering on text embeddings to handle the "long-tail" distribution of labels, mapping hundreds of thousands of raw terms into a manageable set of 18,000 semantic clusters.
Visual Dictionary Restriction process: filtering out abstract terms like 'best design' to focus on visually concrete labels.

Figure 6 demonstrates the Visual Dictionary Restriction process, where abstract terms like "best design" are discarded in favor of visually concrete labels like "jaguar print," ensuring the model focuses on discriminative visual features.

Key Insights and Results

The "Scale Cross-Over"

The research confirmed a critical hypothesis: at smaller data scales (like ImageNet-1k), CNNs are often superior or equal to ViTs. However, as the dataset grows toward 1.3 billion images, the ViT performance curve remains steep while the CNN curve begins to flatten. ViT-B/16 eventually outperformed the best CNN baseline by a wide margin.

Production Gains and Efficiency

When deployed to Pinterest's Visual Shopping system, the ViT-based model delivered a 36% improvement in top-1 relevance (as judged by humans) and a 23% increase in click-through volume.

Surprisingly, despite the perception of Transformers as computationally heavy, the authors found that ViT-B/16 (at 224x resolution) had lower single-image inference latency (8.7ms) compared to ResNeXt-101 (15.6ms) on a single GPU. This efficiency makes it highly suitable for real-time production serving.

Conclusion and Future Work

The study highlights that large-scale pretraining acts as a massive "multiplier" for downstream tasks. A model pretrained on 1.3B images and then fine-tuned on just 5 examples per category performed 20% better than a standard model. While the authors noted challenges such as the quadratic complexity of self-attention, they anticipate even greater gains from larger ViT variants and the exploration of self-supervised objectives to further mitigate label noise.

Summary updated

BibTeX
@inproceedings{beal2022billion,
  author = {Josh Beal and Hao-Yu Wu and Dong Huk Park and Andrew Zhai and Dmitry Kislyuk},
  title = {{Billion-Scale Pretraining with Vision Transformers for Multi-Task Visual Representations}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2022},
  url = {https://openreview.net/forum?id=z4MPE23Wxg},
}
Figure