Contrastive Vision-Language Alignment Makes Efficient Instruction Learner

Lizhao Liu, Xinyu Sun, Tianhang Xiang, Zhuangwei Zhuang, Liuren Yin, Mingkui TanarXiv 2023

TL;DR

CG-VLM introduces a dual-objective alignment strategy that combines Contrastive and Generative losses to bridge the gap between vision and language models. By creating a tighter, more specific alignment between image patches and text tokens, the model becomes a highly efficient learner, achieving 95% of state-of-the-art performance with only 10% of the usual instruction-tuning data.

What Problem Does This Paper Address?

Building a Large Multimodal Model (LMM) typically involves taking a pre-trained Large Language Model (LLM) and "teaching" it to see by connecting it to a Vision Transformer (ViT) via a visual adapter. Standard methods, like the popular LLaVA, train this adapter using a generative loss—essentially asking the model to predict the next word in an image caption.

The authors identify a major flaw in this approach: generative objectives produce "weak alignment." In these models, visual features often show high similarity to every word in a caption, rather than just the relevant ones. This lack of specificity makes the models extremely "data-hungry," requiring massive amounts of high-quality (and expensive) instruction-following data to perform well. CG-VLM aims to solve this by making the alignment step more precise and data-efficient.

Methods

The researchers propose a two-stage pipeline: Vision-Language CG Alignment followed by Visual Instruction Tuning.

  1. CG Alignment (Stage 1): The core innovation lies here. Instead of relying solely on generative loss ($L_{gen}$), they introduce a Contrastive Loss ($L_{con}$).
  2. The Challenge: Standard contrastive learning (like CLIP) works at the image-sentence level. LMMs, however, need patch-level visual signals to match with multiple text tokens, but standard datasets don't provide explicit "grounding" (e.g., which patch corresponds to the word "river").
  3. The Solution: They maximize the averaged similarity between pooled image-patch features and text-token embeddings. This forces the model to learn which visual features belong to which concepts.
  4. Dual Objective: They combine both: $L_{CG} = L_{gen} + \alpha L_{con}$. The contrastive loss provides global structural alignment, while the generative loss ensures the model still attends to fine-grained, non-dominant visual details.
  5. Visual Instruction Tuning (Stage 2): The aligned model is then fine-tuned on dialogue data to follow human instructions. Because the alignment from Stage 1 is so strong, this stage requires significantly less data.
The CG-VLM architecture consists of a two-stage process: alignment using dual losses followed by instruction tuning.

Datasets

  • Pre-training: LCS-558K (a subset of LAION-CC-SBU containing 558k image-text pairs).
  • Instruction Tuning: LLaVA-665K. To test efficiency, the authors created sub-sampled versions containing only 1% (6K) and 10% (66K) of the original data.
  • Evaluation Benchmarks: ScienceQA-Image (reasoning), POPE (object hallucination), TextVQA (OCR), VQAv2, GQA, MME, and SEED-Bench.

Key Insights and Ideas

  • Generative Loss is "Blurry": The authors visualized how LLaVA sees images. With only generative loss, the model's visual features are "noisy," showing high similarity to irrelevant concepts. CG-VLM produces much cleaner, concept-specific heatmaps.
  • Strong Alignment = Data Efficiency: By getting the alignment "right" in the first stage, the model doesn't need to see nearly as many instruction examples to understand how to apply its visual knowledge to complex tasks.
  • Preserving LLM "Brain": Better alignment helps the model retain its original text-only reasoning capabilities. The authors found CG-VLM performed better on text-only portions of benchmarks compared to generative-only baselines.
Figure 2. Comparisons of the image features projected by different visual adapters. With generative objective only, the projected visual features of LLaVA [30] have large similarities to all visual concepts. In contrast, with the proposed contrastive and generative aligned visual adapters, our CG-VLM provides only large similarities to the corresponding concepts.1

Key Results

  • Efficiency Milestone: Using only 10% of instruction tuning data, CG-VLM reached 95% of the performance of the full-data LLaVA-1.5 baseline on ScienceQA-Image.
  • Superior Performance: When compared head-to-head using the same 66K data samples, CG-VLM outperformed LLaVA-1.5 significantly:
  • GQA: 54.0% vs 40.7% (a massive +13.3% jump).
  • POPE: 85.4% vs 79.5% (indicating much lower object hallucination).
  • Scaling: As shown in Figure 1, CG-VLM's performance curve sits consistently higher than competitors like InstructBLIP and Qwen-VL when data is limited.
Figure 1. Comparisons to state-of-the-art visual instruction meth- ods on zero-shot ScienceQA [34] image set w.r.t. different amount of instruction tuning data.

Limitations and Future Work

  • Dense Text: The model still struggles with extremely dense text recognition (OCR) because the contrastive objective can sometimes overlook very small, specific details in favor of dominant visual concepts.
  • Modality Dominance: In some cases, the model can still be "misled" by text prompts, ignoring the actual visual evidence (a common issue in LMMs).
  • Future Directions: The authors plan to explore more advanced grounding models (like GLIP) to further refine the patch-to-token alignment and investigate better ways to balance the vision and language modalities during reasoning.

Summary updated

BibTeX
@misc{liu2023contrastive,
  author = {Lizhao Liu and Xinyu Sun and Tianhang Xiang and Zhuangwei Zhuang and Liuren Yin and Mingkui Tan},
  title = {{Contrastive Vision-Language Alignment Makes Efficient Instruction Learner}},
  year = {2023},
  eprint = {2311.17945},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.17945},
}
Figure