NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

PinnerSage: Multi-Modal User Embedding Framework for Recommendations at Pinterest

Aditya Pal, Chantat Eksombatchai, Yitong Zhou, Bo Zhao, Charles Rosenberg, Jure Leskovec · DOI

TL;DR

PinnerSage is a production-scale recommender system at Pinterest that represents users through multiple embeddings rather than a single vector. By clustering a user’s actions into conceptually distinct groups and representing each with a representative "medoid," the system captures the true diversity of human interests, leading to significant engagement lifts in both homefeed and shopping recommendations.

What Problem Does This Paper Address?

Most personalized recommendation engines try to squash a user’s entire identity into a single high-dimensional embedding. While mathematically convenient, this "one-size-fits-all" approach fails to capture the multi-faceted nature of real human behavior.

A Pinterest user might be interested in painting, shoes, and sci-fi simultaneously. If a system averages these disparate interests into a single vector, the resulting "mean" embedding often lands in a region of the latent space that represents something entirely irrelevant—like "breakfast salads"—or simply a generic blur. This phenomenon, illustrated in Figure 2, leads to poor recommendations that fail to resonate with any of the user's actual interests.

Figure 2: Pins of 256-dimensional embeddings visualized in 2D. These pins depict three different interests of a user.

The challenge PinnerSage tackles is how to represent these multiple "modes" of interest efficiently, at a scale of hundreds of millions of users and billions of items, without exploding computational costs.

Methods

PinnerSage operates on a three-step pipeline:

  1. Clustering User Actions: The system takes a user’s pins from the last 90 days and groups them using Ward’s method, a hierarchical agglomerative clustering algorithm. Unlike K-means, Ward’s method doesn't require a pre-defined number of clusters; it automatically determines how many distinct interests a user has based on the underlying data.
  2. Medoid-based Representation: Instead of using a cluster "centroid" (a synthetic average), PinnerSage selects a medoid—the actual pin within the cluster that is most central. This makes the system robust to outliers and significantly simplifies the engineering pipeline, as the system only needs to store a pin ID rather than a new embedding vector.
  3. Importance Scoring: Not all interests are equal. PinnerSage calculates an importance score for each cluster using a time-decay model. This ensures that a user's long-term hobby and their sudden interest in a new topic are both represented, but weighted appropriately based on frequency and recency.

To handle real-time updates, the authors use a two-pronged approach: a daily batch job processes long-term history (90 days), while a lightweight online service updates clusters based on the most recent 20 actions. For retrieval, they employ an efficient Approximate Nearest Neighbor (ANN) system using HNSW (Hierarchical Navigable Small World) graphs to find similar pins for the sampled medoids.

Figure 4: PinnerSage Recommendation System.

Datasets

The system was trained and evaluated using Pinterest’s massive internal production data:

  • Scale: Over 350 million monthly active users and 2 billion+ pins.
  • Offline Evaluation: A sampled set of tens of millions of users, collecting their actions and impressions over a 90-day window.
  • Benchmarks: The authors compared PinnerSage against several baselines, including "Last Pin" models, time-decayed averages, and sophisticated sequence models like GRU and HierTCN.

Key Insights and Ideas

  • Fixed Pin Embeddings are a Feature, Not a Bug: Unlike many systems that jointly learn user and item embeddings, PinnerSage keeps pin embeddings (from PinSage) fixed. This prevents "topic dilution" where disparate interests are pulled together in the embedding space just because one user likes both.
  • Medoids over Centroids: Using an actual item (medoid) to represent a cluster is not just more robust to outliers; it’s an engineering masterstroke. It allows for massive cross-user cache sharing of ANN results, reducing serving costs by 75% compared to using centroids.
  • The Diversity-Relevance Sweet Spot: The authors found that sampling just 3 medoids per user provides the best balance. As shown in Figure 7, increasing the number of embeddings (e) initially boosts both relevance and diversity, but the gains taper off quickly after e=3.
Figure 3: Snapshot of action pins (repins or clicks) of a random user. Cosine score for a pin is the cosine similarity between its embedding and the latest pin. Age of a pin is the number of days elapsed from the action date to the data collection date.

Key Results

PinnerSage demonstrated substantial improvements over the existing production systems in large-scale A/B tests:

  • Homefeed: Achieved a +4% increase in engagement volume and a +2% increase in propensity (clicks/repins per user).
  • Shopping: Saw a massive +20% increase in engagement volume and +8% in propensity.
  • Retrieval Accuracy: In offline tests, PinnerSage (using Ward clustering and medoids) showed a 110% lift in relevance and an 88% lift in recall relative to the "last pin" baseline, significantly outperforming single-embedding sequence models.

Limitations and Future Work

While PinnerSage is highly effective, the authors note a few areas for improvement:

  • Medoid Selection: Currently, they sample medoids based on importance. Future iterations could explore selecting multiple medoids per cluster to better represent large, diverse clusters.
  • Implicit Feedback: The current importance scoring is based on actions (clicks/repins). A more systematic framework could incorporate implicit negative feedback (e.g., seen but not clicked) to refine cluster importance.
  • Clustering Complexity: While $O(m^2)$ is manageable for user action history, further optimizations might be needed if the lookback window extends significantly beyond 90 days.

Summary updated

BibTeX
@misc{pal2020pinnersage,
  author = {Aditya Pal and Chantat Eksombatchai and Yitong Zhou and Bo Zhao and Charles Rosenberg and Jure Leskovec},
  title = {{PinnerSage: Multi-Modal User Embedding Framework for Recommendations at Pinterest}},
  year = {2020},
  eprint = {2007.03634},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.03634},
}
Figure