A knowledge-enhanced, data-efficient model selector for time-series anomaly detection
KDSelector learns to recommend a suitable anomaly detector for an unseen time series by reusing knowledge from historical benchmark results. It further employs data-efficient learning to reduce selector-training cost. KDSelector is the algorithm behind our SIGMOD 2025 work, while the extended algorithmic details and comprehensive analyses are presented in our PVLDB 2026 paper; see the paper and repository for details.
- Knowledge-enhanced selection — learns from historical detector performance instead of evaluating every detector from scratch.
- Data-efficient training — integrates InfoBatch to reduce redundant training samples.
- Broad model support — includes deep selectors and conventional feature-based classifiers.
- End-to-end interface — provides a Streamlit workflow for dataset loading, selector training, selector management, and anomaly detection.
- Multiple evaluation metrics — ships benchmark scores for AUC-ROC, AUC-PR, VUS-ROC, and VUS-PR.
| Component | Implementations |
|---|---|
| Deep selectors | ConvNet, InceptionTime, ResNet, SiT |
| Feature-based selectors | k-NN, linear SVC, decision tree, random forest, MLP, AdaBoost, Gaussian NB, QDA |
| Anomaly detectors | AE, CNN, HBOS, Isolation Forest, LOF, LSTM, Matrix Profile, NORMA, OCSVM, PCA, POLY |
git clone https://github.com/chenyuanTKCY/KDSelector.git
cd KDSelectorConda is recommended because the project targets Python 3.8 and pins its main machine-learning dependencies.
conda env create --file environment.yml
conda activate KDSelectorAlternatively, install the Python dependencies directly:
python -m pip install -r requirements.txtGPU acceleration requires a CUDA setup compatible with the pinned PyTorch version. The application can also run on CPU.
Run this command from the repository root:
streamlit run app/Home.pyThe application opens in your browser and guides you through four stages: dataset preparation, selector learning, selector management, and model selection with anomaly detection.
Train a deep selector:
python train_deep_model.py \
--path <dataset-directory> \
--model resnet \
--params models/configuration/resnet_default.json \
--eval-trueTrain a feature-based selector:
python train_feature_based.py \
--path <dataset-directory> \
--classifier random_forest \
--eval-trueUse --help with either script to see every training option.
KDSelector/
├── app/ # Streamlit application and detector integrations
├── data/ # Benchmark metric tables
├── InfoBatch/ # Data-efficient training implementation
├── models/ # Selector architectures and configurations
├── report/ # Technical report
├── utils/ # Data loading, evaluation, and training utilities
├── train_*.py # Selector training entry points
└── eval_*.py # Selector evaluation entry points
If KDSelector supports your research, please cite:
@inproceedings{liang2025kdselector,
title = {KDSelector: A Knowledge-Enhanced and Data-Efficient Model
Selector Learning Framework for Time Series Anomaly Detection},
author = {Liang, Zhiyu and Cai, Dongrui and Zhang, Chenyuan and
Liang, Zheng and Liang, Chen and Zheng, Bo and Qiu, Shi and
Wang, Jin and Wang, Hongzhi},
booktitle = {Companion of the 2025 International Conference on Management
of Data},
year = {2025}
}For implementation details and experimental context, see the technical report.

