Notes

PinSage

Pinterest had a graph of three billion pins and boards, and a problem no published graph network could handle: training over the full adjacency structure was out of the question. PinSage was the answer — a graph convolutional recommender that builds an item embedding by sampling a neighbourhood instead of reading all of it.

How it builds an embedding
For a given pin, short random walks from that node produce a set of neighbours, each weighted by how often the walk visited it. The model aggregates those neighbours' features with learned weights, repeats the step for a second hop, and ends with a vector that mixes the pin's own content — image and text features — with the structure of the boards it sits on. Training is pairwise, with negatives drawn on a curriculum that gets harder as the model improves.

Why it mattered

  • It is inductive — an embedding comes from features and neighbours, not from a lookup table, so a pin uploaded after training gets a vector immediately; transductive models like LightGCN cannot do that.
  • It ran at production scale — importance-sampled neighbourhoods keep each minibatch bounded, and inference is a MapReduce job over the whole graph.
  • Content and structure in one vector — which helps most exactly where interaction data is thin.

What it costs
The sampling is the engineering: walk length, neighbourhood size and the negative curriculum all move the result, and the pipeline is far heavier than a matrix factorisation on the same data. PinSage remains the reference point for GraphSAGE-style recommendation at catalogue scale.

PinSage is a graph convolutional recommender from Pinterest that embeds an item by aggregating features from a random-walk-sampled neighbourhood of the user-item graph, hop by hop, rather than over the full adjacency matrix. That sampling is what let it run on a three-billion-node graph. Because embeddings are computed from content features and neighbours instead of looked up, new items get vectors without retraining — the inductive property transductive graph models lack.

Think of judging a restaurant not just by its own menu, but by the handful of other places its regulars also visit. Those neighbours tell you something the menu does not. PinSage does that with online content. It describes each item by blending the item itself with a sample of the things it sits alongside in people's collections. Checking every connection would be impossible — there are billions of them — so it follows a few short paths and uses what it finds there. The payoff is that something posted five minutes ago can be understood straight away, from its own content and its company.