Abstract
Joint image-text embedding is the bedrock for most Vision-and-Language (V+L) tasks, where multimodality inputs are simultaneously processed for joint visual and textual understanding. In this paper, we introduce UNITER, a UNiversal Image-TExt Representation, learned through large-scale pre-training over four image-text datasets (COCO, Visual Genome, Conceptual Captions, and SBU Captions), which can power heterogeneous downstream V+L tasks with joint multimodal embeddings. We design four pre-training tasks: Masked Language Modeling (MLM), Masked Region Modeling (MRM, with three variants), Image-Text Matching (ITM), and Word-Region Alignment (WRA). Different from previous work that applies joint random masking to both modalities, we use conditional masking on pre-training tasks (i.e., masked language/region modeling is conditioned on full observation of image/text). In addition to ITM for global image-text alignment, we also propose WRA via the use of Optimal Transport (OT) to explicitly encourage fine-grained alignment between words and image regions during pre-training. Comprehensive analysis shows that both conditional masking and OT-based WRA contribute to better pre-training. We also conduct a thorough ablation study to find an optimal combination of pre-training tasks. Extensive experiments show that UNITER achieves new state of the art across six V+L tasks (over nine datasets), including Visual Question Answering, Image-Text Retrieval, Referring Expression Comprehension, Visual Commonsense Reasoning, Visual Entailment, and NLVR2.
Introduction
Vision-and-Language (V+L) tasks, such as Visual Question Answering (VQA) and Image-Text Retrieval, require a deep understanding of both visual content and textual descriptions. Traditionally, these tasks were approached with specialized, task-specific architectures. However, inspired by the success of BERT in Natural Language Processing, there has been a shift toward developing universal representations that can be fine-tuned for various downstream applications. UNITER (UNiversal Image-TExt Representation) addresses this by providing a large-scale pre-trained model that serves as a foundation for multimodal understanding.
Architecture and Methods
UNITER utilizes a single-stream Transformer architecture. Unlike two-stream models that process image and text features in parallel before fusing them, UNITER feeds both modalities into a single Transformer block. This design facilitates early and intense cross-modal interaction, allowing the model to learn complex relationships between words and image regions from the first layer.
Pre-training Objectives
The core of UNITER's effectiveness lies in its four pre-training tasks:
- Masked Language Modeling (MLM): Similar to BERT, the model predicts masked tokens. However, in UNITER, this prediction is conditioned on the visual features of the image, forcing the model to use visual context to resolve linguistic ambiguity.
- Masked Region Modeling (MRM): The visual counterpart to MLM, where specific image regions are masked. The model must reconstruct these regions (via feature regression or classification) based on the surrounding visual context and the provided text.
- Image-Text Matching (ITM): A global alignment task where the model learns to determine if a given sentence correctly describes a specific image.
- Word-Region Alignment (WRA): A novel task using Optimal Transport (OT) to explicitly align words with corresponding image regions. By minimizing the "transportation cost" between textual and visual embeddings, the model learns fine-grained, local correspondences.
A key innovation is the use of conditional masking. Unlike prior models that might mask both modalities simultaneously—potentially leaving the model with no context—UNITER masks only one modality at a time while keeping the other fully visible.
Datasets
UNITER was pre-trained on a massive "mega-dataset" comprising approximately 5.6 million image-text pairs. This dataset includes both in-domain data (COCO and Visual Genome) and out-of-domain data (Conceptual Captions and SBU Captions).
The inclusion of diverse datasets ensures that the model generalizes well across different visual and linguistic styles, moving beyond the specific biases of any single dataset.
Results and Discussion
UNITER achieved state-of-the-art (SOTA) results across six major V+L tasks and nine datasets. Notable improvements include:
- Visual Commonsense Reasoning (VCR): A +2.8% gain over previous SOTA.
- NLVR2: A +2.5% performance boost.
- Image-Text Retrieval: A significant +15% increase in R@1 for zero-shot retrieval on Flickr30K.
Ablation studies confirmed that both conditional masking and OT-based WRA are critical to these gains. The single-stream architecture proved highly efficient, outperforming larger two-stream models while maintaining a more streamlined parameter count.
Conclusion
UNITER demonstrates the power of large-scale, cross-modal pre-training with a single-stream Transformer. By introducing conditional masking and Optimal Transport-based alignment, the model achieves a more nuanced understanding of the relationship between vision and language. While current versions rely on pre-extracted image features from Faster R-CNN, future iterations may explore end-to-end learning directly from pixels to further enhance performance and flexibility.
Summary updated