Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

GRAPE: Let GRPO Supervise Query Rewriting by Ranking for Retrieval

About

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.

Zhaohua Zhang, Jianhuan Zhuo, Muxi Chen, Chenchen Zhao, Wenyu Jiang, Tianwen Jiang, Mingyang Chen, Yutang, Qiuyong Xiao, Jihong Zhang, Zhixun Su• 2025

Related benchmarks

TaskDatasetResultRank
Composed Image Retrieval (Image-Text to Image)CIRR
Recall@135.7
128
Text-to-Image RetrievalFlickr30K-CN
R@162.6
105
Text-to-Image RetrievalXM3600
Recall@158.4
9
Text-to-Image RetrievalWikipedia
R@147.8
9
Text-to-Image RetrievalCVLUE
R@115.3
6
Query Rewriting for RetrievalFlickr-CN 1k
Recall@158.7
4
Query Rewriting for RetrievalWikipedia
Recall@143.7
4
Showing 7 of 7 rows

Other info

Follow for update