ActICL: Post-Training for Agentic Multimodal In-Context Learning

Yanshu Li, Ruixiang Tang, Junyi Jessy Li, Elias Stengel-EskinarXiv 2026

TL;DR

ActICL transforms Multimodal Large Language Models (MLLMs) into active agents that iteratively "hunt" for the best in-context demonstrations to solve a given query. By training the model to recognize its own information gaps and use tools to search, read, and curate context, ActICL achieves up to an 11.6% performance boost over traditional retrieval methods and even improves the performance of frontier models like GPT-5.6.

What Problem Does This Paper Address?

In-context learning (ICL)—providing a few examples (or "shots") to a model at inference time—is a powerful way to help MLLMs adapt to new tasks without retraining. However, the effectiveness of ICL is highly sensitive to which examples are chosen.

Most current systems use "static" retrieval: they take the query, find the top-$k$ most similar examples in a database using a fixed embedding, and call it a day. This often leads to redundant or noisy contexts that don't actually help the model reason. While some "context-aware" methods exist, they typically don't allow the model to reason about what it's missing. The authors ask: How can we train an MLLM to adaptively acquire useful context, guided by its own evolving information needs?

Methods

The authors introduce ActICL, a framework that treats context construction as an iterative, agentic task. Instead of a single retrieval step, the MLLM agent engages in a loop of reasoning and tool-use:

  1. Search: The agent formulates specific retrieval goals (e.g., "find charts with color-coded series") to get a pool of candidate "previews" (low-res thumbnails and truncated text).
  2. Read: The agent selects the most promising candidates to "read" in full, revealing the complete input-output pair.
  3. Curate: The agent decides which of the read examples to keep in its active context and which to discard as redundant or unhelpful.
  4. Solve: Once the agent feels the context is sufficient (or it hits a resource limit), it commits the context and generates the final answer.
Figure 1: Given a multimodal query, we seek to construct a context with demonstrations that helps an MLLM answer the query correctly. Prior work has largely (a) used off-the-shelf similarity-based retrievers, which often return redundant demonstrations, or (b) trained context-aware retrievers, which can fail to generalize at test time. Our approach (c), ActICL, treats ICL context construction as an iterative agentic task, training an agent to formulate complex search queries, process and filter retrieved evidence, and decide when to submit a context to an answering model.

To make this work, they use a two-stage post-training procedure:

  • Rejection-Sampling SFT: The model is fine-tuned on successful "trajectories" where it correctly used tools to build a context that led to a right answer.
  • Joint Reinforcement Learning (RL): The model is further optimized using a reward function that balances answer accuracy with "resource penalties" (token costs), encouraging the agent to be both accurate and efficient.
Figure 2: The overall illustration of ActICL. Given a query and acquisition instructions, the agent reasons at every step to choose among four actions: search submits a goal whose enabled channels retrieve previews from the demonstration bank, read reveals full demonstrations, and curate adds or removes read demonstrations in the retained context, until solve commits an admissible context. The agent learns on-policy which contexts make ICL effective and how to acquire them.

Datasets

The authors constructed a massive training set of 20,000 ICL instances spanning diverse multimodal tasks:

  • Knowledge & Commonsense VQA: ReasonVQA, A-OKVQA, VCR.
  • Text-rich Image Understanding: DocVQA, ChartQA, TabMWP.
  • Math & Diagram Reasoning: GeoQA, ScienceQA, AI2D, CoSyn.
  • Visual Reasoning: BabyVision, NLVR2, Molmo2-SynMultiImageQA.
  • Visual Concept Binding: Omniglot, DTD, CUB.

Evaluation was performed on seven distinct benchmarks, including TextVQA, MathVision, and VL-ICL Bench, ensuring the model generalizes to unseen tasks.

Key Insights and Ideas

  • Reasoning-Guided Retrieval: Unlike similarity-only search, ActICL can look for complementary information. If it finds an example of how to read a chart's legend, it might then specifically search for an example of how to calculate percentage growth from that chart.
  • Joint Optimization is Key: Training the model to find context also makes it better at using context. The authors found that ActICL-trained models outperformed standard fine-tuned models even when given the same fixed, externally-provided examples.
  • Adaptive Shot Counts: ActICL doesn't just fill up a fixed number of slots. It can decide to stop after 2 shots if they are perfect, or keep looking up to a limit. On average, ActICL used ~3.5 shots to outperform 4-shot baselines.
  • Cross-Model Utility: A smaller ActICL agent (e.g., based on Qwen3.5-9B) can act as a "specialized librarian" for massive frontier models. The contexts it builds significantly boost the performance of models like GPT-5.6.

Key Results

ActICL consistently outperformed all baselines across three different backbone models (Qwen3-VL-8B, Qwen3-VL-30B, and Qwen3.5-9B).

  • Accuracy Gains: ActICL improved average performance by 11.6 percentage points over standard similarity retrieval and 4.4 points over the strongest prior post-training baseline (ProMSA).
  • Frontier Model Boost: When used to retrieve for GPT-5.6-Sol, ActICL's contexts improved performance by 3.5 points over standard retrieval.
  • Efficiency: In adaptive mode, ActICL achieved higher accuracy than fixed 4-shot methods while using fewer demonstrations on average.
Table 1: Comparison of ICL performance with baseline methods. Bold indicates the best accuracy, and underlining indicates the best accuracy excluding ActICL. The first row for each model reports zero-shot performance. All other results use four shots, except ActICL in the adaptive setting.

Limitations and Future Work

  • Bank Dependency: The agent is only as good as its demonstration bank. If the bank lacks examples clarifying a specific uncommon convention, the agent cannot "invent" that guidance.
  • Visual Detail Errors: Even with perfect context, the answering model can still fail if it misreads a tiny numerical annotation or axis unit in the query image itself.
  • Future Directions: The authors suggest extending this agentic training to broader autonomous multimodal agents that can handle even more complex, multi-step tool-use scenarios beyond just ICL retrieval.

Summary updated

BibTeX
@misc{li2026acticl,
  author = {Yanshu Li and Ruixiang Tang and Junyi Jessy Li and Elias Stengel-Eskin},
  title = {{ActICL: Post-Training for Agentic Multimodal In-Context Learning}},
  year = {2026},
  eprint = {2610.19475},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.19475},
}
Figure