用模型反馈优化图文提示检索,提升多模态模型零样本推理效果
GRIP: Feedback-Guided Prompt Retrieval for Large Multimodal Models

- 基于大模型反馈训练视觉检索器,不依赖单纯相似度匹配
- 在分类、图文生成和视觉问答任务上均显著优于传统方法
- 可跨模型迁移,降低多模态零样本学习部署成本
上下文学习(ICL)已成为无需微调即可让大语言模型适应新任务的强大机制。将此思想扩展至大视多模态模型(LMM),多模态上下文学习(M-ICL)依赖于检索相关示例(如图像、描述或问答对)来指导分类、描述生成和视觉问答(VQA)等任务的预测。现有方法大多基于特征空间相似性选择上下文示例,假设语义相近的样本最具参考价值。然而,我们的系统分析表明该假设并不总成立:视觉上相似的样本未必能有效提升上下文学习性能。为此,我们提出反馈引导的上下文提示检索(GRIP),一个可学习的纯视觉检索框架,利用大模型的反馈识别真正有助于预测的示例。GRIP通过对比学习区分有益与有害的上下文示例,超越了单纯相似性检索。在三个多模态任务(分类、描述生成、VQA)上,GRIP在Qwen2.5-VL-7B上持续优于基于相似性的检索,在Idefics2-8B的分类任务中表现最优。此外,我们证明了使用一个开源大模型反馈训练的检索器可直接迁移至其他模型(包括闭源GPT-4o和Gemini),无需重新训练,实现高效可扩展的M-ICL部署。代码将在论文接受后公开。
原文摘要 · Abstract (English)
In-Context Learning (ICL) has become a powerful mechanism for adapting Large Language Models (LLMs) to new tasks without fine-tuning. Extending this concept to Large Multimodal Models (LMMs), Multimodal In-Context Learning (M-ICL) relies on retrieving relevant examples, such as images, captions, or question-answer pairs, to guide predictions across tasks like classification, captioning, and visual question answering (VQA). Most existing approaches select in-context examples based on feature-space similarity, assuming that semantically similar samples provide the most useful context. However, our systematic analysis reveals that this assumption does not always hold: visually similar examples are not necessarily those that most effectively enhance in-context learning performance. To address this, we propose the Guided Retrieval of In-context Prompts (GRIP), a learnable vision-only retrieval framework that leverages feedback from LMMs to identify examples that truly improve model predictions. GRIP learns to distinguish beneficial from detrimental in-context examples through contrastive training, refining retrieval beyond pure similarity. Across three multimodal tasks, namely classification, captioning, and VQA, GRIP improves consistently over similarity-based retrieval on Qwen2.5-VL-7B, with its strongest gains in classification on Idefics2-8B. Moreover, we demonstrate that retrievers trained with feedback from one open LMM can be transferred to other models without retraining, including closed-source GPT-4o and Gemini, enabling scalable and cost-efficient deployment of M-ICL. Code will be published upon acceptance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。