Approximation Algorithm for Constrained k-Center Clustering: A Local Search Approach

Chaoqi Jia, Longkun Guo, Kewen Liao, Zhigang Lu, Chao Chen, Jason Xue

TL;DR

This paper introduces a novel local search algorithm for the $k$-center clustering problem under both must-link and disjoint cannot-link constraints. By transforming the problem into finding a "single-swap free dominating matching set" in an auxiliary graph, the authors achieve the theoretically optimal 2-approximation ratio while consistently outperforming existing baselines in empirical solution quality.

What Problem Does This Paper Address?

Clustering is a foundational tool in data science, and $k$-center clustering is one of its most classic formulations. The goal is simple: pick $k$ center points such that the maximum distance from any data point to its nearest center (the covering radius) is minimized. This is incredibly useful for applications like trip planning or facility location, where you want to minimize the worst-case travel distance. Without constraints, the best possible approximation ratio for this NP-hard problem is exactly 2—meaning no polynomial-time algorithm can guarantee a radius better than twice the optimum unless $P = NP$.

However, real-world data often comes with background knowledge, usually expressed as instance-level constraints:

  • Must-Link (ML): Point A and Point B must be in the same cluster.
  • Cannot-Link (CL): Point A and Point B cannot be in the same cluster.

Adding general CL constraints makes the problem notoriously difficult—even finding a valid starting solution becomes computationally intractable (equivalent to the graph $k$-coloring problem). Prior work bypassed this by focusing on disjoint CL sets (where cannot-link groups do not overlap), proving that constant-factor approximations are possible. But a lingering question remained: Could a local search approach achieve the optimal 2-approximation guarantee in this constrained setting? This paper provides the answer.

Methods

The authors propose a threshold-based local search framework called LSCKC (Local Search Constrained $k$-Center).

  1. Distance Thresholding: Since the exact optimal radius ($opt$) is unknown, the algorithm samples all $O(n^2)$ pairwise distances in the dataset. For a guessed radius, it sets a strict distance threshold of $\eta = 2opt$.
  2. Graph Transformation: The algorithm treats ML sets as single "big points" and maps the disjoint CL constraints onto an auxiliary $l$-partite graph.
  3. Dominating Matching Set (DMS): The problem of finding valid cluster centers is reframed as finding a subset of vertices that can "dominate" the graph via maximum matchings. Because finding the absolute minimum DMS is NP-hard, the authors introduce a clever relaxation: the Single-Swap Free Dominating Matching Set (SF-DMS).
  4. Enhanced Local Search: Starting from an initial feasible center set, the algorithm iteratively refines the solution using an enhanced single swap. Instead of a standard 1-for-1 swap, it attempts to add one new point to the center set while removing two existing centers. It repeats this until no more swaps can maintain a valid clustering within the $2opt$ radius.

Datasets

The authors evaluated their approach using both synthetic and real-world benchmarks:

  • Synthetic Dataset: A simulated dataset generated with a known optimal radius ($opt$) and $k = 50$, specifically designed to measure the exact empirical approximation ratio.
  • Real-World Datasets: Three standard datasets from the UCI Machine Learning Repository:
  • Cnae-9: A text dataset containing highly sparse documents.
  • Skin: An image-based dataset for skin segmentation.
  • Covertype: A massive geospatial dataset predicting forest cover types.

Key Insights and Ideas

  • The 1-for-2 Swap Strategy: Standard local search algorithms typically swap one center for another. This paper proves that a 1-for-2 swap (adding one point, removing two) is the mathematical key to bounding the final number of remaining centers to $\le k$ while preserving the strict 2-approximation guarantee.
  • Bypassing NP-Hardness via Local Optima: While finding a globally minimal Dominating Matching Set is impossible in polynomial time, finding a locally optimal one (the SF-DMS) is entirely feasible and theoretically sufficient to hit the optimal approximation bound.
  • Algorithmic Flexibility: Prior approximation algorithms strictly selected cluster centers from within the CL constraint sets. LSCKC’s local search allows it to break out of these sets and explore unconstrained points, leading to significantly tighter clusters in practice.

Key Results

  • Theoretical Optimality: The authors mathematically prove that LSCKC achieves a tight 2-approximation ratio in $O(n^2 k^{4.5})$ time.
  • Superior Approximation Ratios: On synthetic data, LSCKC consistently achieved the lowest empirical approximation ratio compared to baselines (Greedy_H, Matching_H, and Approx), staying well below the theoretical ceiling of 2.0.
Empirical approximation ratio on the synthetic dataset with k = 50.
  • Lower Clustering Costs: When tested on real-world datasets under both disjoint and intersected constraint configurations, LSCKC consistently yielded lower maximum cluster radii (costs) than its competitors, proving its practical utility.
Cost of the constrained k-center clustering on real-world datasets.

Limitations and Future Work

  • The Disjoint Constraint: The strict 2-approximation guarantee relies on the assumption that the CL sets are mutually disjoint. Although the algorithm performs exceptionally well on intersected CL constraints in empirical tests, the theoretical guarantee does not formally extend to those scenarios.
  • Scalability with $k$: The algorithm's runtime includes a $k^{4.5}$ factor. While polynomial, this polynomial degree could become computationally heavy for applications requiring exceptionally large values of $k$. Optimizing the local search efficiency for massive cluster counts remains an open area for future research.

Summary updated

BibTeX
@inproceedings{jia2026approximation,
  author = {Chaoqi Jia and Longkun Guo and Kewen Liao and Zhigang Lu and Chao Chen and Jason Xue},
  title = {{Approximation Algorithm for Constrained k-Center Clustering: A Local Search Approach}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i43.41026},
}
Figure