Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Graph Convolutional Neural Networks for Web-Scale Recommender Systems

PinSage trains graph convolutions on billions of Pinterest nodes for recommendations

  • Problem Graph convolutional networks need the full graph Laplacian during training. That becomes infeasible on a graph with billions of nodes whose structure keeps changing, so these methods have not reached production recommenders.
  • Method PinSage builds each convolution from short random-walk neighborhoods, weighted by visit counts. Instead of k-hop sets, it trains with hard negatives added on a curriculum, then embeds all pins with MapReduce.
  • Results PinSage reaches 67% hit-rate and 0.59 MRR on related-pin recommendation. The Combined baseline reaches 27% and 0.37.

Why GCNs stall at web scale

A graph convolutional network learns node representations by repeatedly aggregating feature information from each node's local neighborhood, so stacking layers lets information travel further across the graph. GCN-based methods have set a new standard on many recommender benchmarks, yet those gains had not transferred to production systems.

The obstacle is the training procedure: existing GCN recommenders operate on the full graph Laplacian, which is infeasible once the graph has billions of nodes and its structure keeps changing. The target graph here holds 3 billion nodes and 18 billion edges, about 10,000 times larger than typical GCN applications, so both training and inference have to scale.

Unsupervised graph embedding methods such as node2vec and DeepWalk are ruled out for this setting: they cannot use node features, and their parameter count grows with the size of the graph.

Localized convolutions over sampled neighborhoods

The graph is a bipartite graph of pins and boards, with pins as the items to embed. Each pin carries a real-valued attribute vector \(x_u \in \mathbb{R}^d\) built from its image and text features, and the embedding has to combine these attributes with the graph structure.

The convolve operation first passes each neighbor's embedding through a dense ReLU layer and pools the results with a symmetric function \(\gamma\), weighted by the neighbor weights \(\alpha\), to get a neighborhood vector \(n_u\). That neighborhood vector is concatenated with the node's current representation, passed through a second dense layer, and the output is divided by its L2 norm.

Concatenation gave clearly better results than the averaging used in the Kipf and Welling formulation, and the normalization makes training more stable and lets nearest-neighbor search operate on normalized vectors.

Neighborhoods are not the k-hop sets of earlier GCN work. Each node's neighborhood is its top T nodes ranked by L1-normalized visit counts from short random walks started at that node. In the limit of infinitely many simulations these normalized counts approximate Personalized PageRank scores. A fixed T bounds the memory used per node during training, and the visit counts give each neighbor an importance weight.

The pooling then becomes a weighted mean with those L1-normalized visit counts as weights, which the authors call importance pooling.

Layers are stacked so that the input to layer k is the output of layer k-1, with the input node features serving as layer 0. The parameters Q, q, W and w are shared across all nodes but differ between layers, and a final dense network with parameters G1, G2 and g maps the layer-K representation to the output embedding. In the reported experiments K is 2, the hidden dimension m is 2048 and the output embedding dimension d is 1024.

Max-margin training and the hard negative curriculum

Training uses labeled pairs \((q, i)\) in which item \(i\) is a good recommendation for query \(q\), and the goal is to make their embeddings close. For each pair the loss takes the expectation over negatives \(n_k\) drawn from \(P_n(q)\) of \(\max\{0,\; z_q \cdot z_{n_k} - z_q \cdot z_i + \Delta\}\), where \(\Delta\) is the margin. Minimizing this hinge keeps the inner product with the positive item above the inner products with sampled negatives by at least \(\Delta\).

Each minibatch shares one set of 500 negative items across all its training examples, which avoids computing a separate negative set per node. The authors argue that random negatives are too easy. The model has to find the 1,000 most relevant items among more than 2 billion, which requires telling apart items that differ slightly, and 500 random negatives give a resolution of only 1 in 500.

Hard negative items are sampled from items ranked at 2000 to 5000 by Personalized PageRank relative to the query, so they are related to the query but less related than the positive item. Hard negatives used from the start roughly double the number of epochs needed to converge. The curriculum adds none in the first epoch and n-1 hard negative items per item at epoch n, so the model first settles into a low-loss region and then learns finer distinctions.

The model trains across multiple GPUs with synchronous SGD on large minibatches of 512 to 4096 examples. A gradual warmup raises the learning rate to its peak in the first epoch under a linear scaling rule, and the rate then decays exponentially.

Minibatch construction on CPUs and GPUs

The adjacency lists and features of billions of nodes stay in CPU memory, and GPUs cannot read them efficiently during the convolve step. A re-indexing step builds a sub-graph with the nodes and neighborhoods needed for the current minibatch, together with a small feature matrix ordered to match that sub-graph.

The sub-graph and feature matrix are copied to the GPUs at the start of each iteration, so no CPU-to-GPU traffic is needed during convolution. A producer-consumer pattern runs CPU work for the next iteration while the GPU runs the current one, which the authors report cut training time by almost half.

MapReduce inference and nearest-neighbor serving

Computing embeddings node by node with the minibatch algorithm repeats work, because the K-hop neighborhoods of different target nodes overlap. The MapReduce pipeline removes the repetition: one job projects all pins into the latent space where aggregation happens, and a second job joins pins with the boards they occur in and pools board neighborhoods.

Each latent vector is computed only once, and the second-layer pin embeddings are produced by repeating the same jobs.

Approximate nearest-neighbor search uses locality sensitive hashing, and retrieval is done with a two-level process based on the Weak AND operator. Because embeddings are precomputed offline and stored in a database, the lookup can serve recommendations online. After training, the inference pipeline produces embeddings for 3 billion items in less than 24 hours.

