Quality Not Quantity: On the Interaction between Dataset Design and Robustness of CLIP

Thao Nguyen, Gabriel Ilharco, Mitchell Wortsman, Sewoong Oh, Ludwig Schmidt

TL;DR

Researchers found that the robustness of CLIP models depends heavily on the specific distribution of their pre-training data, rather than just the sheer volume. Surprisingly, mixing different data sources doesn't combine their strengths; instead, it "dilutes" the robustness of the best individual source, suggesting that careful dataset curation is more important than simply scaling up web-crawled noise.

What Problem Does This Paper Address?

Large-scale vision-language models like CLIP and Flamingo owe their impressive "zero-shot" capabilities and robustness to massive web-crawled datasets. However, these datasets are often proprietary "black boxes." We know they work, but we don't know why or how the specific mix of data sources (e.g., Wikipedia vs. Reddit vs. Flickr) contributes to a model's ability to handle distribution shifts—like recognizing a sketch of a banana instead of a photo.

The common wisdom in deep learning has been "more data is better." This paper challenges that assumption, investigating whether simply gathering more web data is the most effective way to build robust models, or if the composition of that data matters more.

Methods

The authors established a controlled "testbed" to study these interactions systematically:

  1. Standardized Training: They trained CLIP models (using a ResNet-50 architecture) on six different publicly available data sources, keeping the number of samples (up to 15M) and hyperparameters consistent to ensure fair comparison.
  2. Effective Robustness Metric: They measured "effective robustness"—a metric that looks at how much better a model performs on out-of-distribution (OOD) tasks (like sketches or renditions) compared to a baseline model with the same accuracy on standard ImageNet.
  3. Mixing & Ensembling: They experimented with Input Mixing (training one model on a union of datasets) and Output Ensembling (averaging the predictions of models trained on separate datasets).
  4. Theoretical Modeling: They developed a simple binary classification theory to mathematically explain why mixing datasets leads to the observed "dilution" of robustness.

Datasets

The study utilized a diverse range of web-crawled sources for pre-training:

  • YFCC: Images and captions from Flickr.
  • LAION: A subset of the massive Common Crawl-based dataset.
  • Conceptual Captions (CC-12M): Images with HTML alt-text.
  • RedCaps: Data from 350 manually curated subreddits.
  • WIT: Image-text pairs from Wikipedia.
  • Shutterstock: Images and captions crawled from the stock photo site.

For evaluation, they used ImageNet as the reference and tested against four major distribution shifts: ImageNet-V2 (newly collected photos), ImageNet-R (renditions/art), ImageNet-Sketch, and ObjectNet (objects in unusual poses/backgrounds).

Key Insights and Ideas

  • No Single Source Dominates: Different datasets induce robustness to different shifts. For instance, Shutterstock data makes models great at recognizing sketches, while RedCaps (Reddit) data excels at ObjectNet's unusual viewpoints.
  • The Dilution Effect: This is the paper's most striking finding. If you mix a "high-robustness" dataset with a "low-robustness" one, the resulting model doesn't inherit the best of both. Instead, its robustness interpolates between the two. In essence, adding a mediocre dataset to a great one makes the final model less robust than if you had just used the great one.
  • Ensembling as a Predictor: The authors found that ensembling the outputs of two models trained on different data perfectly predicts the performance of a single model trained on the mixture of that data. This is a huge win for researchers, as it means you can test data mixing strategies without the massive compute cost of retraining from scratch.
  • Filtering is Key: The theoretical model provides a justification for why CLIP-based filtering (using an existing model to prune "bad" data) works. By selecting data that aligns with a robust prior, you effectively increase the "quality" of the distribution, leading to better downstream robustness.

Key Results

The variability of data sources is clearly visible when plotting OOD accuracy against ImageNet accuracy. As seen in Figure 2, while all sources follow a linear trend, the slope of that trend (the robustness) varies wildly.

Figure 2: Performance of the six pre-training data sources under various distribution shifts. We find that the behavior—both in terms of accuracy and the slope of the linear trend—of the pre-training data varies substantially across distribution shifts, with no single data source dominating. Most shifts help highlight the strengths and weaknesses of different data sources, except for ImageNet-V2, where the linear trends produced by individual sources are highly correlated with one another.

When mixing YFCC and LAION (Figure 3), the researchers observed that a 50/50 mix (cyan line) resulted in robustness strictly between the two parent datasets. Even increasing the total data volume (30M samples vs 15M) did not overcome this interpolation; the model simply moved further up the "average" line rather than shifting to a more robust one.

Figure 3: Mixing YFCC and LAION results in intermediate robustness.

Limitations and Future Work

  • Scale: The experiments were conducted at the 5M–15M sample scale. While the authors provide evidence that these linear trends hold at larger scales (like OpenAI's 400M CLIP), full-scale verification on multi-billion parameter models remains prohibitively expensive.
  • Theoretical Simplicity: The mathematical proofs rely on a binary classification setup. Extending this to the high-dimensional, multi-class reality of CLIP is a logical next step.
  • Fine-tuning: The study focuses on zero-shot performance. It remains an open question how these pre-training data interactions affect a model that is later fine-tuned on a specific downstream task.

Ultimately, the paper concludes that we need a "dataset atlas"—a way to understand which data sources provide which types of robustness—so that we can move away from "crawling everything" and toward principled dataset design.

Summary updated

BibTeX
@inproceedings{nguyen2022quality,
  author = {Thao Nguyen and Gabriel Ilharco and Mitchell Wortsman and Sewoong Oh and Ludwig Schmidt},
  title = {{Quality Not Quantity: On the Interaction between Dataset Design and Robustness of CLIP}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=LTCBavFWp5C},
}
Figure