NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

k-means-: A Unified Approach to Clustering and Outlier Detection

Sanjay Chawla, Aristides GionisSDM 2013

TL;DR

This paper introduces k-means--, a novel algorithm that unifies clustering and outlier detection by extending the classic k-means algorithm. It efficiently identifies both groups of similar data points and anomalous points simultaneously, outperforming traditional methods in precision and offering a more robust clustering solution.

What Problem Does This Paper Address?

Clustering and outlier detection are often treated as separate problems in data mining. However, these tasks are inherently linked: outliers can disproportionately skew clustering results, leading to inaccurate group identification and potentially masking true outliers (false negatives) or misclassifying normal points (false positives). Conversely, a well-defined clustering can help in identifying points that don't belong to any group. Existing methods often tackle these issues independently, or rely on outlier-sensitive algorithms like standard k-means. This paper addresses the need for a unified approach that can robustly perform both tasks concurrently, leading to more accurate cluster assignments and reliable outlier identification.

Methods

The core contribution is the (k, l)-MEANS problem formulation, which generalizes k-means to simultaneously find k clusters and l outliers. This problem is proven to be NP-hard. To solve it, the authors propose the k-means-- algorithm.

The algorithm works iteratively:

  1. Initialization: Similar to k-means, it starts with initial cluster centers.
  2. Outlier Identification: It ranks all data points by their distance to their nearest cluster center. The l points furthest away are identified as outliers and temporarily removed.
  3. Clustering: A standard k-means-like step is performed on the remaining data points (excluding outliers) to refine the cluster centers.
  4. Iteration: Steps 2 and 3 are repeated until the solution converges to a local optimum.

A key aspect is that the algorithm is designed to be generalizable to any Bregman divergence, a broad class of similarity measures that includes Euclidean distance, KL-divergence, and Mahalanobis distance. This makes the algorithm applicable to a wide range of data types and similarity metrics.

Datasets

The paper evaluates k-means-- on a mix of synthetic and real-world datasets:

  • Synthetic Datasets: Generated with controlled parameters (k, m, l, d, σ) to systematically test the algorithm's performance under varying conditions of dimension, number of outliers, and noise.
  • KDD Cup Network Intrusion Dataset: A large-scale dataset used for network anomaly detection.
  • Hurricane Trajectories Dataset: A novel dataset consisting of hurricane tracks, where trajectories are treated as data points and clustered using spectral clustering with k-means--.
  • SHUTTLE Dataset: A publicly available dataset from the UCI Machine Learning Repository.

Key Insights and Ideas

  • Unified Approach is Crucial: The paper strongly argues that clustering and outlier detection are not independent problems. Their tight coupling means a unified approach is necessary for robust results.
  • k-means Sensitivity: Standard k-means is highly sensitive to outliers, which can severely distort cluster assignments. k-means-- directly addresses this by explicitly identifying and handling outliers.
  • Bregman Divergence Generalization: The ability to use any Bregman divergence significantly broadens the applicability of the algorithm beyond simple Euclidean distances, making it suitable for diverse data types and similarity measures.
  • Outlier Impact on Clustering: The experiments show that even when outliers are difficult to distinguish, k-means-- can still produce good clusters, demonstrating its robustness.

Key Results

  • Improved Outlier Detection Precision: On the KDD Cup dataset, k-means-- achieved nearly a 100% increase in precision compared to a standard nearest-neighbor outlier detection approach.
  • Robust Clustering: The algorithm consistently produced high purity scores for clusters across various datasets, indicating that it effectively separates normal data points.
  • Convergence: The k-means-- algorithm is proven to converge to a local optimum.
  • Efficiency: The algorithm's running time is linear in the number of data points, making it scalable for large datasets.
  • Hurricane Trajectory Clustering: The algorithm successfully identified outlier hurricane trajectories, visually aligning with expert knowledge and capturing distinct movement patterns.

Limitations and Future Work

  • Parameter Selection: The paper acknowledges that determining the optimal values for k (number of clusters) and l (number of outliers) is an open problem and assumes these parameters are provided.
  • Local Optima: Like standard k-means, k-means-- converges to a local optimum, meaning the quality of the solution can depend on the initializations.
  • Future Work: The authors suggest exploring methodologies for automatically determining the number of outliers and integrating k-means-- into a wider range of applications with suitably chosen Bregman divergences.

Summary updated

BibTeX
@inproceedings{chawla2013k,
  author = {Sanjay Chawla and Aristides Gionis},
  title = {{k-means-: A Unified Approach to Clustering and Outlier Detection}},
  booktitle = {SDM},
  year = {2013},
  doi = {10.1137/1.9781611972832.21},
}
Figure