Time-series data vary widely across domains, making a universal anomaly detector impractical. Methods that perform well on one dataset often fail to transfer because what counts as an anomaly is context dependent. The key challenge is to design a method that performs well in specific contexts while remaining adaptable across domains with varying data complexities. We present the Robust and Adaptive Model Selection for Time-Series Anomaly Detection RAMSeS framework. RAMSeS comprises two branches: (i) a stacking ensemble optimized with a genetic algorithm to leverage complementary detectors. (ii) An adaptive model-selection branch identifies the best single detector using techniques including Thompson sampling, robustness testing with generative adversarial networks, and Monte Carlo simulations. This dual strategy exploits the collective strength of multiple models and adapts to dataset-specific characteristics. We evaluate RAMSeS and show that it outperforms prior methods on F1.
Figures & tables
Fig. 1: F1 score for six anomaly detection models from statistical and neural-network families across four domains (Prices, Medical, Industry, and Environment) [ 21 , 29 , 30 , 31 ] . Red vertical lines indicate spike anomalies. The triangle marks the best-performing model in each domain.
Fig. 2: RAMSeS framework overview.
Fig. 3: SKAB 1-1 time series
Fig. 4: Stacking ensemble via a genetic algorithm.
Fig. 5: Linear Thompson sampling with ε -greedy for model selection.
Fig. 6: Continuous online real-time model selection for anomaly detection.
Base models
Category
Dim
Brief Description
AutoEncoder [ 82 ]
NN
U&M
Reconstruction error
RNN [ 83 ]
NN
U&M
Vanilla recurrent prediction error
DGHL [ 84 ]
NN
M
Gen-ConvNet with latent factor
LSTMVAE [ 25 ]
NN
U&M
LSTM-based VAE
Donut [ 85 ]
NN
U&M
VAE likelihood scoring
OmniAnomaly [ 86 ]
NN
U&M
Stochastic RNN likelihood
TABLE I: Base models grouped by family: Neural Networks (NN), Statistical (Stat) or Foundation Models (FM) and applicability (U/M).
Entity
Parameter
Value
Rationale
GA-Ens
Population size ( P )
≤ 20
F1 saturation ( VI-H )
Number of Generations ( G )
≤ 20
Cost-effective ( VI-H )
Mutation rate ( μ )
≤ 0.2
Sustains diversity
Meta-learner
RF
Nonlinear aggregation
LinTS
Windows
50
Posterior convergence
Epsilon ( ϵ0 )
0.2
Early exploration
TABLE II: RAMSeS Hyperparameters for Reproducibility
Method
UCR (250 TS)
SMD (27 TS)
SKAB (18 TS)
F1
T
M
F1
T
M
F1
T
M
TSB
0.45
5012
534
0.55
4603
825
0.68
368
702
UMS
0.66
2661
2580
0.80
1520
1796
0.86
546
1312
MSAD
0.07
14918
639
0.13
260
608
0.54
74
286
AutoTSAD
Timeout
Not applicable
Not applicable
RAMSeS
0.83
1704
785
0.89
586
618
0.86
647
512
TABLE III: Average System-level performance: RAMSeS vs. automated TSAD baselines across all datasets and Time series (TS). Time (T) in seconds, Memory (M) in MB. Best in bold . Timeout is 48 hours per time series.
Dataset
GA
LinTS
GAN
SBA
MC
Single Branch
System Memory
UCR
75
1445
71
39
73
1628
785
SMD
280
173
38
30
64
306
618
SKAB
134
337
75
42
88
513
512
TABLE IV: Average end-to-end runtime (seconds) and memory (MB) per entity.
Fig. 7: Online phase avg. F1 & overhead on SMD for RAMSeS & Baselines
Fig. 8: Scalability: F1 and latency vs. candidate pool size for SKAB dataset.
Fig. 9: Window size sensitivity on SKAB dataset.
Dataset
Domain
N
GA-Ens
Single Sel.
Final Sel.
F1± σ
F1± σ
F1± σ
UCR-Med
Healthcare
68
0.77±0.06
0.80±0.09
0.82±0.07
UCR-Env
Environment
13
0.62±0.01
0.80±0.09
0.81±0.04
UCR-Ind
Industry
33
0.72±0.07
0.80±0.09
0.82±0.07
SMD
IT
25
0.88±0.07
0.87±0.05
0.89±0.05
SKAB
Industry
15
0.78±0.04
0.55±0.30
0.80±0.07
TABLE V: Branch average performance comparison based on F1-score.
Entity
P 10
P 50
P 100
G 100
1000
10000
100
1000
10000
100
1000
10000
SKAB 1-1
0.87
0.87
0.87
0.87
0.87
0.87
0.87
0.87
0.87
SKAB 1-2
0.87
0.87
087
0.87
0.87
0.87
0.87
0.87
0.87
SMD 3-4
0.77
0.76
0.76
0.76
0.76
0.76
0.76
0.76
0.76
SMD 3-10
0.71
0.71
0.71
0.71
0.71
0.71
0.71
0.71
0.71
011_UCR
0.77
0.77
0.77
0.77
0.77
0.77
0.77
0.77
0.77
TABLE VI: F1 across P sizes and G . Meta-learner= SVM and μ = 0.2.
Table 16
Fig. 10: Runtime–accuracy of the GA-based stacking ensemble on SKAB1_1 . (A) runtime vs. work ( P×G ), R2=0.931 . (B) runtime vs. μ across meta-learners. (C) runtime vs. meta-learner at three workloads. (D) F1 vs. work, R2=0.540 . (E) F1 vs. μ . (F) F1 vs. meta-learner. Points are medians over 3 runs.
Anomaly detection is a fundamental task for time-series analytics, with important implications for the downstream performance of many applications. Despite the large number of anomaly detection methods proposed in the literature, recent benchmark studies have shown that no single detector performs best across highly heterogeneous time series. Therefore, a practical and scalable solution is to develop a model-selection method that, for a given time series, selects the anomaly detector most likely to perform well. Nevertheless, the model selection approaches proposed in the literature suffer from a significant drop in accuracy when applied in Out-of-Distribution (OOD) settings. In this paper, we tackle the aforementioned limitation and propose RAMSAD, a retrieval-based framework for model selection in time-series anomaly detection. Given a new time series, our method queries a knowledge base of previously observed instances, retrieves the top-k most similar series, and transfers detector recommendations from their performance profiles. The framework can operate with standard similarity measures as well as embedding-based representations. Our results show that RAMSAD outperforms existing baselines in In-Distribution (ID) settings and is the most robust selector in OOD, where, when selecting a small subset of detectors, it matches or exceeds ensembles that run the entire detector pool, at a fraction of their cost. Overall, we demonstrate that similarity-based retrieval constitutes a strong and efficient foundation for model selection in time-series anomaly detection.
Time series anomaly detection is a crucial task in various domains, including finance, healthcare, and industry. However, existing methods often struggle to generalize across different datasets, especially when anomalies are subtle or context-dependent. To solve this issue, we introduce ChronosAD, a novel architecture for anomaly detection that uses a time series foundation model as a feature extractor. Specifically, it employs a two-stage pipeline: first, it uses the foundation model to extract embeddings for each time series in a zero-shot manner. Then, a custom-developed Temporal Block, composed of Bidirectional Long Short-Term Memory (BiLSTM) and Multi-Head Attention, refines these embeddings to capture temporal dependencies and highlight salient patterns. Unlike previous approaches, our model requires minimal task-specific tuning and demonstrates robust generalization across a wide range of domains, including industrial, medical, cyber-physical, and automotive systems. Extensive experiments on 11 benchmarks show that ChronosAD outperforms existing methods by 4.72% in AUC and 6.60% in AP on average. The source code is available at https://github.com/intelligolabs/ChronosAD.
Uzair Khan, Luigi Capogrosso, Francesco Biondani +4
University of Verona · Interdisciplinary Transformation University of Austria · ETH Zurich
Time series (TS) anomaly detection (AD) lacks a universal detector, with the best choice determined by the series rather than by the algorithm. Existing methods therefore either select one detector for each series or average a pool of them. However, both assume that no label ever arrives, while a deployed monitor does receive them, since an operator confirms the alarms it raises. In this paper, we propose ONESHOT, which uses a single confirmed anomaly to weight the pool rather than to choose one detector from it. Specifically, we score each detector on the confirmed anomaly, and those scores become the weights of a soft mixture over the whole pool. We show that a single confirmed anomaly is enough to come close to the best detector for the series. Across 152 univariate and 73 multivariate series, ONESHOT outperforms the strongest single detector, averaging the whole pool, and even picking the best detector on the confirmed event. Code is available at: https://github.com/seunghan96/one_shot.