Eliciting In-Context Learning in Vision-Language Models for Videos Through Curated Data Distributional Properties

Keunwoo Peter Yu, Zheyuan Zhang, Fengyuan Hu, Shane Storks, Joyce Chai

TL;DR

Researchers from the University of Michigan have introduced EILeV (Emergent In-context Learning on Videos), a training paradigm that successfully induces in-context learning (ICL) in vision-language models for video. By curating training data to exhibit specific distributional properties—burstiness, skewness, and dynamic meaning—they created models that can narrate rare and out-of-distribution actions using only a few examples, outperforming much larger general-purpose models.

What Problem Does This Paper Address?

Large Language Models (LLMs) are famous for "in-context learning"—the ability to learn a new task simply by being shown a few examples in a prompt, without any weight updates. While this capability has started to appear in image-based Vision-Language Models (VLMs), it remains largely absent or poorly understood in the temporal domain of video.

Most current video VLMs are "frozen" in their knowledge; to recognize a novel or rare action (like a specific way of using a tool not seen during training), they typically require expensive task-specific fine-tuning. The authors set out to determine if the same data properties that trigger ICL in text-only models can be engineered to elicit ICL in video models, allowing them to adapt to new visual concepts on the fly.

Methods

The authors implemented a novel training paradigm called EILeV. Rather than simply scaling up data and compute, they focused on the structure of the training data. They adapted a BLIP-2 architecture, using a frozen vision encoder and a frozen LLM (OPT-2.7B or Flan-T5-xl), and trained a small projection layer (Q-Former) to bridge the two.

The core innovation lies in curating the training data to satisfy three key properties identified by prior theoretical work:

  1. Bursty Distributions: Entities appear in clusters. In EILeV, training contexts are built by grouping videos that share either the same verb or the same noun as the query video, forcing the model to look at the context to resolve ambiguity.
  2. Skewed Marginal Distributions: The data has a "long tail" of infrequent items (Zipfian distribution). The authors show that training on a highly skewed distribution is essential for the model to learn how to generalize to rare items.
  3. Dynamic Meaning: A single entity can have multiple interpretations (synonyms/polysemy). They used an LLM to canonicalize natural language narrations into verb/noun classes to test the impact of this property.
Figure 1: In our proposed training procedure EILeV, we ensure that the training data satisfy the following three properties: (a) bursty distributions, (b) skewed marginal distributions, and (c) dynamic meanings. Then, we ablate each property to demonstrate its importance. We ablate property (a) by randomly sampling in-context examples; we ablate property (b) by varying the number of common actions in the training data; we ablate property (c) by canonicalizing verbs and nouns using their corresponding verb and noun classes.

Datasets

  • Ego4D: The primary dataset used for training and evaluation. It consists of massive amounts of egocentric (first-person) video with dense narrations. The authors used the "Forecasting Hands & Objects" subset to define verb and noun classes.
  • EPIC-KITCHENS-100: Used as a benchmark for out-of-distribution (OOD) generalization. Even though both datasets contain kitchen videos, there is a significant distributional shift in how actions are performed and recorded.
Figure 3: t-SNE plots of the video embeddings from the frozen vision encoder of BLIP-2 OPT-2.7B. Ego4D videos are in red, and EPIC-KITCHENS-100 videos are in blue. Plots for a randomly sampled subset of 40k videos from both and three most common actions from EPIC-KITCHENS-100 are shown. We manually map Ego4D actions to the EPIC-KITCHENS-100 actions.

Key Insights and Ideas

  • Data Structure > Model Scale: ICL isn't just a "magic" property that appears when models get big enough; it is heavily driven by the distributional properties of the training data. Even relatively small models (188M trainable parameters) can exhibit strong ICL if trained correctly.
  • The Bursty Requirement: Without "bursty" training data (where the context provides relevant but incomplete information), models fail to learn the relationship between the visual examples and the text labels, effectively ignoring the prompt.
  • The In-Weights vs. In-Context Trade-off: The authors observed that models optimized for ICL sometimes perform slightly worse in zero-shot settings. This suggests a trade-off where the model relies less on its internal "hard-coded" knowledge and more on the provided context.
  • Semantic Extraction: Dynamic meaning (synonyms) was found to be particularly important for the model's ability to extract semantic information rather than just mimicking lexical patterns.

Key Results

The EILeV-trained models showed a clear "staircase" improvement in performance as more in-context examples (shots) were provided.

  • Generalization to Rare Actions: On a test set of rare actions never seen during training, EILeV models significantly outperformed much larger off-the-shelf VLMs like Kosmos-2 (1.6B parameters) and Otter (1.3B parameters). While the baselines' performance stayed flat or declined with more shots, EILeV models improved steadily.
  • OOD Success: When tested on EPIC-KITCHENS-100 without any fine-tuning, the EILeV models again demonstrated superior few-shot adaptation, proving that the ICL capability generalizes across different video distributions.
Figure 2: Performance of EILeV-trained and off-the- shelf VLMs (Kosmos-2 and Otter) on the evaluation set of held-out rare actions from Ego4D.

Limitations and Future Work

  • Domain Specificity: The current models are optimized for egocentric video narration. Their performance on third-person video or broader open-domain reasoning remains to be tested.
  • Model Size: The researchers intentionally used smaller model variants to isolate data effects. Scaling EILeV to much larger LLM backbones could potentially unlock even more powerful emergent behaviors.
  • Safety and Bias: Like all models using frozen LLMs, EILeV-trained models can inherit biases present in their base language models. The authors emphasize the need for safety guardrails in real-world applications.

Future work could involve finding the "sweet spot" in training data design that balances zero-shot "in-weights" knowledge with few-shot "in-context" flexibility.

Summary updated

BibTeX
@inproceedings{yu2024eliciting,
  author = {Keunwoo Peter Yu and Zheyuan Zhang and Fengyuan Hu and Shane Storks and Joyce Chai},
  title = {{Eliciting In-Context Learning in Vision-Language Models for Videos Through Curated Data Distributional Properties}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=UhrS65Apq8},
}
Figure