Constraint-Aware Anticlustering Decomposition for Certifying Pairwise-Constrained Clustering

Anna Livia Croella, Veronica Piccialli, Antonio M. SudosoarXiv 2026

Imagine you’ve spent all day trying to organize a massive library. You’ve got thousands of books, and you’re trying to group them so that books in the same pile are as similar as possible (that’s Minimum Sum-of-Squares Clustering, or MSSC). To make it harder, you have specific rules: "these two books must be together" and "these two cannot be in the same pile."

You find a decent way to do it using a quick heuristic, but as you look at your work, a nagging question remains: How much better could I have done? Is your solution 90% perfect? 99%? In the world of mathematical optimization, answering that question requires a "lower bound"—a mathematical proof of the absolute best possible score.

This paper introduces a clever way to find that proof for large-scale problems by using a technique called anticlustering.

TL;DR

The authors propose a way to "certify" the quality of clustering solutions by breaking a massive dataset into smaller, diverse subsets called "anticlusters." By solving these smaller problems perfectly, they can prove that their overall solution is within 1% of the theoretical mathematical limit, even for datasets with thousands of points and complex constraints.

What Problem Does This Paper Address?

Clustering is usually an "unsupervised" task—you let the data speak for itself. But in the real world, we often have "side information." These are pairwise constraints:

  • Must-Link (ML): Points $A$ and $B$ belong in the same cluster.
  • Cannot-Link (CL): Points $A$ and $B$ must be in different clusters.

Adding these rules makes an already "NP-hard" problem (computationally exhausting) even more difficult. While we have fast heuristics (like $k$-means) to find good solutions, they don't tell us how far we are from the best solution. To get that "optimality certificate," we need a strong lower bound. Existing exact methods that provide these bounds usually choke when the dataset grows beyond a few hundred points.

Methods

The authors use a decomposition framework. Instead of tackling the whole 4,000-point dataset at once, they partition it into $T$ smaller subsets.

The secret sauce is Anticlustering. While clustering groups similar things together, anticlustering does the opposite: it creates subsets that are as diverse as possible. Each "anticluster" is essentially a "mini-me" of the entire dataset, capturing its overall geometric shape.

To handle the constraints, they introduce the Constrained Anticlustering Problem (CAP):

  1. Constraint Preservation: They represent all Must-Link and Cannot-Link rules as a graph. If points are connected by a rule, they are kept together in the same "anticluster" so the rule isn't lost during the split.
  2. Mathematical Formulation: They model CAP as a Mixed-Integer Second-Order Cone Program (MISOCP)—a heavy-duty math structure that balances the geometry of the clusters.
  3. The Heuristic: Since solving that math perfectly is too slow, they use a Variable Neighborhood Search (VNS). This algorithm "shakes" the current solution to find better ways to distribute the points into anticlusters.
  4. The Solver: Once the data is split into manageable chunks (subproblems), they use a state-of-the-art exact solver (PC-SOS-SDP) to find the lower bounds for each chunk. Summing these up gives the lower bound for the whole problem.

Datasets

The researchers tested their framework on:

  • Synthetic Datasets: Gaussian clusters with varying levels of overlap (to see how "messy" data affects the bound).
  • Real-World Benchmarks: Datasets from the UCI repository and TSPLIB, including Abalone (4,177 points), Rice (3,810 points), Wifi (2,000 points), and Mallat (2,400 points).
  • These represent a significant step up in scale for "certified" optimal clustering.

Key Insights and Ideas

  • Diversity is Key: If your subproblems don't look like the whole dataset, the lower bound they provide is "weak" and unhelpful. Anticlustering ensures the subproblems are representative.
  • Don't Break the Rules: The "Aha!" moment here is realizing that if you split a "Cannot-Link" pair into two different subproblems, that constraint effectively disappears, making the lower bound much lower (and thus less accurate). By keeping connected components of constraints together, the bound stays "tight."
  • The "Gap" is Two-Fold: The difference between your solution and the perfect one comes from two places: the loss of information from splitting the data (the partition gap) and the fact that we might not solve the subproblems perfectly (the solve gap).

Key Results

  • High Precision: The approach achieved a mean optimality gap below 1% across various datasets. This means they can prove their solutions are at least 99% as good as the theoretical best.
  • Efficiency: Total computation times were generally under 10 minutes, which is remarkably fast for providing mathematical guarantees at this scale.
  • VNS Superiority: Their custom VNS heuristic for splitting the data outperformed the industry-standard solver (Gurobi) by 82.2% in terms of objective value reduction for the anticlustering phase.

Limitations and Future Work

  • The Goldilocks Problem: Choosing the number of anticlusters ($T$) is a trade-off. Too few, and the subproblems are too hard to solve. Too many, and the subsets become too small to represent the whole dataset well.
  • Constraint Density: If a dataset has a massive web of interconnected constraints, the "connected components" might become too large to fit into a single subproblem, breaking the decomposition.
  • Future Directions: The authors suggest looking into adaptive strategies that automatically decide how many anticlusters to use and how to distribute computing power between them.

Summary updated

Abstract

Certifying the quality of feasible solutions to large-scale minimum sum-of-squares clustering with pairwise must-link and cannot-link constraints remains challenging, as it requires strong lower bounds on the optimal objective value. We propose a decomposition framework that partitions the data points into smaller subsets, called anticlusters, and solves the induced clustering subproblems to obtain a certified optimality gap for the original problem. To preserve pairwise information, we introduce the Constrained Anticlustering Problem (CAP), which assigns each connected component of the constraint graph to a single anticluster while seeking geometrically representative subsets. We formulate CAP as a mixed-integer second-order cone program and develop a variable neighborhood search heuristic to construct high-quality decompositions. The resulting lower bound remains valid even when the induced subproblems are not solved to global optimality. Extensive experiments on synthetic and real-world datasets with up to approximately 4,000 observations show that our approach can achieve mean optimality gaps below 1% at a modest computational cost.
BibTeX
@misc{croella2026constraint,
  author = {Anna Livia Croella and Veronica Piccialli and Antonio M. Sudoso},
  title = {{Constraint-Aware Anticlustering Decomposition for Certifying Pairwise-Constrained Clustering}},
  year = {2026},
  eprint = {2611.27496},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.27496},
}
Figure