AIAny
Icon for item

It Takes Two to Match: Co-Evolving Generative Retriever with Reinforcement Learning

Generates compact keyword sets for both queries and items with LLMs and matches them directly via an inverted index. Uses supervised fine-tuning to align keyword spaces, then alternates GRPO-based reinforcement learning on query- and item-side generators to co-evolve representations and maximize retrieval F1 while staying compatible with keyword-based infrastructure.

Introduction

Why this matters Most retrieval pipelines treat matching as a one-sided problem: queries are expanded or rewritten while item representations remain fixed and matching is handed to a separate retriever. That split makes end-to-end optimization for retrieval quality difficult and leaves a persistent misalignment between query and item representations, which in turn causes irreversible candidate misses. This paper shows an alternative: train LLMs to produce the actual retrieval representations on both sides and co-optimize them under a single retrieval objective.

Key Findings
  • Joint generative representations: Two LLM-based generators produce compact keyword bags for queries and items; retrieval is performed by keyword overlap and BM25 ranking, preserving compatibility with existing inverted-index infrastructure. This avoids relying on a separate dense retriever for final matching.
  • Two-stage training with co-evolution: A supervised fine-tuning (SFT) initialization aligns the two keyword spaces, then alternating GRPO-based reinforcement learning updates each side against the other's frozen index. The query generator is rewarded by retrieval F1; the item generator receives a counterfactual marginal reward measuring its keywords' impact on query-side F1. This alternating setup yields stable co-adaptation instead of chasing a moving target.
  • Empirical gains: Across an internal APP Marketplace dataset and the public WANDS benchmark, the method substantially improves retrieval F1 over strong sparse, dense, and generative baselines, demonstrating that co-evolving both sides is critical for performance and alignment.
How it works (concise)
  • Representation: Each side outputs a compact set of keywords; an item is retrieved if generated keyword sets overlap with the query's keywords (optionally including the raw query/item text). Retrieved items are ranked by BM25 on the generated tokens.
  • Optimization: SFT constructs initial query targets from relevant items' keywords. During RL, updates alternate: freeze the opposite-side index, optimize one generator with GRPO to maximize a group-based retrieval F1 objective, then swap. The item-side reward is computed as a counterfactual marginal effect on query F1 when replacing its keywords.
Who it's for and trade-offs

Great fit if you need higher end-to-end retrieval accuracy while remaining compatible with keyword/inverted-index infrastructure, or if you want to leverage LLMs to synthesize interpretable retrieval representations rather than opaque dense vectors. Look elsewhere if you require purely dense embedding pipelines, sub-word-level semantic matching without explicit keywords, or if latency/storage constraints prohibit storing generated keyword sets and maintaining an inverted index. The alternating RL stage adds training complexity and requires labeled relevance data or a reliable proxy F1 signal for reward computation.

Information

  • Websitearxiv.org
  • OrganizationsUniversity of North Carolina at Chapel Hill, Apple
  • AuthorsRunpeng Dai, Kaili Huang, Changsung Kang, Ciya Liao
  • Published date2026/09/01

More Items

Rewrites text-to-image prompts with reinforcement learning that aligns policy updates to semantic spans and pools log-probability shifts within each span to weight token losses. Improves prompt engineering for frozen generators without extra renders (≈9.5% on GenEval, 7.6% on T2I-CompBench).

Uses an intermediate teacher checkpoint to gate transfer of RL-induced policy shifts in on-policy distillation by checking directional agreement between early and late teacher changes; suppresses endpoint shifts that reverse and requires one extra frozen-teacher scoring pass.

Internalizes context-induced performance gains into model parameters by generating prospective queries and distilling context-conditioned outputs into mergeable low-rank or structural feed-forward updates, balancing consolidation and retention across 4B–120B dense and MoE models.