KNN-DBSCAN: a DBSCAN in high dimensions

Youguang Chen,William Ruys,George Biros
2024-09-11
Abstract:Clustering is a fundamental task in machine learning. One of the most successful and broadly used algorithms is DBSCAN, a density-based clustering algorithm. DBSCAN requires $\epsilon$-nearest neighbor graphs of the input dataset, which are computed with range-search algorithms and spatial data structures like KD-trees. Despite many efforts to design scalable implementations for DBSCAN, existing work is limited to low-dimensional datasets, as constructing $\epsilon$-nearest neighbor graphs is expensive in high-dimensions. In this paper, we modify DBSCAN to enable use of $\kappa$-nearest neighbor graphs of the input dataset. The $\kappa$-nearest neighbor graphs are constructed using approximate algorithms based on randomized projections. Although these algorithms can become inaccurate or expensive in high-dimensions, they possess a much lower memory overhead than constructing $\epsilon$-nearest neighbor graphs. We delineate the conditions under which $k$NN-DBSCAN produces the same clustering as DBSCAN. We also present an efficient parallel implementation of the overall algorithm using OpenMP for shared memory and MPI for distributed memory parallelism. We present results on up to 16 billion points in 20 dimensions, and perform weak and strong scaling studies using synthetic data. Our code is efficient in both low and high dimensions. We can cluster one billion points in 3D in less than one second on 28K cores on the Frontera system at the Texas Advanced Computing Center (TACC). In our largest run, we cluster 65 billion points in 20 dimensions in less than 40 seconds using 114,688 x86 cores on TACC's Frontera system. Also, we compare with a state of the art parallel DBSCAN code; on 20d/4M point dataset, our code is up to 37$\times$ faster.
Distributed, Parallel, and Cluster Computing
What problem does this paper attempt to address?
### Problems the Paper Attempts to Solve The paper attempts to address the scalability and efficiency issues of DBSCAN (Density-Based Spatial Clustering of Applications with Noise) on high-dimensional datasets. Specifically, while existing DBSCAN implementations perform well on low-dimensional datasets, they face the following major issues when dealing with high-dimensional data: 1. **Scalability Limitations**: - Constructing the 系-nearest neighbor graph (系-NNG) in high-dimensional space is very expensive, with complexity potentially reaching O(饾憫饾憶虏), where 饾憫 is the dimensionality of the dataset and 饾憶 is the number of data points. - The 系-NNG structure in high-dimensional data is more sensitive to changes in the 系 parameter, leading to a decline in algorithm performance. 2. **Inefficiency in Parameter Tuning**: - Existing parallel DBSCAN algorithms need to restart the algorithm and perform range queries from scratch when adjusting the input parameters 系 and minPts, which is very time-consuming on large-scale datasets. - Selecting appropriate parameters typically requires multiple runs of the algorithm, but current methods do not support efficient parameter tuning. To address these issues, the paper proposes a new density clustering algorithm鈥攌NN-DBSCAN. This algorithm uses the k-nearest neighbor graph (k-NNG) to improve efficiency and achieve good scalability on high-dimensional datasets. The specific contributions include: - **Proposing the kNN-DBSCAN Algorithm**: This algorithm improves efficiency and scalability on high-dimensional data by using k-NNG instead of 系-NNG. - **Theoretical Proof**: It is proven that kNN-DBSCAN can produce the same results as DBSCAN when using the same input parameters. - **Parallel Implementation**: A hybrid MPI/OpenMP parallel implementation is proposed, using Boruvka's algorithm to construct the minimum spanning tree (MST) and achieving an efficient approximate MST method on distributed memory architectures. - **Experimental Validation**: Experiments demonstrate the superior performance of kNN-DBSCAN on large-scale datasets, especially on high-dimensional datasets, where it is over 37 times faster than existing parallel DBSCAN algorithms. In summary, the paper aims to solve the scalability and parameter tuning efficiency issues of existing DBSCAN on high-dimensional datasets by introducing the kNN-DBSCAN algorithm, providing an efficient and reliable solution for clustering analysis of large-scale data.