GRAPE: Let GRPO Supervise Query Rewriting by Ranking for Retrieval
Zhaohua Zhang, Jianhuan Zhuo, Muxi Chen, Chenchen Zhao, Wenyu Jiang, Mingyang Chen, Yutang, Qiuyong Xiao, Tianwen Jiang, Jihong Zhang, Zhixun Su
Abstract
The CLIP model has established itself as a cornerstone of large-scale retrieval systems. However, its performance often degrades under distributional shifts such as multilingual, long-form, or multimodal queries. To avoid the prohibitive costs associated with retriever retraining or corpus re-embedding, we propose GRAPE (Grouped Ranking-Aware Policy Optimization Enhancement), a plug-and-play approach that leverages LLM-based query rewriting to bridge these gaps. Unlike existing methods that lack explicit supervision, GRAPE integrates ranking signals into the rewriting LLM via Grouped Relative Policy Optimization (GRPO), ensuring rewritten queries are better aligned with the frozen retriever’s latent distribution. Crucially, we identify a score inflation phenomenon in naive similarity-based finetuning—where irrelevant candidates receive indiscriminately high scores—and mitigate it with a novel corpus-relative ranking-based reward. Extensive experiments across multilingual (Flickr30k-CN, CVLUE, XM3600), long-form (Wikipedia), and multimodal (CIRR) benchmarks demonstrate that GRAPE consistently improves performance, achieving an average gain of 4.9% in Recall@10 without any modification to the underlying retriever.The code is available at https://github.com/mogulzhang/GRAPE.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f504b640-31db-4b7e-a0d0-1124f9d66e64Builds on13
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language ModelsJunnan Li, Dongxu Li, Silvio Savarese, Steven C. H. HoiICML 2023 · 7,873 citations
- Image Retrieval on Real-life Images with Pre-trained Vision-and-Language ModelsZheyuan Liu, Cristian Rodriguez Opazo, Damien Teney, Stephen GouldICCV 2021 · 344 citations
- Improving CLIP Training with Language RewritesLijie Fan, Dilip Krishnan, Phillip Isola, Dina Katabi et al.NeurIPS 2023 · 308 citations
- BioCLIP: A Vision Foundation Model for the Tree of LifeSamuel Stevens, Jiaman Wu, Matthew J. Thompson, Elizabeth G. Campolongo et al.CVPR 2024 · 92 citations
Related papers
- LLM2CLIP: Powerful Language Model Unlocks Richer Cross-Modality RepresentationWeiquan Huang, Aoqi Wu, Yifan Yang, Xufang Luo et al.AAAI 2026
- RecipeRAG: Advancing Recipe Generation with Reinforced Retrieval Augmented GenerationJinghan Yang, Zhenbo Xu, Dehua Ma, Liu Liu et al.ACM MM 2025 · 1 citation
- Open-Set Fine-Grained Retrieval via Prompting Vision-Language EvaluatorShijie Wang, Jianlong Chang, Haojie Li, Zhihui Wang et al.CVPR 2023
- Target-Guided Composed Image RetrievalHaokun Wen, Xian Zhang, Xuemeng Song, Yinwei Wei et al.ACM MM 2023 · 53 citations
- GRAPE: Optimize Data Mixture for Group Robust Multi-target Adaptive PretrainingSimin Fan, Maria Ios Glarou, Martin JaggiNeurIPS 2025 · 4 citations
