UniPinRec: Unifying Generative Retrieval and Ranking at Pinterest Scale

📅 2026-05-29
📈 Citations: 0
Influential: 0
📄 PDF

career value

204K/year
🤖 AI Summary
This work addresses the computational, parametric, and deployment redundancies arising from the conventional separation of retrieval and ranking modules in recommender systems. It proposes the first production-grade, end-to-end unified framework that integrates input processing, modeling, training, and deployment into a single stack. Built upon a shared Transformer backbone, the framework introduces three key techniques: Masked Action Modeling (MAM), hybrid training sample construction, and cross-stage key-value cache reuse, which jointly enable approximate nearest neighbor retrieval and cross-attention-based ranking within a cohesive architecture. Online experiments demonstrate that the proposed method improves user engagement by approximately 1%, reduces end-to-end latency by 11.1%, and increases system throughput (QPS) by 63.6%.
📝 Abstract
Modern recommendation systems predominantly train retrieval and ranking as separate models despite both increasingly relying on large transformers encoding the same user behavior data, duplicating parameters, compute, and serving cost. Prior work unifies the model architecture but not the full pipeline: input formats, training procedures, and serving stacks remain fragmented across stages. We present UniPinRec, which achieves full-stack unification of retrieval and ranking at Pinterest: one input format, one model, one training stage, deployed within existing serving infrastructure. A shared transformer encodes the user action sequence into candidate-independent representations that branch into retrieval (ANN dot-product) and ranking (cross-attention) via task-specific heads. Three ideas make this work: (1) Masked Action Modeling (MAM) eliminates interleaving, enabling weight sharing without doubling context length; (2) Blended training examples pair action sequences with feedview impression slates to satisfy both objectives jointly; (3) Cross-stage KV cache sharing reuses user-history computation from retrieval for ranking, reducing total FLOPs versus serving two independent models. Deployed in the Pinterest core surfaces, UniPinRec delivers approximately +1% online engagement lift while cutting end-to-end serving latency by 11.1% and lifting QPS by 63.6%. To our knowledge, this is the first full-stack unification of retrieval and ranking, covering inputs, model, training and serving, deployed in a production recommendation system.
Problem

Research questions and friction points this paper is trying to address.

retrieval
ranking
recommendation systems
model unification
serving efficiency
Innovation

Methods, ideas, or system contributions that make the work stand out.

Unified Retrieval and Ranking
Masked Action Modeling
KV Cache Sharing
Transformer-based Recommendation
End-to-End Recommendation System
🔎 Similar Papers
Hanyu Li
Hanyu Li
Pinterest, University of Chicago
Computational NeuroscienceMachine LearningRecommendation System
Y
Yi-Ping Hsu
Pinterest, Palo Alto, CA, USA
A
Aditya Mantha
Pinterest, Palo Alto, CA, USA
P
Prabhat Agarwal
Pinterest, Palo Alto, CA, USA
L
Laksh Bhasin
Pinterest, Palo Alto, CA, USA
J
Jialu Wang
Pinterest, Palo Alto, CA, USA
H
Hongtao Lin
Pinterest, Palo Alto, CA, USA
B
Bella Huang
Pinterest, Palo Alto, CA, USA
Yaxin Li
Yaxin Li
Michigan State University
Deep LearningRobustnessPrivacy PreservingAI FairnessLLM
X
Xinyi Li
Pinterest, Palo Alto, CA, USA
C
Chuxi Wang
Pinterest, Palo Alto, CA, USA
Kousik Rajesh
Kousik Rajesh
Carnegie Mellon University
Machine Learning
H
Hooshmand Shokri Razaghi
Pinterest, Palo Alto, CA, USA
S
Shunyao Li
Pinterest, Palo Alto, CA, USA
Zongyue Qin
Zongyue Qin
University of California, Los Angeles
data sciencecomputer sciencestatistics
Jaewon Yang
Jaewon Yang
Pinterest
Machine LearningNatural Language ProcessingGraph Analysis
J
James Li
Pinterest, Palo Alto, CA, USA
D
Dhruvil Deven Badani
Pinterest, Palo Alto, CA, USA
Jiajing Xu
Jiajing Xu
Pinterest
Recommendation systemInformation retrievalDeep learning
Charles Rosenberg
Charles Rosenberg
Pinterest
computer visionmachine learning