Marketing ops · Production

Pinterest integrates real-time browsing context into sequential ad recommender models, boosting Related Pins candidate relevance by 275–300% and ROAS by 0.7%

The problem

The sequential candidate generator inferred user embeddings purely from offline historical behavior, leaving it blind to what a user was actively browsing at ad-serve time — a critical gap on contextual surfaces like Related Pins and Search.

First attempt

In the previous production system, fewer than 1% of impressions on Related Pins were attributed to the sequential candidate generator because candidates lacking real-time context could not survive downstream ranking and auction.

Workflow diagram · grounded in source
1
Historical sequence offline inference
ai_action
“The majority of the user tower (the Transformer encoder) is inferred offline, and the last hidden state of the transformer (the encoded representations of the event sequence) is stored in the feature store. This is refreshed on a daily b…”
2
Real-time context layer computation
ai_action
“The remaining part of the user tower — the context layer and the final MLP head — is computed online at serving time, taking the real-time context features and the pre-computed offline user signal as inputs”
3
Contextual ad candidate retrieval
ai_action
“This architecture and serving flow enables the user embedding to be dynamically influenced by the real-time context, ensuring the recommendations are both personalized (from sequence) and contextually relevant.”
4
Downstream ranking and auction
validation
“candidates that survived the ranking funnel and delivered to the users were considered positive items”
5
Ad impression delivery
output
“2x more ads candidates retrieved being delivered to impression”
Reported outcome

The Contextual Sequential Two Tower Model achieved a 3x to 10x increase in Recall@K, lifted median candidate relevance by ~275–300%, improved the Related Pins ads relevance metric by 1.08%, delivered 2x more ad candidates to impression, and drove ~0.7% ROAS lift overall (~1.4% for top countries).

Reported metrics
Recall@K vs production model3x to 10x
Median candidate relevance~275–300%
Related Pins ads relevance metric1.08%
Ad candidate delivery2x more
Show all 7 reported metrics
Recall@K vs production model3x to 10x
Median candidate relevance~275–300%
Related Pins ads relevance metric1.08%
Ad candidate delivery2x more
ROAS lift overall~0.7%
ROAS lift for top countries~1.4%
Previous CG impressions attributed on Related Pinsless than 1%
Reported stack
TransformerMulti-Layer Perceptron (MLP)feature store
Source
https://medium.com/pinterest-engineering/enhancing-ad-relevance-integrating-real-time-context-into-sequential-recommender-models-bc3a2f9b682e
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

The Contextual Sequential Two Tower Model achieved a 3x to 10x increase in Recall@K, lifted median candidate relevance by ~275–300%, improved the Related Pins ads relevance metric by 1.08%, delivered 2x more ad candid…

What tools did this team use?

Transformer, Multi-Layer Perceptron (MLP), feature store.

What results were reported?

Recall@K vs production model: 3x to 10x; Median candidate relevance: ~275–300%; Related Pins ads relevance metric: 1.08%; Ad candidate delivery: 2x more (source-reported, not independently verified).

What failed first in this deployment?

In the previous production system, fewer than 1% of impressions on Related Pins were attributed to the sequential candidate generator because candidates lacking real-time context could not survive downstream ranking a…

How is this marketing ops AI workflow structured?

Historical sequence offline inference → Real-time context layer computation → Contextual ad candidate retrieval → Downstream ranking and auction → Ad impression delivery.