CoChat

Navigating the metric maze: a taxonomy of evaluation metrics for anomaly detection in time series

Open access
Sørbø, Sondre, Ruocco, Massimiliano · 2024 · Data Mining and Knowledge Discovery

The DOI matches its Crossref record; 90 of the 91 references it cites were found in a registry or an index, and 1 are not checked yet.

Abstract

The field of time series anomaly detection is constantly advancing, with several methods available, making it a challenge to determine the most appropriate method for a specific domain. The evaluation of these methods is facilitated by the use of metrics, which vary widely in their properties. Despite the existence of new evaluation metrics, there is limited agreement on which metrics are best suited for specific scenarios and domains, and the most commonly used metrics have faced criticism in the literature. This paper provides a comprehensive overview of the metrics used for the evaluation of time series anomaly detection methods, and also defines a taxonomy of these based on how they are calculated. By defining a set of properties for evaluation metrics and a set of specific case studies and experiments, twenty metrics are analyzed and discussed in detail, highlighting the unique suitability of each for specific tasks. Through extensive experimentation and analysis, this paper argues that the choice of evaluation metric must be made with care, taking into account the specific requirements of the task at hand.

Overview

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1007/s10618-023-00988-8

Cites

90 of 91 references verified0 citation errors · 0 not checkable

Statistics

Figures

