Multimodal Contrastive In-Context Learning
Yosuke Miyanishi, Minh Le Nguyen
TL;DR
This work tackles the interpretability of gradient-free in-context learning (ICL) in multimodal large language models by proposing Multimodal Contrastive In-Context Learning (MCICL). It combines a contrastive-learning interpretation of ICL via key–value distances, a bias-aware analytical framework for multimodal input formatting, and an on-the-fly Anchored-by-Text ICL method to enable effective, resource-conscious ICL in challenging tasks such as hateful memes detection. The authors validate their framework with extensive experiments across multiple VQA datasets, showing that semantic alignment via contrastive signals and careful handling of input formatting significantly improves ICL performance, while AbT ICL yields notable gains in resource-constrained settings. Collectively, MCICL provides theoretical and empirical insights into ICL mechanisms and offers practical strategies for designing more interpretable, efficient, and robust multimodal AI systems.
Abstract
The rapid growth of Large Language Models (LLMs) usage has highlighted the importance of gradient-free in-context learning (ICL). However, interpreting their inner workings remains challenging. This paper introduces a novel multimodal contrastive in-context learning framework to enhance our understanding of ICL in LLMs. First, we present a contrastive learning-based interpretation of ICL in real-world settings, marking the distance of the key-value representation as the differentiator in ICL. Second, we develop an analytical framework to address biases in multimodal input formatting for real-world datasets. We demonstrate the effectiveness of ICL examples where baseline performance is poor, even when they are represented in unseen formats. Lastly, we propose an on-the-fly approach for ICL (Anchored-by-Text ICL) that demonstrates effectiveness in detecting hateful memes, a task where typical ICL struggles due to resource limitations. Extensive experiments on multimodal datasets reveal that our approach significantly improves ICL performance across various scenarios, such as challenging tasks and resource-constrained environments. Moreover, it provides valuable insights into the mechanisms of in-context learning in LLMs. Our findings have important implications for developing more interpretable, efficient, and robust multimodal AI systems, especially in challenging tasks and resource-constrained environments.
