# UniPinRec: Unifying Generative Retrieval and Ranking at Pinterest Scale

arXiv: https://arxiv.org/abs/2606.00422 · HTML: https://mlsanity.com/paper/2606.00422/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 24 of its 35 references that are in the map.
- First posted on arXiv 29 May 2026.

## Builds on (most cited first, 24 of 24)

- [Flex Attention: A Programming Model for Generating Optimized Attention Kernels](https://mlsanity.com/paper/2412.05496/) (2024)
- [OneRec: Unifying Retrieve and Rank with Generative Recommender and Iterative Preference Alignment](https://mlsanity.com/paper/2502.18965/) (2025)
- [MTGR: Industrial-Scale Generative Recommendation Framework in Meituan](https://mlsanity.com/paper/2505.18654/) (2025)
- [TransAct: Transformer-based Realtime User Action Model for Recommendation at Pinterest](https://mlsanity.com/paper/2306.00248/) (2023)
- [OnePiece: Bringing Context Engineering and Reasoning to Industrial Cascade Ranking System](https://mlsanity.com/paper/2509.18091/) (2025)
- [Unlocking Scaling Law in Industrial Recommendation Systems with a Three-step Paradigm based Large User Model](https://mlsanity.com/paper/2502.08309/) (2025)
- [OmniSearchSage: Multi-Task Multi-Entity Embeddings for Pinterest Search](https://mlsanity.com/paper/2404.16260/) (2024)
- [Killing Two Birds with One Stone: Unifying Retrieval and Ranking with a Single Generative Recommendation Model](https://mlsanity.com/paper/2504.16454/) (2025)
- [FuXi-α: Scaling Recommendation Model with Feature Interaction Enhanced Transformer](https://mlsanity.com/paper/2502.03036/) (2025)
- [Massive Memorization with Hundreds of Trillions of Parameters for Sequential Transducer Generative Recommenders](https://mlsanity.com/paper/2510.22049/) (2025)
- [TransAct V2: Lifelong User Action Sequence Modeling on Pinterest Recommendation](https://mlsanity.com/paper/2506.02267/) (2025)
- [PinFM: Foundation Model for User Activity Sequences at a Billion-scale Visual Discovery Platform](https://mlsanity.com/paper/2507.12704/) (2025)
- [FuXi-β: Towards a Lightweight and Fast Large-Scale Generative Recommendation Model](https://mlsanity.com/paper/2508.10615/) (2025)
- [Vectorizing the Trie: Efficient Constrained Decoding for LLM-based Generative Retrieval on Accelerators](https://mlsanity.com/paper/2602.22647/) (2026)
- [Efficient user history modeling with amortized inference for deep learning recommendation models](https://mlsanity.com/paper/2412.06924/) (2024)
- [GenRec: A Preference-Oriented Generative Framework for Large-Scale Recommendation](https://mlsanity.com/paper/2604.14878/) (2026)
- [OmniSage: Large Scale, Multi-Entity Heterogeneous Graph Representation Learning](https://mlsanity.com/paper/2504.17811/) (2025)
- [GRank: Towards Target-Aware and Streamlined Industrial Retrieval with a Generate-Rank Framework](https://mlsanity.com/paper/2510.15299/) (2025)
- [SMES: Towards Scalable Multi-Task Recommendation via Expert Sparsity](https://mlsanity.com/paper/2602.09386/) (2026)
- [OneRanker: Unified Generation and Ranking with One Model in Industrial Advertising Recommendation](https://mlsanity.com/paper/2603.02999/) (2026)
- [A Parameter Update Balancing Algorithm for Multi-task Ranking Models in Recommendation Systems](https://mlsanity.com/paper/2410.05806/) (2024)
- [SynerGen: Contextualized Generative Recommender for Unified Search and Recommendation](https://mlsanity.com/paper/2509.21777/) (2025)
- [xMTF: A Formula-Free Model for Reinforcement-Learning-Based Multi-Task Fusion in Recommender Systems](https://mlsanity.com/paper/2504.05669/) (2025)
- [MTMD: A Multi-Task Multi-Domain Framework for Unified Ad Lightweight Ranking at Pinterest](https://mlsanity.com/paper/2510.09857/) (2025)

## Built on by (most cited first, 1 of 1)

- [GenMatch: An End-to-End Generative Matching Framework for Micro-View Order-Dispatching in Ride-Hailing](https://mlsanity.com/paper/2608.19751/) (2026)

## Abstract (arXiv)

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.
