Anomaly Detection: How to Artificially Increase your F1-Score with a Biased Evaluation Protocol

Damien Fourure, Muhammad Usama Javaid, Nicolas Posocco, Simon Tihon
6/30/2021
cs.LG

Official code: euranova/F1-Score-is-Biased (3 stars, Jupyter Notebook, last commit 2021-08-31).

Abstract

Anomaly detection is a widely explored domain in machine learning. Many models are proposed in the literature, and compared through different metrics measured on various datasets.

Show full abstract

The most popular metrics used to compare performances are F1-score, AUC and AVPR. In this paper, we show that F1-score and AVPR are highly sensitive to the contamination rate. One consequence is that it is possible to artificially increase their values by modifying the train-test split procedure. This leads to misleading comparisons between algorithms in the literature, especially when the evaluation protocol is not well detailed. Moreover, we show that the F1-score and the AVPR cannot be used to compare performances on different datasets as they do not reflect the intrinsic difficulty of modeling such data. Based on these observations, we claim that F1-score and AVPR should not be used as metrics for anomaly detection. We recommend a generic evaluation procedure for unsupervised anomaly detection, including the use of other metrics such as the AUC, which are more robust to arbitrary choices in the evaluation protocol.

View on arXivView PDF

Code Implementations(1)

This code reproduces the results and figures presented in the paper "Anomaly Detection: How to Artificially Increase your F1-Score with a Biased Evaluation Protocol" accepted at the ECML-PKDD 2021 conference.

30Jupyter Notebook, PythonJun 28, 20215 years ago

Similar Papers

Cite this paper

@article{fourure2021anomaly,
  title  = {Anomaly Detection: How to Artificially Increase your F1-Score with a Biased Evaluation Protocol},
  author = {Damien Fourure and Muhammad Usama Javaid and Nicolas Posocco and Simon Tihon},
  year   = {2021},
  eprint = {2106.16020},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.16020}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.16020.svg)](https://codeofpaper.com/paper/2106.16020)

Discussion