Devil in the Number: Towards Robust Multi-modality Data Filter

Yichen Xu, Zihan Xu, Wenhao Chai, Zhonghan Zhao, Enxin Song, Gaoang WangarXiv 2023

Abstract

In order to appropriately filter multi-modality data sets on a web-scale, it becomes crucial to employ suitable filtering methods to boost performance and reduce training costs. We observe a significant proportion of redundant information, such as numbers, present in textual content which profoundly impacts CLIP scores. We propose a text-masked CLIP filter that reevaluates similarity after eliminating these influences. Experimentally, our approach outperforms top-ranked methods on the DataComp benchmark, achieving a 3.6% performance improvement on ImageNet distribution shifts and demonstrating superior performance when selecting the top 40% of data.

Introduction: The Numerical Noise Problem

Large-scale vision-language models like CLIP rely on massive web-crawled datasets. To ensure quality, researchers typically use a CLIP score filter to discard image-text pairs with low similarity. However, this process is often compromised by "numerical noise."

The authors identified that CLIP is surprisingly fragile when dealing with numbers in captions. For instance, as shown in Figure 1, an image of a Samsung phone might be paired with the ground truth label "Samsung S30 phone." Surprisingly, CLIP may assign a higher similarity score to a factually incorrect label like "Samsung S20 phone" or a generic "Samsung phone" than to the specific ground truth. This inconsistency leads to high-quality data being erroneously filtered out.

Figure 1: CLIP scores for different text descriptions of a phone image, showing how numerical variations can mislead similarity rankings.

Methodology: Text-Masked CLIP Filtering

To address this, the researchers developed the Text-masked CLIP filter. The core idea is to judge image-text pairs based on their semantic essence rather than specific, often confusing, numerical details.

The pipeline involves three main steps:

  1. Text Masking: Numerical digits and content within brackets are identified and removed from the original captions.
  2. Similarity Re-evaluation: The CLIP similarity score is recalculated using the original image and the newly masked text.
  3. Filtering: Data is ranked and selected based on these robustified scores.
Figure 4: Overview of the proposed filtering pipeline, illustrating how text-masking transforms the original dataset into a more robust candidate dataset.

Key Results and Insights

The proposed method was evaluated on the DataComp benchmark (small scale, 12.8M samples) and tested against ImageNet-1k and various distribution shifts.

  • Performance Gains: The text-masked filter achieved a 3.6% improvement on ImageNet distribution shifts compared to the previous state-of-the-art on DataComp's small scale.
  • Robust Selection: When selecting the top 40% of the dataset, the proposed filter yielded a model with a zero-shot accuracy of 0.464, significantly higher than the 0.448 achieved by the standard CLIP filter.
  • Embeddings Analysis: Visualization of feature spaces reveals that numerical variations push text embeddings away from their corresponding image embeddings in ways that do not reflect visual reality, acting as a contaminant in the filtering process.

Conclusion and Future Directions

By identifying the "Devil in the Number," this research provides a simple yet powerful technique for improving multi-modal data quality. While masking numbers is effective, it can occasionally lose semantic specificity (e.g., counting objects). Future work may explore more sophisticated "language rewriting" using LLMs to normalize captions while preserving essential details, or investigating more granular image-text correspondence for numbers.

Summary updated

BibTeX
@misc{xu2023devil,
  author = {Yichen Xu and Zihan Xu and Wenhao Chai and Zhonghan Zhao and Enxin Song and Gaoang Wang},
  title = {{Devil in the Number: Towards Robust Multi-modality Data Filter}},
  year = {2023},
  eprint = {2309.13770},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.13770},
}
Figure