Building a state-of-the-art Multimodal Large Language Model (MLLM) usually requires a massive budget of GPU hours and millions of image-text pairs. But what if you could "recycle" the visual understanding of one model and plug it into another?
In their NeurIPS 2023 paper, VPGTrans, researchers from the National University of Singapore and Tsinghua University introduce a framework to do exactly that. By transferring a Visual Prompt Generator (VPG) across different LLMs, they’ve found a way to slash training costs by up to 90% while actually improving performance.
TL;DR
VPGTrans is a simple two-stage framework that enables the transfer of pre-trained Visual Prompt Generators between different LLMs (e.g., from OPT to LLaMA). It achieves up to a 10x speedup in training time and requires only ~10% of the original data to reach or exceed the performance of models trained from scratch.
What Problem Does This Paper Address?
Modern MLLMs like BLIP-2 or Flamingo typically consist of a frozen vision encoder, a frozen LLM, and a trainable "Visual Prompt Generator" (VPG) that translates images into "soft prompts" the LLM can understand.
Even though the LLM is frozen, tuning the VPG and its linear projector is incredibly resource-intensive. For instance, training a BLIP-2 model can take over 600 A100-GPU hours. As new, more powerful LLMs (like LLaMA or Vicuna) are released, researchers currently have to re-train these visual components from scratch for every new backbone. VPGTrans addresses this inefficiency by investigating if—and how—we can transfer a VPG tuned for one LLM to a completely different one.
Methods
The authors propose a two-stage transfer framework called VPGTrans. The core challenge of transfer is the "dimension mismatch" and "semantic gap" between the embedding spaces of different LLMs.
- Stage 1: Projector Warm-up: Instead of starting with a random projector, the authors initialize it using a word embedding converter. This is a small linear layer trained (in minutes) to map the embedding space of the source LLM to the target LLM. The projector is then "warmed up" for one epoch using an extremely high learning rate (5x the normal rate) while the VPG and LLM remain frozen.
- Stage 2: Vanilla Fine-tuning: Once the projector provides a basic alignment, the VPG and projector are jointly fine-tuned using standard learning rates.
Datasets
The researchers conducted their exploratory analysis using the COCO caption and SBU datasets (1.4M image-text pairs). For their large-scale experiments, they scaled up to a mixture of COCO, Visual Genome (VG), SBU, and LAION-COCO.
Evaluation was performed across five standard benchmarks:
- Captioning: COCO and NoCaps.
- Visual Question Answering (VQA): VQAv2, GQA, and OKVQA.
- Chatbot Performance: Evaluated via user voting on the Multimodality Chatbot Arena.
Key Insights and Ideas
- The "Poisoning" Effect: The authors discovered that directly inheriting a VPG and training it with a randomly initialized projector actually hurts performance. The gradients from the random projector "mislead" the VPG, destroying its pre-trained visual perception. The Stage 1 warm-up is critical to prevent this.
- Small-to-Large is Superior: Surprisingly, transferring a VPG from a smaller source LLM (e.g., OPT-125M) to a large target often works better than transferring from a larger source. The authors suggest that larger LLMs might "distort" the VPG's fine-grained perception due to their higher-dimensional embedding spaces.
- Linear Transferability: Larger LLMs possess more "linearly transferable" embedding spaces. This makes cross-type transfer (e.g., from a decoder-only OPT to an encoder-decoder Flan-T5) significantly easier for large models than for small ones.
Key Results
- Massive Efficiency Gains: For the transfer from OPT-2.7B to OPT-6.7B, VPGTrans achieved a 10.7x speedup and used only 10.7% of the training data compared to training from scratch.
- Performance Boost: The transferred models often outperformed their "from-scratch" counterparts, notably gaining +2.9 points on VQAv2 and +3.4 points on OKVQA.
- New SOTA Chatbots: The authors used VPGTrans to create VL-LLaMA and VL-Vicuna. In the Multimodality Chatbot Arena, VL-Vicuna ranked 3rd, outperforming established models like MiniGPT-4 and the original BLIP-2.
Limitations and Future Work
While VPGTrans is highly effective, it does have limitations:
- Dependency on Existing VPGs: The method requires at least one high-quality, pre-aligned VPG to serve as the source.
- LLM Hallucinations: The resulting MLLMs still inherit the common pitfalls of LLMs, such as generating plausible-sounding but factually incorrect visual descriptions (hallucinations).
- Safety: The authors note that future work should explore how to integrate VPGTrans with safety-alignment techniques to ensure the resulting multimodal models are robust and helpful.
Summary updated