Toward Building General Foundation Models for Language, Vision, and Vision-Language Understanding Tasks

Xinsong Zhang, Yan Zeng, Jipeng Zhang, Hang Li

TL;DR

X-FM (the X-Foundation Model) is a new general-purpose foundation model designed to excel across language, vision, and vision-language tasks simultaneously. By employing a modular three-encoder architecture and novel training techniques—specifically gradient stopping and vision-language guided image modeling—X-FM overcomes the performance trade-offs that typically plague multi-modal models, outperforming existing generalist models and rivaling specialized state-of-the-art systems.

What Problem Does This Paper Address?

In the current AI landscape, "foundation models" are usually specialists. Models like RoBERTa dominate natural language processing (NLP), while models like BEiTv2 lead in computer vision (CV). While "general" models like FLAVA or OFA attempt to handle all modalities at once, they often suffer from a "jack of all trades, master of none" problem, underperforming compared to their specialized counterparts in specific domains.

The core challenge lies in the asymmetric relationship between modalities: language is highly abstract, while vision is concrete. Jointly training them often leads to suboptimal solutions where the learning process for one modality interferes with the other. The authors set out to prove that a single model can indeed achieve top-tier performance across language, vision, and vision-language understanding (VLU) tasks.

Methods

X-FM utilizes a modular architecture consisting of three components: a Language Encoder (BERT-based), a Vision Encoder (ViT-based), and a Fusion Encoder (BERT-based with added cross-attention layers).

Figure 1: The architecture and pre-training process of X-FM, a Transformer-based general foundation model. Given a text, we learn the language encoder by MLM. Given an image, we learn the vision encoder by MIM. Given an image-text pair, we learn the fusion encoder by BBP, ITM, IMLM and ITC, and further learn the vision encoder by MIM. The gradients of BBP, ITM, and IMLM are stopped from the fusion encoder to the language encoder. The vision encoder is trained by MIM with both the image-text pair data and the image data. M, N and L denote numbers of encoder layers.

The researchers introduced two key training innovations to manage the interaction between these encoders:

  1. Stop Gradient: During multi-modal training (like image-text matching), the model stops gradients from flowing back from the fusion encoder to the language encoder. This ensures the language encoder focuses purely on learning robust text representations (via Masked Language Modeling) without being "distracted" or corrupted by the noise of cross-modal alignment.
  2. Vision-Language Guided Masked Image Modeling (MIM): Unlike standard MIM, which often uses low-level pixel reconstruction, X-FM uses its own vision encoder—already partially trained on semantic vision-language tasks—to generate target representations for masked patches. This provides a more semantic "teaching signal" for the vision encoder.

The model is pre-trained using a suite of six objectives: Masked Language Modeling (MLM), Image-Text Contrastive learning (ITC), Image-Text Matching (ITM), Image-conditioned MLM (IMLM), Bounding Box Prediction (BBP), and Masked Image Modeling (MIM).

Datasets

The authors used a massive combination of public datasets for pre-training:

  • Vision-Language: COCO, Visual Genome, SBU Captions, and Conceptual Captions (CC-3M).
  • Uni-modal Text: The RoBERTa corpus and C4 dataset.
  • Uni-modal Vision: ImageNet-21K.
  • Scale-up ("More Data" setting): CC-12M and a filtered version of LAION containing 1.3 billion image-text pairs.

Evaluation spanned 23 tasks, including the GLUE benchmark for language, ImageNet-1k for vision, and MSCOCO/Flickr30K for cross-modal retrieval.

Key Insights and Ideas

  • Modularity is a Strength: By keeping encoders modular rather than using a single unified Transformer for all modalities, X-FM can preserve the unique representational needs of text and images while still allowing them to interact in the fusion layer.
  • Protecting Language Representations: The "Stop Gradient" technique is a crucial finding. It acknowledges that language is more abstract and that forcing it to adapt too much to visual data during early fusion can actually degrade its performance on pure NLP tasks.
  • Semantic Self-Supervision: Leveraging the vision-language training to guide the vision encoder's self-supervised learning (MIM) creates a virtuous cycle. The more the model understands about how images relate to text, the better it becomes at understanding the internal structure of images themselves.

Key Results

X-FM demonstrates impressive versatility across the board:

  • Language: On the MNLI task, X-FM achieved a score of 87.7, slightly outperforming the specialized RoBERTa model (87.6).
  • Vision: On ImageNet-1k fine-tuning, it reached 85.5%, matching the performance of the specialized BEiTv2.
  • Vision-Language: It significantly outperformed previous generalist models. For example, on MSCOCO text retrieval (TR R@1), X-FM reached 84.2, compared to FLAVA's 61.5.
Performance comparisons between foundation models

As shown in the comparison tables, X-FM consistently occupies the "bold" (best among general models) and "underlined" (best overall) spots across diverse benchmarks.

Limitations and Future Work

  • Computational Intensity: Training the base model required over 5 A100 GPU years, highlighting the high environmental and financial costs of such research.
  • Data Bias: The authors acknowledge that the English-centric image-text pairs used for training likely carry North American or Western European biases.
  • Scaling: This study focused on "base" size models (~300M parameters). The authors leave the exploration of scaling X-FM to "large" or "giant" (billion-plus parameter) scales for future work.
  • Efficiency: Future research could look into sparse attention mechanisms to reduce the computational footprint without sacrificing the model's generalist capabilities.

Summary updated

BibTeX
@inproceedings{zhang2023toward,
  author = {Xinsong Zhang and Yan Zeng and Jipeng Zhang and Hang Li},
  title = {{Toward Building General Foundation Models for Language, Vision, and Vision-Language Understanding Tasks}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=CYvOnVvY3v},
}
Figure