Estimating the Contamination Factor’s Distribution in Unsupervised Anomaly Detection

Lorenzo Perini, Paul-Christian Bürkner, Arto Klami
Proceedings of the 40th International Conference on Machine Learning, PMLR 202:27668-27679, 2023.

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 for a given unlabeled dataset. We leverage several anomaly detectors to capture 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 detectors’ performance over several alternative methods.

Cite this Paper


BibTeX
@InProceedings{pmlr-v202-perini23a, title = {Estimating the Contamination Factor’s Distribution in Unsupervised Anomaly Detection}, author = {Perini, Lorenzo and B\"{u}rkner, Paul-Christian and Klami, Arto}, booktitle = {Proceedings of the 40th International Conference on Machine Learning}, pages = {27668--27679}, year = {2023}, editor = {Krause, Andreas and Brunskill, Emma and Cho, Kyunghyun and Engelhardt, Barbara and Sabato, Sivan and Scarlett, Jonathan}, volume = {202}, series = {Proceedings of Machine Learning Research}, month = {23--29 Jul}, publisher = {PMLR}, pdf = {https://proceedings.mlr.press/v202/perini23a/perini23a.pdf}, url = {https://proceedings.mlr.press/v202/perini23a.html}, 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 for a given unlabeled dataset. We leverage several anomaly detectors to capture 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 detectors’ performance over several alternative methods.} }
Endnote
%0 Conference Paper %T Estimating the Contamination Factor’s Distribution in Unsupervised Anomaly Detection %A Lorenzo Perini %A Paul-Christian Bürkner %A Arto Klami %B Proceedings of the 40th International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2023 %E Andreas Krause %E Emma Brunskill %E Kyunghyun Cho %E Barbara Engelhardt %E Sivan Sabato %E Jonathan Scarlett %F pmlr-v202-perini23a %I PMLR %P 27668--27679 %U https://proceedings.mlr.press/v202/perini23a.html %V 202 %X 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 for a given unlabeled dataset. We leverage several anomaly detectors to capture 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 detectors’ performance over several alternative methods.
APA
Perini, L., Bürkner, P. & Klami, A.. (2023). Estimating the Contamination Factor’s Distribution in Unsupervised Anomaly Detection. Proceedings of the 40th International Conference on Machine Learning, in Proceedings of Machine Learning Research 202:27668-27679 Available from https://proceedings.mlr.press/v202/perini23a.html.

Related Material