Introduction
Multimodal Large Language Models (MLLMs) like Flamingo and IDEFICS have gained prominence for their ability to perform In-Context Learning (ICL). By providing a few image-text pairs as demonstrations, users expect these models to "see" the relationship between visual and textual data to solve a new query. However, recent research suggests a significant discrepancy between this expectation and the models' actual operational mechanics. This paper investigates whether MLLMs truly utilize visual information in demonstrations or if they are primarily performing text-based ICL conditioned on a single query image.
The "Blind Demo" Paradox
Through systematic modality ablation, researchers discovered a surprising "blindness" in current MLLMs. When images in the few-shot demonstrations were removed or replaced with blank squares, the models' performance remained remarkably stable across benchmarks like VQAv2, OK-VQA, and GQA. In contrast, removing the query image led to a catastrophic drop in performance.
This indicates that while the query image is essential for the task, the visual content of the demonstrations is largely ignored during the reasoning process. The models appear to rely almost entirely on the textual patterns provided in the examples.
The Architectural Bottleneck
The root cause of this behavior lies in the common architecture of many MLLMs, specifically the Masked Cross-Attention mechanism. In models like Flamingo, visual features are integrated into the language model through cross-attention layers. However, these layers are typically "masked" such that a text token can only attend to the visual features of the image that immediately precedes it in the sequence.
As shown in the diagram, the text tokens for the query ($T_q$) are physically blocked from directly attending to the images ($I_1, I_2$) of the earlier demonstration examples. This structural constraint forces the model to treat the demonstrations as purely textual context, even when images are present.
MMICES: Leveraging Images for Selection
If the models don't "use" demonstration images for reasoning, are those images useless? The researchers found that while they don't help during inference, they are crucial for selecting the most relevant examples. They proposed MMICES (Mixed Modality In-Context Example Selection), a two-stage retrieval strategy:
- Visual Filtering: Identify the top-K candidates from a support set based on visual similarity to the query image.
- Textual Re-ranking: Re-rank these candidates based on textual similarity to the query to select the final $N$ demonstrations.
MMICES consistently outperforms random selection and image-only retrieval (RICES). By selecting examples with similar images, the prompt naturally includes more relevant textual patterns, which the model can utilize. On the GQA dataset, 4-shot ICL using MMICES even outperformed 32-shot random selection, highlighting that the quality of selected context is more important than quantity.
Conclusion
Current MLLMs exhibit a "text-heavy" bias in multimodal in-context learning, largely due to architectural limitations in how they process sequential image-text data. While they fail to perform deep multimodal reasoning across demonstrations, the visual modality remains a powerful tool for context selection. Strategies like MMICES provide a robust way to enhance performance by optimizing the textual relevance of prompts through multimodal retrieval. Future research into more symmetric architectures may eventually unlock true multimodal in-context reasoning.
Summary updated