Abstract
Training Graph Neural Networks (GNNs) on billion-scale datasets requires distributed systems, yet these systems often suffer from significant communication overhead during neighborhood sampling. We introduce FastSample, a library designed to accelerate distributed GNN training by up to 2x. FastSample achieves this through two primary innovations: a fused sampling kernel that eliminates redundant memory movement and a hybrid partitioning strategy that minimizes network communication by duplicating graph topology while partitioning node features. Our evaluation on massive benchmarks like ogbn-papers100M demonstrates that FastSample provides substantial speedups without sacrificing model accuracy.
Introduction
As graph datasets scale to hundreds of millions of nodes and billions of edges, they exceed the memory capacity of single machines, necessitating distributed training environments. However, the "distributed tax"—primarily the cost of network communication—often becomes the primary bottleneck. In standard GNN training, neighborhood sampling requires frequent data exchange between machines to identify and fetch the features of neighboring nodes. Researchers from Intel, UNC Chapel Hill, and UPenn have developed FastSample to address these inefficiencies, slashing training times for massive graphs.
The Sampling Bottleneck
Most modern GNNs rely on sampling-based mini-batch training. Instead of processing the entire graph, the algorithm explores local neighborhoods for a subset of "seed" nodes. In a distributed setup, if a seed node on Machine A has neighbors on Machine B, a communication round is triggered. For deep GNNs, these rounds multiply, leading to excessive latency. Furthermore, local computation is often hindered by inefficient data structures; standard libraries like the Deep Graph Library (DGL) typically use multi-step processes that move data between different sparse formats, creating a memory-access bottleneck.
Methodology
Fused Sampling Kernel
A significant portion of sampling time is spent converting graph data between formats. Traditionally, neighbors are first identified and stored in a Coordinate (COO) format before being converted into a Compressed Sparse Column (CSC) format for the GNN layers. FastSample introduces a fused sampling kernel that skips this intermediate step, sampling directly into the CSC format. This optimization avoids redundant memory writes and reads, leading to local sampling speeds up to 2x faster than existing optimized kernels.
Hybrid Partitioning Strategy
The most impactful innovation in FastSample is its hybrid partitioning approach. The researchers observed a critical disparity in graph data: the topology (the connectivity map) is significantly smaller than the node features (the actual data, such as high-dimensional embeddings). For instance, in the IGBH-Full dataset, features account for 95.9% of storage, while topology accounts for only 4.1%.
FastSample exploits this by duplicating the entire graph topology on every machine while partitioning the heavy node features. Because each machine possesses a complete "map" of the graph, neighborhood sampling can occur entirely locally without network chatter. Communication is only required at the final stage to fetch the necessary features for the sampled nodes. This reduces the number of communication rounds from $2L$ (where $L$ is the number of layers) to just 2.
Multi-Level Sampling Workflow
The sampling process involves multiple levels of neighbor exploration, followed by a renumbering phase to create a compact representation for the GNN blocks. FastSample ensures that these operations are performed efficiently, maintaining mathematical equivalence to standard sampling methods to ensure no loss in accuracy.
Experimental Results
FastSample was evaluated using the Open Graph Benchmark (OGB) on datasets including ogbn-products (124M edges) and ogbn-papers100M (3.2B edges). Key findings include:
- Distributed Performance: On an 8-machine cluster training
ogbn-papers100M, FastSample reduced per-epoch training time by nearly 50%. - Local Efficiency: The fused kernel alone provides a 10% to 25% overall speedup for single-node training.
- Accuracy: Because the sampling logic remains identical to standard methods, FastSample achieves the same accuracy as baseline DGL implementations.
Conclusion and Future Work
FastSample demonstrates that strategic data duplication and kernel fusion can significantly mitigate the communication overhead in distributed GNN training. While the hybrid partitioning strategy introduces a memory trade-off by duplicating topology, the resulting performance gains make it a compelling choice for billion-scale graphs. Future iterations may incorporate feature caching and adaptive sampling fanouts to further push the boundaries of large-scale graph learning.
Summary updated