Fig. 2 Given an anomaly score, two distinct thresholds yield two different binary predictions. For each threshold, every time step with anomaly score higher than the threshold is considered anomalous. Lowering the threshold increases the number of anomalous points predicted. Anomalous point, Normal point
Fig. 2 Given an anomaly score, two distinct thresholds yield two different binary predictions. For each threshold, every time step with anomaly score higher than the threshold is considered anomalous. Lowering the threshold increases the number of anomalous points predicted. Anomalous point, Normal pointCC-BY · From the PDF
Fig. 3 Time series anomaly detection pipeline. The binary predictions are found by applying a threshold to the anomaly score outputted by the detector. The evaluation is done at one of two points, either using the anomaly score, or the binary predictions. In both cases, binary labels are used for comparison
Fig. 3 Time series anomaly detection pipeline. The binary predictions are found by applying a threshold to the anomaly score outputted by the detector. The evaluation is done at one of two points, either using the anomaly score, or the binary predictions. In both cases, binary labels are used for comparisonCC-BY · From the PDF
Fig. 4 The confusion matrix for anomaly detection. Each point can have one of two label values, and one of two prediction values, resulting in four different classes of points. Anomalous point, Normal point
Fig. 4 The confusion matrix for anomaly detection. Each point can have one of two label values, and one of two prediction values, resulting in four different classes of points. Anomalous point, Normal pointCC-BY · From the PDF
Fig. 5 We consider two main categories of metrics, defined by their use of binary or non-binary predictions as input
Fig. 5 We consider two main categories of metrics, defined by their use of binary or non-binary predictions as inputCC-BY · From the PDF
Fig. 6 A taxonomy of binary evaluation metrics. A large number of these are f-scores based on various definitions of precision and recall. Precision and recall can be defined in many ways. Compared to the original point-wise definition, the difference can be present in the point-wise predictions, the counting metrics (TP, FP, TN, FN) or the formulas for precision and recall. The metrics can also be divided into point-based and event-based metrics, that count respectively individual points or contiguous events when aggregating to the total score. C f u1D6FD and NAB use both of these methods for parts of the total score
Fig. 6 A taxonomy of binary evaluation metrics. A large number of these are f-scores based on various definitions of precision and recall. Precision and recall can be defined in many ways. Compared to the original point-wise definition, the difference can be present in the point-wise predictions, the counting metrics (TP, FP, TN, FN) or the formulas for precision and recall. The metrics can also be divided into point-based and event-based metrics, that count respectively individual points or contiguous events when aggregating to the total score. C f u1D6FD and NAB use both of these methods for parts of the total scoreCC-BY · From the PDF
Fig. 7 Counting metrics are found in various ways by the different metrics. The figure shows the counting metrics, precision (P) and recall (R) and finally the f 1 -score, for three of the various definitions of the f 1 -score, for the same binary predictions. PW f u1D6FD considers each time point individually. As does PA f u1D6FD , but only after making an adjustment by expanding partially predicted anomalies. S f u1D6FD , on the other hand, considers events. Anomalous point, Normal point
Fig. 7 Counting metrics are found in various ways by the different metrics. The figure shows the counting metrics, precision (P) and recall (R) and finally the f 1 -score, for three of the various definitions of the f 1 -score, for the same binary predictions. PW f u1D6FD considers each time point individually. As does PA f u1D6FD , but only after making an adjustment by expanding partially predicted anomalies. S f u1D6FD , on the other hand, considers events. Anomalous point, Normal pointCC-BY · From the PDF
Fig. 8 We test the affiliation and temporal distance metrics on two predictions of the same label time series. The best score for each metric is shown in bold. The labels include two events, and each prediction is a bit early on one of them. The affiliation metric splits the time series into periods with one event each, and calculates the relative distance of the closest predicted event. In this example, the first anomaly in prediction 1 is seen as closer to a true anomaly than the second anomaly in prediction 2. TD , on the other hand, uses absolute distance, and prefers prediction 2
Fig. 8 We test the affiliation and temporal distance metrics on two predictions of the same label time series. The best score for each metric is shown in bold. The labels include two events, and each prediction is a bit early on one of them. The affiliation metric splits the time series into periods with one event each, and calculates the relative distance of the closest predicted event. In this example, the first anomaly in prediction 1 is seen as closer to a true anomaly than the second anomaly in prediction 2. TD , on the other hand, uses absolute distance, and prefers prediction 2CC-BY · From the PDF
Fig. 9 A taxonomy of non-binary evaluation metrics. Although the input is different from the binary metrics, they are quite similar, and indeed any binary metric can be made non-binary by using the optimal threshold strategy (See section 5.2.2)
Fig. 9 A taxonomy of non-binary evaluation metrics. Although the input is different from the binary metrics, they are quite similar, and indeed any binary metric can be made non-binary by using the optimal threshold strategy (See section 5.2.2)CC-BY · From the PDF
Fig. 10 Probability density functions for the anomaly scores of the positive (red) and negative (black) samples, for detectors A and B. The stippled lines are the thresholds. Anomalous samples generally give higher anomaly scores, although many normal and anomalous points have similar scores, making it hard to set a threshold. ( a , b ) show the counting metrics (as the shaded areas) for thresholds optimal for PW f u1D6FD for u1D6FD = 1 and u1D6FD = 8 respectively. Keep in mind that only 2% of samples are anomalies, i.e. TN + FP = 49 ( FN + TP ) , which is not shown in the figures. FP and FN are of comparable sizes in 10a (Color figure online)
Fig. 10 Probability density functions for the anomaly scores of the positive (red) and negative (black) samples, for detectors A and B. The stippled lines are the thresholds. Anomalous samples generally give higher anomaly scores, although many normal and anomalous points have similar scores, making it hard to set a threshold. ( a , b ) show the counting metrics (as the shaded areas) for thresholds optimal for PW f u1D6FD for u1D6FD = 1 and u1D6FD = 8 respectively. Keep in mind that only 2% of samples are anomalies, i.e. TN + FP = 49 ( FN + TP ) , which is not shown in the figures. FP and FN are of comparable sizes in 10a (Color figure online)CC-BY · From the PDF
Fig. 11 The ROC and PR curves for detectors A (blue) and B (green). The marked dots are the points corresponding to the optimal thresholds for PW f u1D6FD with u1D6FD ∈ 16, 8, 4, 2, 1, 1 ∕ 2, 1 ∕ 4, 1 ∕ 8 . We observe that detector A is best for higher thresholds, which are optimal for lower values of β, and vice versa. Detector B has the higher AUCROC , while detector A has the higher AUCPR (Color figure online)
Fig. 11 The ROC and PR curves for detectors A (blue) and B (green). The marked dots are the points corresponding to the optimal thresholds for PW f u1D6FD with u1D6FD ∈ 16, 8, 4, 2, 1, 1 ∕ 2, 1 ∕ 4, 1 ∕ 8 . We observe that detector A is best for higher thresholds, which are optimal for lower values of β, and vice versa. Detector B has the higher AUCROC , while detector A has the higher AUCPR (Color figure online)CC-BY · From the PDF
Table 1 Overview of all the metrics considered in the case studies
Table 1 Overview of all the metrics considered in the case studiesCC-BY · From the PDF
Fig. 17 Score as a function of position of the predicted event: Each point on the graph is the output of the considered evaluation metric ( PW f 1 in this case) for one full prediction, where the position of the predicted anomaly changes. The 4 vertical marks on the axis indicate the start and end of areas where some, but not all, predicted anomaly points are correct. In other words, before the first and after the last mark, the predictions have no TP points, while between the second and third mark, the predictions have no FP points
Fig. 17 Score as a function of position of the predicted event: Each point on the graph is the output of the considered evaluation metric ( PW f 1 in this case) for one full prediction, where the position of the predicted anomaly changes. The 4 vertical marks on the axis indicate the start and end of areas where some, but not all, predicted anomaly points are correct. In other words, before the first and after the last mark, the predictions have no TP points, while between the second and third mark, the predictions have no FP pointsCC-BY · From the PDF
Fig. 18 Score as a function of position of the predicted event: For each metric, the graph shows the scores of the detection scenario shown in Fig. 17, as a function of the position in the prediction. All graphs are scaled to the same interval for easy comparison
Fig. 18 Score as a function of position of the predicted event: For each metric, the graph shows the scores of the detection scenario shown in Fig. 17, as a function of the position in the prediction. All graphs are scaled to the same interval for easy comparisonCC-BY · From the PDF
Fig. 19 Is there one anomaly at t ≈ 3 and another at t ≈ 4 , or just one anomalous event from 3 to 4? Without any information about domain and time scale, we may only guess what is an anomaly here, or if there even exist any
Fig. 19 Is there one anomaly at t ≈ 3 and another at t ≈ 4 , or just one anomalous event from 3 to 4? Without any information about domain and time scale, we may only guess what is an anomaly here, or if there even exist anyCC-BY · From the PDF

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

