Part III: Distributed Machine Learning
Chapter 13: Distributed Graph Machine Learning

Distributed Graph Machine Learning

When the data arrives as a graph rather than a table, the examples are no longer independent rows that a scheduler can scatter at will: every vertex depends on its neighbors, and any cut you make to spread the graph across machines severs edges the computation needs. This chapter builds the machinery that learns over graphs too large for one machine, graph partitioning that minimizes the damage of cutting, the vertex-centric Pregel model that turns iteration into message passing, distributed graph analytics, and the distributed graph neural networks whose neighbor sampling and full-graph-versus-mini-batch tradeoffs decide whether training a billion-edge model is feasible at all.

Conceptual illustration for Chapter 13: Distributed Graph Machine Learning

"They split the graph eight ways and handed me a vertex on the seam. Half its neighbors live on a machine I can only reach by message. Every step I compute, I first wait for the mail."

A Boundary Vertex on the Wrong Side of the Cut

Chapter Overview

This is the fourth chapter of Part III, and it confronts the data structure that breaks the clean shard-and-reduce of everything before it. Chapter 12 scaled the classical canon by cutting the data into independent shards and summing a small summary statistic across them. That move works because rows are independent. A graph is the opposite: an edge is a dependency, and any partition that spreads the graph across machines necessarily cuts some edges, turning a neighbor lookup into a network round trip. The whole chapter is organized around that single difficulty, and around the techniques that contain it.

Read in order, the eight sections take you from "this graph does not fit on one machine and you cannot just cut it in half" to "train a graph neural network on a billion edges across a cluster." The thread to watch is that distribution over graphs always trades partition quality against communication: a better cut means fewer cross-machine messages, sampling means fewer neighbors to fetch, and mini-batching means smaller working sets, and every framework in the last section is a different point on that tradeoff. The partitioned, message-passing structure built here returns wherever later parts touch graph-shaped data, from recommendation graphs to multi-agent communication topologies.

Prerequisites

This chapter assumes the distributed-systems and optimization background of the earlier chapters. From Chapter 2: Distributed Systems Concepts for AI you carry the basic vocabulary of partitioning, message passing, synchronization barriers, and the consistency-and-coordination reasoning that the bulk-synchronous supersteps of the Pregel model in Section 13.3 depend on. From Chapter 10: Distributed Optimization you carry the data-parallel gradient and distributed SGD, because training a distributed graph neural network in Sections 13.5 through 13.7 is distributed SGD whose forward pass happens to fetch features across the graph rather than reading independent rows. From Chapter 12: Distributed Classical Machine Learning you carry the habit of asking, for any algorithm, what summary statistic travels between machines and which collective carries it; graph learning answers that question with messages along edges. The chapter assumes comfortable Python, a single-machine understanding of PageRank and of a graph neural network layer such as GCN or GraphSAGE, and the collective-communication primitives, all-reduce, all-gather, and broadcast, introduced earlier in Part I. The linear-algebra background refreshed in Appendix A: Mathematical Background covers the sparse matrix view of graph propagation.

Learning Objectives

Chapter Roadmap

What's Next?

This chapter learned over data whose pieces refuse to come apart, partitioning a graph to minimize the edges that cross machines, carrying the rest as messages, and bounding deep message passing with sampling and mini-batching. Chapter 14: Federated and Decentralized Learning takes the distribution problem in a different direction, from data that is one graph spread across a cluster you control to data that is scattered across many devices you do not control and cannot move. Federated learning trains a shared model while the training data stays on phones, hospitals, and edge devices, raising new problems the chapters here did not face: non-identically-distributed shards, unreliable and intermittent participants, communication budgets measured in rounds rather than messages, and privacy constraints that forbid centralizing the data at all. Read it next, and watch the assumption that you own and can co-locate your data, quietly held through all of Part III so far, finally fall away.

Bibliography & Further Reading

Graph Partitioning

Karypis, G., Kumar, V. "A Fast and High Quality Multilevel Scheme for Partitioning Irregular Graphs (METIS)." SIAM Journal on Scientific Computing, 20(1), 1998. epubs.siam.org

The multilevel coarsen-partition-refine scheme behind METIS, the standard tool for the balanced edge-cut partitioning that Section 13.2 builds on to minimize cross-machine edges.

