Ecommerce ops · Production

Pinterest Homefeed advances embedding-based retrieval with MaskNet, DHEN, multi-embedding clustering, and conditional retrieval

The problem

Pinterest Homefeed needed to retrieve highly personalized and diverse content for users with varied intents, but a single embedding was inadequate to represent the full range of user interests, and the serving corpus defined a ceiling on retrieval performance that required ongoing renovation.

First attempt

Direct fine-tuning of pre-trained ID embeddings caused severe overfitting. A coarser image-signature granularity in the serving corpus versus the training data caused statistical feature drift in Pin engagement counts.

Workflow diagram · grounded in source
1
User enters Homefeed
trigger
“homefeed has users entering with diverse intents, and it can be inadequate to represent all sorts of intents by a single embedding”
2
Two-tower embedding candidate retrieval
ai_action
“embedding-based retrieval (a.k.a Learned Retrieval) is a key candidate generator to retrieve highly personalized, engaging, and diverse content to fulfill various user intents”
3
Multi-embedding clustering
ai_action
“a differentiable clustering module modified upon Capsule Networks performs better than other variants such as multi-head attention and pre-clustering based methods”
4
ANN search per embedding
ai_action
“we only keep the first K embeddings and run ANN search, and K is determined by the length of user history. Thanks to the property of maxmin initialization, the first K embeddings are generally the most representative ones”
5
Conditional retrieval with interest filters
ai_action
“conditional retrieval, a two-tower model with a conditional input to boost personalization and engagements: at training time, we feed the target Pin's interest id and embed it as the condition input to the user tower; when we serve the m…”
6
Ranking and blending output
output
“the results are combined in a round robin fashion and passed to the ranking and blending layers”
Reported outcome

A series of modeling and corpus improvements delivered incremental gains in engaged sessions, homefeed saves, clicks, and repins, with conditional retrieval further improving personalization and recommendation funnel efficiency.

Reported metrics
engaged sessions improvement (MaskNet architecture)0.15–0.35%
engaged sessions improvement (DHEN framework)+0.1–0.2%
homefeed saves and clicks (DHEN framework)>1%
HF repins and clicks (ID embeddings with dropout)0.6–1.2%
Show all 6 reported metrics
engaged sessions improvement (MaskNet architecture)0.15–0.35%
engaged sessions improvement (DHEN framework)+0.1–0.2%
homefeed saves and clicks (DHEN framework)>1%
HF repins and clicks (ID embeddings with dropout)0.6–1.2%
HF repins (ID embeddings without overlap window)0.25–0.35%
engaged sessions (serving corpus upgrade)+0.1–0.2%
Reported stack
torchrecANN
Source
https://medium.com/pinterest-engineering/advancements-in-embedding-based-retrieval-at-pinterest-homefeed-d7d7971a409e
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

A series of modeling and corpus improvements delivered incremental gains in engaged sessions, homefeed saves, clicks, and repins, with conditional retrieval further improving personalization and recommendation funnel…

What tools did this team use?

torchrec, ANN.

What results were reported?

engaged sessions improvement (MaskNet architecture): 0.15–0.35%; engaged sessions improvement (DHEN framework): +0.1–0.2%; homefeed saves and clicks (DHEN framework): >1%; HF repins and clicks (ID embeddings with dropout): 0.6–1.2% (source-reported, not independently verified).

What failed first in this deployment?

Direct fine-tuning of pre-trained ID embeddings caused severe overfitting.

How is this ecommerce ops AI workflow structured?

User enters Homefeed → Two-tower embedding candidate retrieval → Multi-embedding clustering → ANN search per embedding → Conditional retrieval with interest filters → Ranking and blending output.