TL;DR
This paper tackles the overwhelming challenge of choosing the right anomaly detection algorithm for time series data by providing a comprehensive experimental comparison of twelve popular methods. They offer practical guidelines to help researchers and practitioners select algorithms based on specific time series characteristics, saving significant time and effort.
What Problem Does This Paper Address?
Anomaly detection in time series data is crucial across many fields, from fraud detection to medical monitoring. However, the sheer volume of available anomaly detection algorithms, coupled with the diverse nature of time series data (exhibiting seasonality, trends, concept drift, etc.), makes selecting the optimal method a daunting task. There's no "one-size-fits-all" solution, and current research often focuses on developing new methods rather than systematically evaluating existing ones across various scenarios. This paper addresses the need for a practical guide to navigate this complex landscape, helping users efficiently identify promising algorithms for their specific time series data.
Methods
The authors experimentally evaluated twelve anomaly detection algorithms: Windowed Gaussian, SARIMAX, Facebook Prophet, Anomalous, GLIM, STL residual thresholding, Twitter AD, Matrix Profile, VAE (Donut), HS Trees, PBAD, and HTM. They re-implemented or used existing libraries for these methods. To evaluate their performance, they employed three key metrics: AUC (Area Under the Curve), windowed F-score, and the Numenta Anomaly Benchmark (NAB) scoring model. They also considered the time taken for training and detection, crucial for real-time applications. Statistical significance of the results was assessed using the Friedman average rank test, followed by the Nemenyi test for pairwise comparisons.
Datasets
The paper utilized datasets from the Numenta Anomaly Benchmark repository, which contains pre-annotated datasets across various domains. For each time series characteristic (seasonality, trend, concept drift, and missing time steps), they created a corpus of 10 datasets. In cases where Numenta datasets were not used, they had computer science undergraduate students tag the datasets for anomalies following Numenta's instructions.
Key Insights and Ideas
- No Silver Bullet: The paper strongly reinforces the idea that a single anomaly detection method is not optimal for all time series domains.
- Characteristics Matter: The performance of anomaly detection algorithms is highly dependent on the specific characteristics of the time series data, such as seasonality, trend, and concept drift.
- Scoring Method Impact: Different evaluation metrics (AUC, F-score, NAB) can lead to vastly different rankings of the same algorithms, highlighting the importance of choosing an appropriate metric for the application's goals (e.g., NAB rewards early detection).
- Classical vs. ML: Simple methods like Windowed Gaussian and GLIM can perform competitively with more complex machine learning and deep learning models like VAE, suggesting that advanced techniques don't always outperform classical approaches in time series anomaly detection.
- Method Limitations: Some methods have specific limitations, such as Twitter AD VEC not handling time series with periodicity of 1, or STL Residual Thresholding requiring a periodicity of 4 or higher.
Key Results
The paper presents detailed comparisons across seasonality, trend, concept drift, and missing time steps (though the extended abstract focuses heavily on seasonality results). For seasonality, they found:
- AUC: ANOMALOUS was outperformed by Windowed Gaussian, VAE, HS Tree, and GLIM. GLIM outperformed Twitter and PBAD.
- Windowed F-Score: ANOMALOUS was outperformed by Windowed Gaussian, HTM, and GLIM, but ANOMALOUS outperformed VAE and HS Tree.
- NAB Scores: ANOMALOUS outperformed STL, SARIMAX, and PBAD. PBAD was outperformed by VAE and Twitter.
- Performance Variability: ANOMALOUS, for instance, ranked 11th in AUC but 1st in NAB, demonstrating how scoring methods influence perceived performance.
- Top Performers (Seasonality): For AUC and windowed F-score, Windowed Gaussian and GLIM were consistently ranked in the top three.
Limitations and Future Work
The authors acknowledge that their work is an extended abstract and that their full JAIR article [Freeman et al., 2021] repeats these experiments on datasets expressing the remaining time series characteristics (trend, concept drift, and missing time steps). They also analyze complexity and report on training and prediction times, which are vital for real-time settings. The paper's primary limitation is the inherent complexity of anomaly detection and the vastness of the field, but their hope is that their experiments and analysis will provide valuable guidance for practitioners.
Summary updated