# Estimating the Contamination Factor's Distribution in Unsupervised Anomaly Detection

arXiv: https://arxiv.org/abs/2210.10487 · HTML: https://mlsanity.com/paper/2210.10487/

## Key facts

- Cited by 14 papers in the map (data through 14 Oct 2026).
- Builds on 18 of its 74 references that are in the map.
- First posted on arXiv 19 Oct 2022.

## Builds on (most cited first, 18 of 18)

- [Variational Inference: A Review for Statisticians](https://mlsanity.com/paper/1601.00670/) (2016)
- [ADBench: Anomaly Detection Benchmark](https://mlsanity.com/paper/2206.09426/) (2022)
- [PyOD: A Python Toolbox for Scalable Outlier Detection](https://mlsanity.com/paper/1901.01588/) (2019)
- [COPOD: Copula-Based Outlier Detection](https://mlsanity.com/paper/2009.09463/) (2020)
- [LSCP: Locally Selective Combination in Parallel Outlier Ensembles](https://mlsanity.com/paper/1812.01528/) (2018)
- [Learning in the Wild with Incremental Skeptical Gaussian Processes](https://mlsanity.com/paper/2011.00928/) (2020)
- [Towards a More Reliable Interpretation of Machine Learning Outputs for Safety-Critical Systems using Feature Importance Fusion](https://mlsanity.com/paper/2009.05501/) (2020)
- [Transforming variables to central normality](https://mlsanity.com/paper/2005.07946/) (2020)
- [Anomaly Detection: How to Artificially Increase your F1-Score with a Biased Evaluation Protocol](https://mlsanity.com/paper/2106.16020/) (2021)
- [On Accurate and Reliable Anomaly Detection for Gas Turbine Combustors: A Deep Learning Approach](https://mlsanity.com/paper/1908.09238/) (2019)
- [Elliptical Insights: Understanding Statistical Methods through Elliptical Geometry](https://mlsanity.com/paper/1302.4881/) (2013)
- [A Robust AUC Maximization Framework with Simultaneous Outlier Detection and Feature Selection for Positive-Unlabeled Classification](https://mlsanity.com/paper/1803.06604/) (2018)
- [Periodicity Detection of Outlier Sequences Using Constraint Based Pattern Tree with MAD](https://mlsanity.com/paper/1507.01685/) (2015)
- [Fast and Exact Outlier Detection in Metric Spaces: A Proximity Graph-based Approach](https://mlsanity.com/paper/2110.08959/) (2021)
- [Bayesian Anomaly Detection and Classification](https://mlsanity.com/paper/1902.08627/) (2019)
- [Filtering Approaches for Dealing with Noise in Anomaly Detection](https://mlsanity.com/paper/1909.01477/) (2019)
- [Multiple outlier detection tests for parametric models](https://mlsanity.com/paper/1910.10426/) (2019)
- [TransductGAN: a Transductive Adversarial Model for Novelty Detection](https://mlsanity.com/paper/2203.15406/) (2022)

## Built on by (most cited first, 14 of 14)

- [Unsupervised Anomaly Detection with Rejection](https://mlsanity.com/paper/2305.13189/) (2023)
- [Revisiting Deep Feature Reconstruction for Logical and Structural Industrial Anomaly Detection](https://mlsanity.com/paper/2410.16255/) (2024)
- [An Evidence-Based Post-Hoc Adjustment Framework for Anomaly Detection Under Data Contamination](https://mlsanity.com/paper/2510.21296/) (2025)
- [Uncertainty-aware Evaluation of Auxiliary Anomalies with the Expected Anomaly Posterior](https://mlsanity.com/paper/2405.13699/) (2024)
- [How to Allocate your Label Budget? Choosing between Active Learning and Learning to Reject in Anomaly Detection](https://mlsanity.com/paper/2301.02909/) (2023)
- [Conformal Data Contamination Tests for In-distribution Data Acquisition](https://mlsanity.com/paper/2507.13835/) (2025)
- [Multi-Agent Conformal Prediction with Personalized Statistical Validity](https://mlsanity.com/paper/2606.00717/) (2026)
- [Impact of Inaccurate Contamination Ratio on Robust Unsupervised Anomaly Detection](https://mlsanity.com/paper/2408.07718/) (2024)
- [Risk-Based Thresholding for Reliable Anomaly Detection in Concentrated Solar Power Plants](https://mlsanity.com/paper/2503.19146/) (2025)
- [Anomaly Detection with Adaptive and Aggressive Rejection for Contaminated Training Data](https://mlsanity.com/paper/2511.21378/) (2025)
- [IMPACT: Influence Modeling for Open-Set Time Series Anomaly Detection](https://mlsanity.com/paper/2603.29183/) (2026)
- [When Normality Shifts: Risk-Aware Test-Time Adaptation for Unsupervised Tabular Anomaly Detection](https://mlsanity.com/paper/2605.10242/) (2026)
- [Unsupervised Anomaly Detection of Information Operations Users via Behavioral and Language Patterns](https://mlsanity.com/paper/2607.05855/) (2026)
- [Collaborative Streaming Anomaly Detection with Interactive Explanations and Ensemble Consensus](https://mlsanity.com/paper/2609.23883/) (2026)

## Abstract (arXiv)

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.
