PECANN: Parallel Efficient Clustering with Graph-Based Approximate Nearest Neighbor Search

Shangdi Yu, Joshua Engels, Yihao Huang, Julian Shun

TL;DR

This paper introduces PECANN, a novel parallel framework for density-based clustering (specifically Density Peaks Clustering - DPC) that efficiently handles large, high-dimensional datasets. By integrating graph-based Approximate Nearest Neighbor Search (ANNS), PECANN achieves significant speedups (up to 734x) over existing state-of-the-art methods while maintaining competitive clustering quality.

What Problem Does This Paper Address?

Clustering is a fundamental task in data analysis, and density-based methods like Density Peaks Clustering (DPC) are powerful for discovering clusters of arbitrary shapes. However, existing DPC algorithms struggle with the massive, high-dimensional datasets common in modern applications. They are often sequential, making them too slow, or are optimized for low-dimensional data, failing to scale effectively. This paper aims to bridge this gap by providing a parallel, efficient, and scalable framework for DPC variants that can handle high-dimensional data.

Methods

The core contribution is the PECANN framework, which unifies various DPC variants by abstracting common algorithmic steps. The key innovation lies in using graph-based Approximate Nearest Neighbor Search (ANNS) for efficiently finding nearest neighbors that satisfy specific density predicates, a crucial step in DPC. PECANN employs a "doubling search" technique to find approximate nearest neighbors with higher densities in a logarithmic number of rounds, enabling significant parallelism. The framework is modular, allowing different ANNS algorithms (like VAMANA, PYNNDescent, HCNNG) and density functions to be plugged in. For cluster formation, PECANN utilizes a concurrent union-find data structure for efficient parallel merging of points into clusters.

Datasets

The authors evaluated PECANN on a variety of datasets:

  • Synthetic: A Gaussian mixture dataset with varying dimensions and numbers of clusters.
  • Real-world:
    • MNIST (handwritten digits)
    • ImageNet (image embeddings from a ConvNet)
    • birds (image embeddings from a ConvNet)
    • reddit (text embeddings)
    • arxiv (text embeddings)

These datasets range in size up to 1.28 million points and 1024 dimensions, pushing the boundaries of existing DPC methods.

Key Insights and Ideas

  • ANNS is Key for High-Dimensional DPC: The paper demonstrates that leveraging graph-based ANNS is crucial for making DPC scalable to high-dimensional data, overcoming the limitations of traditional spatial indexing structures like kd-trees.
  • Parallelism is Essential: By designing PECANN with parallelism in mind, the authors achieve dramatic speedups, making DPC practical for large-scale applications.
  • Unified Framework Benefits Research: Abstracting DPC into a modular framework like PECANN facilitates easier comparison and experimentation with different DPC variants and ANNS algorithms.
  • "Doubling Search" for Density Predicates: This technique efficiently finds approximate higher-density neighbors, a critical bottleneck in DPC, by iteratively expanding the search radius.

Key Results

  • Massive Speedups: PECANN achieved speedups of 45x-734x compared to the state-of-the-art sequential FASTDP algorithm for high-dimensional DPC, while maintaining competitive ARI scores. Compared to a low-dimensional parallel DPC algorithm, PECANN was two orders of magnitude faster.
  • Scalability: The framework demonstrated good parallel scalability, achieving an average of 14.36x speedup on one NUMA node and 16.57x on two NUMA nodes with increasing hyper-threads.
  • Competitive Accuracy: PECANN achieved ARI scores comparable to or better than existing methods, particularly on datasets with complex cluster shapes where geometric methods like k-means struggle.
  • Robustness to Cluster Number: PECANN showed more robustness than k-means when the number of clusters provided to the algorithm differed from the ground truth.

Limitations and Future Work

  • Approximation Guarantees: While PECANN provides theoretical analysis for density estimation and dependent point estimation, the exact approximation bounds for density peaks are limited to cases without conflicts between density intervals.
  • Noise Function: The paper currently implements only one common noise function, suggesting that supporting alternative noise definitions could be a future direction.
  • Parameter Tuning: Like most clustering algorithms, PECANN's performance can be sensitive to parameter choices, although the paper explores some of these trade-offs.
  • Future Work: The authors suggest exploring other density functions, center functions, and ANNS algorithms within the PECANN framework. They also highlight the potential for further research into dynamic DPC algorithms and more theoretical analysis of approximation guarantees.

Summary updated

BibTeX
@inproceedings{yu2025pecann,
  author = {Shangdi Yu and Joshua Engels and Yihao Huang and Julian Shun},
  title = {{PECANN: Parallel Efficient Clustering with Graph-Based Approximate Nearest Neighbor Search}},
  booktitle = {ACDA},
  year = {2025},
  doi = {10.1137/1.9781611978759.1},
}
Figure