Sequential Aggregation and Rematerialization: Distributed Full-batch Training of Graph Neural Networks on Large Graphs

H. Mostafa

Main figure for Sequential Aggregation and Rematerialization: Distributed Full-batch Training of Graph Neural Networks on Large Graphs

Abstract

We present the Sequential Aggregation and Rematerialization (SAR) scheme for distributed full-batch training of Graph Neural Networks (GNNs) on large graphs. Large-scale training of GNNs has recently been dominated by sampling-based methods and methods based on non-learnable message passing. SAR on the other hand is a distributed technique that can train any GNN type directly on an entire large graph. The key innovation in SAR is the distributed sequential rematerialization scheme which sequentially re-constructs then frees pieces of the prohibitively large GNN computational graph during the backward pass. This results in excellent memory scaling behavior where the memory consumption per worker goes down linearly with the number of workers, even for densely connected graphs. Using SAR, we report the largest applications of full-batch GNN training to-date, and demonstrate large memory savings as the number of workers increases. We also present a general technique based on kernel fusion and attention-matrix rematerialization to optimize both the runtime and memory efficiency of attention-based models. We show that, coupled with SAR, our optimized attention kernels lead to significant speedups and memory savings in attention-based GNNs. We made the SAR GNN training library publicy available:.

Benchmark Results

Tested on 2 datasets

Tables show presented results in global context (best 3 papers + GCN + MLP).

OGB

#ModelAccuracy ↑Paper
1
Jacobi
0.8968
2
GPR
0.8953
3
LEMP4HG
0.8939
4
SAGE
0.8933
9
GAT
actual #9 vs paper #273 264 places worse
0.8829
best reported
actual #9 vs paper #273 264 places worse
paper 0.7490
83
GraphSAGE
actual #83 vs paper #142 59 places worse
0.8010
actual #83 vs paper #142 59 places worse
paper 0.8010
129
GraphSage+C&S
0.8090
This paper
221
GAT+C&S
0.7770
This paper
351
MLP
0.6605 ±0.0020
#ModelAccuracy ↑Paper
1
SGC
0.7910
2
GAMLP
0.7036 ±0.0002
3
GLEM-GNN
0.7036 ±0.0002
35
SAGE
0.6644 ±0.0017
39
GraphSage+C&S
0.6630
This paper
49
GAT
actual #49 vs paper #70 21 places worse
0.6598 ±0.0023
best reported
actual #49 vs paper #70 21 places worse
paper 0.6370
52
GraphSAGE
actual #52 vs paper #52
0.6580
actual #52 vs paper #52
paper 0.6580
paper 0.6580 Δ at pub 0.0100
67
GAT+C&S
0.6450
This paper
95
MLP
0.4960 ±0.0030
SOTA performance (not significantly different from the best) Baseline / comparison (this paper) Global context (other papers) Best at pub — reported value improved over the best known when published Improved at pub — later paper surpassed this result Best today — OK at publication; today's leaderboard best is elsewhere