Abstract
Large Language Models have demonstrated remarkable performance across various tasks, exhibiting the capacity to swiftly acquire new skills, such as through In-Context Learning (ICL) with minimal demonstration examples. In this work, we present a comprehensive framework for investigating Multimodal ICL (M-ICL) in the context of Large Multimodal Models. We consider the best open-source multimodal models (e.g., IDEFICS, OpenFlamingo) and a wide range of multimodal tasks. Our study unveils several noteworthy findings: (1) M-ICL primarily relies on text-driven mechanisms, showing little to no influence from the image modality. (2) When used with advanced-ICL strategy (like RICES), M-ICL is not better than a simple strategy based on majority voting over context examples. Moreover, we identify several biases and limitations of M-ICL that warrant consideration prior to deployment.
Introduction
In-Context Learning (ICL) has revolutionized how we interact with Large Language Models, allowing them to adapt to new tasks via a few demonstration examples without parameter updates. As the field shifts toward Large Multimodal Models (LMMs), the assumption has been that providing image-text pairs as context facilitates complex visual reasoning. However, the underlying mechanisms of Multimodal ICL (M-ICL) remain a "black box." This research investigates whether models are truly reasoning across modalities or simply exploiting textual shortcuts and statistical biases.
Methodology
The study employs a rigorous framework to stress-test M-ICL using IDEFICS (9B) and OpenFlamingo. The methodology includes:
- Modality Ablation: Systematically removing or randomizing images and text within context demonstrations to isolate the contribution of each modality.
- Sampling Strategy Comparison: Evaluating random selection against RICES (Retrieval-based In-Context Example Selection), which uses CLIP embeddings to find similar examples.
- Shortcut Analysis: Utilizing Generalized Linear Models (GLM) and Spearman correlation to detect "soft copy" behaviors, such as frequency or recency biases.
- Oracle Comparison: Benchmarking M-ICL against a K-Nearest Neighbor (KNN) baseline to determine if the LLM provides value beyond simple statistical lookup.
Mechanisms of Multimodal ICL
Our analysis reveals that M-ICL is primarily a text-driven phenomenon. In Visual Question Answering (VQA) tasks, removing context images resulted in a negligible performance drop of only 1.2 to 1.5 points, suggesting the models "read" the task from the text and largely ignore visual context. Images only become critical in "image-to-text" tasks like captioning, where textual labels are too sparse to define the task style independently.
We identify four key interaction types in M-ICL, as illustrated above. Notably, the model often defaults to a "Majority Vote" shortcut; when using advanced retrieval like RICES, the context is often flooded with the correct label, and the model simply outputs the most frequent response. Furthermore, a significant "Recency Bias" exists, where models are disproportionately likely to copy the answer from the final demonstration in the prompt.
Experimental Results and Shortcuts
The reliance on textual patterns is particularly evident when visual context is disrupted. In Image Captioning (COCO), while correct images provide a 20-point boost over text-only context, the model often falls back on common n-gram patterns when the number of shots increases or images are randomized.
As shown in the 3-gram analysis, models using 32-shot random image contexts exhibit a massive spike in the frequency of specific phrases (e.g., "in front of") compared to the base model or the training distribution. This suggests that instead of learning from the context, the model is being "primed" to repeat common textual structures.
In classification tasks, the M-ICL performance often fails to exceed a simple KNN baseline. For ImageNet, RICES-retrieved examples allowed a basic KNN to reach ~78% accuracy, a benchmark the M-ICL models struggled to significantly outperform, further highlighting the "lookup" nature of current ICL behaviors.
Conclusion and Future Work
Current open-source LMMs exhibit a "lazy" reliance on text and context shortcuts rather than true multimodal reasoning. While IDEFICS (trained on OBELICS) showed better responsiveness than OpenFlamingo, both are susceptible to recency and frequency biases. Future work must focus on developing retrieval methods that provide diverse examples to break majority-vote patterns and designing training objectives that mandate tighter integration between visual and textual context tokens.
Summary updated