NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Filter Like You Test: Data-Driven Data Filtering for CLIP Pretraining

Mikey Shechter, Yair Carmon

TL;DR: The authors introduce FLYT (Filter Like You Test), a data-driven framework that moves away from heuristic data filtering for CLIP models. By using gradient signals from downstream tasks to "learn" which pretraining examples are actually useful, they achieve a new state-of-the-art 40.1% ImageNet zero-shot accuracy on the DataComp medium benchmark—a significant 5.5% jump over previous methods using only public resources.

The Problem with Heuristic Data Filtering

Training massive vision-language models like CLIP requires enormous datasets, usually scraped from the web. However, web data is inherently noisy. To achieve strong performance, researchers must "filter" this data to retain only the highest-quality examples.

Historically, filtering has relied on heuristic proxies: asking questions like "Does the image match the caption according to an existing model?" or "Is this image similar to ImageNet?" While effective, these heuristics are ultimately just educated guesses at what makes a "good" training example. The authors argue that we should instead treat data filtering as a machine learning problem. Rather than guessing, we should optimize a loss function that directly measures how much a specific data point helps the model perform better on the downstream tasks we actually care about.

Methods: Learning to Filter

The paper introduces three core components to realize this data-driven filtering approach:

  1. FLYT (Filter Like You Test): This is a meta-learning-inspired algorithm. It jointly trains a scoring model and a reference model. In each step, the scoring model weights a batch of pretraining data. The reference model takes a gradient step based on this weighted data. Then, the reference model is evaluated on a "downstream" dataset (like ImageNet). The gradient from that downstream loss is backpropagated all the way through the reference model's update and back to the scoring model's parameters. Essentially, the scoring model learns: "If I give this example a high weight, does the model get better at the downstream task?"
FLYT Architecture
  1. M-FLYT (Mixing-FLYT): A practical implementation of FLYT where the "features" used by the scoring model are the scores from existing heuristic methods (like CLIP score, DFN, or HYPE). It learns the optimal linear combination to unify these different signals into one master score.
  2. SCS (Soft Cap Sampling): Most filtering methods simply take the "Top 20%" of examples. FLYT produces a probability distribution. SCS samples from this distribution but applies a "repetition penalty" ($\alpha$). This prevents the model from seeing the absolute highest-scoring images too many times, ensuring the final dataset remains diverse.

Key Insights and Ideas

  • Optimization over Heuristics: The most significant insight is that we don't need to guess which filtering method is best. By using the chain rule, we can let the downstream task tell us which data points (or which existing filters) are most valuable.
  • The Power of Mixing: M-FLYT demonstrates that different filters capture different "flavors" of quality. By learning to mix various scores, the authors outperformed any single heuristic score by a wide margin.
  • Diversity vs. Quality: The success of SCS suggests that strict "Top-K" filtering is sub-optimal. Even a "lower quality" image can be useful if it provides unique information that the high-quality images lack. The repetition penalty effectively balances this trade-off.
  • Qualitative Shift: Interestingly, M-FLYT tends to prioritize images containing multiple objects or complex scenes (e.g., a dog and a tent), whereas standard CLIP scores often favor simple images with clear text overlays.

Key Results

The proposed methods yield substantial improvements on standard benchmarks.

Filtering Results Comparison
  • New State-of-the-Art: On the DataComp Medium benchmark, M-FLYT combined with SCS achieved 40.1% ImageNet zero-shot accuracy. This represents a 2% absolute increase over the previous best overall result and a 5.5% increase over previous methods that strictly use public resources.
  • Efficiency: Despite the complex meta-learning loop, M-FLYT is computationally efficient. It achieves these results using roughly $3\times$ fewer FLOPs than training a full DataComp medium-scale model from scratch, as it only needs to train on a small fraction of the data (20M examples) to learn the scoring weights.
  • Small Scale Success: The method also set a new record on the DataComp Small benchmark, demonstrating that the approach scales effectively across different dataset sizes.

Limitations and Future Work

  • Computational Overhead: While optimized, FLYT still requires more memory and compute per step than standard training due to the second-order gradients (gradients through gradients).
  • ImageNet Bias: The scoring model was trained using ImageNet as the downstream signal. While this generalized well to other tasks, it might over-index on "ImageNet-like" features. Future work could involve using a more diverse set of downstream tasks in the inner loop.
  • Scaling Up: The authors tested up to the "Medium" scale (128M). Applying this to "Large" (1.2B) or "X-Large" (12.8B) scales remains an open challenge.
  • Language Models: The authors suggest that this "Filter Like You Test" philosophy could be highly effective for filtering data for Large Language Models (LLMs), which currently rely on even more opaque heuristic filters.

Summary updated

BibTeX
@inproceedings{shechter2025filter,
  author = {Mikey Shechter and Yair Carmon},
  title = {{Filter Like You Test: Data-Driven Data Filtering for CLIP Pretraining}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=lYOOHqfM46},
}
Figure