A sampling-based approach for efficient clustering in large datasets

Georgios Exarchakis, Omar Oubari, Gregor LenzCVPR 2022 · DOI

Abstract

Clustering large-scale datasets with high-dimensional features and a large number of clusters presents a significant computational challenge for traditional algorithms like k-means. We present D-GMM (Data Similarity Gaussian Mixture Model), a stochastic, truncated Expectation-Maximization (EM) approach that achieves sub-linear scaling with respect to the number of clusters. By utilizing a cluster similarity matrix to guide a neighborhood search, D-GMM reduces distance evaluations by orders of magnitude while maintaining competitive accuracy.

Introduction

The k-means algorithm remains the standard for clustering due to its simplicity and effectiveness. However, its $O(NMD)$ complexity—where $N$ is the number of points, $M$ the number of clusters, and $D$ the dimensionality—creates a "scaling wall" for modern big data applications. Existing approximate methods often rely on rigid data structures like trees, which can be unstable in high dimensions or prone to local optima. This work introduces D-GMM, a probabilistic framework that leverages stochasticity to efficiently navigate the cluster space.

Methodology

D-GMM frames clustering as a Gaussian Mixture Model (GMM) optimization problem. The core innovation lies in a two-layered efficiency strategy:

  1. Truncated E-Step: Instead of evaluating all $M$ clusters for each point, the algorithm restricts its search to a small subset $H$ of candidate clusters.
  2. Stochastic Neighborhood Search: To identify these candidates, the algorithm maintains a Cluster Similarity Matrix ($S$). This matrix tracks co-occurrence patterns between clusters across iterations. New candidates are sampled from the neighbors of the current best-fitting cluster, allowing the algorithm to "learn" the data geometry dynamically.
Figure 4: Variational lower bound convergence for exact GMM vs. D-GMM.

Mathematically, we demonstrate that this truncated approach monotonically increases the variational lower bound, ensuring convergence to a local optimum as shown in Figure 4.

Experimental Evaluation

The algorithm was benchmarked against standard k-means and vc-GMM across diverse datasets, including SONG ($N \approx 515k, M=4000$) and SUSY ($N=5M, M=2000$).

Performance and Accuracy

D-GMM demonstrates a significant reduction in computational overhead. On the SONG dataset, it achieved an 862x reduction in distance evaluations compared to exact k-means. Crucially, this speedup does not come at the cost of significant accuracy; the relative quantization error typically remains within 5-12% of the exact solution.

Figure 6: Trade-off between relative quantization error and distance evaluations across different algorithms.

As shown in Figure 6, D-GMM consistently provides a superior Pareto frontier compared to k-means with lightweight coresets and vc-GMM, particularly as the computational budget (distance evaluations) decreases.

Conclusion

D-GMM addresses the scalability limits of traditional clustering by replacing exhaustive searches with a guided, stochastic sampling mechanism. Its sub-linear scaling makes it uniquely suited for massive datasets with thousands of clusters. Future work will focus on optimizing low-level computational bottlenecks, such as exponential calculations, and extending the model to support non-isotropic Gaussian components.

Summary updated

BibTeX
@inproceedings{exarchakis2022sampling,
  author = {Georgios Exarchakis and Omar Oubari and Gregor Lenz},
  title = {{A sampling-based approach for efficient clustering in large datasets}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.01208},
}
Figure