Show all 91 references

Research works printed but not linked: 12

  1. Braei M, Wagner S (2020) Anomaly detection in univariate time-series: a survey on the state-of-the-art. CoRR abs/2004.00433. https://doi.org/10.48550/arXiv.2004.00433, arXiv:2004.00433 · arXiv · doi:10.48550/arxiv.2004.00433 · Paper page
  2. Campos D, Kieu T, Guo C, et al. (2021) Unsupervised time series outlier detection with diversity-driven convolutional ensembles. Proc VLDB Endow 15(3):611–623. https://doi.org/10.14778/3494124.3494142, http://www.vldb.org/pvldb/vol15/p611-chaves.pdf · DOI
  3. Chen Z, Chen D, Yuan Z et al (2021) Learning graph structures with transformer for multivariate time-series anomaly detection in IOT. IEEE Internet Things J 9:9179-9189. https:// doi. org/ 10. 1109/ JIOT. 2021. 31005 · DOI · Paper page
  4. Choi K, Yi J, Park C, et al. (2021) Deep learning for anomaly detection in time-series data: Review, analysis, and guidelines. IEEE Access 9:120,043–120,065. https://doi.org/10.1109/ACCESS.2021.3107975 · DOI · Paper page
  5. Gensler A, Sick B (2014) Novel criteria to measure performance of time series segmentation techniques. In: Seidl T, Hassani M, Beecks C (eds) Proceedings of the 16th LWA Workshops: KDML, IR and FGWM, Aachen, Germany, September 8-10, 2014, CEUR workshop proceedings, vol 1226. CEUR-WS.org, pp 193–204, http://ceur-ws.org/Vol-1226/paper31.pdf
  6. He · DOI · Paper page
  7. Huang X, Lee J, Kwon YW, et al. (2020) Crowdquake: A networked system of low-cost sensors for earthquake detection via deep learning. Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery and data mining https://doi.org/10.1145/3394486.3403378 · DOI
  8. Jacob V, Song F, Stiegler A, et al. (2021) Exathlon: A benchmark for explainable anomaly detection over time series. Proc VLDB Endow 14(11), 2613–2626. https://doi.org/10.14778/3476249.3476307 · DOI · Paper page
  9. Lai K, Zha D, Xu J, et al. (2021) Revisiting time series outlier detection: Definitions and benchmarks. In: Vanschoren J, Yeung S (eds) Proceedings of the neural information processing systems track on datasets and benchmarks 1, NeurIPS datasets and benchmarks 2021, December 2021, virtual, https:// datas ets-bench marks-proce edings. neuri ps. cc/ paper/ 2021/ hash/ ec5de cca5e d3d6b 8079e 2e7e7 bacc9 f2-Abstr act-round1. html
  10. Ma M, Zhang S, Chen J, et al. (2021) Jump-starting multivariate time series anomaly detection for online service systems. In: USENIX annual technical conference, https:// www. usenix. org/ confe rence/ atc21/ prese ntati on/ ma
  11. Shen L, Li Z, Kwok J (2020) Timeseries anomaly detection using temporal hierarchical one-class network. In: Larochelle H, Ranzato M, Hadsell R, et al. (eds) Advances in neural information processing systems, vol 33. curran associates, Inc., pp 13,016–13,026, https://proceedings.neurips.cc/paper/2020/file/97e401a02082021fd24957f852e0e475-Paper.pdf
  12. Tatbul N, Lee TJ, Zdonik S, et al. (2018) Precision and recall for time series. In: Bengio S, Wallach HM, Larochelle H, et al. (eds) Advances in neural information processing systems 31: annual conference on neural information processing systems 2018. NeurIPS 2018, December 3-8, 2018, Montréal, Canada, pp 1924–1934, https://proceedings.neurips.cc/paper/2018/hash/8f468c873a32bb0619eaeb2050ba45d1-Abstract.html

