Visual in-context learning (VICL) enables visual foundation models to handle multiple tasks by steering them with demonstrative prompts. The choice of such prompts largely influences VICL performance, standing out as a key challenge. Prior work has made substantial progress on prompt retrieval and reranking strategies, but mainly focuses on prompt images while overlooking labels. We reveal these approaches sometimes get visually similar but label-inconsistent prompts, which potentially degrade VICL performance. On the other hand, higher label consistency between query and prompts preferably indicates stronger VICL results. Motivated by these findings, we develop a framework named LaPR (Label-aware Prompt Retrieval), which highlights the role of labels in prompt selection. Our framework first designs an image-label joint representation for prompts to incorporate label cues explicitly. Besides, to handle unavailable query labels at test time, we introduce a mixture-of-expert mechanism to the dual encoders with query-adaptive routing. Each expert is expected to capture a specific label mode, while the router infers query-adaptive mixture weights and helps to learn label-aware representation. We carefully design alternative optimization for experts and router, with a VICL performance-guided contrastive loss and a label-guided contrastive loss, respectively. Extensive experiments show promising and consistent improvement of LaPR on in-context segmentation, detection, and colorization tasks. Moreover, LaPR generalizes well across feature extractors and cross-fold scenarios, suggesting the importance of label utilization in prompt retrieval for VICL. Code is available at https://github.com/luotc-why/CVPR26-LaPR.


翻译:视觉上下文学习(VICL)通过使用示例提示引导视觉基础模型处理多种任务。提示的选择显著影响VICL性能,成为关键挑战。先前工作已在提示检索和重排序策略上取得实质性进展,但主要关注提示图像而忽视标签。我们发现这些方法有时会检索到视觉相似但标签不一致的提示,这可能降低VICL性能。另一方面,查询与提示之间更高的标签一致性往往预示着更强的VICL结果。基于这些发现,我们开发了名为LaPR(标签感知提示检索)的框架,强调标签在提示选择中的作用。该框架首先设计图像-标签联合表示以明确融入标签线索。此外,为处理测试时查询标签不可用的情况,我们引入混合专家机制到双编码器中,并采用查询自适应路由。每个专家负责捕获特定标签模式,路由器推断查询自适应混合权重并辅助学习标签感知表示。我们精心设计了专家与路由器的交替优化,分别使用VICL性能引导对比损失和标签引导对比损失。大量实验表明,LaPR在上下文的图像分割、检测和着色任务上取得持续且显著的改进。此外,LaPR在特征提取器和跨折场景中均展现出良好泛化能力,揭示了标签利用在VICL提示检索中的重要性。代码见:https://github.com/luotc-why/CVPR26-LaPR。

0
下载
关闭预览

相关内容

提示学习在计算机视觉中的分类、应用及展望
专知会员服务
19+阅读 · 2025年6月18日
【AAAI2024】LAMM: 多模态提示学习的标签对齐
专知会员服务
41+阅读 · 2023年12月14日
【ICML2023】改善自监督Vision Transformers的视觉提示调优
专知会员服务
36+阅读 · 2023年6月12日
【南洋理工-CVPR2022】视觉语言模型的条件提示学习
专知会员服务
34+阅读 · 2022年3月13日
文本+视觉,多篇 Visual/Video BERT 论文介绍
AI科技评论
22+阅读 · 2019年8月30日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
13+阅读 · 2014年12月31日
Arxiv
0+阅读 · 4月2日
Arxiv
0+阅读 · 3月31日
VIP会员
最新内容
21世纪的无人机战争
专知会员服务
1+阅读 · 44分钟前
《量子技术的军事任务技术适配与利用》
专知会员服务
1+阅读 · 58分钟前
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
相关资讯
文本+视觉,多篇 Visual/Video BERT 论文介绍
AI科技评论
22+阅读 · 2019年8月30日
相关基金
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
13+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员