PinterestPinterest EngineeringProblem & solution
Enhancing Ad Relevance: Integrating Real-Time Context into Sequential Recommender Models
Summary
Pinterest's sequential ads candidate generator inferred user embeddings offline from historical offsite conversions, which lacked real-time browsing context. Consequently, less than 1% of impressions on the Related Pins surface were attributed to this generator because its retrieved candidates struggled in downstream ranking. To resolve this limitation, engineers developed the Contextual Sequential Two Tower Model, integrating a context layer directly into the query tower alongside user demographic features. Offline training utilized synthetic context derived from positive conversion labels paired with high dropout rates to preserve sequence reliance, while serving split into offline Transformer inference and online context computation. Offline evaluations showed a 3x to 10x increase in Recall@K, and production deployment lifted median candidate relevance by 275% to 300% and overall ROAS by approximately 0.7%.
Context
Pinterest's sequential ads candidate generator relied on offline user embeddings inferred from historical offsite conversions. This design lacked real-time online browsing context, causing candidates to struggle in downstream ranking on contextual surfaces like Related Pins, where the model generated less than 1% of impressions.
Approach / What changed
Pinterest created the Contextual Sequential Two Tower Model, which concatenates the offline Transformer sequence encoder output with a real-time context layer and user demographics before passing them to an MLP. Offline training synthesizes pseudo-context from positive conversion labels with high dropout on the context layer. Serving runs hybrid inference, calculating Transformer states offline and computing the context layer with the MLP online.
Takeaways
Offline evaluation of the contextual model demonstrated a 3x to 10x increase in Recall@K over the production baseline on Related Pins.
Median relevance of retrieved candidates increased by roughly 275% to 300%, doubling the volume of retrieved candidates delivered to impression.
Overall ads relevance metric rose by 1.08%, driving a ~0.7% lift in Return on Ad Spend (ROAS) overall and ~1.4% in top revenue countries.
Source and freshness
- Source
- medium.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.