📄 Paper

Vertex-Centric Graph Processing Systems

Malewicz, G., Austern, M. H., Bik, A. J. C., Dehnert, J. C., Horn, I., Leiser, N., Czajkowski, G. "Pregel: A System for Large-Scale Graph Processing." SIGMOD, 2010. dl.acm.org

The paper that introduced the think-like-a-vertex bulk-synchronous superstep model, the foundation of the vertex-centric computation developed in Section 13.3.

📄 Paper

Gonzalez, J. E., Low, Y., Gu, H., Bickson, D., Guestrin, C. "PowerGraph: Distributed Graph-Parallel Computation on Natural Graphs." OSDI, 2012. usenix.org

The system that introduced vertex-cut partitioning and the gather-apply-scatter abstraction to handle power-law graphs, central to the partitioning and computation models of Sections 13.2 and 13.3.

📄 Paper

Gonzalez, J. E., Xin, R. S., Dave, A., Crankshaw, D., Franklin, M. J., Stoica, I. "GraphX: Graph Processing in a Distributed Dataflow Framework." OSDI, 2014. usenix.org

The system that embeds graph-parallel computation in a general dataflow engine (Spark), showing how vertex-centric analytics of Section 13.4 run on the data-processing stack of Part II.

📄 Paper

Graph Neural Networks

Kipf, T. N., Welling, M. "Semi-Supervised Classification with Graph Convolutional Networks (GCN)." arXiv:1609.02907, 2016. arxiv.org/abs/1609.02907

The graph convolutional network that frames neighbor aggregation as a sparse propagation, the canonical layer whose distribution is the subject of Section 13.5.

📄 Paper

Hamilton, W. L., Ying, R., Leskovec, J. "GraphSAGE: Inductive Representation Learning on Large Graphs." arXiv:1706.02216, 2017. arxiv.org/abs/1706.02216

The inductive model that introduced fixed-size neighbor sampling for scalable message passing, the basis for the distributed neighbor sampling of Section 13.6.

📄 Paper

Scalable GNN Training

Chiang, W.-L., Liu, X., Si, S., Li, Y., Bengio, S., Hsieh, C.-J. "Cluster-GCN: An Efficient Algorithm for Training Deep and Large Graph Convolutional Networks." arXiv:1905.07953, 2019. arxiv.org/abs/1905.07953

The mini-batch scheme that builds batches from graph-clustered subgraphs to bound neighborhood expansion, one of the two approaches weighed in Section 13.7.

📄 Paper

Zeng, H., Zhou, H., Srivastava, A., Kannan, R., Prasanna, V. "GraphSAINT: Graph Sampling Based Inductive Learning Method." arXiv:1907.04931, 2019. arxiv.org/abs/1907.04931

The subgraph-sampling training method that samples a subgraph per minibatch and corrects the resulting bias, the second mini-batch approach contrasted with full-graph training in Section 13.7.

📄 Paper

Frameworks and Benchmarks

Zheng, D., Ma, C., Wang, M., Zhou, J., Su, Q., Song, X., Gan, Q., Zhang, Z., Karypis, G. "DistDGL: Distributed Graph Neural Network Training for Billion-Scale Graphs." arXiv:2010.05337, 2020. arxiv.org/abs/2010.05337

The distributed training system that partitions the graph, co-locates features, and runs distributed neighbor sampling at billion-edge scale, the centerpiece framework of Section 13.8.

📄 Paper

Fey, M., Lenssen, J. E. "Fast Graph Representation Learning with PyTorch Geometric." arXiv:1903.02428, 2019. arxiv.org/abs/1903.02428

The widely used graph-learning library whose message-passing abstraction and samplers package the distributed building blocks surveyed in Section 13.8.

📄 Paper

Hu, W., Fey, M., Zitnik, M., Dong, Y., Ren, H., Liu, B., Catasta, M., Leskovec, J. "Open Graph Benchmark: Datasets for Machine Learning on Graphs (OGB)." arXiv:2005.00687, 2020. arxiv.org/abs/2005.00687

The benchmark suite of large-scale graph datasets that standardized evaluation of scalable graph learning, the proving ground for the distributed methods of this chapter.

📄 Paper