An Evaluation of Anomaly Detection and Diagnosis in Multivariate Time Series

Astha Garg, Wenyu Zhang, Jules Samaran, Savitha Ramasamy, Chuan-Sheng Foo · DOI

Abstract

Recent years have seen a surge in deep learning methods for multivariate time series (MVTS) anomaly detection. However, the field lacks a systematic comparison across common datasets and robust metrics. This paper presents a comprehensive evaluation of unsupervised and semi-supervised models through a modular framework, varying models and scoring functions independently. We identify critical flaws in the widely used point-adjusted F1-score ($F_{pa1}$) and propose a new Composite F-score ($Fc_1$). Our findings reveal that the choice of scoring function often outweighs the model architecture, with dynamic scoring significantly outperforming static methods. Notably, a simple Univariate AutoEncoder (UAE) combined with dynamic scoring emerges as a state-of-the-art performer.

The "Fog of War" in MVTS Evaluation

In cyber-physical systems (CPS)—such as power plants or spacecraft—identifying sensor anomalies is vital for preventing catastrophic failure. Despite numerous proposed models, evaluation remains inconsistent. A major hurdle is the popular "point-adjusted" F1-score ($F_{pa1}$), which considers an entire anomalous event "detected" if even a single point within it is flagged. While this reflects the importance of events over individual points, it is easily gamed.

Comparison of F-score metrics: $F_1$, $F_{pa1}$, and the proposed $Fc_1$. Note how $F_{pa1}$ gives high scores to random or trivial detectors, whereas $Fc_1$ correctly identifies poor performance.

As shown above, a random detector can achieve a high $F_{pa1}$ score, creating an illusion of high performance. To address this, we introduce the Composite F-score ($Fc_1$), the harmonic mean of time-wise precision and event-wise recall. $Fc_1$ ensures that detectors are rewarded for finding events without sacrificing precision, providing a more robust benchmark for the field.

A Modular Framework for Detection and Diagnosis

To clear the confusion between model architecture and post-processing, we propose a modular framework that decomposes the anomaly detection pipeline into three distinct stages:

  1. The Model ($f_m$): A reconstruction or prediction model (e.g., AutoEncoder, LSTM) that calculates raw errors for each channel.
  2. The Scoring Function ($f_{trans}$ and $f_{agg}$): This transforms raw errors into anomaly scores. We distinguish between static scoring (using fixed training statistics) and dynamic scoring (adapting to local variations in the test data).
  3. Thresholding ($f_{thres}$): Determining the cutoff point to label a time-point as anomalous.

Key Results: Scoring Matters More Than the Model

By conducting a grid search across 10 models and 4 scoring functions on seven real-world datasets (including SWaT, SMD, and NASA's MSL), we observed a surprising trend: the choice of scoring function often has a greater impact on performance than the underlying neural network architecture.

Performance across datasets as scoring functions vary from static (Error, Gauss-S) to dynamic (Gauss-D, Gauss-D-K). Dynamic functions consistently provide a significant performance boost across all models.

Dynamic scoring functions, such as Gauss-D, which adapt to changing "normal" behavior during testing, consistently outperformed static ones. Furthermore, a simple Univariate AutoEncoder (UAE)—which treats every channel independently—emerged as the top performer when paired with dynamic scoring. It outperformed much more complex models designed to capture intricate multivariate correlations, achieving the highest average rank for both detection and diagnosis.

Conclusion

This study highlights the need for robust metrics and modular evaluation in MVTS anomaly detection. The success of the simple UAE model suggests that many current benchmarks may be dominated by temporal anomalies rather than complex inter-channel dependencies. Future research should focus on developing datasets that explicitly challenge models to capture these intricate relationships and on further refining dynamic scoring techniques for streaming scenarios.

Summary updated

BibTeX
@article{garg2021evaluation,
  author = {Astha Garg and Wenyu Zhang and Jules Samaran and Savitha Ramasamy and Chuan-Sheng Foo},
  title = {{An Evaluation of Anomaly Detection and Diagnosis in Multivariate Time Series}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2021},
  doi = {10.1109/tnnls.2021.3105827},
}
Figure