ML Systems Lab Open interactive version →
Advanced 60 min read scalable GNNCluster-GCNGraphSAINTSIGNcold-start

Scalable GNNs for Node Classification

Neighbor explosion, Cluster-GCN, GraphSAINT, SIGN, cold-start, class imbalance

A 2-layer GNN on a node with average degree 100 requires 100 first-hop and up to 10,000 second-hop neighbors. A 3-layer GNN requires up to 1 million. For a graph with 100 million nodes, full-batch training is not a slow option — it is not an option at all. This is the neighbor explosion problem, and it appears immediately when scaling beyond academic benchmarks.

Three production approaches exist. Cluster-GCN partitions the graph into dense clusters using METIS. Each mini-batch is one cluster; GNN training runs entirely within the cluster. No neighbor explosion because the subgraph is bounded. The approximation error is the ignored cross-cluster edges. For graphs with strong community structure, these are few. For globally connected graphs, ignoring cross-cluster edges causes significant distribution shift.

GraphSAINT samples random node-induced or edge-induced subgraphs for each mini-batch and normalizes message aggregations by sampling probability to produce unbiased gradient estimates. The normalization coefficients are precomputed offline. This works better for globally connected graphs where METIS would cut through many informative edges.

SIGN precomputes multi-hop diffusion features offline — X^k = (D̃^{-1/2} Ã D̃^{-1/2})^k X for each k — and stores them on disk. At training time: load precomputed features for a mini-batch, concatenate, pass through an MLP. No graph structure needed during training. As fast as a tabular model. The limitation: all neighborhood information is fixed at precompute time and cannot adapt to new edges.

NOT this. "Cluster-GCN is always the right choice for large graphs." Cluster-GCN works well when the graph has strong community structure so cross-cluster edges are few. On a globally connected graph like Reddit (230K nodes, 11M edges, low community structure), METIS would cut through many informative inter-community edges, and the model trained on disconnected clusters would perform poorly on full-graph inference. GraphSAINT with random walk sampling achieves 93% accuracy on Reddit versus Cluster-GCN's 90.4%. The choice depends on graph structure: dense communities favor Cluster-GCN, globally connected graphs favor GraphSAINT.

Key points

Takeaway

The neighbor explosion problem — a K-layer GNN's required neighborhood grows exponentially with K — makes full-batch training impossible at scale and forces a choice between partitioning (Cluster-GCN), subgraph sampling (GraphSAINT), and offline precomputation (SIGN). The choice depends on graph structure and whether embeddings need to be dynamic. The often-overlooked issue is training-time distribution shift: a GNN trained on dense clusters performs 5% worse on the full graph because the cross-cluster edges it never saw during training shift the input distribution at inference time. Always evaluate with full-graph inference even when training uses mini-batches.

Recap

Check your understanding

Q1. Your GNN is trained with Cluster-GCN but accuracy on the full graph is 5% lower than on the training clusters. Diagnose the problem and propose fixes.

Q2. Design the architecture for GNN-based fraud detection at a payments company with 100M users, 1B transactions per day, and 0.1% fraud rate. Focus on scalability and handling cold-start.

Q3. Which two of the following statements about GraphSAINT vs Cluster-GCN on the Reddit graph (230K nodes, 11M edges, highly connected) are TRUE? (Select two.)

Try it interactively

ML Systems Lab is a free interview-prep platform for ML engineers — work through the full interactive module, quizzes, and drills.

Open ML Systems Lab →