Sample-and-Search: An Effective Algorithm for Learning-Augmented k-Median Clustering in High Dimensions

Kangke Cheng, Shihong Song, Guanlin Mo, Hu Ding

TL;DR

The paper introduces Sample-and-Search, a novel learning-augmented algorithm for $k$-median clustering that breaks the curse of dimensionality. By confining the search space to a low-dimensional subspace spanned by small random samples, it eliminates the exponential time dependence on dimension $d$ found in previous state-of-the-art methods, delivering up to a 10× speedup in high dimensions while matching or improving clustering quality.

What Problem Does This Paper Address?

Clustering is a foundational task in unsupervised learning, with $k$-means and $k$-median being two of the most popular approaches. While $k$-means minimizes squared Euclidean distances, it is notoriously sensitive to outliers. The $k$-median problem minimizes the sum of unsquared Euclidean distances, making it far more robust for noisy, heavy-tailed real-world data. However, $k$-median is computationally harder because it lacks a closed-form solution for cluster centers.

Recently, the field has shifted toward learning-augmented algorithms, a paradigm that uses predictions (like noisy cluster labels from a machine learning model) to bypass pessimistic traditional worst-case complexity bounds.

The current state-of-the-art learning-augmented $k$-median algorithms face a massive roadblock: they rely on brute-force grid searches in the original high-dimensional space. This introduces an exponential dependence on the dimension ($d$), making them completely impractical for high-dimensional applications like computer vision or bioinformatics. This paper tackles a key open question: Can we design a learning-augmented $k$-median algorithm that achieves state-of-the-art accuracy without exploding exponentially as the dimension increases?

Methods

The authors propose the Sample-and-Search framework, which operates in three main stages:

  1. Sampling-Based Subspace Construction: Instead of searching the entire high-dimensional space $\mathbb{R}^d$, the algorithm takes a small uniform random sample of points from each predicted cluster. Geometrically, the true median of the correctly labeled points lies very close to the low-dimensional flat subspace spanned by this small sample.
  2. Grid-Based Candidate Generation: Within this low-dimensional subspace, the algorithm constructs a localized grid to generate a small set of candidate cluster centers. Because the grid is low-dimensional, the number of candidate points depends only on the accuracy parameters, completely independent of $d$.
  3. Greedy Center Selection: Finally, the algorithm uses a cost-minimization greedy strategy to select the best center from the candidates. This step neatly avoids having to explicitly identify which points were misclassified by the noisy predictor.

The authors also successfully extend this framework to the learning-augmented $k$-means problem.

Illustration of how a low-dimensional subspace is sampled to approximate the true median point.

Datasets

The algorithms were evaluated on four standard high-dimensional real-world datasets, where noisy cluster labels were simulated by corrupting a fraction ($\alpha$) of the ground-truth labels:

  • CIFAR-10: Image dataset ($n = 50,000$, $d = 3,072$)
  • Fashion-MNIST: Image dataset ($n = 60,000$, $d = 784$)
  • PHY: Physics dataset from KDD Cup 2004 ($n = 10,000$, $d = 50$)
  • MNIST: Handwritten digit dataset ($n = 1,797$, $d = 64$)

Key Insights and Ideas

  • Dimension Reduction via Sampling: The core "aha!" moment is that you don't need the full space to find a good median. A tiny random sample provides enough directional "basis" to capture a proxy of the optimal cluster center. This shifts the grid-search complexity from exponential in $d$ to linear in $d$.
  • Bypassing Noise Filtering: Rather than trying to clean the dataset or predict which labels are wrong, the greedy selection step evaluates candidates based on the closest $(1-\alpha)$ fraction of points. This naturally robustifies the search against the predictor's errors.

Key Results

  • Theoretical Guarantees: The algorithm achieves an optimal approximation ratio of $1 + \frac{(6+\epsilon)\alpha - 4\alpha^2}{(1-\alpha)(1-2\alpha)}$ for an error rate $\alpha < 1/2$, matching the best-known theoretical bounds. Crucially, its time complexity is strictly linear with respect to $n$ and $d$.
  • Experimental Performance: In practical evaluations, Sample-and-Search consistently outperformed existing baselines (like NCN and HFH+). It achieved up to 10× speedups on high-dimensional datasets like Fashion-MNIST while yielding a lower overall clustering cost.
Our algorithm consistently achieves a lower approximation ratio than the NCN algorithm across all error rates.

Limitations and Future Work

While the algorithm successfully tames the dimension $d$, it introduces an exponential dependence on the label error rate ($\alpha$) and the accuracy parameter ($\epsilon$) within its time complexity term: $2^{O(1/(\alpha\epsilon)^4)}$. If the predictor is highly inaccurate ($\alpha \to 1/2$) or if extreme precision is required ($\epsilon \to 0$), the candidate pool size can still swell significantly.

Future research directions suggested by the authors include:

  1. Finding ways to mitigate or eliminate this exponential dependence on $\alpha$ and $\epsilon$.
  2. Exploring whether the approximation ratio can be tightened further without sacrificing linear time complexity.
  3. Adapting the Sample-and-Search framework to streaming data models for large-scale, real-time applications.

Summary updated

BibTeX
@inproceedings{cheng2026sample,
  author = {Kangke Cheng and Shihong Song and Guanlin Mo and Hu Ding},
  title = {{Sample-and-Search: An Effective Algorithm for Learning-Augmented k-Median Clustering in High Dimensions}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i25.39186},
}
Figure