Abstract
Modern recommender systems face significant scalability challenges when dealing with item catalogs containing millions of entries. Standard training algorithms like REINFORCE with a softmax policy scale linearly with the catalog size, making them computationally prohibitive for massive datasets. This paper introduces a novel training algorithm that achieves logarithmic scaling by leveraging a covariance-based gradient estimator combined with fast Maximum Inner Product Search (MIPS). Experimental results on large-scale datasets demonstrate up to a 30x speedup over traditional methods without compromising recommendation quality.
Introduction
In large-scale recommendation (e.g., Amazon, YouTube, or Twitch), systems must select the optimal item from a massive catalog. Researchers often utilize offline policy optimization, treating the recommender as a "policy" that maximizes rewards (like clicks or purchases) based on historical data. The standard tool for this is the REINFORCE algorithm using a softmax policy. However, the softmax function requires a normalizing constant—a sum over every item in the catalog. For a catalog of 2 million items, every training step requires 2 million operations just to calculate one gradient, leading to $O(P)$ linear complexity that is prohibitively slow.
Methodology
The authors propose three main innovations to break this linear complexity bottleneck:
- The Covariance Gradient: By rewriting the standard policy gradient into a "covariance" form, the authors can estimate the gradient using samples without ever calculating the full softmax partition function.
- Self-Normalized Importance Sampling (SNIS): Since sampling directly from the current policy is slow, the method uses a "proposal distribution" $q$ and corrects for the difference using SNIS, allowing for much faster computation.
- MIPS-based Mixture Proposal: This core component builds a proposal distribution $q$ as a mixture of a uniform distribution (to ensure coverage of the "long tail") and a Top-K distribution retrieved via approximate Maximum Inner Product Search (MIPS). By fixing item embeddings and only training user transformations, the MIPS index remains static, enabling $O(\log P)$ retrieval.
Experimental Evaluation
The approach was evaluated on two large-scale collaborative filtering datasets: Twitch (~790,000 items) and GoodReads (~2.33 million items). The task was framed as session completion, where the model predicts remaining items in a user's session based on observed history.
Results and Discussion
The proposed "Fast" policy optimization achieves massive speedups while maintaining or even improving recommendation quality.
As shown in the speedup analysis, the method was 15x to 25x faster than vanilla REINFORCE on CPU. Even on high-end GPUs, it achieved a 5x to 10x speedup. Crucially, the approximations do not lead to a loss in quality; the mixture proposal achieves rewards equal to or slightly higher than the slow baseline.
Key insights from the results include:
- MIPS for Training: MIPS is not just for inference; it is a powerful tool for building efficient gradient estimators during training.
- Mixture Benefits: A purely uniform proposal has high variance, while a purely Top-K proposal is biased. The mixture approach balances these, performing well throughout the training cycle.
Conclusion
This work demonstrates that logarithmic scaling is achievable for large-scale policy optimization. By combining MIPS with a covariance gradient estimator, the authors provide a scalable path for training on millions of items. Future work will explore adaptive mixture schedules and methods for updating item embeddings dynamically without sacrificing the $O(\log P)$ speed advantage.
Summary updated