TL;DR
RealSyn introduces a novel paradigm for transforming massive, unorganized "interleaved" web documents (where text and images are mixed) into high-quality image-text pairs for CLIP training. By combining a hierarchical retrieval of realistic text with LLM-based synthetic caption generation and a semantic balancing strategy, the authors created the RealSyn dataset, which consistently outperforms standard benchmarks like LAION and YFCC across a wide range of vision-language tasks.
What Problem Does This Paper Address?
Modern vision-language models like CLIP rely on massive datasets of image-text pairs. While the web is full of data, a huge portion of it exists as interleaved documents—think of a blog post or news article where multiple images and paragraphs are scattered throughout the page without explicit "this caption goes with this image" labels.
Standard training methods struggle to use this "unpaired" data effectively. Previous attempts to fix this often relied solely on synthetic captions generated by AI, which can lack real-world grounding or suffer from model hallucinations. The challenge is: how do we efficiently extract and pair the best real-world text with its corresponding images from these messy documents, and how can we augment that with synthetic data to create a superior training set?
Methods
The authors propose a three-stage pipeline to turn 118 million interleaved documents into a clean, scalable dataset:
-
Real-World Data Extraction: They first extract all images and sentences, applying rigorous quality filters. Images are filtered by resolution and aspect ratio, while sentences are filtered based on complexity, information entropy, and perplexity. Perceptual and semantic deduplication ensures the final pool (198M images and 0.84B sentences) is high-quality and unique.
Figure 2: The multi-stage extraction pipeline for images and text. -
Hierarchical Retrieval & Generation: To pair them up, they use a two-pronged approach:
- Realistic Text Retrieval: Instead of a slow brute-force search, they use Hierarchical Retrieval. They cluster the 0.84B sentences into 2 million groups. For any given image, they first find the most relevant cluster and then search within it for the best matching real-world sentences.
- Synthetic Text Generation: To capture fine-grained details that might be missing from retrieved text, they use vision expert models (OFA and RAM++) to generate tags and basic captions. These are then fed into an instruction-tuned LLaMA3-8B model to produce a rich, "synthetic" description.
- Semantic Balance Sampling: To prevent the model from ignoring rare ("long-tail") concepts, they use a cluster-based sampling strategy. This ensures the final dataset has a diverse representation of topics rather than being dominated by common web imagery.
Datasets
- Source Data: The OBELICS dataset, containing 118M interleaved image-text documents from Common Crawl.
- New Benchmark: RealSyn, released in three scales: 15M, 30M, and 100M image-text pairs.
- Evaluation: The models were tested on 20 downstream classification datasets (e.g., ImageNet, CIFAR10, Food101) and standard retrieval benchmarks like Flickr30k and MSCOCO.
Key Insights and Ideas
- The Power of "Both": The biggest "aha" moment is that combining retrieved realistic text (which provides broad context and real-world knowledge) with synthetic text (which provides fine-grained visual grounding) works significantly better than using either alone.
- Efficiency at Scale: Hierarchical retrieval reduced the computational cost of matching images to text from a projected 10,000 GPU-hours to just 40 GPU-hours on an 8×A100 cluster.
- Diversity Matters: Semantic balance sampling was shown to create a "smoother" data distribution, which is critical for the model to learn concepts that appear less frequently on the web.
Key Results
RealSyn-trained models achieved state-of-the-art (SOTA) performance across multiple categories:
- Linear Probe: RealSyn15M outperformed LAION15M on 18 out of 20 datasets, with an average improvement of 1.6%.
- Zero-Shot Transfer: RealSyn15M showed a massive 14.3% average improvement over YFCC15M and a 5.2% lead over LAION15M.
- Image-Text Retrieval: On Flickr30k, RealSyn15M improved Recall@1 by a staggering 35.8% compared to YFCC15M.
- Robustness: The models showed superior performance on "out-of-distribution" variants of ImageNet (like ImageNet-Adversarial and ImageNet-Sketch), proving the dataset helps models generalize better.
Limitations and Future Work
The authors noted that RealSyn still struggles with specific niche categories like "Cars" and "Flowers" due to their low frequency (less than 1%) in the source OBELICS data. Future work could involve incorporating more diverse source documents to fill these gaps. Additionally, while LLaMA3-8B is efficient, the authors suggest that even more powerful Multimodal Large Language Models (MLLMs) could be explored for even higher-quality synthetic text generation, provided the inference costs can be managed.
Summary updated