[论文解读] Hierarchical Agglomerative Graph Clustering in Nearly-Linear Time
本文提出了一种用于边加权图的分层聚合聚类(HAC)的新型算法框架,通过利用动态低出度图定向和模块化的邻接堆数据结构,实现了近乎线性时间复杂度。该方法首次实现了完整链接和WPGMA链接的精确$\tilde{O}(m)$时间算法,以及首次实现了平均链接的亚二次方$\tilde{O}(n\bar{\beta})$时间精确算法,并提供了互补的$\tilde{O}(m)$时间$\epsilon$-近似算法,使大规模数据集上的运行速度最高提升了76.5倍,同时保持了聚类质量。
We study the widely used hierarchical agglomerative clustering (HAC) algorithm on edge-weighted graphs. We define an algorithmic framework for hierarchical agglomerative graph clustering that provides the first efficient $ ilde{O}(m)$ time exact algorithms for classic linkage measures, such as complete- and WPGMA-linkage, as well as other measures. Furthermore, for average-linkage, arguably the most popular variant of HAC, we provide an algorithm that runs in $ ilde{O}(n\sqrt{m})$ time. For this variant, this is the first exact algorithm that runs in subquadratic time, as long as $m=n^{2-ε}$ for some constant $ε> 0$. We complement this result with a simple $ε$-close approximation algorithm for average-linkage in our framework that runs in $ ilde{O}(m)$ time. As an application of our algorithms, we consider clustering points in a metric space by first using $k$-NN to generate a graph from the point set, and then running our algorithms on the resulting weighted graph. We validate the performance of our algorithms on publicly available datasets, and show that our approach can speed up clustering of point datasets by a factor of 20.7--76.5x.
研究动机与目标
- 为解决传统$O(n^2)$ HAC算法在真实数据中仅有$o(n^2)$相似度非零时的低效问题。
- 设计一种通用的算法框架,实现在稀疏边加权图上的高效、精确和近似HAC。
- 实现广泛使用的链接度量(尤其是此前缺乏此类算法的平均链接)的亚二次方或近乎线性时间复杂度。
- 通过$k$-NN图在真实世界点数据集上验证所提算法在实际可扩展性和聚类质量方面的表现。
提出的方法
- 该框架使用邻接堆数据结构模块化核心HAC操作,实现对图边的高效优先队列操作。
- 对于平均链接,该算法动态维护图的低出度定向,确保最大出度为$O(\alpha)$,其中$\alpha$是图的树环度。
- 精确算法的时间复杂度为$\tilde{O}(n\bar{\alpha})$,其中$\bar{\alpha}$为所有收缩步骤中的最大树环度,由于$\alpha = O(\sqrt{m})$,因此可达到$\tilde{O}(n\sqrt{m})$的时间复杂度。
- 平均链接的近似算法通过基于采样的方法维护$\epsilon$-接近的链接值,实现$\tilde{O}(m)$时间复杂度。
- 该方法适用于从度量空间点集构建的$k$-NN图,将聚类流程转化为基于图的HAC工作流。
- 该框架假设未定义的相似度为$\bot$(完整链接/WPGMA)或零(平均链接),并使用边加权图表示,避免存储完整的$n \times n$相似度矩阵。
实验结果
研究问题
- RQ1我们能否设计一种在仅有$o(n^2)$相似度非零时,运行时间亚二次方的精确平均链接HAC算法?
- RQ2在稀疏图环境下,能否实现经典链接度量(如完整链接和WPGMA链接)的近乎线性时间复杂度?
- RQ3能否设计一种平均链接的近似HAC算法,使其运行时间在$\tilde{O}(m)$内,同时保持聚类质量?
- RQ4所提出的框架能否在大规模数据集(如60k+个点)上实现显著的端到端加速,相比标准$O(n^2)$实现?
主要发现
- 精确的平均链接HAC算法运行时间为$\tilde{O}(n\sqrt{m})$,当$m = n^{2-\epsilon}$时为亚二次方,是该度量的首个此类精确算法。
- 该框架实现了完整链接和WPGMA链接的$\tilde{O}(m)$时间精确算法,显著优于标准的$O(n^2)$复杂度。
- 在Fashion-MNIST数据集(60,000个点)上,基于图的方法相比sklearn的$O(n^2)$基于度量的HAC实现了20.7倍的端到端加速。
- 在Last.fm数据集(292,385个点)上,近似平均链接算法实现了76.5倍的加速,外推估计表明在完整数据集上可实现200至500倍的加速。
- 近似算法和简单精确算法生成的聚类质量与精确的sklearn基线相比差距在1%以内,精确算法在平均ARI上高1.8%,NMI上高0.5%。
- 该算法的内存使用量约为$56m + O(n)$字节,可在256GB内存机器上处理包含数十亿个顶点和20至30亿条边的图。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。