# ParChain: A Framework for Parallel Hierarchical Agglomerative Clustering using Nearest-Neighbor Chain

arXiv: https://arxiv.org/abs/2106.04727 · HTML: https://mlsanity.com/paper/2106.04727/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 8 of its 73 references that are in the map.
- First posted on arXiv 8 Jun 2021.

## Builds on (most cited first, 8 of 8)

- [A cost function for similarity-based hierarchical clustering](https://mlsanity.com/paper/1510.05043/) (2015)
- [Hierarchical Clustering: Objective Functions and Algorithms](https://mlsanity.com/paper/1704.02147/) (2017)
- [Scaling Hierarchical Agglomerative Clustering to Billion-sized Datasets](https://mlsanity.com/paper/2105.11653/) (2021)
- [Fast Parallel Algorithms for Euclidean Minimum Spanning Tree and Hierarchical Spatial Clustering](https://mlsanity.com/paper/2104.01126/) (2021)
- [Scalable Hierarchical Clustering with Tree Grafting](https://mlsanity.com/paper/2001.00076/) (2019)
- [Tree-Independent Dual-Tree Algorithms](https://mlsanity.com/paper/1304.4327/) (2013)
- [Plug-and-play dual-tree algorithm runtime analysis](https://mlsanity.com/paper/1501.05222/) (2015)
- [ConnectIt: A Framework for Static and Incremental Parallel Graph Connectivity Algorithms](https://mlsanity.com/paper/2008.03909/) (2020)

## Built on by (most cited first, 1 of 1)

- [On the cohesion and separability of average-link for hierarchical agglomerative clustering](https://mlsanity.com/paper/2411.05097/) (2024)

## Abstract (arXiv)

This paper studies the hierarchical clustering problem, where the goal is to produce a dendrogram that represents clusters at varying scales of a data set. We propose the ParChain framework for designing parallel hierarchical agglomerative clustering (HAC) algorithms, and using the framework we obtain novel parallel algorithms for the complete linkage, average linkage, and Ward's linkage criteria. Compared to most previous parallel HAC algorithms, which require quadratic memory, our new algorithms require only linear memory, and are scalable to large data sets. ParChain is based on our parallelization of the nearest-neighbor chain algorithm, and enables multiple clusters to be merged on every round. We introduce two key optimizations that are critical for efficiency: a range query optimization that reduces the number of distance computations required when finding nearest neighbors of clusters, and a caching optimization that stores a subset of previously computed distances, which are likely to be reused. Experimentally, we show that our highly-optimized implementations using 48 cores with two-way hyper-threading achieve 5.8--110.1x speedup over state-of-the-art parallel HAC algorithms and achieve 13.75--54.23x self-relative speedup. Compared to state-of-the-art algorithms, our algorithms require up to 237.3x less space. Our algorithms are able to scale to data set sizes with tens of millions of points, which existing algorithms are not able to handle.
