Abstract
Constrained clustering incorporates domain knowledge via pairwise Must-Link and Cannot-Link constraints, but finding global optima for these problems is NP-hard and traditionally limited to small datasets. This paper introduces SDC-GBB, a Sample-Driven Constrained Group-Based Branch-and-Bound algorithm that scales exact constrained clustering to millions of data points. By leveraging geometric pruning, pseudo-sample formulations, and center-based branching, SDC-GBB achieves a 200x to 1500x increase in scale over previous state-of-the-art exact methods while maintaining a tiny optimality gap ($\le 3\%$).
Introduction
Clustering is a fundamental tool in unsupervised learning. However, standard clustering often fails to capture specific domain requirements. Constrained clustering addresses this by allowing users to specify pairwise rules: Must-Link (ML), where two points must belong to the same cluster, and Cannot-Link (CL), where they must be separate.
While adding constraints makes clustering more useful, it also makes it significantly harder. Heuristic algorithms like constrained $k$-means are fast but prone to local optima or feasibility failures. Conversely, exact methods that guarantee global optimality have historically struggled with scalability, often failing beyond a few thousand samples. SDC-GBB tackles this scalability wall, moving exact constrained clustering from toy datasets to real-world, large-scale applications.
Methodology
The core of SDC-GBB lies in its ability to prune the search space effectively and represent constraints efficiently through four primary innovations:
- Pseudo-sample Formulation: For Must-Link constraints, the algorithm mathematically "collapses" linked groups into centroid-based pseudo-samples. This reduction in variables simplifies the solver's task without sacrificing the guarantee of a global optimum.
- Geometric Sample-Determination: SDC-GBB uses the current best solution (the incumbent) to define geometric boundaries. If a point's distance to a cluster region precludes it from improving the current score, it is pruned early.
- Reduced-Space Branching: Instead of branching on binary point-to-cluster assignments, SDC-GBB branches on the continuous space of cluster centers ($\mu$). Since the number of clusters is typically much smaller than the number of points, this drastically reduces the combinatorial search space.
- Grouped Lagrangian Decomposition: The algorithm partitions data into groups solved in parallel. Lagrangian multipliers ensure these groups converge on a consistent set of cluster centers, providing tight lower bounds for the Branch-and-Bound process.
Experimental Evaluation
The authors evaluated SDC-GBB against commercial solvers (CPLEX), specialized SDP solvers, and popular heuristics on a mix of classic benchmarks and massive synthetic sets:
- Real-world benchmarks: Including Iris, Seeds, Hemi, HTRU2, Skin Segmentation, and UrbanGB.
- Large-scale synthetic data: Ranging from 12,000 to 1.5 million samples.
- Baseline comparisons: SDC-GBB was compared against exact methods and heuristics like COP-k-means.
Key Results and Insights
SDC-GBB demonstrates unprecedented scalability for exact methods. It successfully handled up to 1.5 million samples with Must-Link constraints and 200,000 samples with Cannot-Link constraints. This represents a 200x to 1500x improvement in scale over previous state-of-the-art exact solvers.
Crucially, Must-Link constraints were found to simplify the problem by reducing the effective sample size through pseudo-sample "collapsing." In contrast, Cannot-Link constraints act as barriers that increase branching frequency, though SDC-GBB manages them far more effectively than prior methods. Even when a perfect 0% optimality gap wasn't reached within time limits on the largest sets, the gap remained consistently below 3%, providing reliability that heuristics cannot match.
Conclusion and Future Work
SDC-GBB marks a significant step forward in making exact constrained clustering practical for large-scale applications. While dense Cannot-Link graphs remain a challenge due to their inherent NP-hardness, the algorithm's geometric and center-based branching strategies provide a robust framework for global optimization. Future work may focus on tighter lower bounds using Mixed-Integer Second-Order Cone Programming (MISOCP) and advanced graph-theoretic pruning techniques like clique inequalities to further scale Cannot-Link handling.
Summary updated