Automated Model Selection for Time-Series Anomaly Detection

Yuanxiang Ying, Juanyong Duan, Chunlei Wang, Yujing Wang, Congrui Huang, Bixiong XuarXiv 2020

TL;DR

This paper tackles the challenge of selecting the best anomaly detection model for diverse time-series data, which is crucial for industrial monitoring. They introduce an automated framework that intelligently picks the most suitable model and its parameters, significantly improving detection accuracy and user customization.

What Problem Does This Paper Address?

In today's data-driven world, businesses rely on monitoring millions of temporal signals to ensure smooth operations. Detecting anomalies in these signals is critical for identifying potential issues and preventing significant losses. However, time-series data is notoriously complex: it's often messy, stochastic, and lacks the labels needed for traditional supervised learning. Furthermore, a single anomaly detection model rarely performs well across all types of time-series due to their diverse patterns. This forces practitioners to either manually tune models for each series or settle for suboptimal performance. This paper addresses this by proposing an automated system that can dynamically select the best anomaly detection model and its parameters for any given time-series.

Methods

The core of the proposed solution is an Automated Model Selection Framework. This framework operates in three main phases:

  1. Feature Extraction Phase: For an incoming time-series, a set of transformations (like FFT, de-seasonality) and statistical metrics are applied to generate a rich feature vector (82 dimensions in their case). This phase aims to capture the underlying characteristics of the time-series.
  2. Automated Model Selection Phase: This is the heart of the innovation. A pre-trained model selector (implemented as a LightGBM classifier) takes the feature vector and predicts the most suitable anomaly detection model from a pool of candidates. Crucially, this phase also includes a parameter estimator (implemented as a LightGBM regression model) that learns the optimal hyperparameters for the selected model. The candidate models are unsupervised, making them suitable for data with limited labels.
  3. Customized Anomaly Detection Phase: Once the model and parameters are selected, they are used to generate a preliminary anomaly detection result. This result is then refined by a customized tuning module, allowing users to adjust anomaly detection sensitivity with a single parameter. This provides flexibility to meet diverse business needs.

The model selector is trained offline using a "time-series knowledge base" of labeled data. The framework is designed to be extensible, allowing new anomaly detection models to be easily incorporated.

Datasets

The primary dataset used for evaluation is an internal Microsoft time-series dataset called TSD. This dataset consists of 1570 sequences with a total size of 308,822 data points, containing 23,356 anomalies, resulting in an anomaly ratio of 7.56%. The dataset was split into training and testing sets with a 3:1 ratio. The paper does not introduce a new benchmark dataset but uses its internal production data for evaluation.

Key Insights and Ideas

  • No One-Size-Fits-All: The paper strongly emphasizes that different time-series have unique characteristics, and a single anomaly detection model cannot effectively handle them all. This justifies the need for an automated selection mechanism.
  • Feature Engineering is Key: The effectiveness of the model selector hinges on extracting informative features from the time-series. The combination of transformations and statistical metrics proves valuable.
  • Leveraging Machine Learning for Model Selection: Treating model selection as a classification task, and parameter estimation as a regression task, allows for a data-driven and automated approach.
  • User Customization is Essential: Anomaly detection is not just a technical problem but also a business one. The ability for users to tune the sensitivity of anomaly detection results is crucial for practical adoption.
  • Extensibility for Future-Proofing: The modular design allows for easy integration of new anomaly detection algorithms, ensuring the system can adapt to advancements in the field.

Key Results

The paper demonstrates significant improvements in anomaly detection performance:

  • Improved F1 Score: The proposed Auto-Selector achieved a higher F1 score (0.4738) compared to individual models like SR (0.3446), HBOS (0.4190), and S-H-ESD (0.4148) when using their best parameters found during training (Table 2).
  • Further Improvement with Best Parameters: When the best parameters were searched on the test set for each individual model, Auto-Selector still outperformed them, achieving an F1 score of 0.5714 compared to SR (0.4719), HBOS (0.4969), and S-H-ESD (0.4711) (Table 3). This indicates the model selector itself is effective.
  • Practical Impact: The system has been deployed at Microsoft and is used by over 200 product teams, monitoring millions of time-series, demonstrating its scalability and real-world utility. Case studies show how Auto-Selector resolved previously unsatisfactory detection cases by selecting more appropriate models.

Limitations and Future Work

  • Dependence on Labeled Data for Training: The model selector is trained offline using a "time-series knowledge base" with anomaly labels. While the system aims to reduce the need for labels in online serving, the initial training phase still relies on them.
  • Parameter Estimator Performance: While the parameter estimator improves performance, the paper notes that it might be challenging for this module to achieve perfectly satisfied results compared to manually searching for the best parameters on the test set.
  • Future Work: The authors plan to enhance the Parameter Estimator's ability and reduce the dependence on anomaly labels for building a more accurate Auto-Selector. They also aim to further improve the extensibility and robustness of the framework.

Summary updated

BibTeX
@misc{ying2020automated,
  author = {Yuanxiang Ying and Juanyong Duan and Chunlei Wang and Yujing Wang and Congrui Huang and Bixiong Xu},
  title = {{Automated Model Selection for Time-Series Anomaly Detection}},
  year = {2020},
  eprint = {2009.04395},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2009.04395},
}
Figure