PinRec: Outcome-Conditioned, Multi-Token Generative Retrieval for Industry-Scale Recommendation Systems
Prabhat Agarwal, Anirudhan Badrinath, Laksh Bhasin, Jaewon Yang, Edoardo Botta, Jiajing Xu, Charles Rosenberg
TL;DR
PinRec addresses the scalability and multi-objective demands of industry-scale generative retrieval by introducing outcome-conditioned generation and temporal multi-token inference within a Transformer-based framework. The approach enables targeted optimization across business metrics (e.g., saves, clicks) while producing diverse candidate sets through multi-token generation and efficient serving via CUDA graphs, KV caches, and ANN retrieval. Offline results show substantial gains over baselines, and online A/B tests demonstrate controllable improvements across Homefeed, Search, and Related Pins with modest latency costs. This work constitutes a practical, first comprehensive deployment of generative retrieval at web scale, with evidence of real-world impact and avenues for future enhancement in ranking integration and input-sequence optimization.
Abstract
Generative retrieval methods utilize generative sequential modeling techniques, such as transformers, to generate candidate items for recommender systems. These methods have demonstrated promising results in academic benchmarks, surpassing traditional retrieval models like two-tower architectures. However, current generative retrieval methods lack the scalability required for industrial recommender systems, and they are insufficiently flexible to satisfy the multiple metric requirements of modern systems. This paper introduces PinRec, a novel generative retrieval model developed for applications at Pinterest. PinRec utilizes outcome-conditioned generation, enabling modelers to specify how to balance various outcome metrics, such as the number of saves and clicks, to effectively align with business goals and user exploration. Additionally, PinRec incorporates multi-token generation to enhance output diversity while optimizing generation. Our experiments demonstrate that PinRec can successfully balance performance, diversity, and efficiency, delivering a significant positive impact to users using generative models. This paper marks a significant milestone in generative retrieval, as it presents, to our knowledge, the first rigorous study on implementing generative retrieval at the scale of Pinterest.
