[Paper Review] Faster DBSCAN via subsampled similarity queries
This paper proposes SNG-DBSCAN, a faster variant of DBSCAN that subsamples edges in the epsilon-neighborhood graph while preserving cluster structure. By sampling only O(log n / n) of the edges and relying solely on similarity queries, it achieves O(n log n) runtime and up to 200x speedup with 250x less RAM on large datasets, maintaining competitive clustering quality under theoretical consistency guarantees.
DBSCAN is a popular density-based clustering algorithm. It computes the $ε$-neighborhood graph of a dataset and uses the connected components of the high-degree nodes to decide the clusters. However, the full neighborhood graph may be too costly to compute with a worst-case complexity of $O(n^2)$. In this paper, we propose a simple variant called SNG-DBSCAN, which clusters based on a subsampled $ε$-neighborhood graph, only requires access to similarity queries for pairs of points and in particular avoids any complex data structures which need the embeddings of the data points themselves. The runtime of the procedure is $O(sn^2)$, where $s$ is the sampling rate. We show under some natural theoretical assumptions that $s \approx \log n/n$ is sufficient for statistical cluster recovery guarantees leading to an $O(n\log n)$ complexity. We provide an extensive experimental analysis showing that on large datasets, one can subsample as little as $0.1\%$ of the neighborhood graph, leading to as much as over 200x speedup and 250x reduction in RAM consumption compared to scikit-learn's implementation of DBSCAN, while still maintaining competitive clustering performance.
Motivation & Objective
- To address the high computational cost of DBSCAN, which scales quadratically with dataset size due to full neighborhood graph computation.
- To enable scalable density-based clustering on large datasets where standard DBSCAN fails due to memory or time constraints.
- To develop a method that avoids complex data structures and works with arbitrary similarity functions, not just specific distance metrics.
- To provide theoretical guarantees on cluster recovery under natural assumptions about data density and cluster separation.
- To empirically validate that subsampling as little as 0.1% of the neighborhood graph maintains competitive clustering performance.
Proposed method
- SNG-DBSCAN constructs a subsampled epsilon-neighborhood graph by uniformly sampling edges from the full neighborhood graph.
- The method relies only on similarity queries between random point pairs to determine if an edge should be included (i.e., if distance ≤ ε).
- It uses a theoretical result from Karger (1995) showing that O(log n / n) edge sampling preserves connected components of high-degree nodes (core points) with high probability.
- The algorithm processes the subsampled graph to extract connected components, forming the final clusters.
- It avoids space-partitioning data structures like KD-trees, making it compatible with any similarity function.
- The overall complexity is O(sn²) where s is the sampling rate, and under theoretical assumptions, s ≈ log n / n yields O(n log n) total runtime.
Experimental results
Research questions
- RQ1Can a subsampled epsilon-neighborhood graph preserve the connected components of core points necessary for DBSCAN clustering?
- RQ2What is the minimum sampling rate s required to ensure statistical consistency and accurate cluster recovery?
- RQ3Can the subsampling approach achieve sub-quadratic runtime while maintaining competitive clustering performance on real-world datasets?
- RQ4How does SNG-DBSCAN compare in speed and memory usage to standard DBSCAN and other optimized variants like DBSCAN++?
- RQ5Does the method remain effective across diverse datasets, including low-dimensional and high-dimensional settings?
Key findings
- On datasets with up to a million points, SNG-DBSCAN achieves up to 200x speedup and 250x reduction in RAM usage compared to scikit-learn’s DBSCAN implementation.
- Subsampling as little as 0.1% of the neighborhood graph maintains competitive clustering performance, with ARI and AMI scores within 10% of full DBSCAN on most datasets.
- SNG-DBSCAN outperforms DBSCAN++ on 70% of the metrics tested, especially on high-dimensional data like Australian, where DBSCAN++ fails due to poor core-point selection.
- Theoretical analysis shows that sampling s ≈ log n / n edges preserves the connected components of core points with high probability under standard density assumptions.
- On small datasets, SNG-DBSCAN achieves significant runtime improvements with 1% to 30% edge sampling, maintaining competitive clustering scores under optimal tuning.
- For large ε values, standard DBSCAN fails due to memory exhaustion, but SNG-DBSCAN remains feasible, enabling clustering on previously intractable datasets.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.