An Improved Local Search Algorithm for k-Median

Vincent Cohen-Addad, Anupam Gupta, Lunjia Hu, Hoon Oh, David Saulpic

Abstract

We present a new local-search algorithm for the $k$-median clustering problem that achieves a $(2.836+\epsilon)$-approximation, improving upon the long-standing $(3+\epsilon)$ guarantee established by Arya et al. (2001). The core innovation is a "non-oblivious" potential function that accounts for both the closest and second-closest facilities to each client. By rewarding solutions with nearby "backup" facilities, the algorithm avoids the bad local optima that plague standard local search. Our results are supported by rigorous mathematical proofs and computer-aided analysis, suggesting that this approach could eventually match the best-known LP-based approximation ratios.

Introduction: The Locality Gap Challenge

The $k$-median problem is a cornerstone of unsupervised learning and operations research. Given a set of clients and potential facility locations in a metric space, the goal is to open $k$ facilities to minimize the total distance from each client to its nearest facility.

While the problem is NP-hard, local search—the process of iteratively swapping one open facility for a closed one to reduce total cost—is a popular heuristic. However, standard local search has a known "locality gap" of 3, meaning it can get stuck in a local optimum that is three times worse than the global best.

A simplified representation of a configuration leading to a locality gap, illustrating the factor-of-3 difference between local (ALG) and global (OPT) optima.

Until now, the only way to beat this factor of 3 was through complex Linear Programming (LP) "bi-point rounding" techniques. This paper seeks to determine if a more clever local search objective can bridge that gap.

The authors employ non-oblivious local search. Instead of moving between solutions based on the actual $k$-median cost, the algorithm moves based on a surrogate potential function $\Phi(F)$.

The Potential Function

The standard cost only considers the distance to the closest facility ($d_1$). The new potential function includes a "backup" term: $$\Phi(F) := \sum_{c \in \mathcal{C}} \left( d_1(c, F) + \beta \min \{ d_2(c, F), \alpha d_1(c, F) \} \right)$$ Where $d_2$ is the distance to the second-closest facility, and $\alpha, \beta$ are carefully chosen constants (specifically $\alpha=3, \beta=1/5$). This refined potential incentivizes the algorithm to explore configurations where clients are well-served by multiple facilities, avoiding the "bad" local optima identified in previous literature.

Randomized Swap Analysis

To prove the approximation ratio, the authors analyze "important swaps" using a combination of simple and tree-based swaps. They use a randomized approach to map optimal facilities to local facilities, creating a graph structure that allows them to bound the expected change in potential across different types of clients.

Key Results and Insights

  • Improved Bound: The algorithm achieves a $(2.836 + \epsilon)$-approximation, significantly better than the previous $(3 + \epsilon)$ limit for local search.
  • Computer-Aided Proofs: The authors used a Linear Program to simulate the worst-case behavior of their algorithm, allowing them to "search" for the best potential function parameters and approximation bound.
  • Future Potential: Preliminary results suggest that extending the potential function to consider the three closest facilities ($q=3$) could push the ratio as low as 2.69, approaching the world-best LP-based result of 2.675.

Conclusion

This work provides the first viable alternative to LP-rounding for achieving a $k$-median approximation ratio below 3. By demonstrating that local search can be significantly improved through non-oblivious objectives, it opens new avenues for solving facility location problems efficiently. While it currently trails the most sophisticated LP-rounding algorithms, the potential for higher-order functions ($q \ge 3$) suggests that local search may yet reach the theoretical limit of the problem.

Summary updated

BibTeX
@inproceedings{cohenaddad2022improved,
  author = {Vincent Cohen-Addad and Anupam Gupta and Lunjia Hu and Hoon Oh and David Saulpic},
  title = {{An Improved Local Search Algorithm for k-Median}},
  booktitle = {SODA},
  year = {2022},
  doi = {10.1137/1.9781611977073.65},
}
Figure