
Breaking the ROAS ceiling with a hybrid Two-Tower architecture that blends historical intent and immediate context.
Explore how Pinterest Engineering integrated real-time browsing signals into their sequential recommender models. This post details the transition from static offline embeddings to a dynamic hybrid system that significantly improves ad candidate quality and business performance.
Highly recommended for ML engineers building large-scale retrieval systems who need to balance long-term user interests with immediate session-based intent.
Previous sequential models used offline user embeddings based only on historical offsite behavior, failing to account for real-time context like current browsing activity, which resulted in very low candidate survival rates (<1%) on contextual surfaces.
The team developed a Contextual Sequential Two Tower Model that integrates a context layer into the query tower, utilizes synthetic data augmentation for training, and employs a hybrid inference flow combining offline sequence encoding with online context processing.
The model achieved a 3x to 10x improvement in Recall@K, increased median candidate relevance by 275-300%, and delivered a measurable lift of ~0.7% in overall ROAS, reaching ~1.4% in top revenue countries.
Trade-off
Due to technical complexities in merging real-time onsite and offsite data, the model relies on synthetic data during training, and the hybrid serving approach introduces additional online computational requirements compared to pure offline inference.
A retrieval architecture that learns separate embedding functions for queries and candidates to enable efficient similarity searches.
A recommendation approach that models users' evolving preferences based on their chronological sequence of interactions.
A serving strategy that splits computation between offline batch processing and online real-time execution to optimize for both freshness and scale.




