Abstract
Clustering is inherently ill-posed due to the subjective nature of data grouping. While pairwise constraints can guide the process, querying users for these constraints is often prohibitively expensive. We present COBRA (Constraint-Based Repeated Aggregation), a fast active clustering algorithm that utilizes "super-instances" and logical constraint propagation to align results with user intent. COBRA eliminates the requirement for a pre-defined number of clusters ($K$) and significantly reduces the query burden by exploiting transitivity and entailment. Experimental results across 21 diverse tasks demonstrate that COBRA outperforms state-of-the-art methods in both accuracy and computational efficiency.
Introduction
The "correct" clustering of a dataset often depends on the specific application or user intent. For instance, facial images can be grouped by identity, expression, or pose. To resolve this ambiguity, active clustering uses pairwise constraints: "must-link" (ML) and "cannot-link" (CL). However, existing active clustering methods often require the number of clusters $K$ to be known a priori, are computationally intensive (particularly spectral-based methods), or fail to fully leverage the logical implications of user-provided constraints.
Methods
COBRA addresses these challenges through a three-stage iterative process that intertwines constraint selection with the clustering process:
- Over-clustering (Super-instances): The algorithm begins by partitioning the data into a large number of "super-instances" using K-means. These small, dense local groups are assumed to be "pure," meaning all points within a super-instance belong to the same target cluster in any reasonable clustering.
- Iterative Merging: The medoids of these super-instances serve as the primary units for clustering. COBRA iteratively identifies the two closest clusters for potential merging.
- Active Querying and Propagation: Before a merge is finalized, the user is queried for a constraint between the medoids. COBRA minimizes the total number of queries by applying logical rules:
- Transitivity: If A must-link B and B must-link C, then A must-link C.
- Entailment: If A must-link B and B cannot-link C, then A cannot-link C.
By prioritizing queries for the most similar pairs (the closest-pair heuristic), COBRA increases the likelihood of discovering "must-link" constraints early, which triggers more automated inferences via transitivity. The process terminates when no further merges are possible, naturally determining the optimal number of clusters ($K$) during execution.
Key Results
COBRA was evaluated on 21 clustering tasks across 17 datasets, including 15 UCI benchmarks, CMU Faces, and 20 Newsgroups subsets.
- Clustering Quality: COBRA consistently achieved higher Adjusted Rand Index (ARI) scores compared to established methods like MPCKMeans and Constrained Spectral Clustering (COSC), even when those competitors were provided with the ground-truth $K$.
- Computational Efficiency: COBRA is orders of magnitude faster than spectral-based methods. In experiments, it consistently finished in under 10 seconds across all datasets.
- Query Efficiency: The use of super-instances drastically reduces the query space. For example, on the
opdigitsdataset, using 25 super-instances reduced the required queries from over 3,000 (with just transitivity/entailment) to only 54.
Discussion and Limitations
While COBRA is highly effective, its performance hinges on the "purity" of the initial super-instances. If the initial $K$ for over-clustering is too low or the data is excessively noisy, points from different target clusters may be incorrectly grouped together. Additionally, while COBRA removes the need to specify the final $K$, it introduces a new hyperparameter: the number of super-instances ($N_S$). Future work involves investigating ways to determine the optimal $N_S$ automatically through incremental refinement during the merging process.
Summary updated