Enhancing Ad Relevance: Integrating Real-Time Context into Sequential Recommender Models
May 8, 2026Pinterest Engineering

Summary
Introduced a Contextual Sequential Two Tower Model to integrate real-time context into ad relevance. This involved adding a context layer to the query tower, using synthetic augmented data for training by injecting pseudo-context from positive labels, and implementing a hybrid inference flow where the Transformer encoder is inferred offline and the context layer/MLP head are computed online. This resulted in a 3x-10x increase in Recall@K, a ~275-300% increase in median candidate relevance on Related Pins, and a ~0.7% lift in ROAS.