Source-linked AI summary
Killing Two Birds with One Stone: Unifying Retrieval and Ranking with a Single Generative Recommendation Model
Luankang Zhang, Kenan Song, Yi Quan Lee, Wei Guo, Hao Wang, Yawen Li, Huifeng Guo, Yong Liu, Defu Lian, Enhong Chen
TL;DR
Separate retrieval and ranking stages can lose information between them. UniGRF unifies both tasks in one generative model, and experiments report that it outperforms state-of-the-art baselines on benchmark datasets.
Problem
Generative recommendation approaches often handle retrieval and ranking separately, and information can be lost as it passes between stages.
Source: §1 · p. 2Method
UniGRF casts retrieval and ranking as sequence-generation tasks in one model, adding ranking-driven sample enhancement and gradient-guided loss weighting.
Source: §1 · p. 2Results
UniGRF outperforms state-of-the-art baselines on various benchmark datasets.
Source: §1 · p. 2, §6 · p. 10Takeaways & Limitations
The reported experiments support a unified generative framework for information sharing and collaboration between retrieval and ranking stages.
Source: §1 · p. 2, §6 · p. 10In recommendation scenarios, a decrease in loss does not always correspond to improved model performance.
Source: §5.5.2 · p. 10
Abstract
from arXiv · showhide
In recommendation systems, the traditional multi-stage paradigm, which includes retrieval and ranking, often suffers from information loss between stages and diminishes performance. Recent advances in generative models, inspired by natural language processing, suggest the potential for unifying these stages to mitigate such loss. This paper presents the Unified Generative Recommendation Framework (UniGRF), a novel approach that integrates retrieval and ranking into a single generative model. By treating both stages as sequence generation tasks, UniGRF enables sufficient information sharing without additional computational costs, while remaining model-agnostic. To enhance inter-stage collaboration, UniGRF introduces a ranking-driven enhancer module that leverages the precision of the ranking stage to refine retrieval processes, creating an enhancement loop. Besides, a gradient-guided adaptive weighter is incorporated to dynamically balance the optimization of retrieval and ranking, ensuring synchronized performance improvements. Extensive experiments demonstrate that UniGRF significantly outperforms existing models on benchmark datasets, confirming its effectiveness in facilitating information transfer. Ablation studies and further experiments reveal that UniGRF not only promotes efficient collaboration between stages but also achieves synchronized optimization. UniGRF provides an effective, scalable, and compatible framework for generative recommendation systems.
1 Introduction
Generative recommendation approaches often handle retrieval and ranking separately, leaving information loss between stages. UniGRF unifies them in one generative model and adds mechanisms for inter-stage collaboration and synchronized optimization.
- Existing generative approaches often handle one stage or train each stage separately, while prior joint methods focus on data or loss transfer and leave bias and information loss unresolved.The paper frames retrieval and ranking as interdependent and identifies differing loss magnitudes and convergence rates as a challenge to simultaneous improvement.Source: §1 · p. 2
- UniGRF converts retrieval and ranking into sequence-generation tasks in one model, distinguishing their outputs by position.The framework is described as model-agnostic and plug-and-play, with information sharing between stages and no additional cost.Source: §1 · p. 2
- A ranking-driven enhancer uses ranking precision to generate high-quality retrieval samples, while a gradient-guided adaptive weighter balances stage losses.The enhancer forms a parameter-sharing loop; the weighter monitors optimization rates and adjusts stage weights.Source: §1 · p. 2
- Experiments report that UniGRF outperforms state-of-the-art baselines across various benchmark datasets.Ablations and further analysis are reported to support its scalability, multi-stage collaboration, and synchronized optimization.Source: §1 · p. 2
2 Related Works
Related work traces retrieval and ranking from sequential models toward generative approaches, while prior cascade frameworks transfer information across stages without addressing collaboration and synchronized optimization for generative recommendation.
2.1 Retrieval Models for Recommendation
- Retrieval work includes sequential models such as GRU4Rec, BERT4Rec [43], and SASRec [23], LLM-enhanced representations, and generative approaches such as HSTU [67] and HLLM [3].HSTU still trains retrieval and ranking separately.Source: §2.1 · pp. 2–3
2.2 Ranking Models for Recommendation
- Ranking work spans feature-interaction models such as DCN [56] and DeepFM [10], sequential models including DIN [75] and DIEN [74], and LLM-based or generative approaches such as BAHE [9] and HSTU [67].The HSTU ranking adaptation appends candidate items to user sequences and adds MLP and prediction heads.Source: §2.2 · p. 3
2.3 Cascade Framework for Retrievers and Rankers
- Cascade methods connect stage objectives, incorporate unexposed data [41], jointly optimize stage models, distill knowledge [20], or estimate selection bias [73].These approaches use traditional recommendation models and do not address efficient collaboration and synchronized optimization in generative recommendation.Source: §2.3 · p. 3
3 Problem Definition
The problem setup represents each user’s chronological interactions as a fixed-length sequence and predicts the next item. UniGRF applies one generative model to retrieval and ranking.
- A user history records chronological item interactions and click status, retaining the most recent n interactions or padding shorter histories to length n.The interaction indicator is 1 for a click and 0 for no click.Source: §3 · p. 3
- The generative recommendation objective is to predict the next item the user will interact with from that history.Source: §3 · p. 3
- UniGRF performs retrieval and ranking simultaneously with one generative model: it selects candidates from the item pool, scores them, and recommends the next item.Source: §3 · p. 3
4 Methodology
UniGRF presents a unified, model-agnostic framework that turns retrieval and ranking into sequence generation, then uses ranking-driven enhancement and adaptive loss weighting to coordinate the stages.
- UniGRF reformulates retrieval and ranking as sequence-generation tasks within one model-agnostic framework to support information transfer and scalability.Source: §4 · p. 3
- A ranking-driven enhancer generates accurate, high-quality samples with minimal computational overhead to create a mutually reinforcing loop between stages.Source: §4 · p. 3
- A gradient-guided adaptive weighter is designed to synchronize performance improvement across retrieval and ranking.Source: §4 · p. 3
4.2 Ranking-Driven Enhancer
Figure 1 presents UniGRF as a unified generative recommendation model with a ranking-driven enhancer and gradient-guided adaptive weighter for collaboration and synchronized optimization.
4.2 Ranking-Driven Enhancer
- UniGRF unifies retrieval and ranking within one generative recommendation model.The overview also identifies a ranking-driven enhancer and a gradient-guided adaptive weighter.Source: Figure 1 · p. 4
- A ranking-driven enhancer is included to support collaboration between the stages.Source: Figure 1 · p. 4
- A gradient-guided adaptive weighter is included for synchronized optimization.Source: Figure 1 · p. 4
4.1 A Unified Generative Recommendation Framework
UniGRF integrates retrieval and ranking as sequence-generation tasks in one generative model. Its retrieval and ranking constraints support next-item prediction and click-probability scoring, respectively.
4.1 A Unified Generative Recommendation Framework
- UniGRF is plug-and-play with autoregressive generative architectures and halves time and space complexity.It combines retrieval and ranking in one generative recommendation framework.Source: §4.1 · p. 4
4.1.1 Constraint on the Retrieval Stage in UniGRF.
- Retrieval predicts the next item from prior interactions, adds the most similar item from the pool to the candidate set, and optimizes with sampled softmax.The loss pulls the predicted item embedding toward the actual next item and away from randomly sampled negatives.Source: §4.1.1 · p. 4
4.1.2 Constraint on the Ranking Stage in UniGRF.
- Ranking estimates click probabilities for candidate items with a small neural network and compares scores with user feedback using binary cross-entropy.The shared model parameters let ranking's more precise user-interest representations enhance retrieval, while full-pool negative sampling is described as reducing ranking data bias.Source: §4.1.2 · pp. 4–5
4.2 Ranking-Driven Enhancer
The Ranking-Driven Enhancer uses ranking-stage precision to improve retrieval training through hard-negative selection and potential-favorite relabeling. Shared parameters support bidirectional enhancement between the stages.
4.2.1 Hard-to-Detect Disliked Items Generator.
- Randomly sampled negatives can be easy to distinguish from positives, so the generator selects challenging dislikes using relative retrieval and ranking scores.It repeatedly trains on the selected items until they are distinguished effectively and removed from the hard-negative set.Source: §4.2.1 · p. 5
4.2.2 Potential Favorite Items Generator.
- Items in the negative sample set that receive ranking scores above threshold α are flagged as potential favorites and relabeled positive in the next iteration.This addresses the possibility that randomly sampled negatives are actually liked by the user.Source: §4.2.2 · p. 5
4.2 Ranking-Driven Enhancer
- Ranking precision supplies retrieval with more informative training data through hard-to-detect dislikes and potential favorites, while shared parameters support bidirectional enhancement.The framework maintains the original data distribution and adds minimal computational overhead.Source: §4.2.2 · p. 5
4.3 Gradient-Guided Adaptive Weighter
The Gradient-Guided Adaptive Weighter addresses different convergence speeds between retrieval and ranking by adjusting their loss weights according to gradient update rates. The resulting weighted loss is intended to support synchronous optimization.
4.3 Gradient-Guided Adaptive Weighter
- Different convergence speeds in the unified framework complicate simultaneous optimization, motivating weights that adapt to each stage’s learning speed.The mechanism monitors gradient update rates over time to align convergence speeds.Source: §4.3 · pp. 5–6
- The method qualitatively estimates convergence speed from the magnitude of loss decrease, using relative optimization magnitudes for retrieval and ranking.A larger convergence-rate value indicates slower convergence and calls for a larger task weight.Source: §4.3 · p. 6
- The adaptively weighted retrieval and ranking losses form the final optimization loss, which the paper says enables synchronous optimization.Temperature adjusts the difference between stage weights, while λa and λb scale the losses to similar magnitudes.Source: §4.3 · p. 6
5 Experiments
The experiments use three recommendation datasets and compare UniGRF with retrieval, ranking, generative, and cascade baselines. Evaluation uses a shared data split and task-specific metrics, with common dataset-level hyperparameter settings.
5.1.1 Datasets.
- Experiments use MovieLens-1M, MovieLens-20M, and Amazon-Books, with Table 1 identified as reporting dataset statistics.The datasets are described as varying in size and derived from real-world user interactions.Source: §5.1.1 · p. 6, Table 1 · p. 6
5.1.2 Compared Methods.
- Comparisons include classic retrieval and ranking methods, generative models trained independently for single tasks, and cascade frameworks instantiated with HSTU.The listed cascade baselines are RankFlow-HSTU and CoRR-HSTU.Source: §5.1.2 · pp. 6–7
5.1.3 Evaluation Protocols.
- All methods use the same chronological train-validation-test partition, and retrieval is evaluated against the entire item set using NDCG@K, HR@K, and MRR at K=10 and 50, while ranking uses AUC.The last interaction is test, the second-to-last is validation, and earlier interactions are training data.Source: §5.1.3 · p. 7
5.1.4 Parameter Settings.
- For each dataset, baselines share hyperparameter settings and a learning rate of 1e−3, while negative-sample counts and training epochs vary by task and dataset.Transformer depth also varies by dataset; all models are trained using eight computation cards.Source: §5.1.4 · p. 7
5.2 Overall Performance
UniGRF outperforms baselines in retrieval and ranking with both HSTU and Llama, while its ablations show that unification alone is insufficient. The enhancer and adaptive weighter contribute to cross-stage collaboration and optimization.
5.2 Overall Performance
- Generative HSTU and Llama outperform non-generative methods when retrieval and ranking use different models.The authors suggest richer feature representations and deeper user-interest relationships may explain this pattern.Source: §5.2 · p. 7
- UniGRF improves both stages, with a larger boost in ranking, which directly affects recommendation quality.The authors note that retrieval generates a candidate set and is less sensitive to metric changes.Source: §5.2 · p. 7
- UniGRF consistently outperforms all baselines in retrieval and ranking with both HSTU and Llama.The comparison spans three datasets.Source: §5.2 · p. 7, Table 2 · p. 8, Table 3 · p. 8
5.3 Ablation Study
- All tested ablation and fine-tuning variants perform worse than UniGRF-HSTU on MovieLens-1M.The ablations remove the enhancer, the weighter, or both; the fine-tuning variants transfer parameters between separately trained stages.Source: §5.3 · p. 8, Table 4 · p. 8
- Removing both modules performs worst and fails to surpass HSTU; removing the enhancer degrades retrieval, while removing the weighter degrades ranking.Fine-tuned variants improve on HSTU but do not surpass UniGRF-HSTU, even with more training epochs.Source: §5.3 · p. 8
5.4 Impact of Hyper-parameter
The number of hard negatives has dataset-dependent effects, while adaptive weighting sustains performance improvement across retrieval and ranking. On MovieLens-20M, expanding the model improves both loss and recommendation performance.
5.4 Impact of Hyper-parameter
- On MovieLens-20M, retrieval and ranking performance continuously rises as hard-negative count m increases from 0 to 20.The total negative-sample count is fixed at 256 for this dataset.Source: §5.4 · p. 9, Figure 4 · p. 9
- On MovieLens-1M, both stages peak around m=5, while larger hard-negative counts may overfit and reduce sample diversity.The total negative-sample count is fixed at 128; the authors recommend balancing performance gains against overfitting on small datasets.Source: §5.4 · p. 9
5.5.1 Analysis of the Impact of Optimization on Unified Framework Performance.
- With simple loss addition on MovieLens-20M, ranking performance peaks after several epochs and rapidly declines while retrieval continues rising.The authors attribute this divergence to retrieval's harder negative-sampling task receiving disproportionate optimization attention.Source: §5.5.1 · p. 9
- Adaptive two-stage weighting keeps ranking performance improving and makes retrieval improvement smoother by adjusting loss weights to training rates and convergence speeds.The comparison uses performance curves over epochs on MovieLens-20M.Source: §5.5.1 · p. 9
5.5.2 Analysis on Scaling Law.
- On MovieLens-20M, increasing Transformer layers lowers loss and improves retrieval and ranking performance.The tested HSTU architectures use 2, 4, 8, 16, 24, or 32 layers; scalability is demonstrated on this large public dataset, with industrial datasets left for future study.Source: §5.5.2 · pp. 9–10, Figure 4 · p. 9
6 Conclusion
UniGRF unifies retrieval and ranking in one generative model to address information loss in multi-stage recommendation. Its enhancer and adaptive weighter support stage collaboration and synchronized optimization, and experiments show improvements over state-of-the-art baselines.
6 Conclusion
- UniGRF combines retrieval and ranking in one generative model to address information loss in multi-stage recommendation.Its ranking-driven enhancer and gradient-guided adaptive weighter support collaboration and synchronized optimization between stages.Source: §6 · p. 10
- Experiments on benchmark datasets show that UniGRF outperforms state-of-the-art baselines.The authors describe the framework as scalable and as amplifying generative models' strengths.Source: §6 · p. 10
Related papers
This paper cites
- Attention Is All You Need2017
- Language Models are Few-Shot Learners2020
- LLaMA: Open and Efficient Foundation Language Models2023
- Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation2014
- On the Properties of Neural Machine Translation: Encoder-Decoder Approaches2014
- BPR: Bayesian Personalized Ranking from Implicit Feedback2012