NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Distributed Hybrid CPU and GPU training for Graph Neural Networks on Billion-Scale Heterogeneous Graphs

Da Zheng, Xiang Song, Chengru Yang, Dominique LaSalle, George Karypis

TL;DR

This paper introduces DistDGLv2, a system for efficiently training Graph Neural Networks (GNNs) on massive, heterogeneous graphs using a hybrid CPU-GPU approach. It achieves significant speedups by optimizing data movement, parallel computation, and asynchronous pipeline processing, making large-scale GNN training more accessible and performant.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) have proven highly effective for tasks involving graph-structured data, such as recommendation systems and fraud detection. However, real-world graphs in these domains are often enormous, containing billions of nodes and edges with diverse types. Training GNNs on such massive and heterogeneous graphs presents significant challenges:

  • Scale: Storing and processing these graphs exceeds the memory capacity of single machines.
  • Heterogeneity: Graphs with different types of nodes and edges, and varying feature sizes, complicate data management and processing.
  • Computational Demands: GNN training, especially with mini-batching, requires efficient utilization of both CPU and GPU resources, along with fast data transfer between them and across a distributed cluster.

Existing distributed GNN training frameworks often struggle with these challenges, either by not effectively handling heterogeneous graphs, being optimized for CPU-only clusters, or not scaling beyond single-machine memory limits. This paper aims to bridge this gap by enabling efficient, distributed hybrid CPU-GPU training for GNNs on billion-scale heterogeneous graphs.

Methods

DistDGLv2 builds upon the Deep Graph Library (DGL) and its existing distributed framework, DistDGL, introducing several key innovations:

  • Hybrid CPU/GPU Architecture: Graph data (structure and features) is stored in distributed CPU memory, while GNN computations are performed on GPUs. This leverages the large capacity of CPUs for storage and the high computational power of GPUs for training.
  • API Compatibility: DistDGLv2 maintains API compatibility with DGL's mini-batch training and heterogeneous graph APIs. This significantly lowers the barrier to entry, requiring minimal code modifications for users to adopt distributed training.
  • Asynchronous Mini-Batch Pipeline: A sophisticated pipeline is implemented to overlap data loading, sampling, and computation. This pipeline is divided into stages running on CPUs and GPUs, with computations and data transfers happening concurrently to maximize hardware utilization. It uses a dedicated Python thread for sampling to avoid blocking GPU computations.
  • Heterogeneous Graph Support: DistDGLv2 explicitly supports heterogeneous graphs by employing a multi-level partitioning algorithm. This algorithm ensures minimal edge cuts and balanced partitions, crucial for efficient data distribution and load balancing across machines.
  • Hierarchical Partitioning: A two-level partitioning strategy is used: the first level partitions the graph across machines, and a second level partitions within each machine for GPUs. This aims to improve data locality and reduce the number of vertices/edges needed for mini-batches.
  • Load Balancing: Beyond minimizing edge cuts, DistDGLv2 incorporates multi-constraint partitioning to balance the distribution of vertices and edges of different types across machines, ensuring even utilization of CPU memory.

Datasets

The paper evaluates DistDGLv2 on several large-scale graph datasets:

  • Homogeneous:
    • ogbn-product
    • Amazon
    • ogbn-papers100M
  • Heterogeneous:
    • ogbn-mag
    • mag-lsc

These datasets vary in size, from millions to billions of vertices and edges, and are used for tasks like vertex classification and link prediction.

Key Insights and Ideas

  • Hybrid CPU/GPU is Crucial for Scale: Storing massive graphs on CPUs and offloading computation to GPUs is a highly effective strategy for scaling GNN training beyond single-machine memory limits.
  • Asynchronous Pipelines are Key to Overlap: Overlapping data movement and computation through an asynchronous pipeline is critical for maximizing hardware utilization and achieving significant speedups, especially in distributed environments.
  • Heterogeneity Requires Smart Partitioning: Simply partitioning a graph isn't enough for heterogeneous graphs. Multi-level and multi-constraint partitioning is necessary to balance data distribution and minimize communication overhead.
  • Mini-batch Training is Superior for Large Graphs: The paper reinforces that for large graphs, mini-batch training converges faster and to better accuracy than full-graph training, making it the preferred approach for scalability.
  • API Compatibility Drives Adoption: By aligning with existing DGL APIs, DistDGLv2 makes advanced distributed training techniques accessible to a wider audience with minimal code changes.

Key Results

DistDGLv2 demonstrates substantial performance improvements:

  • Speedup: Achieves 2-3x speedup over DistDGL-GPU and 18x speedup over Euler-GPU.
  • GPU vs. CPU: Shows up to 15x speedup over distributed CPU training (DistDGL-CPU) for GNN models like GAT and RGCN.
  • Efficiency: Can complete an epoch on graphs with hundreds of millions of vertices in just 5-10 seconds on a cluster with 64 GPUs.
  • Scalability: Exhibits good scalability, with training speed doubling when scaling from four to eight instances on large graphs.
  • Accuracy: Maintains model accuracy comparable to single-machine training, with mini-batch training outperforming full-graph training on large datasets.

Limitations and Future Work

  • Asynchronous Pipeline Staleness: The asynchronous pipeline, while beneficial for performance, currently only applies to immutable data (graph structure and features). Learnable embeddings are still handled synchronously, which could be a future area for optimization.
  • Startup Overhead: The asynchronous pipeline introduces a startup overhead at the beginning of each epoch, which can impact performance on very small training sets.
  • Future Work: The authors plan to release the asynchronous mini-batch sampling pipeline in future DGL releases. Further optimizations for learnable embeddings and more advanced sampling algorithms are implied directions.

Summary updated

BibTeX
@inproceedings{zheng2022distributed,
  author = {Da Zheng and Xiang Song and Chengru Yang and Dominique LaSalle and George Karypis},
  title = {{Distributed Hybrid CPU and GPU training for Graph Neural Networks on Billion-Scale Heterogeneous Graphs}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2022},
  url = {https://openreview.net/forum?id=H9WEPQsBDC},
}
Figure