Anomaly Detection via Mean Shift Density Enhancement
Pritam Kar, Rahul Bordoloi, Olaf Wolkenhauer, Saptarshi Bej
TL;DR
This work tackles unsupervised anomaly detection on complex data manifolds, a setting where anomalies exhibit diverse structural deviations. It introduces Mean Shift Density Enhancement (MSDE), a fully unsupervised framework that combines an adaptive neighborhood graph, UMAP-based density weighting, and a weighted mean-shift on a learned manifold; anomalies are scored by the cumulative geometric displacement during density-driven evolution. The approach delivers a displacement-based detection criterion with strong, robust performance across multiple anomaly types and noise levels, as demonstrated on the ADBench benchmark with 46 real-world datasets and 13 baselines. MSDE's density-enhancement perspective yields interpretable manifold dynamics and scalability advantages, offering a principled alternative to static density or reconstruction-based detectors and promising broader use in clustering and representation learning.
Abstract
Unsupervised anomaly detection stands as an important problem in machine learning, with applications in financial fraud prevention, network security and medical diagnostics. Existing unsupervised anomaly detection algorithms rarely perform well across different anomaly types, often excelling only under specific structural assumptions. This lack of robustness also becomes particularly evident under noisy settings. We propose Mean Shift Density Enhancement (MSDE), a fully unsupervised framework that detects anomalies through their geometric response to density-driven manifold evolution. MSDE is based on the principle that normal samples, being well supported by local density, remain stable under iterative density enhancement, whereas anomalous samples undergo large cumulative displacements as they are attracted toward nearby density modes. To operationalize this idea, MSDE employs a weighted mean-shift procedure with adaptive, sample-specific density weights derived from a UMAP-based fuzzy neighborhood graph. Anomaly scores are defined by the total displacement accumulated across a small number of mean-shift iterations. We evaluate MSDE on the ADBench benchmark, comprising forty six real-world tabular datasets, four realistic anomaly generation mechanisms, and six noise levels. Compared to 13 established unsupervised baselines, MSDE achieves consistently strong, balanced and robust performance for AUC-ROC, AUC-PR, and Precision@n, at several noise levels and on average over several types of anomalies. These results demonstrate that displacement-based scoring provides a robust alternative to the existing state-of-the-art for unsupervised anomaly detection.
