Towards Global Optimal Visual In-Context Learning Prompt Selection

Chengming Xu, Chen Liu, Yikai Wang, Yanwei Fu
2/3/2026

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Visual In-Context Learning (VICL) is a prevailing way to transfer visual foundation models to new tasks by leveraging contextual information contained in in-context examples to enhance learning and prediction of query sample. The fundamental problem in VICL is how to select the best prompt to activate its power as much as possible, which is equivalent to the ranking problem to test the in-context behavior of each candidate in the alternative set and select the best one. To utilize more appropriate ranking metric and leverage more comprehensive information among the alternative set, we propose a novel in-context example selection framework to approximately identify the global optimal prompt, i.e. choosing the best performing in-context examples from all alternatives for each query sample. Our method, dubbed Partial2Global, adopts a transformer-based list-wise ranker to provide a more comprehensive comparison within several alternatives, and a consistency-aware ranking aggregator to generate globally consistent ranking. The effectiveness of Partial2Global is validated through experiments on foreground segmentation, single object detection and image colorization, demonstrating that Partial2Global selects consistently better in-context examples compared with other methods, and thus establish the new state-of-the-arts.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{xu2026towards,
  title  = {Towards Global Optimal Visual In-Context Learning Prompt Selection},
  author = {Chengming Xu and Chen Liu and Yikai Wang and Yanwei Fu},
  year   = {2026},
  eprint = {2405.15279},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.15279},
  url    = {https://arxiv.org/abs/2405.15279},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.15279.svg)](https://codeofpaper.com/paper/2405.15279)

Discussion