Interleaved multimodal in-context learning (ICL) lets frozen large vision-language models (LVLMs) acquire new tasks from a handful of image-text-answer demonstrations, yet it remains fragile: demonstrations bind to the wrong images, redundant exemplars crowd out informative ones, and noisy answers are copied verbatim into predictions. We present AVA, a training-free framework that organizes the demonstration pipeline of multimodal ICL into three composable stages. A Thread-Resolved Decomposer (TRD) segments the interleaved context into per-sample threads and re-stitches them with explicit boundaries, restoring image-text binding. An Influence-scored Demonstration Selector (IDS) estimates each candidate's marginal influence with one extra forward pass, removes redundancy, and orders the survivors by descending value. A Weak-to-Strong Consistency Calibration (WSC) module scores each demonstration by a weak sibling model's reconstruction confidence and softly reweights its contribution during decoding. On five vision-language benchmarks with interleaved 4-shot prompts, AVA improves the strongest same-setting baseline by +1.7 points on average, with gains of up to +2.4 points on VizWiz, shrinks the require-visual performance gap on ScienceQA-IMG, and retains most of its gain under 30% noisy demonstrations, at a 26% latency overhead that an offline cache amortizes. No gradients are ever computed; the LVLM stays frozen.
Figures & tables
Figure 1: Overview of TraceICL. A candidate demonstration pool is filtered by the Influence-scored Demonstration Selector (IDS), organized into per-sample threads by the Thread-Resolved Decomposer (TRD), and softly reweighted at decoding time by the Weak-to-Strong Consistency Calibration (WSC). The LVLM remains frozen throughout.
Model
Flickr30K
WebSRC
VQAv2
Hateful Memes
VizWiz
Flamingo-3B (w/ 4-shot) ( Alayrac et al., 2022 )
72.00
–
53.20
53.60
34.00
Flamingo-9B (w/ 4-shot) ( Alayrac et al., 2022 )
72.60
–
56.30
62.70
34.90
KOSMOS-1 (w/ 4-shot) ( Huang et al., 2023 )
75.30
–
51.80
–
35.30
BLIP-2 FLAN-T5-XL (w/o ICL) ( Li et al., 2023b )
64.51
12.25
58.79
60.00
25.52
BLIP-2 FLAN-T5-XXL (w/o ICL) ( Li et al., 2023b )
60.74
10.10
60.91
62.25
22.50
InstructBLIP FLAN-T5-XL (w/o ICL) ( Dai et al., 2023 )
77.16
10.80
36.77
58.54
32.08
Table 1: Multimodal ICL results with 4-shot interleaved prompts. Baseline numbers are from MMICL ( Zhao et al., 2024 ) (their Table 4); all metrics are accuracy except Flickr30K (CIDEr). “Ours (TraceICL)” uses the same backbone and demonstrations as MMICL (Instruct-FLAN-T5-XXL). Best in bold .
Model
Size
Avg.
Don’t req.
Req.
Gap
Random Guess
–
35.50
35.80
34.90
–
InstructBLIP ( Dai et al., 2023 )
12.1B
71.30
82.00
60.70
21.30
Otter ( Li et al., 2023a )
9B
63.10
70.90
55.70
15.20
Shikra ( Chen et al., 2023 )
7.2B
45.80
52.90
39.30
13.60
MMICL ( Zhao et al., 2024 )
12.1B
82.10
82.60
81.70
0.90
Ours (TraceICL)
12.1B
83.55
83.90
83.20
0.70
Table 2: Zero-shot results on ScienceQA-IMG ( Lu et al., 2022 ) , with baseline numbers from MMICL ( Zhao et al., 2024 ) (their Table 5). “Gap” is the difference between the require-visual and don’t-require-visual splits. No demonstrations are used, so TraceICL enables only TRD and WSC.
Figure 2: Main comparison between the strongest baseline and TraceICL.
Configuration
TRD
IDS
WSC
Flickr30K
WebSRC
VQAv2
Baseline (MMICL scheme)
✗
✗
✗
88.79
19.65
70.56
+TRD
✓
✗
✗
89.31
20.02
71.24
+IDS
✗
✓
✗
89.47
20.15
71.39
+TRD+IDS
✓
✓
✗
89.86
20.51
71.62
Full (TraceICL)
✓
✓
✓
90.42
21.10
72.08
w/ random threads
–
–
–
89.02
19.88
70.85
Table 3: Module ablation under the 4-shot setting of Table 1 . “w/ random” uses random thread segmentation; “w/ hard drop” replaces WSC’s soft weighting with threshold-based discarding. Best in bold .
Configuration
Memes
VizWiz
Avg.
Baseline (MMICL scheme)
64.60
50.28
58.78
+TRD
65.18
51.04
59.36
+IDS
65.32
51.26
59.52
+TRD+IDS
65.77
51.79
60.11
Full (TraceICL)
66.35
52.64
60.52
w/ random threads
64.92
50.61
59.06
Table 4: Module ablation (continued): Hateful Memes, VizWiz, and the five-task average.
Figure 3: (a) Heatmap of each module’s contribution per task. (b) Robustness on VizWiz as the noisy-demonstration ratio grows.
Figure 4: Hyperparameter sweeps on the five-task average; the circled point is the default.
Figure 5: (a) Thread-cap sweep. (b) End-to-end latency; the offline WSC cache keeps the full model within one forward pass of the selector.
Multimodal In-Context Learning (ICL) has emerged as a practical inference paradigm for Multimodal Large Language Models, where a small set of interleaved image-text In-Context Demonstrations (ICDs) conditions the model to solve new tasks. Despite its flexibility, multimodal ICL incurs high inference latency and suffers from instability due to sensitivity to demonstration formatting, ordering, and content. To address these limitations, we propose Hyper-ICL, a lightweight, training-based framework for demonstration-free multimodal ICL that reconstructs demonstration effects directly without requiring ICDs at inference time. Hyper-ICL learns a parameter-efficient low-rank logit-level adapter that calibrates attention distributions to better match demonstration-induced attention redistribution. To capture how demonstration influence varies across queries, we introduce a query-adaptive modulation mechanism that adaptively controls intervention strength at token level across layers and heads based on the current query. Finally, we propose a layer-wise hyperbolic anchor distillation loss that aligns intermediate student features to a demonstration-conditioned teacher via Lorentz geodesic distance. This loss encourages the student to reconstruct the demonstration-query relationships induced by ICDs. Extensive experiments across six different multimodal benchmarks (including VQAv2, OK-VQA, and COCO Caption) demonstrate that Hyper-ICL consistently improves accuracy and stability over vanilla ICL and existing state-of-the-art methods.
In-context learning (ICL) enables models to infer tasks from demonstrations, but existing benchmarks generally lack matched text and image versions needed to compare ICL performance across modalities. We introduce TwinICL, a procedurally generated benchmark providing such pairs for controlled comparison. Across six open-weight models and 38 tasks, multimodal ICL consistently underperforms text-only ICL, with gaps varying by task family. To test whether this gap can be recovered, we target visual access, task framing, and reasoning through three interventions. Their combination recovers strong multimodal ICL performance on a diagnostic subset, despite limited or inconsistent individual effects. To distinguish difficulties in executing tasks from those in inferring them, we evaluate models with explicit task instructions, revealing a modality gap even when the task is known. We then examine how adding demonstration inputs and outputs reshapes this gap, highlighting demonstrations' dual role as additional context to process and evidence about the task. The dataset is available at https://github.com/lab-flair/TwinICL.
Zihan Xue, Po-Yi Lu, Serhii Honcharenko +5
University of California, Los Angeles · 2National Taiwan University · 3Texas A&M University +2
In-context learning (ICL) enables models to adapt to new tasks via inference-time demonstrations. Despite its success in large language models, the extension of ICL to multimodal settings remains poorly understood in terms of its internal mechanisms and how it differs from text-only ICL. In this work, we conduct a systematic analysis of ICL in multimodal large language models. Using identical task formulations across modalities, we show that multimodal ICL performs comparably to text-only ICL in zero-shot settings but degrades significantly under few-shot demonstrations. To understand this gap, we decompose multimodal ICL into task mapping construction and task mapping transfer, and analyze how models establish cross-modal task mappings, and transfer them to query samples across layers. Our analysis reveals that current models lack reasoning-level alignment between visual and textual representations, and fail to reliably transfer learned task mappings to queries. Guided by these findings, we further propose a simple inference-stage enhancement method that reinforces task mapping transfer. Our results provide new insights into the mechanisms and limitations of multimodal ICL and suggest directions for more effective multimodal adaptation. Our code is available here.
Yu Wang, Sharon Li
Department of Computer Sciences, University of Wisconsin-Madison