Advancements in Embedding-Based Retrieval at Pinterest Homefeed

Zhibo Fan, Bowen Deng, Hedi Xia, Yuke Yan, Hongtao Lin, Haoyu Chen, Dafang He, Jay Adams, Raymond Hsu, James Li, Dylan Wang3 Feb 2025

Problem

Pinterest Homefeed uses a two-tower embedding retrieval model as one of its candidate generators. Users enter with diverse intents and actions, such as saving Pins or shopping, and a single user vector captures them poorly. The model, its ID features and its serving corpus all cap what the ranking layers can see. Each limit was lifted by a separate change, tested online.

Example from the article: a user whose history mixes several interests gets several embeddings instead of one, and the retrieved candidates are combined round robin.

Solution in brief

Treat the two towers as large models, since the item tower runs offline and the user tower runs once per request. Add feature crossing inside each tower, add pretrained ID embeddings with strong regularization, rebuild the serving corpus with time-decayed engagement scores, and replace the single user vector with several cluster embeddings. A conditional variant feeds an interest id into the user tower for topic-based retrieval.

Questions this case answers
  • How to raise the quality of embedding-based candidate retrieval when the item side must stay precomputable and only a dot-product is allowed at serving time
  • How to reuse pretrained ID embeddings in a retrieval model that overfits on them
  • How to retrieve for users whose single history mixes several unrelated intents, and for explicit topic inputs, without a heavier ranking stage
  • How to get more out of a two-tower retrieval model without breaking its offline-indexed item tower?

Tools and methods

  • Two-tower model — separate user and Pin encoders scored by dot-product, searched with ANN
  • MaskNet and DHEN — feature crossing inside each tower
  • Pretrained ID embeddings — memorize engagement patterns, with fixed table and dropout
  • Differentiable clustering (capsule-style routing) — several user embeddings per request
  • Conditional retrieval — interest id as an early-fusion input to the user tower
Continue reading — it's free

Google or a one-time email code. No password.