Table of Contents
Fetching ...

DAWN: Matrix Operation-Optimized Algorithm for Shortest Paths Problem on Unweighted Graphs

Yelai Feng, Huaixi Wang, Yining Zhu, Xiandong Liu, Hongyi Lu, Qing Liu

TL;DR

DAWN introduces a matrix operation-optimized algorithm for unweighted SSSP and APSP that leverages Boolean vector-matrix operations, specifically BOVM and SOVM, to dramatically reduce computation and memory compared with traditional BFS and prior matrix-based methods. It achieves $O(E_{wcc}(i))$ time for SSSP and $O(S_{wcc} \cdot E_{wcc})$ time for APSP with $O(m)$ space, and demonstrates strong empirical gains over GAP ($3.769\times$) and Gunrock ($9.410\times$) across a diverse benchmark set, while maintaining lower GPU memory usage. The approach emphasizes high parallelism and scalability, validated on GPUs and CPUs across large graphs, and shows particular strength on sparse, large weakly connected components. The work suggests broad practical impact for fast graph analytics and lays groundwork for extending to weighted graphs using min-plus operations.

Abstract

The shortest paths problem is a fundamental challenge in graph theory, with a broad range of potential applications. The algorithms based on matrix multiplication exhibits excellent parallelism and scalability, but is constrained by high memory consumption and algorithmic complexity. Traditional shortest paths algorithms are limited by priority queues, such as BFS and Dijkstra algorithm, making the improvement of their parallelism a focal issue. We propose a matrix operation-optimized algorithm, which offers improved parallelism, reduced time complexity, and lower memory consumption. The novel algorithm requires $O(E_{wcc}(i))$ and $O(S_{wcc} \cdot E_{wcc})$ times for single-source and all-pairs shortest paths problems, respectively, where $S_{wcc}$ and $E_{wcc}$ denote the number of nodes and edges included in the largest weakly connected component in graph. To evaluate the effectiveness of the novel algorithm, we tested it using graphs from SuiteSparse Matrix Collection and Gunrock benchmark dataset. Our algorithm outperformed the BFS implementations from Gunrock and GAP (the previous state-of-the-art solution), achieving an average speedup of 3.769$\times$ and 9.410$\times$, respectively.

DAWN: Matrix Operation-Optimized Algorithm for Shortest Paths Problem on Unweighted Graphs

TL;DR

DAWN introduces a matrix operation-optimized algorithm for unweighted SSSP and APSP that leverages Boolean vector-matrix operations, specifically BOVM and SOVM, to dramatically reduce computation and memory compared with traditional BFS and prior matrix-based methods. It achieves time for SSSP and time for APSP with space, and demonstrates strong empirical gains over GAP () and Gunrock () across a diverse benchmark set, while maintaining lower GPU memory usage. The approach emphasizes high parallelism and scalability, validated on GPUs and CPUs across large graphs, and shows particular strength on sparse, large weakly connected components. The work suggests broad practical impact for fast graph analytics and lays groundwork for extending to weighted graphs using min-plus operations.

Abstract

The shortest paths problem is a fundamental challenge in graph theory, with a broad range of potential applications. The algorithms based on matrix multiplication exhibits excellent parallelism and scalability, but is constrained by high memory consumption and algorithmic complexity. Traditional shortest paths algorithms are limited by priority queues, such as BFS and Dijkstra algorithm, making the improvement of their parallelism a focal issue. We propose a matrix operation-optimized algorithm, which offers improved parallelism, reduced time complexity, and lower memory consumption. The novel algorithm requires and times for single-source and all-pairs shortest paths problems, respectively, where and denote the number of nodes and edges included in the largest weakly connected component in graph. To evaluate the effectiveness of the novel algorithm, we tested it using graphs from SuiteSparse Matrix Collection and Gunrock benchmark dataset. Our algorithm outperformed the BFS implementations from Gunrock and GAP (the previous state-of-the-art solution), achieving an average speedup of 3.769 and 9.410, respectively.
Paper Structure (18 sections, 2 theorems, 12 equations, 7 figures, 8 tables, 3 algorithms)

This paper contains 18 sections, 2 theorems, 12 equations, 7 figures, 8 tables, 3 algorithms.

Key Result

lemma 1

harary1965structural In the matrix $A^{k} = (a_{i,j}^{(k)})_{n\times n}$, the element $a_{i,j}^{(k)}$ represents the number of paths with length $k$ from $v_i$ to $v_j$.

Figures (7)

  • Figure 1: Example for the Shortest Paths Discovery in the Boolean Matrix
  • Figure 2: Example for the BFS and DAWN Processing, Left is the BFS and Right is the DAWN
  • Figure 3: Speedup for DAWN based on SOVM in various threads (baseline 1 thread), with Intel Core i5-13600KF baseline of 1 thread
  • Figure 4: Speedup for DAWN based on SOVM in various threads (baseline 4 threads), with AMD EPYC Milan 7T83
  • Figure 5: Running time for the DAWN based on the SOVM and BFS API from GAP with an I5-13600KF
  • ...and 2 more figures

Theorems & Definitions (2)

  • lemma 1
  • theorem 1