arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.19019cs.DScs.DC
收藏

树状图计算与单链接聚类的最优并行算法

Optimal Parallel Algorithms for Dendrogram Computation and Single-Linkage Clustering

Laxman Dhulipala, Xiaojun Dong, Kishen N Gowda, Yan Gu

AI总结:

本文基于 SLD 新结构性质与分治框架,提出两种确定性并行算法,在十亿规模树上实现高效计算,并较 Union-Find 最高加速150倍。

摘要:

计算单链接树状图(Single-Linkage Dendrogram,SLD)是经典单链接层次聚类算法中的关键步骤。给定输入边加权树 $T$,$T$ 的 SLD 是一个二叉树状图,它总结了按权重顺序收缩 $T$ 的边所得到的 $n-1$ 个聚类,其中 $n=|T|$。现有计算 SLD 的算法都需要 $\Omega(n\log n)$ 的工作量。此外,据我们所知,此前没有任何工作为该问题提供可获得非平凡加速比的并行算法。在本文中,我们基于关于 SLD 的新结构结果,设计了在理论和实践上都更快的 SLD 计算并行算法。具体而言,我们基于并行树收缩得到了一种确定性的输出敏感并行算法,该算法需要 $O(n\log h)$ 的工作量和 $O(\log^2 n\log^2 h)$ 的深度,其中 $h$ 是输出 SLD 的高度。我们还受用于层次凝聚聚类的最近邻链算法启发,给出了一种用于该问题的确定性自底向上算法,并证明它实现 $O(n\log h)$ 的工作量和 $O(h\log n)$ 的深度。我们的结果基于一种用于构建 SLD 的新型分治框架,该框架受 Cartesian 树(笛卡尔树)分治算法启发。我们的新算法能够在十亿规模的树上快速计算 SLD,并且相对于实践中通常用于计算 SLD 的高效 Union-Find(并查集)算法,最高获得 150 倍的加速比。

英文摘要:

Computing a Single-Linkage Dendrogram (SLD) is a key step in the classic single-linkage hierarchical clustering algorithm. Given an input edge-weighted tree $T$, the SLD of $T$ is a binary dendrogram that summarizes the $n-1$ clusterings obtained by contracting the edges of $T$ in order of weight. Existing algorithms for computing the SLD all require $Ω(n\log n)$ work where $n = |T|$. Furthermore, to the best of our knowledge no prior work provides a parallel algorithm obtaining non-trivial speedup for this problem. In this paper, we design faster parallel algorithms for computing SLDs both in theory and in practice based on new structural results about SLDs. In particular, we obtain a deterministic output-sensitive parallel algorithm based on parallel tree contraction that requires $O(n \log h)$ work and $O(\log^2 n \log^2 h)$ depth, where $h$ is the height of the output SLD. We also give a deterministic bottom-up algorithm for the problem inspired by the nearest-neighbor chain algorithm for hierarchical agglomerative clustering, and show that it achieves $O(n\log h)$ work and $O(h \log n)$ depth. Our results are based on a novel divide-and-conquer framework for building SLDs, inspired by divide-and-conquer algorithms for Cartesian trees. Our new algorithms can quickly compute the SLD on billion-scale trees, and obtain up to 150x speedup over the highly-efficient Union-Find algorithm typically used to compute SLDs in practice.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