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

Introduces Declarative Attention (DA), a zero-shot protocol that has LMs declare which parts of long context to attend to during chain-of-thought, letting the runtime build dynamic attention masks and skip most KV-cache reads. Produces large token savings (up to ~52% on Gemma-4-31B) with modest accuracy loss.

Studies looping shared transformer layers in Mixture-of-Experts models under matched budgets and proposes SMELT: loop the middle half twice while matching per-token FLOPs, non-embedding parameters, and KV cache. Shows 6.8–18.0% training-FLOPs savings on the compute-optimal frontier, stronger downstream gains on code and long-context tasks.

Turns sparse per-student records into individualized simulators that both reproduce a student’s responses and update them under tutor guidance using pooled LLM pretraining followed by per-student specialization; releases StudentSimEval and reference simulators across chess, L2 writing, and math.