Graph Convolutional Neural Networks for Web-Scale Recommender Systems

Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L. Hamilton, Jure LeskovecOpenReview 2018 · DOI

Abstract

Recent advancements in deep neural networks for graph-structured data have achieved state-of-the-art performance on recommender benchmarks. However, scaling these methods to web-scale tasks involving billions of items and hundreds of millions of users remains a significant challenge. This paper introduces PinSage, a large-scale deep recommendation engine developed and deployed at Pinterest. By combining efficient random walks with graph convolutions, PinSage generates embeddings that incorporate both graph structure and node features. We describe a novel training strategy using "hard" negative examples and an efficient MapReduce inference algorithm. Deployed on a graph with 3 billion nodes and 18 billion edges, PinSage significantly outperforms traditional alternatives in offline metrics, user studies, and A/B tests.

Introduction: The Scalability Wall

Graph Convolutional Networks (GCNs) have historically struggled with scalability. Traditional approaches often require operating on the full graph Laplacian, which is computationally infeasible for a production graph like Pinterest's, containing 3 billion Pins and Boards and 18 billion edges.

The primary challenges are twofold:

  1. Training Scalability: Performing convolutions on a graph that exceeds GPU memory limits.
  2. Inference Efficiency: Generating embeddings for billions of items in a dynamic environment where the graph is constantly evolving.

The PinSage Framework

PinSage addresses these challenges by moving away from global graph operations toward localized, on-the-fly convolutions. Its architecture is built on several novel engineering and algorithmic pillars.

Importance-based Neighborhoods via Random Walks

Instead of aggregating features from all neighbors—which leads to exponential growth in the computation graph—PinSage uses short random walks to identify the most influential neighbors. This "importance pooling" weights neighbors based on their visit count, ensuring that the most relevant structural information is preserved while keeping the memory footprint fixed and manageable.

The PinSage convolution mechanism aggregates information from a sampled neighborhood of a target node to produce a high-level embedding.

Scalable Training and Inference

To maximize hardware efficiency, PinSage employs a Producer-Consumer architecture. The CPU handles the heavy lifting of graph sampling and feature fetching, while the GPU is dedicated solely to neural network computations. For large-scale deployment, a MapReduce pipeline generates embeddings layer-by-layer, avoiding redundant calculations across the massive graph.

A batch of localized networks allows for efficient parallel processing during training, enabling the model to scale to billions of nodes.

Curriculum Learning with Hard Negatives

A key innovation in PinSage's training is the use of "hard" negative examples. Standard uniform sampling often provides examples that are too easy for the model to distinguish (e.g., a couch vs. a banana). PinSage uses a curriculum approach, gradually introducing harder negatives (e.g., a mid-century modern couch vs. a minimalist couch) to improve the model's resolution and retrieval accuracy.

Results and Impact

PinSage represents a 10,000x increase in scale compared to prior GCN applications. Its impact at Pinterest has been substantial:

  • Offline Performance: Achieved a 67% hit-rate, a 40% absolute improvement over the best-performing baseline.
  • User Engagement: A/B tests on the Pinterest homefeed showed a 30% to 100% increase in user engagement (repin rate).
  • Human Evaluation: Recommendations were preferred 60% of the time in head-to-head studies against existing state-of-the-art methods like Pixie.

Conclusion

PinSage bridges the gap between theoretical graph deep learning and real-world production systems. By treating engineering constraints as part of the algorithmic design—through random walk sampling and efficient data pipelines—it paves the way for a new generation of web-scale recommender systems. Future work includes extending the framework to more complex, multi-modal graph structures and adapting it for tasks like knowledge graph reasoning.

Summary updated

BibTeX
@misc{ying2018graph,
  author = {Rex Ying and Ruining He and Kaifeng Chen and Pong Eksombatchai and William L. Hamilton and Jure Leskovec},
  title = {{Graph Convolutional Neural Networks for Web-Scale Recommender Systems}},
  year = {2018},
  eprint = {1806.01973},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.01973},
  howpublished = {OpenReview},
}
Figure