Unicoder-VL: A Universal Encoder for Vision and Language by Cross-modal Pre-training

Gen Li, Nan Duan, Yuejian Fang, Daxin Jiang, Ming Zhou

Introduction

In artificial intelligence, vision and language have traditionally been treated as distinct domains. Computer Vision (CV) models excel at object identification, while Natural Language Processing (NLP) models master textual semantics. However, cross-modal tasks—such as complex image retrieval or visual reasoning—require a unified understanding. Unicoder-VL, developed by researchers from Microsoft and Peking University, introduces a "Universal Encoder" designed to learn joint representations of vision and language through large-scale cross-modal pre-training.

Problem Statement

Standard pre-trained models are often modality-specific. CV models trained on ImageNet recognize categories but struggle with complex linguistic descriptions. Conversely, NLP models like BERT lack inherent visual grounding. Integrating these models typically involves adding fusion layers atop fixed backbones, which is often suboptimal. Unicoder-VL addresses this by learning the relationship between pixels and words during the pre-training phase, establishing a unified foundation for downstream tasks.

Methodology

Unicoder-VL utilizes a single-stream Transformer architecture. Unlike dual-stream models that process modalities separately before fusion, Unicoder-VL feeds both into a multi-layer Transformer simultaneously, allowing for early and free interaction between visual and linguistic features.

Input Pipeline

The input consists of two primary streams:

  1. Textual Input: Sentences are tokenized via WordPiece and combined with position embeddings.
  2. Visual Input: A Faster R-CNN extracts Regions of Interest (RoIs). Each region is represented by visual features and a 5-D location vector (spatial coordinates and relative area).

These embeddings are projected into a shared semantic space before entering the Transformer.

The Unicoder-VL architecture processes image regions and text tokens through a single-stream Transformer encoder.

Pre-training Tasks

The model is trained using three self-supervised objectives:

  • Masked Language Modeling (MLM): Predicting masked words using both textual context and visual cues.
  • Masked Object Classification (MOC): Predicting the object category of a masked image region based on surrounding text and visual context.
  • Visual-linguistic Matching (VLM): Determining if a given image and caption pair are matching.

Experimental Setup

The model was pre-trained on a combined dataset of approximately 3.8 million image-caption pairs, including Conceptual Captions (~3M) and SBU Captions (~0.8M). Evaluation was conducted on MSCOCO and Flickr30K for retrieval tasks, and the Visual Commonsense Reasoning (VCR) dataset for cognitive reasoning.

Key Results

Unicoder-VL achieved state-of-the-art (SOTA) performance across multiple benchmarks. On the MSCOCO 1K test set, it reached an 84.3% R@1 for sentence retrieval, significantly outperforming previous non-pre-trained methods.

Performance comparison of Unicoder-VL against baseline methods on MSCOCO and Flickr30k datasets.

Beyond retrieval, the model demonstrated strong performance on the VCR dataset, indicating an ability to handle tasks requiring "cognitive" understanding—reasoning about the "why" behind visual scenes rather than just identifying "what" is present.

Discussion and Conclusion

A key insight from this work is the importance of "early fusion" and large-scale pre-training. The model's zero-shot capabilities on MSCOCO suggest it learns a generalized understanding of the physical world's relationship to language. Furthermore, scaling model depth and data size consistently improved performance.

However, a performance gap remains between perception and high-level cognition. While Unicoder-VL excels at perceptual tasks (e.g., identifying a "red truck"), improvements in complex reasoning (VCR) were more incremental. This suggests that while caption-based pre-training facilitates visual grounding, it may not fully capture social or causal reasoning. Future research may explore temporal dimensions (video) and learning from image-only data.

Summary updated

BibTeX
@inproceedings{li2020unicoder,
  author = {Gen Li and Nan Duan and Yuejian Fang and Daxin Jiang and Ming Zhou},
  title = {{Unicoder-VL: A Universal Encoder for Vision and Language by Cross-modal Pre-training}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i07.6795},
}
Figure