Cited by

See all 58

Metadata

Authors
Sørbø, S., & Ruocco, M.
Affiliations
  • SINTEF Digital (NO)
  • Norwegian University of Science and Technology (NO)
Corresponding author
  • Sørbø, Sondre
  • Ruocco, Massimiliano
Venue
Data Mining and Knowledge Discovery
Published
2023-11-18
Volume
38
Issue
3
Pages
1027-1068
ISSN
  • 1384-5810 (ISSN-L)
  • 1573-756X
OpenAlex
W4388797346
Cited by
58
References
88
Citations by year
2026: 24 · 2025: 20 · 2024: 13 · 2023: 1
FWCI
5.45
Type
journal article
Language
en
Open access
Licence
Locations
  • Data Mining and Knowledge Discovery (publishedVersion, cc-by)
  • arXiv (Cornell University) (submittedVersion)
  • NORA - Norwegian Open Research Archives (submittedVersion, cc-by)
  • arXiv (Cornell University)
Funders
  • Norges Forskningsråd (312062)
  • SINTEF
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Anomaly Detection Techniques and Applications
  • Physical Sciences › Computer Science › Signal Processing › Time Series Analysis and Forecasting
  • Physical Sciences › Computer Science › Computer Networks and Communications › Software System Performance and Reliability
Keywords
time series anomaly detection, evaluation metrics, measurement properties, metric comparison

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.