Abstract
Single-linkage hierarchical clustering is a fundamental technique in data mining, yet computing its output—the Single-Linkage Dendrogram (SLD)—remains a significant bottleneck for massive datasets. This paper introduces two novel deterministic parallel algorithms that achieve optimal theoretical work and substantial practical speedups. By utilizing a new divide-and-conquer framework based on an "SLD-Merge" primitive, these algorithms can process billion-scale datasets up to 150x faster than the industry-standard sequential Union-Find approach.
Introduction
Single-linkage hierarchical clustering groups objects based on similarity, producing a binary tree known as a Single-Linkage Dendrogram (SLD). While conceptually straightforward, the computational demands for large-scale data are high. The standard sequential algorithm, SeqUF, utilizes a Union-Find data structure and operates in $O(n \log n)$ time. However, its inherently sequential nature makes it unsuitable for modern multi-core architectures.
Previous parallelization attempts often suffered from work inefficiency—performing significantly more total work than the sequential baseline—or relied on complex randomized techniques that failed to deliver practical performance. This research addresses these gaps by providing deterministic, work-efficient parallel algorithms applicable to general tree structures.
Methodology: The SLD-Merge Framework
The core innovation of this work is a divide-and-conquer framework built upon a new primitive called SLD-Merge. This primitive allows for the merging of two dendrograms derived from subtrees that share a single vertex. The authors identify two primary algorithmic implementations of this framework:
- ParUF (Activation-Based Algorithm): An asynchronous, bottom-up approach that identifies "local minima" edges—those that would be merged by a sequential algorithm before any neighbors—and processes them in parallel. It employs an atomic activation mechanism to manage dependencies without global synchronization.
- RCTT (RC-Tree Tracing Algorithm): This algorithm leverages Parallel Tree Contraction. It constructs a hierarchical decomposition of the input tree (an RC-tree) and "traces" paths to determine when each edge's position in the final dendrogram is fixed. This method avoids the overhead of maintaining complex dynamic data structures during the merge process.
Theoretical Contributions
The proposed algorithms achieve a work bound of $O(n \log h)$, where $h$ is the height of the output dendrogram. This "output-sensitive" complexity matches the comparison-based lower bound. For well-balanced dendrograms where $h = \log n$, the algorithms perform $O(n \log \log n)$ work, significantly less than the standard $O(n \log n)$ approach.
A key structural insight supporting this efficiency is the "Protected" Property. The authors proved that when merging sub-dendrograms, changes only affect specific paths to the root (spines). Most nodes remain "protected," meaning they do not require updates, which directly enables the work-optimal parallelization.
Experimental Evaluation
The algorithms were tested on a diverse set of synthetic and massive real-world datasets, including the Friendster gaming network, Twitter follower graphs, and the BigANN dataset (100 million SIFT descriptors). Testing scaled up to trees with 1 billion vertices.
Key Results:
- Massive Speedups: On billion-scale inputs, RCTT achieved a geometric mean speedup of 16.9x over the optimized SeqUF, with peak performance reaching 132x.
- Peak Performance: ParUF demonstrated even higher potential speedups, reaching up to 150x, though it showed sensitivity to adversarial, low-parallelism inputs.
- Scalability: The algorithms can compute the dendrogram for a billion-node tree in approximately 10 seconds on a 96-core machine.
- Robustness: RCTT proved to be the most consistent performer, outperforming SeqUF across all tested scales and tree topologies.
Conclusion and Future Work
This research demonstrates that many large-scale clustering problems possess high latent parallelism that traditional sequential algorithms cannot exploit. While the current algorithms are work-optimal, future research may focus on improving the "depth" of these algorithms to reach polylogarithmic bounds in all models. Additionally, extending the SLD-Merge framework to dynamic settings—where edges are frequently added or removed—presents a promising avenue for real-time hierarchical clustering applications.
Summary updated