TL;DR
Standard $k$-Means clustering falls apart in the presence of extreme outliers, prompting decades of complex algorithmic workarounds. This paper proves that a refreshingly simple approach—filtering out the points farthest from their $K$-th nearest neighbor before running standard $k$-Means—achieves rigorous mathematical guarantees and beats sophisticated state-of-the-art methods in both speed and clustering quality. Sometimes, the simplest textbook heuristic really is the right tool for the job—if you tune it properly.
What Problem Does This Paper Address?
If you have ever run $k$-Means on messy real-world data, you know its Achilles' heel: because it minimizes squared distances, even a single wild data point far from the true clusters acts like a gravitational anomaly, yanking a cluster center away from where it belongs.
To fix this, researchers study robust $k$-Means ($k$-Means with outliers): given a dataset, a target of $k$ clusters, and an outlier budget $z$, find the $k$ centers that minimize the clustering cost after ignoring up to $z$ points.
Historically, solving this at scale meant choosing your poison. Exact or strict polynomial-time algorithms are far too slow for millions of data points. Fast, scalable algorithms usually rely on bicriteria approximations—a polite theoretical term for "bending the rules," either by outputting way more than $k$ cluster centers (say, $O(k/\epsilon)$) or throwing away more than $z$ outliers (like $2z$). Meanwhile, practitioners in anomaly detection have long used simple $K$-Nearest-Neighbor (KNN) distances to spot outliers, yet nobody had rigorously connected the two worlds to see if simple KNN filtering actually guarantees good clustering costs.
Methods
The authors operate under a practical assumption common in prior literature: every true optimal cluster is reasonably large compared to the outlier budget—specifically, containing at least $cz$ points for some constant $c > 1$ (e.g., $3z$). Under this lens, they propose two algorithms that strictly respect both $k$ and $z$:
- OKMeans (Vanilla KNN): Instead of setting $K$ to a small fixed number like 5, set $K = \frac{c+1}{2}z$ (so $K = 2z$ when $c=3$). Compute every point's distance to its $K$-th nearest neighbor, drop the $z$ points with the largest distances, and run any standard $k$-Means algorithm (like
k-means++) on the rest. - OKMeans2 (Mid-Range KNN Variant): Rather than looking at a single neighbor, sum the distances from each point to its neighbors ranked from $z+1$ to $cz$. Crucially, it ignores the closest $z$ neighbors, then drops the $z$ highest-scoring points before clustering.
Because computing all-pairs KNN distances takes $O(dn^2)$ time, the authors pair these methods with coresets (compact, representative subsamples of the data) and fast nearest-neighbor libraries (Scikit-Learn and FAISS), bringing theoretical runtime down to a near-linear $O(dkn \log n)$.
Datasets
No new benchmarks are introduced; the authors follow established robust clustering evaluation setups across four real-world datasets:
- SKIN ($245,057 \times 3$, $k=10$) and SUSY ($5,000,000 \times 18$, $k=10$): Injected with 1% synthetic outliers sampled uniformly from hypercubes of side length $\xi \in \{5, 10\}$ (yielding SKIN-5/10 and SUSY-5/10).
- SHUTTLE ($43,500 \times 9$, $k=10$): Natural outliers formed by the two smallest classes (17 points).
- KDDFULL ($4,898,431 \times 37$, $k=3$): Natural outliers formed by the 23 smallest classes (45,747 points).
Key Insights and Ideas
- $K$ must scale with the outlier budget $z$: In classic anomaly detection, $K$ is usually a small constant (like 2, 5, or 10). Here, both theory and experiments show small constants fail on adversarial or clumped outliers. Scaling $K$ linearly with $z$ ensures true inliers have enough fellow cluster-mates nearby to anchor their scores.
- Defeating outlier "cliques": Why does
OKMeans2skip the first $z$ neighbors? Imagine all $z$ outliers clump tightly together far away from the real data. If you sum distances starting from the 1st neighbor, those clumped outliers will "help" each other look dense and safe! Ignoring the closest $z$ neighbors neutralizes outlier collusion. - No rule-bending required: Unlike leading theoretical competitors, KNN filtering gives a constant-factor reduction to standard $k$-Means while outputting exactly $k$ centers, removing at most $z$ outliers, and requiring zero prior knowledge of the optimal clustering cost.
Key Results
- Tighter Theoretical Bounds: When optimal clusters have size at least $3z$,
OKMeansprovides a 9-approximate reduction to standard $k$-Means, whileOKMeans2sharpens this bound to 5.98. - Better Quality, Faster Runtime: On the 5-million-point SUSY-10 dataset,
OKMeansachieves a better mean clustering cost ($4.873 \times 10^7$) than state-of-the-artTIKMeans($5.272 \times 10^7$) while running nearly 7$\times$ faster (12.9s vs. 89.2s). - Large-Scale Efficiency: On KDDFULL (~4.9M points),
OKMeansachieves the lowest best-run cost ($3.308 \times 10^7$) and runs over 5$\times$ faster thanTIKMeans(9.5s vs. 49.9s). - Why Constant $K$ Fails: On KDDFULL, forcing a traditional small constant like $K=2$ or $K=10$ degrades mean clustering cost from $4.019 \times 10^7$ up to ~$4.63 \times 10^7$, confirming the theoretical scaling rule. Meanwhile, varying the cluster-size parameter $c \in [3, 7]$ shows stable, robust performance.
Limitations and Future Work
- Loose Theoretical Constants: The authors note their worst-case mathematical analysis isn't tight—chiefly because the proof bounds cost using the original optimal centers rather than accounting for how centers might beneficially shift on the filtered data.
- The Large-Cluster Assumption: The guarantees rely on true clusters having size $\ge cz$ (and knowing the outlier budget $z$ in advance). Tiny, legitimate minority clusters smaller than $z$ are fundamentally indistinguishable from clumped adversarial outliers without domain labels.
- Future Bridges: The authors suggest analyzing other classic anomaly detectors for clustering guarantees, adapting robust clustering tools to build better outlier detectors, and moving beyond adversarial worst-case analysis to realistic data-generation models.
Summary updated