Mimic In-Context Learning for Multimodal Tasks
Yuchu Jiang, Jiale Fu, Chenduo Hao, Xinting Hu, Yingzhe Peng, Xin Geng, Xu Yang
Abstract
Recently, In-context Learning (ICL) has become a significant inference paradigm in Large Multimodal Models (LMMs), utilizing a few in-context demonstrations (ICDs) to prompt LMMs for new tasks. However, the synergistic effects in multimodal data increase the sensitivity of ICL performance to the configurations of ICDs, stimulating the need for a more stable and general mapping function. Mathematically, in Transformer-based models, ICDs act as "shift vectors" added to the hidden states of query tokens. Inspired by this, we introduce Mimic In-Context Learning (MimIC) to learn stable and generalizable shift effects from ICDs. Specifically, compared with some previous shift vector-based methods, MimIC more strictly approximates the shift effects by integrating lightweight learnable modules into LMMs with four key enhancements: 1) inserting shift vectors after attention layers, 2) assigning a shift vector to each attention head, 3) making shift magnitude query-dependent, and 4) employing a layer-wise alignment loss. Extensive experiments on two LMMs (Idefics-9b and Idefics2-8b-base) across three multimodal tasks (VQAv2, OK-VQA, Captioning) demonstrate that MimIC outperforms existing shift vector-based methods. The code is available at https://github.com/Kamichanw/ MimIC.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
10 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Visual Instruction Tuning cites Language Models are Few-Shot Learners
- Visual Instruction Tuning cites Flamingo: a Visual Language Model for Few-Shot Learning
- GraphIC: A Graph-Based In-Context Example Retrieval Model for Multi-Step Reasoning cites Language Models are Few-Shot Learners
- GraphIC: A Graph-Based In-Context Example Retrieval Model for Multi-Step Reasoning cites Calibrate Before Use: Improving Few-shot Performance of Language Models
- MVI-Bench: A Comprehensive Benchmark for Evaluating Robustness to Misleading Visual Inputs in LVLMs cites Visual Instruction Tuning
- MVI-Bench: A Comprehensive Benchmark for Evaluating Robustness to Misleading Visual Inputs in LVLMs cites GraphIC: A Graph-Based In-Context Example Retrieval Model for Multi-Step Reasoning
- MVI-Bench: A Comprehensive Benchmark for Evaluating Robustness to Misleading Visual Inputs in LVLMs cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models cites Calibrate Before Use: Improving Few-shot Performance of Language Models
- Flamingo: a Visual Language Model for Few-Shot Learning cites Language Models are Few-Shot Learners
- Flamingo: a Visual Language Model for Few-Shot Learning cites Calibrate Before Use: Improving Few-shot Performance of Language Models
- HiFICL: High-Fidelity In-Context Learning for Multimodal Tasks cites Visual Instruction Tuning
- HiFICL: High-Fidelity In-Context Learning for Multimodal Tasks cites Flamingo: a Visual Language Model for Few-Shot Learning
- Analyzing Fine-Tuning Representation Shift for Multimodal LLMs Steering cites Visual Instruction Tuning
- Analyzing Fine-Tuning Representation Shift for Multimodal LLMs Steering cites Language Models are Few-Shot Learners
- Analyzing Fine-Tuning Representation Shift for Multimodal LLMs Steering cites Flamingo: a Visual Language Model for Few-Shot Learning
- Where and What Matters: Sensitivity-Aware Task Vectors for Many-Shot Multimodal In-Context Learning cites Language Models are Few-Shot Learners
- Calibrate Before Use: Improving Few-shot Performance of Language Models cites Language Models are Few-Shot Learners
Cited by top-tier papers10
- MVI-Bench: A Comprehensive Benchmark for Evaluating Robustness to Misleading Visual Inputs in LVLMsHuiyi Chen, Jiawei Peng, Dehai Min, Changchang Sun et al.ICML 2026 · 18 citations
- Analyzing Fine-Tuning Representation Shift for Multimodal LLMs SteeringPegah Khayatan, Mustafa Shukor, Jayneel Parekh, Arnaud Dapogny et al.ICCV 2025 · 17 citations
- GraphIC: A Graph-Based In-Context Example Retrieval Model for Multi-Step ReasoningJiale Fu, Yaqing Wang, Simeng Han, Jiaming Fan et al.AAAI 2026 · 3 citations
- HiFICL: High-Fidelity In-Context Learning for Multimodal TasksXiaoyu Li, Yuhang Liu, xuanshuo kang, zheng luo et al.CVPR 2026 · 1 citation
- Where and What Matters: Sensitivity-Aware Task Vectors for Many-Shot Multimodal In-Context LearningZiyu Ma, Chenhui Gou, Yiming Hu, Yong Wang et al.AAAI 2026 · 1 citation
Builds on29
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Visual Instruction TuningHaotian Liu, Chunyuan Li, Qingyang Wu, Yong Jae LeeNeurIPS 2023 · 11,349 citations
- Flamingo: a Visual Language Model for Few-Shot LearningJean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech et al.NeurIPS 2022 · 6,707 citations
- Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein et al.ICML 2021 · 1,843 citations
Related papers
- LIVE: Learnable In-Context Vector for Visual Question AnsweringYingzhe Peng, Chenduo Hao, Xinting Hu, Jiawei Peng et al.NeurIPS 2024
- In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space SteeringSheng Liu, Haotian Ye, Lei Xing, James Y. ZouICML 2024 · 244 citations
- Learning Task Representations from In-Context LearningBaturay Saglam, Xinyang Hu, Zhuoran Yang, Dionysis Kalogerias et al.ACL Findings 2025 · 1 citation
- Hyper-ICL: Attention Calibration with Hyperbolic Anchor Distillation for Multimodal In-Context LearningNiloufar Alipour Talemi, Hossein Kashiani, Fatemeh AfghahICML 2026
- Dissecting Multimodal In-Context Learning: Modality Asymmetries and Circuit Dynamics in modern TransformersYiran Huang, Karsten Roth, Quentin Bouniot, Wenjia Xu et al.ICML 2026
