Skip to main content
QUICK REVIEW

[Paper Review] Estimating the Contamination Factor's Distribution in Unsupervised Anomaly Detection

Lorenzo Perini, Paul Buerkner|arXiv (Cornell University)|Oct 19, 2022
Anomaly Detection Techniques and ApplicationsComputer Science9 citations
TL;DR

This paper proposes $̳$GMM, the first Bayesian method for estimating the posterior distribution of the contamination factor $̳$ in unsupervised anomaly detection. By leveraging multiple anomaly detectors to create a score-based representation and fitting a Dirichlet Process Gaussian Mixture Model (DPGMM), it estimates the probability that the most extreme components are anomalous, enabling uncertainty-aware thresholding that outperforms 21 baselines in detection accuracy.

ABSTRACT

Anomaly detection methods identify examples that do not follow the expected behaviour, typically in an unsupervised fashion, by assigning real-valued anomaly scores to the examples based on various heuristics. These scores need to be transformed into actual predictions by thresholding, so that the proportion of examples marked as anomalies equals the expected proportion of anomalies, called contamination factor. Unfortunately, there are no good methods for estimating the contamination factor itself. We address this need from a Bayesian perspective, introducing a method for estimating the posterior distribution of the contamination factor of a given unlabeled dataset. We leverage on outputs of several anomaly detectors as a representation that already captures the basic notion of anomalousness and estimate the contamination using a specific mixture formulation. Empirically on 22 datasets, we show that the estimated distribution is well-calibrated and that setting the threshold using the posterior mean improves the anomaly detectors' performance over several alternative methods. All code is publicly available for full reproducibility.

Motivation & Objective

  • To address the lack of methods for estimating the contamination factor $̳$ in unsupervised anomaly detection, a critical yet overlooked challenge in practical deployment.
  • To frame contamination factor estimation as a Bayesian inference problem, enabling uncertainty quantification in the absence of labels.
  • To develop a method that produces well-calibrated posterior distributions of $̳$ for use in thresholding anomaly scores.
  • To improve anomaly detection performance by using the posterior mean of $̳$ as a robust, uncertainty-aware threshold.
  • To demonstrate that uncertainty-aware thresholding leads to higher detection accuracy than existing heuristic or point-estimate methods.

Proposed method

  • Transform raw data into a score space using multiple unsupervised anomaly detectors, creating a high-level representation of anomalousness.
  • Fit a Bayesian Gaussian Mixture Model with a Dirichlet Process prior (DPGMM) to the score space to model the underlying distribution of anomaly scores.
  • Order the mixture components by their extremity in the score space, prioritizing those with high mean scores and low variance.
  • Estimate the probability that the $k$ most extreme components are jointly anomalous using a two-parameter transformation based on $p_0$ and $p_{\text{high}}$.
  • Construct the posterior distribution of the contamination factor $\gamma$ as the sum of the weights of the most extreme components, marginalized over component assignments.
  • Use the posterior mean of $\gamma$ as a threshold for converting anomaly scores into discrete predictions, improving detection performance.

Experimental results

Research questions

  • RQ1Can we estimate the posterior distribution of the contamination factor $\gamma$ in an unsupervised setting without labeled anomalies?
  • RQ2How well does the uncertainty in $\gamma$ estimation translate into improved thresholding and detection performance?
  • RQ3How robust is the method to variations in hyperparameters $p_0$ and $p_{\text{high}}$?
  • RQ4Is the posterior distribution of $\gamma$ well-calibrated across diverse real-world datasets?
  • RQ5Does using the posterior mean of $\gamma$ as a threshold improve detection accuracy compared to standard estimators?

Key findings

  • The posterior mean of $\gamma$ estimated by $\gamma$GMM outperforms 21 baseline methods in detection accuracy on 22 benchmark datasets.
  • The method achieves near-perfect calibration, with empirical frequencies closely matching expected probabilities across a broad range of datasets.
  • The posterior distribution of $\gamma$ is often wide and multi-modal, reflecting genuine uncertainty in contamination estimation.
  • The method is robust to hyperparameter choices: $p_0$ has minimal impact, while $p_{\text{high}}$ slightly affects calibration but not performance.
  • The mean absolute error (MAE) of $\gamma$GMM's posterior mean estimate ranges from 0.252 (best) to 0.32 (worst) across hyperparameter variants, indicating consistent performance.
  • Using the posterior mean as a threshold leads to significantly better detection accuracy than using fixed thresholds or statistical estimators like MTT and IQR.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.