Scalable Graph Neural Network Training: The Case for Sampling

Marco Serafini, Hui GuanarXiv 2021

Abstract

Graph Neural Networks (GNNs) are notoriously difficult to scale because graph data is inherently interconnected, breaking the "independent data point" assumption of standard deep learning. This paper argues that sample-based training—which uses mini-batches of sampled subgraphs—is the most promising path forward for scalability. By analyzing the architectural bottlenecks of whole-graph training and the computational overheads of sampling, we highlight the potential of GPU-accelerated sampling frameworks like the authors' NextDoor system to achieve significant end-to-end speedups.

Introduction: The Scalability Crisis

Training GNNs on massive graphs, such as social networks or web-scale citation graphs, presents a significant systems challenge. In traditional deep learning, datasets are easily partitioned into independent mini-batches. However, in a graph, vertices are interconnected, making isolation difficult. When a graph exceeds the memory capacity of a single GPU, researchers typically face two suboptimal choices: whole-graph partitioning or sample-based mini-batching.

Architectural Trade-offs

Whole-graph training involves partitioning the graph across multiple devices. Because GNN layers aggregate information from neighbors, devices must constantly exchange features at every layer, creating massive communication overhead and synchronization bottlenecks.

In contrast, sample-based training involves sampling small subgraphs to create independent mini-batches. While this allows devices to work independently, it introduces the "neighbor explosion" problem and significant computational overhead for the sampling process itself.

Comparison of (a) Full Graph, (b) Whole-Graph Training with cross-device communication, and (c) Sample-Based Training with independent subgraphs.

The Sampling Bottleneck and NextDoor

The authors argue that the challenges of sampling are more addressable than the inherent architectural bottlenecks of whole-graph training. Sampling can be viewed as a form of data parallelism, making it more modular and easier to deploy on standard high-performance clusters.

However, sampling itself is a major bottleneck, often consuming over 50% of total training time when performed on the CPU. For instance, GraphSAGE on the PPI dataset spends 51% of its time on sampling, while LADIES on Reddit reaches 62%.

To address this, the authors introduce the NextDoor framework, which moves sampling to the GPU. NextDoor utilizes "transit parallelism," parallelizing by the vertex being transitioned through rather than by individual samples. This approach ensures coalesced memory reads and significantly higher GPU efficiency by allowing multiple threads to access the same adjacency list simultaneously.

Key Results

The evaluation across large-scale benchmarks—including PPI, Reddit, Orkut, LiveJ, and Patents—demonstrates the effectiveness of optimized sample-based training. By offloading sampling to the GPU and employing transit parallelism, the authors achieved substantial end-to-end training speedups.

End-to-end training speedups achieved using the NextDoor framework across various GNN models and datasets.

As shown in the results, speedups reached as high as 4.75x for FastGCN on the Orkut dataset. These findings suggest that while sampling involves redundant computation (as nodes may appear in multiple mini-batches), this cost is frequently lower than the communication overhead required for moving large feature tensors in whole-graph distributed training.

Conclusion and Future Work

Sample-based training transforms GNN training into a more modular, "pluggable" architecture. While it offers a clear path to scalability, challenges remain. There is a potential accuracy gap between sampling and full-batch training that requires ongoing monitoring. Furthermore, for "billion-scale" graphs that exceed host RAM, distributed sampling remains an open research challenge. Future work will focus on perfectly overlapping GPU sampling with training to achieve maximum hardware utilization.

Summary updated

BibTeX
@misc{serafini2021scalable,
  author = {Marco Serafini and Hui Guan},
  title = {{Scalable Graph Neural Network Training: The Case for Sampling}},
  year = {2021},
  eprint = {2105.02315},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.02315},
}
Figure