稀疏图的最优代数宽度优先搜索
Optimal algebraic Breadth-First Search for sparse graphs
摘要:
由于GraphBLAS库和其他稀疏矩阵方法的发展,用于图形算法的代数方法的流行程度有所提高。这些方法的一个范例是广度优先搜索(BFS)。代数BFS算法是矩阵-向量乘法与$n \times n$邻接矩阵的简单递归,但非零上的许多冗余操作最终导致次优性能。因此,一个最佳的代数BFS应该是非常感兴趣的,特别是如果它很容易与现有的矩阵方法集成。当前的方法,特别是在GraphBLAS中,使用稀疏矩阵屏蔽稀疏向量(SpMmSpV)乘法,其中输入向量在BFS的每个步骤中保持稀疏表示,并且向量中的非零在后续步骤中被屏蔽。这是GraphBLAS和其他库最近研究的一个领域。虽然在理论上,这些掩蔽方法在稀疏图上是渐进最优的,但许多方法增加了导致次优运行时间的工作。我们给出了一个新的最优,代数BFS稀疏图,从而关闭了文献中的空白。我们的方法在每一步都乘以邻接矩阵的较小子矩阵。令$n$和$m$分别表示顶点和边的数量。在稀疏图上,我们的方法需要$O(n)$代数运算,而不是理论上最优稀疏矩阵方法所需的$O(m)$运算。因此,对于稀疏图,它与最著名的顺序算法的边界相匹配,并且在并行随机存取机(PRAM)上,它是工作最优的。我们的结果适用于有向图和无向图。与领先的GraphBLAS库相比,我们的方法实现了高达24倍的顺序时间快,对于并行计算,它可以在大型图上快17倍,在大直径图上快12倍。
英文摘要:
There has been a rise in the popularity of algebraic methods for graph algorithms given the development of the GraphBLAS library and other sparse matrix methods. An exemplar for these approaches is Breadth-First Search (BFS). The algebraic BFS algorithm is simply a recurrence of matrix-vector multiplications with the $n \times n$ adjacency matrix, but the many redundant operations over nonzeros ultimately lead to suboptimal performance. Therefore an optimal algebraic BFS should be of keen interest especially if it is easily integrated with existing matrix methods. Current methods, notably in the GraphBLAS, use a Sparse Matrix masked-Sparse Vector (SpMmSpV) multiplication in which the input vector is kept in a sparse representation in each step of the BFS, and nonzeros in the vector are masked in subsequent steps. This has been an area of recent research in GraphBLAS and other libraries. While in theory these masking methods are asymptotically optimal on sparse graphs, many add work that leads to suboptimal runtime. We give a new optimal, algebraic BFS for sparse graphs, thus closing a gap in the literature. Our method multiplies progressively smaller submatrices of the adjacency matrix at each step. Let $n$ and $m$ refer to the number of vertices and edges, respectively. On a sparse graph, our method takes $O(n)$ algebraic operations as opposed to $O(m)$ operations needed by theoretically optimal sparse matrix approaches. Thus for sparse graphs it matches the bounds of the best-known sequential algorithm and on a Parallel Random Access Machine (PRAM) it is work-optimal. Our result holds for both directed and undirected graphs. Compared to a leading GraphBLAS library our method achieves up to 24x faster sequential time and for parallel computation it can be 17x faster on large graphs and 12x faster on large-diameter graphs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。