A High-Throughput Solver for Marginalized Graph Kernels on GPU

Yu-Hang Tang, Oguz Selvitopi, Doru Popovici, Aydin Buluç · DOI

Introduction

In modern machine learning, comparing complex objects like molecules, traffic patterns, or social networks requires specialized mathematical tools. Unlike images or sound waves, which are "discretizable" and can be mapped to regular grids, graphs are inherently discrete and non-sequential.

Comparison of discretizable data vs. discrete graph data.

To measure similarity between these structures, researchers use graph kernels. The Marginalized Graph Kernel (MGK) is a particularly robust method that calculates similarity by considering all possible random walks between two graphs. However, its computational cost has historically limited its application to large-scale datasets.

The Computational Challenge of MGK

The MGK requires solving a massive linear system derived from the tensor product of two graphs. For two graphs with $N$ nodes, the resulting matrix is $N^2 \times N^2$. Comparing a dataset of 2,000 molecules requires solving one million such systems, creating a severe bottleneck for traditional CPU-based architectures.

Mathematical and probabilistic interpretation of the marginalized graph kernel.

As shown in the linear algebra interpretation, the kernel $K(G, G')$ involves inversions of matrices containing degree, vertex labels, adjacency, and edge labels. Naive GPU implementations often fail due to memory constraints when attempting to store these massive product matrices directly.

GPU Optimization Strategies

To overcome these hurdles, the researchers developed a specialized solver optimized for NVIDIA's Volta architecture using the Preconditioned Conjugate Gradient (PCG) method. Key innovations include:

  • On-the-Fly Kronecker Products: Instead of precomputing and storing the $N^2 \times N^2$ matrix, the solver regenerates necessary components in real-time. This strategy leverages the high arithmetic throughput of GPUs to save precious memory bandwidth.
  • Partition-Based Reordering (PBR): A novel algorithm that reorders graph nodes to cluster non-zero elements into dense tiles. This improves the efficiency of "on-the-fly" calculations by reducing the total number of blocks the GPU must process.
  • Hierarchical Sparsity Exploitation: The solver uses bitmapped compact storage and prunes empty 8x8 tiles, allowing it to handle sparse real-world graphs with high efficiency.

Performance Evaluation

The solver was evaluated on both synthetic and real-world datasets, including DrugBank (over 10,000 drug molecules) and PDB-3k (protein structures). The results demonstrate a transformative leap in performance:

  • Massive Speedups: The GPU solver is 3 to 4 orders of magnitude faster than popular CPU-based libraries like GraKeL and GraphKernels.
  • Real-World Scalability: For the DrugBank dataset, the solver completed tasks in roughly 172 seconds that were projected to take between 2 and 12.9 days on a CPU.
  • Hardware Efficiency: The tiling-blocking approach achieved over 90% of theoretical peak floating-point performance on certain dense graph operations.

Conclusion

By prioritizing computation over storage and introducing tile-aware graph reordering, this high-throughput solver makes kernel-based machine learning feasible for large-scale graph datasets. Future work aims to integrate these capabilities into mainstream frameworks like PyTorch and extend the "on-the-fly" approach to other tensor-product-based graph algorithms.

Summary updated

BibTeX
@inproceedings{tang2019high,
  author = {Yu-Hang Tang and Oguz Selvitopi and Doru Popovici and Aydin Buluç},
  title = {{A High-Throughput Solver for Marginalized Graph Kernels on GPU}},
  booktitle = {IPDPS},
  year = {2019},
  doi = {10.1109/ipdps47924.2020.00080},
}
Figure