Skip to content

ReuseGR: Sharing SID Prefixes to Cut Generative Retrieval Latency

THE ARGUMENT

ReuseGR does not shrink the model so much as move the query-dependent, user-independent part of generative retrieval offline, leaving only personalized completion and branch admission on the serving path.

On this page

2 engineers on your retrieval team have a 7B generative retriever that clears the quality bar, but they must decide whether its decoding cost fits inside the latency budget. The usual advice is binary: keep the big model and pay for engineering workarounds, or distill down to a 0.5B model and accept the quality drop. ReuseGR argues that this trade-off is partly artificial. When many users submit the same query, the expensive part, namely the coarse candidate structure, can be computed once offline and shared, while each user's own history only has to steer the final tokens [1].

Why the Same Query Gets Decoded Twice

Search advertising retrieves candidates from a catalog of millions of items before ranking. Classical retrieval matches a query against item representations; generative retrieval instead trains a model to emit the identifier of a candidate item. Those identifiers are Semantic IDs (SIDs): each item becomes a short token sequence, and items sharing a prefix sit in the same semantic group. The paper uses 4 layers with a codebook of 32 tokens per layer, so the first two tokens already define a coarse cell [1].

The default assumption is that quality and latency trade off directly. Want quality? Use a bigger generator and fix latency with engineering. Want latency? Distill into a smaller model, predict tokens in parallel, or use speculative decoding. All of these reduce the cost of a single prediction, yet complete SIDs are still generated from scratch on every search. The waste the paper identifies is concrete: when different users submit the same query, the same prefix tokens are decoded again and again, even though their histories demand different final results.

The authors first run a diagnostic called KeyProbe. It compares, at matched preceding prefixes, a next-token prediction based on that query's own history against one based on global statistics. Query information contributes far more at the first two layers than at later ones, which suggests the coarse candidate structure can be shared across users. A second number makes the same point: under the same prefix-count limit, model-generated prefix sets at query-specific depths retain 78.62% of target SIDs on average, versus 74.18% for a uniform two-token depth.

Splitting Candidate Planning From Personal Completion

ReuseGR splits one retrieval into two stages. Offline, a 7B planner called CellPlan keeps the top-N prefixes at depth s for each query, with N set to 32 and scores taken as cumulative masked log probabilities. At depth 1 every legal root token survives; at depth 2 their legal children are enumerated; at depth 3 an exact best-first search is used, and each depth is ranked independently.

Online, only a 0.5B model runs. It reads the current query and history, selects which prefixes to use, and generates the remaining tokens. A cache depth d means d SID layers are already prepared, leaving 4 minus d layers to compute online; d equals 0 starts from an empty root. Requests that miss the cache fall back to a separate 0.5B end-to-end model rather than to a degraded path [1].

  • Offline: the 7B CellPlan emits prefix sets at depths 1 to 3, taking the top 32 prefixes per depth
  • Online: the 0.5B model picks prefixes with the current query and history, then fills the remaining tokens
  • Admission: BudgetCut decides which scored branches enter the final merged ranking
  • Fallback: requests without prepared prefixes go to a separate 0.5B end-to-end model

The point of the split is that a cached prefix keeps a whole subtree rather than a fixed list of finished results. The online model can still generate candidates that offline planning never enumerated, so personalization is not frozen by the cache.

ReuseCut Sets a Cache Depth per Query

Deeper is not automatically better. A deep cut saves decoding steps but narrows the available subtrees; a shallow cut leaves more choices and costs more online. ReuseCut supervises the depth directly: for a query's historical outcome rows, it checks whether the target SID's first s tokens fall inside the top-N prefixes ranked by historical click mass, which yields a coverage rate at that depth. Small samples are corrected with the Wilson-score lower endpoint at z equals 1.96, and a query only receives a label once it has at least 5 historical rows.

The label is the deepest level whose coverage clears a threshold at every level up to it. Depths are computed offline per query, so online serving pays nothing for the decision. The ablation shows this matters: permuting depths across queries while keeping the same depth distribution costs 3.17 HR@100 points. Which query gets which depth carries information that a uniformly deeper cut cannot recover [1].

Teaching the 0.5B Scorer the 7B Model's Taste

A 0.5B model completing 7B-planned prefixes needs its suffix scoring to hold up. Path KD addresses this by transferring suffix-scoring knowledge along paths rather than only matching the final token distribution, with the student updated through LoRA.

Admission comes next. The final layer yields many scored leaves, and sending all of them to ranking is too expensive, so BudgetCut selects branches under a fixed budget. Each branch gets an 8-dimensional feature vector, at most B branches are admitted, and their already-scored leaves are merged into top-k SID buckets. The policy is initialized by masked listwise on-policy distillation (OPD), which supervises sequences the student itself generates, then refined by clipped GRPO, a group-relative policy optimization that uses the recall of complete branch sets as reward. The planner and scorer stay frozen; only the branch policy head is trained.

The Numbers on AE-PV

Evaluations use AE-PV, an industrial search-advertising dataset with roughly 2M query-item records, 3.38M catalog items, and 44,225 test queries. Latency is measured on a single A100 at batch size 1. Under those conditions ReuseGR reaches 85.82% query-level HR@100 and 46.05% Recall@100 at 71.45 ms mean online latency, with prefixes already prepared [1].

ComparisonQuery-level HR@100Mean online latency
All-online 0.5B baselineplus 3.83 percentage points38.9% lower
All-online 7B baselinecomparable57.7% lower
ReuseGR absolute85.82% (Recall@100 46.05%)71.45 ms, prefixes prepared

Personalization has its own evidence. With each request's actual history, completion recovers clicked SIDs outside the query-only 7B top-100 list on 5.67% of rows. The business test is a 14-day user-level online A/B against the 0.5B end-to-end baseline: 0.93% relative gain in click-through rate and 1.05% relative gain in revenue per thousand requests.

When ReuseGR Does Not Apply

First, it needs repeated queries. In a setting where users search dispersed long-tail terms, offline prefixes rarely hit, the planning layer is wasted work, and latency falls back toward the 0.5B end-to-end model. Both the 85.82% HR@100 and the 71.45 ms figure are explicitly measured with prefixes prepared; the unprepared path is a different system.

Second, depth labels depend on historical coverage. ReuseCut only assigns supervision once a query has at least 5 historical outcome rows, so long-tail queries get weak labels and fall back to a default depth. Coverage is also computed from click logs, which are biased, and offline-online drift forces the depth model to be retrained.

Third, the evidence base is narrow. Every number comes from one industrial search-advertising dataset, AE-PV, with no public-benchmark comparison; the A/B gains of 0.93% and 1.05% are relative to a 0.5B baseline, not to 7B. Out of scope for a new domain, the method fails when the query repetition rate has not been measured first, so the honest first step is to log it rather than to copy the architecture [1].

References

  1. ReuseGR: Offline–Online Decoupled Generative Retrieval via Adaptive Prefix Reuse

Sign in to Padda

A code in your inbox. No password to remember.

Connecting to sign-in…