Published March 7, 2022 | Version v1

Accelerating Training and Inference of Graph Neural Networks with Fast Sampling and Pipelining

Description

Abstract

Improving the training and inference performance of graph neural networks (GNNs) is faced with a challenge uncommon in general neural networks: creating mini-batches requires a lot of computation and data movement due to the exponential growth of multi-hop graph neighborhoods along network layers. Such a unique challenge gives rise to a diverse set of system design choices. We argue in favor of performing mini-batch training with neighborhood sampling in a distributed multi-GPU environment, under which we identify major performance bottlenecks hitherto under-explored by developers: mini-batch preparation and transfer. We present a sequence of improvements to mitigate these bottlenecks, including a performance-engineered neighborhood sampler, a shared-memory parallelization strategy, and the pipelining of batch transfer with GPU computation. We also conduct an empirical analysis that supports the use of sampling for inference, showing that test accuracies are not materially compromised. Such an observation unifies training and inference, simplifying model implementation. We report comprehensive experimental results with several benchmark data sets and GNN architectures, including a demonstration that, for the ogbn-papers100M data set, our system SALIENT achieves a speedup of 3x over a standard PyTorch-Geometric implementation with a single GPU and a further 8x parallel speedup with 16 GPUs. Therein, training a 3-layer GraphSAGE model with sampling fanout (15, 10, 5) takes 2.0 seconds per epoch and inference with fanout (20, 20, 20) takes 2.4 seconds, attaining test accuracy 64.58%.

Instructions

Refer to the code.zip file for a README file, source code, installation instructions, and documentation on how to evaluate this artifact. The code is also hosted on GitHub.

We also archive the nistath/salient:cuda-11.1.1 Docker image which is also hosted on DockerHub. The image was saved using Docker Engine version 20.10.12.
To use it, download the docker_image.tar.gz file and run docker load docker_image.tar.gz. Refer to the README for further instructions.

Acknowledgments

This research was sponsored by MIT-IBM Watson AI Lab and in part by the United States Air Force Research Laboratory and the United States Air Force Artificial Intelligence Accelerator and was accomplished under Cooperative Agreement Number FA8750-19-2-1000. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the United States Air Force or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein.

Files

code.zip

Files (6.3 GB)

Name Size
md5:5ceb168b49bc0e0b3c9081311db9504b
2.2 MB Preview Download
md5:57ee01ccb41427d7e67123f7cb9f4360
6.3 GB Download