TL;DR
OmniCorpus is a massive new open-source dataset featuring 8.6 billion images interleaved with 1.7 trillion text tokens, making it 15 times larger than previous state-of-the-art interleaved corpora. By providing a diverse, bilingual (English and Chinese), and video-centric foundation, it allows Multimodal Large Language Models (MLLMs) to maintain their linguistic prowess while significantly boosting their visual reasoning and in-context learning capabilities.
What Problem Does This Paper Address?
Most multimodal models are trained on simple image-text pairs (like "a photo of a cat" matched with a cat image). While useful, this "naive" pairing ignores how we actually consume information on the internet—in documents where multiple images and paragraphs of text are woven together. This "interleaved" format is crucial for teaching models multimodal in-context learning (the ability to learn from examples provided in a prompt).
Until now, interleaved datasets like MMC4 and OBELICS were relatively small (around 100-140 million documents) and primarily focused on English-centric web pages. This lack of scale and diversity has become a bottleneck for developing truly capable, world-class MLLMs. The authors of OmniCorpus set out to build a "10 billion-level" dataset that captures the richness of the broader web, including non-English content and video-centric documents.
Methods
The researchers developed a sophisticated, five-stage Data Engine designed to scale to thousands of CPU cores and handle massive web-scale data:
- Main Body Extraction: Using an improved version of the Trafilatura library, they extracted primary content from HTML while preserving the natural order of text and images.
- Preliminary Text Filtering: They applied standard quality filters (similar to those used for LLMs like Gopher and C4) to remove "lorem ipsum" text, excessive gibberish, or documents that were too short.
- Document Deduplication: They used MinHash to identify and remove near-duplicate documents, reducing redundancy by roughly 90%.
- Image Downloading & Filtering: Images were filtered based on aspect ratio, size, and quality scores (using LAION-Aesthetic and NSFW detectors).
- Detailed Text Filtering: This is the "secret sauce." They used BERT-based classifiers to score content for advertisements, fluency, and toxicity. Crucially, they implemented a human-feedback loop to iteratively refine these filters.
The data is stored in a unified "streaming data format," which allows researchers to easily "degrade" the interleaved documents into pure text or simple image-text pairs depending on their training needs.
Datasets
The paper introduces three primary subsets under the OmniCorpus umbrella:
- OmniCorpus-CC: Sourced from Common Crawl (English-centric).
- OmniCorpus-CW: Sourced from major Chinese internet resources, providing a massive boost to bilingual capabilities.
- OmniCorpus-YT: A "video-centric" subset derived from video platforms (YouTube), where frames are treated as interleaved images alongside transcribed audio.
For evaluation, the authors tested their models on standard benchmarks including OKVQA, TextVQA, COCO Captioning, and Flickr30k, as well as the text-only MMLU to check for linguistic degradation.
Key Insights and Ideas
- Architecture Dictates Strategy: One of the most interesting findings is that the "best" way to arrange images in a document depends on the model's architecture. Autoregressive models (like LLaVA) perform better when images are kept in their "natural" positions. In contrast, cross-attention models (like Flamingo) benefit more from a "retrieval-based" strategy where images are inserted based on their similarity to surrounding text.
- Linguistic Preservation: Training on interleaved data helps MLLMs retain the "linguistic prowess" of their base LLMs. Models trained only on image-text pairs often suffer from "catastrophic forgetting" of complex language tasks; OmniCorpus helps mitigate this.
- The Video Trade-off: Using video frames (OmniCorpus-YT) significantly boosts performance on Visual Question Answering (VQA) tasks because of the rich contextual information. However, it can actually degrade image captioning performance, likely because a single video frame might not perfectly match the transcribed audio at that exact timestamp.
Key Results
- Scale: OmniCorpus contains 8.6 billion images and 1,696 billion tokens across 2.2 billion documents. This is roughly 1.7x more images and 12.5x more text than LAION-5B.
- Performance: A 7B-parameter model pre-trained on OmniCorpus outperformed larger, well-known models like OpenFlamingo-9B and IDEFICS-9B across multiple benchmarks.
- Bilingual Boost: Pre-training on the Chinese subset (OmniCorpus-CW) improved scores on Chinese multimodal benchmarks (like MMBench-CN) by significant margins (+2.7 points).
Limitations and Future Work
The authors acknowledge several challenges:
- URL Stability: The dataset relies on URLs to images hosted on the web. Over time, these links can break ("link rot"), making it difficult for others to perfectly replicate the dataset.
- Residual Noise: Despite rigorous filtering, web-scraped data always contains some level of noise, advertisements, or biases that are difficult to eliminate entirely.
- Ethical Concerns: While they followed established practices for privacy and safety, the authors note that obtaining explicit consent from billions of web content creators is practically impossible.
Future work will likely focus on even more refined data curation strategies and exploring how this massive scale can be used to train "frontier" multimodal models that rival proprietary systems.
Summary updated