Learning to Cluster via Same-Cluster Queries

Yi Li, Yan Song, Qin Zhang

Abstract

Clustering is a fundamental task in data science, yet traditional unsupervised methods often struggle with unknown cluster counts ($K$) or non-spherical data distributions. This paper introduces two semi-supervised algorithms that leverage "same-cluster queries" to identify cluster centers without prior knowledge of $K$ or reliance on specific mathematical objectives. By utilizing $D^2$-sampling and a novel "banding" technique, these algorithms achieve sublinear query complexity and demonstrate significant robustness to oracle noise.

Introduction

Standard clustering techniques like $K$-means typically require the user to specify the number of clusters $K$ and assume that clusters are well-separated according to a specific distance metric. In many real-world scenarios, neither the number of clusters nor the underlying data distribution is known.

To address these challenges, recent research has explored the use of a "same-cluster oracle"—a mechanism (such as a human expert or a pre-trained classifier) that can determine if two data points belong to the same cluster. However, previous query-based approaches often assumed $K$ was known or that the ground truth clusters minimized a specific objective function. This work removes these constraints, aiming to recover all significant clusters using a minimal number of queries.

Methodology

The authors propose two primary algorithms designed for query efficiency:

The Basic Algorithm

This algorithm discovers clusters iteratively using $D^2$-sampling. Points are sampled with a probability proportional to their squared distance from existing cluster centers, which helps in identifying distant or smaller clusters that uniform sampling might overlook. Once a potential new cluster is identified, rejection sampling is used to refine the centroid location.

The Batched Algorithm

To further improve efficiency, the Batched Algorithm groups discovered clusters into "heavy bands" based on their empirical probabilities. Instead of recovering clusters one by one, it recovers all clusters within a band simultaneously. This parallelized approach reduces the total query count by a factor of $K$, making it highly suitable for large-scale datasets.

Experimental Evaluation

The algorithms were tested on synthetic datasets with power-law cluster size distributions and real-world datasets including the NASA Shuttle dataset and the KDD Cup 1999 network intrusion dataset.

Query Efficiency and Noise Robustness

A key finding is the superior efficiency of the proposed methods compared to uniform sampling. In fixed-budget scenarios, the Basic and Batched algorithms recovered nearly twice as many clusters as uniform sampling for the same number of queries. Furthermore, the algorithms maintain high accuracy even when the oracle is noisy (providing incorrect answers up to 49% of the time).

Figure 6: Performance comparison of BASIC, BATCHED, and UNIFORM algorithms across different noise levels (p) and evaluation modes (Fixed-budget and Fixed-recovery).

As shown in the figure above, the BATCHED algorithm consistently outperforms UNIFORM sampling in both the number of clusters recovered for a given budget and the number of queries required per cluster. The performance gap remains significant even as the noise level $p$ increases to 0.3.

Real-World Application: Shuttle Dataset

On the Shuttle dataset, which contains 7 clusters, the algorithms quickly converged to the ground truth.

Figure 5: Performance on the Shuttle dataset (7 clusters) under fixed-budget and fixed-recovery constraints.

In this real-world test, the BATCHED algorithm demonstrated its ability to recover the majority of clusters with a very low query budget, significantly outperforming the baseline uniform approach.

Key Insights

  • $D^2$-sampling Effectiveness: By focusing on points poorly explained by current centers, $D^2$-sampling is far more effective than uniform sampling at discovering the full diversity of clusters.
  • Banding for Scalability: Grouping clusters into bands allows for a "batch" recovery process that significantly reduces the sequential query bottleneck.
  • The 1-Query Heuristic: The authors observed that once centers are established, assigning the rest of the dataset typically requires only one additional query per point to its nearest center.

Conclusion

This work provides a robust framework for clustering without prior knowledge of $K$. By combining $D^2$-sampling with efficient batching strategies, the proposed algorithms offer a practical solution for high-dimensional, imbalanced datasets where traditional unsupervised methods fail. Future research may focus on extending these techniques to non-Voronoi cluster shapes and further reducing the absolute number of queries for massive-scale applications.

Summary updated

BibTeX
@inproceedings{li2021learning,
  author = {Yi Li and Yan Song and Qin Zhang},
  title = {{Learning to Cluster via Same-Cluster Queries}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2021},
  url = {https://openreview.net/forum?id=l6telyL8p2u},
}
Figure