Introduction
Time Series Anomaly Detection (TSAD) is a critical task across various domains, from monitoring industrial equipment to securing IT infrastructure. However, the "No Free Lunch" theorem is particularly evident in this field: no single algorithm consistently outperforms others across all types of data. A model optimized for detecting spikes in network traffic may fail to identify subtle drifts in medical sensor data. To address this, researchers utilize "model selectors"—meta-models designed to analyze a data sample and predict which specific TSAD algorithm will yield the best results.
Despite their potential, existing model selectors suffer from two primary limitations. First, they often underutilize available information, relying solely on raw time series data and "hard labels" (identifying only the single best model) while ignoring the relative performance of runners-up and contextual metadata. Second, training these selectors on large-scale datasets is computationally expensive, as standard methods iterate over every sample, including redundant data that contributes little to the model's learning. This paper introduces KDSelector, a plug-and-play framework designed to overcome these hurdles through knowledge enhancement and data-efficient learning.
Methodology
KDSelector enhances the training of neural network-based selectors through three integrated modules: Performance-Informed Selector Learning (PISL), Meta-Knowledge Integration (MKI), and Pruning-based Acceleration (PA).
Performance-Informed Selector Learning (PISL)
Traditional selectors are typically trained using hard labels, which only identify the top-performing model for a given segment. PISL replaces this with "soft labels"—a probability distribution derived from the actual performance scores of all candidate models in a library. By training on the entire performance landscape, the selector learns the nuanced relationships and similarities between different algorithms, leading to more robust and accurate selection logic.
Meta-Knowledge Integration (MKI)
Time series data is often accompanied by natural language descriptions (e.g., "ECG data from a patient with arrhythmia" or "freeway loop sensor"). MKI leverages this metadata by using a pre-trained Large Language Model (BERT) to encode descriptions into feature vectors. To ensure the selector effectively utilizes this context, KDSelector employs mutual information maximization via InfoNCE loss, aligning the selector’s internal latent features with the high-level domain context provided by the metadata.
Pruning-based Acceleration (PA)
To address training inefficiency, the PA module identifies and removes redundant training samples. Using Locality Sensitive Hashing (LSH), the framework groups similar data samples into buckets. If a bucket contains numerous samples with similar training losses, the system prunes the majority, retaining only a representative subset. To maintain training stability and ensure the gradient remains unbiased, the gradients of the remaining samples are rescaled based on the size of the original bucket.
Experimental Setup
The authors evaluated KDSelector using the TSB-UAD benchmark, a comprehensive collection of 16 diverse datasets. These include:
- Medical/Biological: ECG, MITDB, SVDB, and Daphnet (Parkinson’s gait).
- Environmental/Industrial: SensorScope, Gasoil Heating Loop (GHL), and Genesis (industrial robotics).
- Web/IT Infrastructure: IOPS (web services), YAHOO (production traffic), NAB (AWS metrics), and SMD (server data).
- Synthetic/Other: MGAB (chaotic series), Dodgers (traffic), KDD21, and Occupancy.
The framework was tested across multiple base architectures, including ResNet, InceptionTime, and Transformer-based selectors, against a library of 12 candidate TSAD models.
Key Results and Insights
Performance Gains
Integrating PISL and MKI led to significant improvements in selection accuracy. Across the tested architectures, the average Area Under the Precision-Recall Curve (AUC-PR) increased from 0.421 to 0.461. This demonstrates that both the "soft" performance relationships and the domain-specific metadata provide critical signals that raw time series data alone cannot capture.
Efficiency and Scalability
The PA module proved highly effective at reducing computational overhead without sacrificing performance. For Transformer-based selectors, the framework achieved a 74.17% reduction in training time. For ResNet-based models, training time was reduced by 58.3% while maintaining nearly identical accuracy to models trained on the full dataset. This suggests that a vast majority of TSAD training data is functionally redundant.
Comparative Superiority
KDSelector consistently outperformed traditional non-neural selectors (such as Random Forest and K-Nearest Neighbors) as well as standard neural network approaches. The results indicate that the framework's ability to synthesize performance distributions and semantic metadata creates a more sophisticated understanding of the TSAD task space.
Conclusion and Future Work
KDSelector represents a significant step forward in making model selection for time series anomaly detection both more accurate and more efficient. By treating model selection as a knowledge-rich task rather than a simple classification problem, it unlocks the potential of existing TSAD algorithms.
Future research directions include expanding the candidate library to include modern time series foundation models and exploring "online" selection mechanisms. Such mechanisms would allow the selector to adapt dynamically as data streams evolve in real-time, further reducing the reliance on static offline training.
Summary updated