Table of Contents
Fetching ...

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.

Anomaly Detection via Mean Shift Density Enhancement

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.
Paper Structure (44 sections, 12 equations, 6 figures, 7 tables, 1 algorithm)

This paper contains 44 sections, 12 equations, 6 figures, 7 tables, 1 algorithm.

Figures (6)

  • Figure 1: Performance comparison of anomaly detection methods under no noise across evaluation metrics. Under the zero noise setting, MSDE outperforms other models on average over different anomaly types.
  • Figure 2: Qualitative illustration of MSDE anomaly detection on the MNIST dataset. Left: samples with the largest cumulative MSDE displacement (high anomaly scores). Right: samples with the smallest displacement (low anomaly scores). Across all digit classes, high-shift samples correspond to poorly written, ambiguous, or structurally irregular digits, while low-shift samples represent clean, prototypical instances. This demonstrates that MSDE captures semantic irregularity through geometric instability, despite operating in a fully unsupervised manner.
  • Figure 3: Step-by-step illustration of the proposed MSDE algorithm. The method constructs a manifold-aware similarity structure, performs weighted mean-shift updates, and quantifies anomaly likelihood using cumulative point displacement.
  • Figure 4: Geometric effect of Mean Shift Density Enhancement (MSDE) visualized in a two-dimensional PCA projection. Top-left: original data distribution of MNIST dataset. Top-right and bottom: data after MSDE updates (on the MNIST dataset) with increasing neighborhood sizes ($k=25,50,100$) and learning rate of 1. As $k$ increases, points are progressively attracted toward stable, high-density manifold regions, while samples originating in low-density or unstable regions undergo larger, more directed displacements. This illustrates the central principle of MSDE: anomalous points exhibit greater geometric instability under density-driven manifold evolution.
  • Figure 5: Class-wise visualization of mean absolute feature displacement induced by MSDE on the MNIST dataset. For each digit class, pixel intensities represent the average magnitude of per-feature shift accumulated during the mean-shift iterations. Displacement is concentrated along digit strokes and structurally informative regions, while background pixels remain largely stable. This indicates that MSDE-driven density enhancement selectively perturbs semantically meaningful features rather than introducing diffuse or global distortion.
  • ...and 1 more figures