WeGR: Towards Unified Generative Retrieval via Behavior-aware Tokenization and Preference Alignment
Organizations: Tencent Penguin Island
Abstract
Generative retrieval (GR) offers a promising paradigm for industrial search by unifying candidate generation within an autoregressive framework. However, effectively leveraging user behaviors in industrial GR remains challenging: existing SID tokenization methods struggle to preserve collaborative signals while maintaining balanced codebook utilization, whereas reinforcement learning (RL) for prioritizing high-value candidates suffers from sparse rewards when generated SIDs fail to match positive items. To address these challenges, we propose WeGR, a unified GR framework with two complementary components. Specifically, the Collaborative and Collapse-free Tokenizer (CoCo-VAE) injects query-to-item and item-to-item collaborative signals into continuous representations before quantization, preserving behavioral information without disrupting codebook optimization. It further couples first-layer codebook refresh to reactivate underutilized codewords with fidelity anti-collapse regularization, which broadens gradient coverage over relevant codewords and penalizes collisions in deeper layers to yield behavior-aware SIDs with balanced utilization. For preference alignment, Dynamic Horizon Policy Optimization (DHPO) progressively expands reward evaluation and policy optimization horizons to alleviate reward sparsity, enabling coarse-to-fine preference learning from SID prefixes to complete items without auxiliary reward models. Extensive offline experiments validate that WeGR improves retrieval and ranking performance. Moreover, a six-week online A/B test on a large-scale e-commerce search platform achieves relative gains of 2.539% in orders, 1.508% in CTR, and 1.381% in CVR, while reducing CPU and GPU usage by 25.5% and 26.1%. These results highlight the effectiveness and efficiency of WeGR in industrial deployment, supporting multiple search scenarios and tens of millions of daily page views.
Figures & tables
| Methods | ||||
|---|---|---|---|---|
| RQ–Kmeans | 100% | 95.56% | 21.33% | 6.92% |
| RQ–Kmeans + L3 Balance | 100% | 95.56% | 52.30% | 24.26% |
| RQ–OPQ | 100% | 95.56% | 1.33% | 22.64% |
| RQ–VAE | 99.96% | 68.11% | 0.89% | 0.09% |
| R 3 –VAE | 18.80% | 18.37% | 9.19% | 1.92% |
| CoCo–VAE | 99.98% | 94.85% | 22.17% | 7.71% |
| Method | Click (20k) | Order (20k) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| HR@6 | HR@50 | HR@200 | MRR@6 | MRR@50 | MRR@200 | HR@6 | HR@50 | HR@200 | MRR@6 | MRR@50 | MRR@200 | |
| Semantic ID Construction (SFT) | ||||||||||||
| RQ–Kmeans | 0.2641 | 0.4120 | 0.4869 | 0.1714 | 0.1815 | 0.1823 | 0.4051 | 0.5890 | 0.6613 | 0.2702 | 0.2833 | 0.2841 |
| RQ–Kmeans + L3 Balance | 0.2491 | 0.3746 | 0.4455 | 0.1657 | 0.1745 | 0.1753 | 0.3832 | 0.5374 | 0.6137 | 0.2602 | 0.2711 | 0.2719 |
| RQ–OPQ | 0.2585 | 0.4000 | 0.4510 | 0.1694 | 0.1790 | 0.1796 | 0.3897 | 0.5661 | 0.6188 | 0.2621 | 0.2744 | 0.2751 |
| RQ–VAE | 0.1865 | 0.2775 | 0.3185 | 0.1216 | 0.1281 | 0.1285 | 0.3470 | 0.4922 | 0.5416 | 0.2313 | 0.2419 | 0.2425 |
| Methods | Click (20k) | Order (20k) | ||
|---|---|---|---|---|
| HR@6 | MRR@6 | HR@6 | MRR@6 | |
| Semantic ID Construction | ||||
| CoCo-VAE | 0.2759 | 0.1821 | 0.4103 | 0.2776 |
| w/o q2i | 0.2650 | 0.1732 | 0.3933 | 0.2604 |
| w/o i2i | 0.2704 | 0.1748 | 0.4042 | 0.2693 |
| w/o fid | 0.2437 | 0.1585 | 0.3944 | 0.2602 |
| Configuration | Order | CTR | CVR | Latency (ms) |
|---|---|---|---|---|
| V1.0 (Additive) | +1.579% | +1.108% | +0.520% | — |
| V1.1 (60% Removal) | +1.962% | +0.884% | +0.950% | |
| V1.2 (80% Removal) | +2.539% | +1.508% | +1.381% |
| Metric | UG1 | UG2 | UG3 | UG4 | UG5 | UG6 |
|---|---|---|---|---|---|---|
| Order | +1.611% | +5.154% | +1.556% | +4.823% | +9.855% | +6.143% |
| CTR | +1.125% | +2.323% | +2.112% | +1.638% | +3.448% | +0.524% |
| CVR | +0.399% | +2.481% | +0.247% | +3.063% | +6.585% | +7.382% |
| Query bucket | Frequency | Order | CVR | CTR |
|---|---|---|---|---|
| Low | – | +3.24% | +2.40% | +0.95% |
| Medium-low | – | +3.86% | +3.58% | +0.91% |
| Medium | – | +0.99% | ||
| High | +3.51% | +1.12% | +2.73% |
| Methods | Click (20k) | Order (20k) | ||
|---|---|---|---|---|
| HR@6 | MRR@6 | HR@6 | MRR@6 | |
| SFT | 0.2759 | 0.1821 | 0.4103 | 0.2776 |
| GRPO-Ranker | 0.2790 | 0.1840 | 0.4172 | 0.2835 |
| DHPO | 0.2810 | 0.1851 | 0.4217 | 0.2878 |
| Methods | Click (18k) | Order (18k) | ||
|---|---|---|---|---|
| HR@6 | MRR@6 | HR@6 | MRR@6 | |
| Semantic ID Construction | ||||
| RQ-Kmeans | 0.2114 | 0.1428 | 0.2291 | 0.1670 |
| CoCo-VAE | 0.2289 | 0.1529 | 0.2470 | 0.1815 |
| Improvement | +8.28% | +7.07% | +7.81% | +8.68% |
| Reinforcement Learning | ||||
Generative Retrieval
Generative retrieval uses language models to produce relevant document or item identifiers directly from a query.
See all 45 papers