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

Accelerating graph sampling for graph machine learning using GPUs

Abhinav Jangda, Sandeep Polisetty, Arjun Guha, Marco Serafini

TL;DR

This paper introduces NEXTDOOR, a novel system that significantly accelerates graph sampling for machine learning by leveraging GPUs. It achieves this through a new "transit-parallelism" paradigm, which efficiently handles the irregular nature of graph data on parallel hardware, leading to orders-of-magnitude speedups over existing methods.

What Problem Does This Paper Address?

Graph Machine Learning (GML) models, particularly Graph Neural Networks (GNNs), often rely on sampling subgraphs or neighborhoods to create mini-batches for training. This sampling process, while conceptually "embarrassingly parallel," is notoriously difficult to optimize on GPUs due to the irregular structure of graphs. Existing GNN training systems efficiently utilize GPUs for the neural network computation itself, but the graph sampling step, often performed on the CPU, becomes a significant bottleneck, consuming up to 62% of the total training time. This inefficiency is further exacerbated when multiple GPUs are used for training, as a slow CPU sampler cannot keep them saturated. The paper aims to bridge this gap by enabling efficient and parallel graph sampling directly on GPUs.

Methods

The core innovation of NEXTDOOR is its transit-parallelism paradigm. Unlike traditional "sample-parallelism" where each sample is processed independently, transit-parallelism groups samples based on their "transit vertices" (vertices whose neighbors are being considered for inclusion in the sample). This allows for:

  • Regular Computation: By processing samples associated with the same transit vertex together, the system can achieve more regular memory access patterns and reduce warp divergence on GPUs.
  • Load Balancing: NEXTDOOR employs a multi-level parallelism strategy (transits to thread blocks, samples to warps, and individual threads for computation) and a sophisticated kernel selection mechanism (sub-warp, thread block, and grid kernels) to balance the workload across transit vertices, even when they have varying numbers of neighbors.
  • Efficient Caching: It utilizes shared memory and registers to cache transit vertex neighborhoods, minimizing costly global memory accesses.
  • High-Level API: NEXTDOOR provides a user-friendly API that abstracts away the low-level GPU programming details, allowing users to express various graph sampling algorithms (like random walks, k-hop neighborhood sampling, and layer sampling) with just a few lines of code.

Datasets

The paper evaluates NEXTDOOR on several real-world graph datasets:

  • PPI (Protein-Protein Interactions)
  • com-Orkut
  • cit-Patents
  • soc-LiveJournal1 (LiveJ)
  • com-Friendster (FriendS)

These datasets are obtained from the Stanford Network Analysis Project (SNAP) and are used in their original form or with randomly assigned edge weights.

Key Insights and Ideas

  • The "embarrassingly parallel" nature of graph sampling is a red herring for GPUs: While conceptually parallel, the irregular memory access patterns and control flow inherent in graph structures make naive parallelization on GPUs inefficient.
  • Transit vertices are the key to GPU-friendly graph sampling: By re-framing parallelism around transit vertices rather than individual samples, the system can exploit GPU hardware more effectively.
  • Multi-level parallelism and adaptive kernel selection are crucial for load balancing: NEXTDOOR's ability to dynamically assign work to different kernel types (sub-warp, thread block, grid) based on the number of neighbors is essential for efficient GPU utilization.
  • A high-level API is vital for adoption: Abstracting away GPU complexities makes advanced graph sampling techniques accessible to a wider range of GML practitioners.

Key Results

  • Orders-of-magnitude speedups: NEXTDOOR achieves speedups ranging from 26.1x to 50x over KnightKing for random walks and significant speedups over existing GNN samplers.
  • Substantial improvement over sample-parallelism: NEXTDOOR's transit-parallel approach provides speedups of 1.09x to 6x over an optimized sample-parallel baseline (SP).
  • Efficient GPU utilization: The system demonstrates high global memory store efficiency and multiprocessor activity, indicating effective use of GPU resources.
  • Scalability to large graphs: NEXTDOOR can handle graphs that do not fit entirely in GPU memory by processing disjoint sub-graphs.
  • End-to-end GNN speedups: Integrating NEXTDOOR as a sampler in existing GNNs leads to significant improvements in end-to-end training times, with speedups up to 4.75x reported.

Limitations and Future Work

  • CPU-based coordination: While the sampling itself is GPU-accelerated, some coordination and scheduling are still handled by the CPU.
  • Tensorflow limitation: The speedup for GraphSAGE integration was limited by Tensorflow's inability to create tensors directly on the GPU memory, requiring data transfers between CPU and GPU.
  • Future work: The authors plan to improve support for sampling very large graphs and explore further optimizations for sampling applications that involve significant computation. They also suggest that future work could investigate detecting and exploiting common combined neighborhoods for collective sampling.

Summary updated

BibTeX
@inproceedings{jangda2021accelerating,
  author = {Abhinav Jangda and Sandeep Polisetty and Arjun Guha and Marco Serafini},
  title = {{Accelerating graph sampling for graph machine learning using GPUs}},
  booktitle = {EuroSys},
  year = {2021},
  doi = {10.1145/3447786.3456244},
}
Figure