Abstract
State-of-the-art vision and vision-and-language models rely on large-scale visio-linguistic pretraining for obtaining good performance on a variety of downstream tasks. Generally, such models are often either cross-modal (contrastive) or multi-modal (with earlier fusion) but not both; and they often only target specific modalities or tasks. A promising direction would be to use a single holistic universal model, as a "foundation", that targets all modalities at once -- a true vision and language foundation model should be good at vision tasks, language tasks, and cross- and multi-modal vision and language tasks. We introduce FLAVA as such a model and demonstrate impressive performance on a wide range of 35 tasks spanning these target modalities.
Introduction
FLAVA (Foundational Language And Vision Alignment) is a single, unified foundation model designed to excel at vision, language, and multimodal (vision-and-language) tasks simultaneously. Unlike previous models that specialize in just one domain or rely on massive, proprietary datasets, FLAVA utilizes a strategic mix of pretraining objectives on a purely public 70-million-pair dataset. This approach demonstrates that a single architecture can effectively serve as a "jack-of-all-trades" across diverse AI domains.
The Fragmentation of Vision and Language Models
In recent years, large-scale pretraining has driven significant progress in AI, yet models have become increasingly fragmented. Current state-of-the-art approaches typically fall into two categories:
- Dual-encoder models (e.g., CLIP, ALIGN) utilize contrastive learning to align images and text. While excellent for retrieval, they often struggle with complex multimodal reasoning tasks, such as Visual Question Answering (VQA).
- Fusion-encoder models (e.g., ViLBERT, UNITER) integrate image and text data early in the pipeline. These are strong at reasoning but frequently underperform on unimodal tasks (vision-only or text-only).
Furthermore, many leading models rely on massive, private datasets, hindering reproducibility. FLAVA addresses these issues by providing an open-data foundation model that achieves state-of-the-art performance across vision, language, and multimodal benchmarks.
Methods and Architecture
FLAVA employs a unified architecture based on Vision Transformers (ViT), consisting of three primary components: an image encoder, a text encoder, and a multimodal encoder that fuses the outputs of the first two.
The model's effectiveness stems from a comprehensive pretraining strategy that combines unimodal and multimodal objectives:
- Unimodal Pretraining: The model learns independent representations for each modality. It employs Masked Image Modeling (MIM) for images and Masked Language Modeling (MLM) for text.
- Multimodal Pretraining: To connect the modalities, FLAVA uses paired image-text data with three key losses:
- Global Contrastive Loss: Aligns overall image and text representations.
- Masked Multimodal Modeling (MMM): A novel task where both image patches and text tokens are masked, requiring the model to reconstruct them using cross-modal context.
- Image-Text Matching (ITM): A binary classification task to predict if an image and text pair are correctly matched.
A "curriculum" approach is used for training: image and text encoders are first initialized with unimodal pretraining (using DINO for vision and MLM for text) before joint training begins.
Datasets and Evaluation
A core contribution of FLAVA is its commitment to open science through the curation of the Public Multimodal Datasets (PMD) corpus. This dataset contains 70 million image-text pairs aggregated from publicly available sources like COCO, Conceptual Captions, and RedCaps. For unimodal pretraining, the authors used ImageNet-1K for images and CCNews/BookCorpus for text.
FLAVA was rigorously evaluated across 35 downstream tasks, including 22 vision tasks, 8 NLP tasks (GLUE benchmark), and 5 multimodal tasks (e.g., VQAv2, Hateful Memes).
Key Insights and Results
- Reasoning Capabilities: The inclusion of MMM and ITM losses is critical for reasoning tasks like VQA, which contrastive learning alone cannot fully address.
- Global Backpropagation: Implementing "global contrastive" loss across all GPU workers provided a 1.65% macro average performance boost without significant extra compute.
- Effective Initialization: Initializing with unimodal self-supervised weights is a crucial stepping stone for the complex joint optimization of vision and language.
FLAVA outperforms previous public-data baselines and remains competitive with models trained on much larger private datasets. Notably, it approaches the performance of dedicated language models like BERT on NLP tasks, proving that multimodal integration does not necessitate a sacrifice in unimodal proficiency.
Limitations
Despite its strengths, FLAVA faces challenges in Scene Text Recognition (OCR) due to a lack of specific examples in the PMD dataset. Additionally, while highly competitive, it is slightly outperformed on specific tasks by models trained on datasets over 25 times larger (e.g., 1.8 billion pairs). Future work will focus on scaling pretraining data to further explore the architecture's potential.
Summary updated