NOMAD: Generating Embeddings for Massive Distributed Graphs
Abstract
Successful machine learning on graphs or networks requires embeddings that not only represent nodes and edges as low-dimensional vectors but also preserve the graph structure. Established methods for generating embeddings require flexible exploration of the entire graph through repeated use of random walks that capture graph structure with samples of nodes and edges. These methods create scalability challenges for massive graphs with millions-to-billions of edges because single-node solutions have inadequate memory and processing capabilities. We present NOMAD, a distributed-memory graph embedding framework using the Message Passing Interface (MPI) for distributed graphs. NOMAD implements proximity-based models proposed in the widely popular LINE (Large-scale Information Network Embedding) algorithm. We propose several practical trade-offs to improve the scalability and communication overheads confronted by irregular and distributed graph embedding methods, catering to massive-scale graphs arising in web and science domains. NOMAD demonstrates median speedups of 10/100x on CPU-based NERSC Perlmutter cluster relative to the popular reference implementations of multi-threaded LINE and node2vec, 35-76x over distributed PBG, and competitive embedding quality relative to LINE, node2vec, and GraphVite, while yielding 12-370x end-to-end speedups on real-world graphs.
Figures & tables
| Framework | CPU | GPU | Distributed | Sampling | Training | Scale Up | Scale Out | Partitioned graph | Notes |
| NOMAD (this work) | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | MPI collective communication and synchronization |
| PyTorch-BigGraph [ 1 ] | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Parameter-server architecture with shared parameter synchronization |
| Fast-Node2vec [ 2 ] | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Pregel-like iterative BSP |
| GraphVite [ 3 ] | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | ✗ | ✗ | Hybrid, OpenMP threads for sampling; GPU-based training |
| Grape [ 4 ] | ✓ | ✗ | ✗ | ✓ | ✓ | ✓ | ✗ | ✗ | Thread-level SIMD parallelism |
| CuGraph [ 5 ] | ✗ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | Dask-based multi-GPU random walk sampling (no training) |
| Datasets | Speedup | |||
| pubmed [ 40 ] | 20K | 89K | 12 152 | 12 |
| photo [ 41 ] | 7.5K | 238K | 16 1K | 37 |
| computers [ 41 ] | 13K | 491K | 39 3K | 58 |
| physics [ 41 ] | 34K | 495K | 9 181 | 23 |
| ogbn-arxiv [ 42 ] | 169K | 2.3M | 60 2K | 99 |
| youtube [ 43 ] | 1.1M | 9.8M | 199 6K | 370 |
| Dataset | LINE | node2vec | GraphVite | Nomad (local) | Nomad (remote) | |||||
| Mi | Ma | Mi | Ma | Mi | Ma | Mi | Ma | Mi | Ma | |
| computers | 0.61 | 0.50 | 0.50 | 0.41 | 0.79 | 0.74 | 0.83 | 0.82 | 0.83 | 0.83 |
| physics | 0.59 | 0.31 | 0.74 | 0.69 | 0.60 | 0.41 | 0.78 | 0.69 | 0.83 | 0.77 |
| pubmed | 0.41 | 0.30 | 0.48 | 0.43 | 0.40 | 0.22 | 0.62 | 0.53 | 0.53 | 0.40 |
| photo | 0.77 | 0.73 | 0.51 | 0.48 | 0.77 | 0.70 | 0.84 | 0.82 | 0.89 | 0.88 |
| youtube | 0.25 | 0.06 | 0.40 | 0.29 | 0.31 | 0.14 | 0.27 | 0.11 | 0.25 | 0.07 |
| arxiv ( =2.3M, =643) | youtube ( =9.8M, =11,127) | ||||||||||
| Local (%MPI=99.4, Avg. Mem./PE=201 MiB) | Remote (%MPI=99.7, Avg. Mem./PE=208 MiB) | Local (%MPI=99.4, Avg. Mem./PE=247 MiB) | Remote (%MPI=98.8, Avg. Mem./PE=260 MiB) | ||||||||
| % Total | % Imbal. | Function | %Total | % Imbal. | Function | % Total | % Imbal. | Function | % Total | % Imbal. | Function |
| 46 | 9 | MPI_Alltoallv | 55 | 12 | MPI_Allreduce | 76 | 5 | MPI_Alltoallv | 80 | 1 | MPI_Alltoallv |
| 35 | 45 | MPI File I/O | 15 | 11 | MPI_Barrier | 11 | 14 | MPI_Alltoall | 9 | 13 | MPI_Allreduce |
| 12 | 35 | MPI_Allreduce | 13 | 5 | MPI_Alltoallv | 9 | 26 | MPI_Allreduce | 6 | 12 | MPI_Alltoall |
| 7 | 38 | MPI_Barrier | 9 | 40 | MPI File I/O | 2 | 30 | MPI_Barrier | 1 | 33 | MPI_Barrier |
| youtube (default) MPI utilization | youtube (RMA) MPI utilization | ||||
| %-time | %-imb. | Function | %-time | %-imb. | Function |
| 74 | 1 | MPI_Alltoallv | 51 | 42 | MPI_Allreduce |
| 15 | 10 | MPI_Allreduce | 27 | 51 | MPI_Win_flush_all |
| 6 | 10 | MPI_Alltoall | 13 | 58 | MPI_Win_flush_local_all |
Graph Embedding
Graph embedding maps nodes, edges, or whole graphs into vectors that capture structure for prediction, clustering, retrieval, and analysis.
See all 53 papers