Faster Parallel Exact Density Peaks Clustering

Yihao Huang, Shangdi Yu, Julian Shun · DOI

Introduction

Clustering is a fundamental task in data science, essential for discovering patterns in datasets across various domains. Among the diverse array of clustering techniques, Density Peaks Clustering (DPC) has emerged as a particularly powerful method. DPC is prized for its ability to identify clusters of arbitrary shapes and varying densities by locating "peaks"—points with high local density—and assigning other points to the same cluster as their nearest neighbor with a higher density.

Despite its effectiveness, DPC faces a significant computational hurdle. For every point in a dataset, the algorithm must identify its "dependent point": the closest neighbor that possesses a higher local density. A naive implementation of this search requires $O(n^2)$ time, which is prohibitive for large-scale data. While previous research utilized kd-trees to optimize this process, these implementations were often sequential or lacked sufficient parallelism (high "span"), rendering them impractical for modern high-performance computing environments. This paper addresses these limitations by introducing highly efficient parallel algorithms that achieve polylogarithmic span while remaining work-efficient.

Methodology

The authors propose two primary parallel algorithms designed to solve the dependent point finding task without sacrificing exactness.

1. Priority Search kd-tree

The flagship contribution of this work is the Priority Search kd-tree. This structure augments a standard kd-tree by storing the maximum density value found within each subtree at its internal nodes, effectively incorporating a heap property into the spatial tree. When searching for a denser neighbor, the algorithm can prune entire branches if the "max density" of a branch is lower than the density of the query point. This allows all points to query the tree in parallel with a worst-case span of $O(\log n \log \log n)$.

2. Fenwick Tree-based DPC

As an alternative, the authors developed a Fenwick Tree-based approach. This method nests multiple kd-trees within a Fenwick tree structure, partitioning points by density ranges. While this approach has a slightly higher average-case work complexity than the priority search tree, it is robust and relies on fewer assumptions regarding data distribution to maintain its efficiency.

3. Parallelized Density and Clustering

Beyond the dependent point search, the authors parallelized the entire DPC pipeline. This includes the initial density counting step, which utilizes kd-tree pruning, and the final clustering assignment step, which employs a lock-free parallel union-find data structure to ensure high throughput on multi-core systems.

Experimental Evaluation

The algorithms were evaluated on a 30-core machine (60 threads) using a diverse set of synthetic and real-world datasets, including GPS trajectories (GeoLife), physical activity monitoring (PAMAP2), and location-based social networks (Gowalla).

Key Results

  • Massive Speedups: The primary algorithm, DPC-PRIORITY, achieved speedups ranging from 10.8x to 13,169x over the previous state-of-the-art exact parallel implementation (DPC-EXACT-BASELINE).
  • Surpassing Approximations: Traditionally, speed in DPC is gained by approximating distances or densities. However, this new exact algorithm proved to be 1.5x to 4,206x faster than the leading approximate parallel DPC algorithms.
  • Scalability: The implementation demonstrated excellent self-relative speedup (up to 13.2x on 30 cores), proving that the sequential bottlenecks inherent in traditional DPC have been effectively mitigated.

Discussion and Insights

The core insight of this research is that the dependent point search is essentially a Nearest Neighbor search with a conditional density constraint. By encoding this constraint directly into the data structure via the Priority Search kd-tree, the algorithm can skip vast portions of the search space that are mathematically guaranteed not to contain a valid candidate. This proves that researchers do not need to sacrifice exactness for performance; with optimized data structures, exact DPC can outperform approximate variants.

Limitations and Future Work

While highly effective, the kd-tree-based methods are subject to the "curse of dimensionality," where performance may degrade as the number of dimensions increases (though the authors successfully tested up to 8 dimensions). Additionally, the current implementation is optimized for shared-memory systems. Future research could explore distributed-memory versions of these priority search structures to handle datasets that exceed the capacity of a single machine.

Conclusion

By introducing the Priority Search kd-tree and parallelizing the DPC pipeline, this work provides a theoretically sound and practically superior framework for density-based clustering. The dramatic speedups achieved enable exact DPC to be applied to massive datasets that were previously only reachable via approximation, setting a new standard for parallel clustering performance.

Summary updated

BibTeX
@inproceedings{huang2023faster,
  author = {Yihao Huang and Shangdi Yu and Julian Shun},
  title = {{Faster Parallel Exact Density Peaks Clustering}},
  booktitle = {ACDA},
  year = {2023},
  doi = {10.1137/1.9781611977714.5},
}
Figure