Scalable Density-based Clustering with Random Projections

Haochuan Xu, Ninh Pham · DOI

Introduction

Density-based clustering algorithms, such as DBSCAN and OPTICS, are highly valued for their capacity to identify clusters of arbitrary shapes and handle noise without requiring the number of clusters as an input parameter. Despite these advantages, their primary limitation is scalability. As datasets expand into millions of points, the quadratic time complexity ($O(n^2)$) of finding $\epsilon$-neighborhoods becomes a significant barrier to practical application.

In their recent work, Haochuan Xu and Ninh Pham propose sDBSCAN and sOPTICS, scalable variants of these classic algorithms. By utilizing the properties of random projections and extreme order statistics, these methods achieve massive speedups, enabling the clustering of high-dimensional, million-point datasets on standard hardware in minutes rather than hours.

The Neighborhood Search Bottleneck

The core computational challenge in DBSCAN is the $\epsilon$-neighborhood search: identifying all points within a distance $\epsilon$ for every point in the dataset. While spatial indexing structures like KD-trees can mitigate this in low-dimensional spaces, they suffer from the "curse of dimensionality" in high-dimensional contexts, often reverting to inefficient linear scans.

Furthermore, the OPTICS algorithm, which generates reachability plots to help users select appropriate clustering parameters, is even more resource-intensive than DBSCAN. This makes interactive data exploration nearly impossible for large-scale datasets using traditional implementations, which often crash or take hours to process millions of points.

Methodology: Random Projections and Extreme Order Statistics

The authors address the search bottleneck by approximating $\epsilon$-neighborhoods using random projections. The approach relies on two key innovations:

  1. Extreme Order Statistics: The method leverages the property that points with extremely high or low projection values on a specific random vector are highly likely to be close in cosine distance. By focusing on these "high-quality" candidates, sDBSCAN reduces the search space from $O(n)$ to a small constant per point.
  2. Kernel Features: To extend the method beyond cosine distance, the authors employ Random Fourier Features. This technique embeds data into a space where cosine distance approximates other metrics, such as L1, L2, $\chi^2$, and Jensen-Shannon distances.

Visual Fidelity and Performance

A critical requirement for any approximate clustering algorithm is maintaining the structural integrity of the results. sOPTICS succeeds in this by producing reachability plots that are visually nearly identical to those generated by the standard OPTICS algorithm.

Comparison of reachability plots for standard OPTICS (blue) and sOPTICS (red) across L1 and L2 metrics.

As shown in the reachability plots above, sOPTICS (red) accurately captures the "valleys" that represent clusters, mirroring the output of the original OPTICS (blue). However, the performance difference is stark: on the Mnist dataset, sOPTICS achieved a 180x speedup over standard scikit-learn implementations, completing in under 30 seconds compared to 1.5 hours.

Experimental Results and Scalability

The proposed methods were evaluated on several benchmarks, including Mnist (70,000 points), Pamap2 (1.7 million points), and Mnist8m (8.1 million points).

  • Scalability: sDBSCAN successfully clustered the 8.1 million points of Mnist8m in just 15 minutes on a single 32-core machine—a task that typically causes standard implementations to fail due to memory or time constraints.
  • Accuracy: Measured by Normalized Mutual Information (NMI), sDBSCAN consistently matched or exceeded the accuracy of other state-of-the-art approximate methods like DBSCAN++.

Conclusion

sDBSCAN and sOPTICS provide a robust and efficient framework for density-based clustering at scale. By replacing exact neighborhood searches with high-quality approximations derived from random projections, the authors have made these powerful clustering tools accessible for modern, large-scale data analysis without the need for specialized high-performance computing clusters.

Summary updated

BibTeX
@misc{xu2024scalable,
  author = {Haochuan Xu and Ninh Pham},
  title = {{Scalable Density-based Clustering with Random Projections}},
  year = {2024},
  eprint = {2402.15679},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.15679},
}
Figure