Training data, features and baselines

Positive pairs come from user sessions in which a user engaged with pin i right after pin q, and all other pins serve as negative candidates. The training set contains 1.2 billion positive pairs, 500 shared negatives per batch and 6 hard negatives per pin, giving 7.5 billion training examples in total.

Training runs on a sampled subgraph holding 20% of boards with the pins they touch and 70% of the labeled examples, while 10% of the labeled examples are kept for tuning and the remaining 20% for testing. At test time the model computes embeddings for the entire graph, covering all 2 billion pins. Pin features concatenate 4,096 visual dimensions from the sixth fully connected layer of a VGG-16 network, 256 dimensions of annotation embeddings, and the log degree of the pin.

The baselines are Visual embeddings, Annotation embeddings, Combined embeddings and the random-walk ranking method Pixie. Ablation variants are max-pooling, mean-pooling, mean-pooling-xent and mean-pooling-hard, and the full PinSage adds importance pooling on top of the others.

Offline related-pin results

Hit-rate counts a query as a hit when its labeled related pin is among the top K nearest neighbors, with K set to 500, drawn from a sample of 5 million test pins. MRR divides each rank by 100 and rounds it up before taking the reciprocal, then averages over the labeled pairs, so that ranks around 1,000 and 2,000 remain distinguishable.

PinSage reaches 67% hit-rate and 0.59 MRR, against 17% and 0.23 for Visual, 14% and 0.19 for Annotation, and 27% and 0.37 for Combined. Combining visual and textual features beats either alone by a wide margin, with the combined approach 60% above the visual and annotation baselines.

Among the ablations, mean-pooling-hard reaches 46% hit-rate against 41% for mean-pooling, and both rows use mean pooling, so the change isolates adding hard negatives. Max-pooling reaches 39% and mean-pooling-xent 29% hit-rate, so the cross-entropy variant is weaker than the max-margin variants in this table. The introduction credits importance pooling with a 46% gain in offline metrics and curriculum training with a 12% gain, but no table row isolates curriculum training.

Spread of embedding similarities

The analysis plots the distribution of cosine similarity between random item pairs under annotation, visual and PinSage embeddings. PinSage has the lowest kurtosis of the three, at 0.43, against 2.49 for annotation embeddings and 1.20 for visual embeddings. The authors describe the PinSage distribution as the most spread out and argue that this lowers the collision rate of the subsequent LSH lookup.

Head-to-head user study

Raters see a query pin and two candidates from different systems, choose the more related one, or select equal, and a question without agreement from 2/3 of raters is treated as inconclusive. Raters were asked to judge relatedness by visual appearance, object category and personal identity.

PinSage wins 56.5% of decided comparisons against Visual, 72.5% against Annotation, 60.0% against Combined and 62.4% against Pixie. Across these comparisons, roughly 60% of the preferred items came from PinSage.

The authors credit PinSage with combining visual, textual and graph information to find items that are both visually and topically close. A t-SNE plot of 1000 random PinSage embeddings places items of the same category together and groups fashion items with the same theme.

Production homefeed A/B test

The live comparison measured repin rate, the share of homefeed recommendations that users saved to one of their boards. Compared with the Annotation and Visual embedding recommendations, PinSage gives a 10-30% higher repin rate, with the size depending on the setting. Pixie is not part of this test, and the comparison covers only the two deployed content-based systems.

Training subgraphs, batch size and neighborhood size

On development data a subgraph of 300 million items gave the best hit-rate, and training on it reduced runtime by a factor of 6 relative to the full graph. The authors state that further growth of the training set did not help the hit-rate.

For the mean-pooling-hard variant, Table 3 lists per-iteration time, iteration count and total time for batch sizes 512, 1024, 2048 and 4096. Batch size 2048 gives the lowest total time, 48.8 hours over 130k iterations, against 63.9 hours at 512, 53.2 hours at 1024 and 68.4 hours at 4096.

For importance pooling, Table 4 gives 60%, 63% and 67% hit-rate with 0.51, 0.54 and 0.59 MRR for 10, 20 and 50 neighbors, and training times of 20, 33 and 78 hours. The authors observe diminishing returns as the neighborhood grows and select the two-layer model with 50 neighbors as the best trade-off.

Limits of the evidence

All experiments use Pinterest data, and the GCN recommenders of Monti et al. and Berg et al. are not compared because they cannot scale to data of this size. Pixie is absent from the offline table because its labeled pairs were generated by Pixie itself, so only the human study compares against it.

The Kipf and Welling style variants were dropped after weaker development results and are not reported in the tables. Training time and the inference time for 3 billion items come from one hardware setup, a 32-core machine with 16 Tesla K80 GPUs and a 378-node Hadoop cluster. The subgraph result that reduces runtime by a factor of 6 comes from development data, not the reported test setting.

The tables report single values with no confidence intervals, so run-to-run variability is not shown. The user study treats questions without 2/3 agreement as inconclusive, and the offline gains are measured only on related-pin retrieval. Benefits for other graph tasks such as knowledge graph reasoning and graph clustering were not tested.

Paper info

Authors
Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L. Hamilton, Jure Leskovec
Venue
arXiv · Preprint
First published
2018-6-6
Added
2026-11-12
Updated
2018-6-6
Version
v1
arXiv
1806.01973
DOI
10.1145/3219819.3219890
Category
cs.IR · cs.LG · stat.ML
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L. Hamilton, Jure Leskovec (2018). Graph Convolutional Neural Networks for Web-Scale Recommender Systems. arXiv:1806.01973v1. https://doi.org/10.1145/3219819.3219890

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

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up