R2QRec: Turning Interaction Logs into Recommendation Queries Without Labels
Letting the retriever's own acceptance test and fused ranking define what a good query is beats imitating item titles, but only if you have a strong retriever you are willing to freeze.
On this page
A team with 3 months of click logs but zero query annotations must decide whether that log alone can train a query generator. The usual advice is to imitate item titles: teach the model to predict the title of the clicked item, then hand that text to a retriever. It works often enough to look correct, and it quietly assumes the title is the best query for that item. The log never says that. It says the item was chosen, not which wording found it. R2QRec keeps the log as the only supervision but changes what the log is asked to certify: a query is good if the retriever, run unchanged, puts the clicked item near the top [1].
The Default: Imitate the Item's Title
GPT4Rec trains its generator to predict the target item's title before retrieving with the generated text. BIGRec also uses target item text for supervised adaptation. QueRec skips fine-tuning entirely and prompts a large model to write personalized queries. The appeal is obvious: titles already exist in the catalogue, and one cross-entropy loss gets you a runnable system.
The cost is that the objective silently mutates from "what query should I write" into "which title should I recite." A reading history of Thinking, Fast and Slow, The Power of Habit, and Outliers could point at cognitive science, behavioural change, or human achievement, and none of those is wrong. An item label can supply an admissibility test. It cannot supply the wording.
Step 1: Let a Frozen Retriever Accept or Reject Candidate Queries
For each training pair, a base language model samples a set of candidate query strings. A fixed retriever executes every candidate, and only those that place the observed item within the top τ positions survive. A pair enters the supervised set only if at least one query is accepted, so a single item can end up with several equally valid phrasings.
Two design details matter more than they look. The target item is visible to the verifier and never appended to the generator's input, which means a query that shares no words with the title can still become a training target if it retrieves correctly. And the acceptance threshold τ is deliberately decoupled from the recommendation cutoff N: τ governs which phrasings are worth imitating, N governs how many items a user finally sees.
Only LoRA adapters on the generator are updated. The language model backbone, the retriever, and the item index stay frozen throughout, so what is learned is exactly one thing: how to turn user context into a retrieval request.
Step 2: Score a Whole Query Set by the Target's Fused Rank
At inference the generator emits K queries in one response, the retriever returns K ranked lists, and reciprocal rank fusion collapses them into a single list. The reward during refinement is a function of that fused position: r = −log(1 + ρ_F), where ρ_F is where the observed item landed.
For one context the policy samples G responses, each containing K queries, and a group-relative advantage is computed inside that group: responses above the group mean are pushed up, those below are pushed down. K and G are not interchangeable. K sets how many retrieval requests live inside one response; G sets how many alternative responses get compared. The defaults are 5 and 4, and with G = 1 the relative signal vanishes entirely.
The policy term averages token log-probabilities rather than summing them, which stops the optimiser from rewarding verbosity. A KL penalty pulls the policy back toward the SFT checkpoint, and its coefficient decides how far rank-driven updates may drift from wordings the retriever already vouched for.
Why Log-Rank Instead of Hit or Miss
A binary hit reward only asks whether the target made the top N. Everything past position N collapses into the same value, so many rollouts inside one group return identical rewards, the centred advantages become zero, and the gradient dies. Training looks like it is running while nothing is being learned.
The paper reports an early Books experiment: roughly 88% of steps carried no reward gradient under binary hit feedback, against 6.4% under log-rank feedback. Those two figures belong to that Books study and should not be extrapolated to every dataset, but they establish the order of magnitude of the problem.
What the Paper Actually Measures
Evaluation spans three public datasets. Books and MovieTV are the two named in the available excerpt; the third is not identified there, and I will not guess it. The claim is state-of-the-art overall recommendation performance among the evaluated methods, which is a statement about the authors' baseline set, not about every system in existence.
| Stage | Where supervision comes from | What it optimises | What is trained |
|---|---|---|---|
| Retrieval verification (SFT) | Whether a candidate retrieves the observed item within τ | Imitating accepted phrasings | Generator LoRA |
| Fusion-aware refinement | The observed item's rank in the RRF list built from K queries | Improving the fused set ranking | Generator LoRA |
The controlled MovieTV comparisons are the most informative part, because they separate where supervision comes from (item titles versus retrieval verification) from whether refinement runs after SFT. The paper also studies generator families and sizes, the retrieval encoder, and cross-domain transfer.
- Default query budget K = 5 and G = 4 sampled responses per context
- Books early experiment: 88% gradient-dead steps with binary hits against 6.4% with log-rank
- Three public datasets, with Books and MovieTV named in the excerpt
- Only generator LoRA adapters are trained; retriever and index stay frozen
When This Design Fails
It fails when the retriever is weak. Acceptance is defined by whether the retriever can recover the item, so a poor retriever produces a sparse, skewed supervised set and the generator learns that retriever's quirks instead of user intent. It does not apply when items have no encodable text representation — pure-ID catalogues with no retrieval layer have nothing for this loop to verify against.
It is also out of scope when per-pair sampling cost dominates: every training pair needs M candidate queries generated and executed before a single supervised target exists. And if all G responses for a context happen to share the same reward, the centred advantages are zero and the step does nothing, which is precisely why the objective needs a rank-sensitive reward rather than a hit.
So read the contribution narrowly. It fits systems that already have interaction logs, a text retrieval layer, and no query annotations, and whose owners accept the frozen retriever as part of the evaluation. It does not fix cold start, it does not fix the retriever, and it does not transfer to recommenders that score items discriminatively with no retrieval step at all [1].
