Introduction
Vision-Language (V-L) artificial intelligence has traditionally been divided into two distinct paradigms: understanding and generation. Understanding models, such as CLIP or UNITER, excel at discriminative tasks like image-text retrieval or visual question answering by utilizing bidirectional masking. However, this architecture often prevents them from generating text autoregressively. Conversely, generative models are designed for tasks like image captioning but can lack the deep semantic grounding required for complex reasoning.
The UniVL (Unified Multimodal Pre-training) framework addresses this dichotomy by bridging the gap between understanding and generation within a single, unified architecture. By combining innovative masking strategies with prompt-based learning, UniVL achieves high performance across both task types.
Methodology: The UniVL Framework
UniVL consists of a visual encoder (ViT), a text encoder (BERT-based), and a multimodal encoder that integrates features via cross-attention. The framework introduces three primary innovations to achieve its unified capabilities:
- Mixed Masking Strategy: During pre-training, the model employs both bidirectional masks for context understanding and causal (triangular) masks for sequence prediction. This dual approach enables the model to switch seamlessly between understanding and generation tasks.
- Unified Prompt-based Fine-tuning: Rather than using task-specific classification heads, UniVL reframes understanding tasks as generative ones. For instance, a classification task is transformed into a "fill-in-the-blank" prompt: "The theme is about [MASK]".
- Parametric Learnable Prompts: To avoid the brittleness of manual prompt engineering, the authors utilize [UNUSED] tokens from the BERT vocabulary as "soft prompts." These tokens act as learnable parameters optimized during fine-tuning to signal specific tasks to the model.
Datasets and Evaluation
The model underwent pre-training on a combined dataset of GCC3M and COCO, encompassing approximately 2.84 million unique images. Performance was evaluated across a diverse set of benchmarks, including Flickr30K and COCO for retrieval and captioning, VQAv2 for question answering, and SNLI-VE for visual entailment.
Key Results and Insights
UniVL demonstrates that a unified approach can rival or exceed the performance of specialized models while remaining highly efficient.
- Retrieval Performance: On the Flickr30K benchmark, UniVL achieved a fine-tuned Recall@1 of 94.3% for image-to-text retrieval. Notably, this performance is competitive with models like ALIGN, despite ALIGN being trained on 400 times more data (1.2 billion images).
- Generative Versatility: By reframing VQA as a generative task, the model handles "extra-domain" answers more effectively than traditional discriminative models. On the SNLI-VE test set, UniVL reached 80.0% accuracy, outperforming established baselines like UNITER.
- Few-Shot Efficiency: The prompt-based approach proves highly sample-efficient. In few-shot scenarios, the learnable prompt method significantly outperformed traditional linear classifiers by leveraging the model's inherent linguistic knowledge.
Discussion and Future Work
The research highlights a fundamental "masking trade-off": increasing causal masks benefits generation (captioning) but can slightly degrade understanding (retrieval). The authors suggest that scaling model parameters and data volume is the most promising path to mitigating this trade-off. Furthermore, the success of learnable prompts suggests that automated prompt engineering will be a critical area for future V-L research.
Summary updated