Scaling Conditional Learned Re... Note

Scaling Conditional Learned Retrieval for Pinterest Home Feed

Pinterest's home feed aims to retrieve relevant Pins for users by improving its recommendation system. Initially, a two-tower model was used, encoding users and items separately, but this struggled with users' multiple interests. Conditional Learned Retrieval (CLR) was developed to address this by conditioning user embeddings on explicit retrieval contexts. Prior work explored bootstrapping CLR for notifications and integrating it into a multi-embedding framework for the home feed. This blog details CLR's evolution into a broader retrieval system for the Pinterest home feed.CLR was expanded to support diverse retrieval candidates by incorporating new condition types like Interests, Pins, and Boards. Interest conditions were initially bootstrapped from user signals and later enhanced with LLM-generated interests. Pin conditions involved clustering engaged Pins and representing them with embeddings, allowing CLR to replace legacy generators. Board conditions were created by using random walks on the Pin-Board graph and representing Boards with embeddings.The model foundations were scaled using sequence modeling and improved condition representations. A Conditioned User Sequence Transformer was introduced to make CLR sequence-aware by encoding user actions alongside condition tokens. This evolved into a Foundation Model-based CLR architecture, integrating a large-scale transformer trained on global user sequences. This foundation model uses shared Pin embeddings for both user and item towers and incorporates a contrastive alignment loss.Condition representation was unified to handle heterogeneous conditions within a single model, reducing duplicated work. Unified CLR consolidated different condition types into one model, accepting multiple conditions and imputing missing features. Router simplification involved refactoring routing logic into a condition-agnostic Slot Architecture with predefined slots for different embedding types.Training efficiency for CLR was enhanced through lossless infrastructure optimizations that doubled training throughput. Request-level training deduplicates identical user features within a batch, and further optimizations are ongoing. The system now efficiently handles multi-condition retrieval at production scale, improving user engagement through more diverse and relevant content.
CdXz5zHNQW_6wtn6E8XMD.png