Abstract
Time series anomaly detection (TSAD) is a critical task across various domains, yet no single algorithm consistently outperforms others due to the diversity of anomaly types. While ensembling multiple detectors can improve accuracy, it is often computationally expensive. This paper introduces MSAD (Model Selection for Anomaly Detection), a framework that treats model selection as a time series classification problem. By predicting and combining only the most suitable detectors for a given data window, MSAD achieves superior accuracy compared to brute-force ensembles while significantly reducing computational overhead.
The Challenge: The "No Free Lunch" of Anomaly Detection
In fields ranging from medical diagnostics (ECG monitoring) to IT infrastructure management, identifying anomalies in time series data is vital. However, the "no free lunch" theorem is particularly evident in TSAD: an algorithm that excels at detecting sudden spikes may fail to identify gradual contextual shifts.
The conventional approach to mitigate this is the "Averaging Ensemble," which runs a wide array of anomaly detection (AD) methods and averages their scores. While robust, this brute-force strategy is unscalable for large-scale or real-time applications due to the cumulative execution time of multiple complex algorithms. MSAD addresses this bottleneck by asking: can we intelligently predict which detectors are most likely to succeed on a specific time series, thereby avoiding the cost of running irrelevant models?
The MSAD Pipeline
The authors propose a three-stage pipeline designed to automate detector selection using deep learning-based time series classification.
- Preprocessing: The input time series is partitioned into non-overlapping windows of a fixed length (e.g., 128 to 1024 points).
- Prediction: A classifier processes each window to output a probability distribution over a library of 12 candidate AD methods. The authors evaluated various architectures, finding that Convolutional Neural Networks (CNNs) and Transformers significantly outperform traditional feature-based models.
- Combination: Predictions are aggregated across windows using "Average" or "Vote" strategies. The system selects the top-$k$ detectors (where $k$ is typically small, e.g., 4 or 5), executes only those, and produces a final anomaly score through weighted averaging.
Evaluation and Key Insights
The framework was rigorously tested using the TSB-UAD benchmark, which comprises over 1,980 time series from 16 diverse domains, including medical (MITDB), sensor (SensorScope), and web metrics (YAHOO).
Several key findings emerged from the study:
- The Power of Ensembles ($k > 1$): Selecting just the single "best" predicted detector ($k=1$) is often insufficient. Because complex time series may contain multiple anomaly types, combining a small subset of top-predicted detectors (e.g., $k=4$) provides the necessary breadth to capture diverse patterns.
- Deep Learning Superiority: Modern architectures like ResNet and InceptionTime proved more adept at capturing the structural nuances required for accurate model selection than traditional statistical feature extraction.
- Generalization: MSAD demonstrated impressive out-of-distribution (OOD) transferability. Even when trained on one domain (e.g., medical) and tested on another (e.g., server metrics), the selector could still identify effective detector subsets.
Performance Results
The primary advantage of MSAD lies in its ability to balance high detection accuracy with computational efficiency.
- Accuracy Gains: In-distribution, the optimal MSAD configuration (ConvNet-128 with $k=4$) was up to 2.3x more accurate than the single best individual detector and 1.9x more accurate than the standard Averaging Ensemble.
- Efficiency Gains: By running only a fraction of the available detector library, MSAD maintains an execution time comparable to a single detector. This represents a massive speedup over brute-force ensembling, making it viable for large-scale deployments.
Limitations and Future Directions
Despite its success, MSAD still trails a theoretical "Oracle" selector that always chooses the perfect model. Current limitations include high performance variance on exceptionally difficult datasets where all base detectors struggle. Future research may focus on "diversity-aware" selection—ensuring the top-$k$ chosen detectors are not only accurate but also uncorrelated, thereby maximizing the ensemble's ability to cover different anomaly characteristics.
Summary updated