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

Xinsong Zhang, Yan Zeng, Jipeng Zhang, Hang Li

Abstract

Foundation models or pre-trained models have substantially improved the performance of various language, vision, and vision-language understanding tasks. However, existing foundation models can only perform the best in one type of tasks, namely language, vision, or vision-language. It is still an open question whether it is possible to construct a general foundation model performing the best for all the understanding tasks. In this paper, we propose a new method for training the general foundation model, X-FM (the X-Foundation Model). X-FM has one language encoder, one vision encoder, and one fusion encoder, as well as a new training method. The training method includes two new techniques for learning X-FM from text, image, and image-text pair data. One is to stop gradients from the vision-language training when learning the language encoder. The other is to leverage the vision-language training to guide the learning of the vision encoder. Extensive experiments on benchmark datasets show that X-FM can significantly outperform existing general foundation models and perform better than or comparable to existing foundation models specifically for language, vision, or vision-language understanding.

Introduction

The current landscape of Artificial Intelligence is dominated by "specialist" foundation models. Architectures like RoBERTa excel in natural language processing, BEiTv2 leads in computer vision, and X-VLM sets benchmarks for vision-language (VL) tasks. However, creating a single "generalist" model that achieves state-of-the-art performance across all three domains simultaneously remains a significant challenge.

The primary obstacle is the fundamental difference between modalities: language is symbolic and abstract, whereas vision is raw and pixel-based. Previous attempts at joint training often resulted in a "jack of all trades, master of none" scenario. Specifically, gradients from multi-modal objectives often "pollute" pure language representations, degrading the model's abstract reasoning capabilities. Researchers from ByteDance and HKUST have introduced X-FM (X-Foundation Model) to address these trade-offs.

The X-FM Architecture and Training Strategy

X-FM employs a modular design consisting of three distinct encoders: a language encoder, a vision encoder, and a fusion encoder. While these components utilize standard Transformer-based architectures (BERT-like for language/fusion and ViT-like for vision), the innovation lies in the training methodology.

Architecture of X-FM showing the three-encoder design and novel training techniques.

To preserve the integrity of linguistic representations, X-FM introduces a Stop-Gradient Technique. Gradients from vision-language objectives, such as Image-Text Matching (ITM), are prevented from flowing back into the language encoder. This ensures the language encoder focuses on high-level abstract reasoning via Masked Language Modeling (MLM) on pure text, while still providing necessary features to the fusion layer.

Simultaneously, X-FM utilizes Vision-Language Guided Masked Image Modeling (MIM). Unlike traditional MIM that focuses on low-level pixel reconstruction, X-FM uses signals from VL training to guide the vision encoder. This encourages the model to learn "semantic" visual features that are more effective for downstream understanding tasks. The model is optimized using six objectives: MLM (text), MIM (vision), Image-Text Contrastive learning (ITC), ITM, Image-conditioned MLM (IMLM), and Bounding Box Prediction (BBP).

Experimental Evaluation

X-FM was pre-trained on a massive dataset including MSCOCO, Visual Genome, SBU Captions, and CC3M, with a "large-scale" variant utilizing up to 1.3 billion image-text pairs. Evaluation spanned the GLUE benchmark for text, ImageNet-1K for vision, and MSCOCO/Flickr30K for multi-modal tasks.

Comprehensive performance comparison of X-FM against specialist and generalist foundation models.

As shown in the comparative results, X-FM demonstrates exceptional versatility:

  • Language: On the GLUE benchmark, X-FM achieved an average score of 87.7 on MNLI, outperforming the specialist RoBERTa (87.6) and significantly surpassing generalist models like FLAVA (80.3) and OFA (84.3).
  • Vision: In linear evaluation on ImageNet, X-FM reached 81.2%, exceeding the specialist BEiTv2 (80.1%). Across 18 diverse vision classification tasks, X-FM outperformed CLIP and FLAVA in 11 instances.
  • Vision-Language: X-FM established new state-of-the-art performance for general foundation models on retrieval tasks, particularly excelling in zero-shot scenarios on MSCOCO and Flickr30K.

Discussion and Conclusion

The success of X-FM suggests that the relationship between language and vision is asymmetric. By shielding the language encoder from multi-modal noise and using VL signals to semantically enrich the vision encoder, X-FM avoids the performance degradation typical of joint training.

While X-FM represents a significant step toward general-purpose AI, challenges remain. The computational cost is substantial, with the base model requiring over 5 A100 GPU years for training. Future work will focus on scaling these techniques to larger parameter counts and exploring more efficient attention mechanisms to reduce the environmental and financial footprint of training such powerful foundation models.

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