MetaVL: Transferring In-Context Learning Ability From Language Models to Vision-Language Models

Masoud Monajatipoor, Liunian Harold Li, Mozhdeh Rouhsedaghat, Kai-Wei Chang, Lin Yang · DOI

TL;DR

This paper introduces MetaVL, a novel approach to enable in-context learning (ICL) in vision-language (VL) models by transferring ICL capabilities from pre-trained language models. MetaVL significantly improves VL ICL performance, even outperforming larger baseline models with a fraction of the parameters.

What Problem Does This Paper Address?

Large language models (LLMs) have demonstrated a remarkable ability to adapt to new tasks with just a few examples provided in the prompt, a phenomenon known as in-context learning (ICL). This is highly desirable as it allows models to perform new tasks without requiring extensive fine-tuning or gradient updates. However, this capability has been largely absent in vision-language (VL) models. Existing VL models that attempt ICL often rely on massive model sizes or specialized training datasets. This paper asks: can we transfer the ICL ability from the language domain to the VL domain, and can we do so without resorting to extreme model scaling?

Methods

The core idea behind MetaVL is to leverage the ICL capabilities of meta-trained language models.

  1. Meta-training a Language Model: First, a standard language model is meta-trained on a diverse set of NLP tasks using an in-context learning objective. This process, inspired by MetaICL, teaches the model to "learn to learn" from a few examples.
  2. Transfer to VL: This meta-trained language model then serves as the backbone (encoder-decoder) for the VL model. A visual encoder is attached to process image inputs, and a visual prefix module maps these visual features into the language model's embedding space.
  3. VL Training: During VL training, the visual encoder and visual prefix modules are trained, while the meta-trained language model backbone is kept frozen. This preserves the learned ICL abilities.
  4. In-Context Learning for VL Tasks: For inference on a new VL task, a few examples (shots) from that task are provided in the prompt, along with the query, allowing the MetaVL model to perform the task without gradient updates.

Datasets

  • Meta-training (Language Model): A collection of 142 meta-training language datasets (as used in Min et al., 2022).
  • VL Training: COCO dataset (Lin et al., 2014).
  • Evaluation:
    • VQA (Visual Question Answering)
    • OK-VQA (Outside Knowledge Visual Question Answering)
    • GQA (Graphical Question Answering)

Key Insights and Ideas

  • Cross-Modal ICL Transfer: The central hypothesis, that ICL ability can be transferred from language to VL, is validated. This is a significant step towards more adaptable VL models.
  • Meta-Learning as a Foundation for ICL: Meta-training a language model specifically for ICL proves to be a powerful strategy that can be effectively transferred to a multimodal setting.
  • Efficiency Through Transfer: The meta-trained language model backbone acts as a strong, pre-equipped ICL learner, allowing the VL model to achieve competitive performance with significantly fewer parameters than large baseline models.
  • Frozen Backbone Preserves ICL: Keeping the meta-trained language model frozen during VL training is crucial for preserving its in-context learning capabilities.

Key Results

  • Outperforms Baselines: MetaVL outperforms baseline models (Frozen, a re-implementation of a previous VL ICL model) on VQA, OK-VQA, and GQA.
  • Parameter Efficiency: MetaVL achieves this superior performance with approximately 20 times fewer parameters than the baseline models. For instance, on VQA, OK-VQA, and GQA, MetaVL outperformed the baseline while having ~20 times fewer parameters.
  • Adaptor Layers: Adding adaptor layers to the frozen language model (Frozen w/adap, MetaVL w/adap) improved zero-shot performance for Frozen, likely due to better vision-language alignment. However, for MetaVL, a fully frozen language model backbone performed better, suggesting that adaptors might interfere with the preserved ICL ability.
  • Robustness to Data Reduction: Even when trained on only 50% of the COCO training data, MetaVL maintained its in-context learning capacity, showing only a slight performance decrease.

Limitations and Future Work

  • Task Scope: The experiments primarily focused on Visual Question Answering (VQA) tasks. The paper acknowledges that it's unclear how well MetaVL generalizes to other VL tasks beyond VQA.
  • Model Scale: The experiments were conducted with a moderate-sized language model. The performance of MetaVL after scaling up the language model remains an open question.
  • Future Work: The authors suggest exploring generalization to other VL tasks and investigating the impact of scaling up the meta-trained language model.

Summary updated

BibTeX
@inproceedings{monajatipoor2023metavl,
  author = {Masoud Monajatipoor and Liunian Harold Li and Mozhdeh Rouhsedaghat and Kai-Wei Chang and Lin Yang},
  title = {{MetaVL: Transferring In-Context Learning Ability From Language Models to Vision-Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-short.43},
}
Figure