Organizations: Department of Industrial Engineering, Tsinghua University, Beijing, China · Lab, Huawei Technologies, ShenZhen, China · Datadog AI Research, Paris, France
Time series anomaly detection (TSAD) is a critical task, but developing models that generalize to unseen data in a zero-shot manner remains challenging. Existing foundation models for TSAD often rely on reconstruction-error scoring at inference time, which can miss subtle anomalies that are well reconstructed and can falsely flag complex but normal patterns in unseen domains. We introduce TimeRCD, a foundation model for TSAD built on Relative Context Discrepancy (RCD), a pre-training paradigm that trains the model to detect anomalies by comparing a query pattern with its surrounding context. This relational formulation, implemented with a standard Transformer architecture, enables the model to infer normality from the input context rather than relying on fixed global normal patterns. We further construct a large-scale synthetic corpus with context-dependent anomaly labels to provide supervised pre-training signals for RCD. Experiments across diverse benchmarks show that TimeRCD outperforms existing general-purpose and anomaly-specific foundation models in most zero-shot TSAD settings, while remaining competitive with dataset-specific full-shot baselines. These results provide empirical evidence that RCD is an effective direction for building robust and generalizable TSAD models.
Figures & tables
Figure 1: Limitations of Reconstruction-based TSAD and Our Proposed TimeRCD. (a) The model accurately reconstructs a smooth anomaly, resulting in a low error score and a missed detection (false negative). (b) The model fails to reconstruct a complex normal pattern unseen in the training dataset, leading to a high error score and a false alarm (false positive). (c) TimeRCD adopts RCD with a large-scale context-dependent corpus and a standard encoder-only Transformer.
Figure 2: Motivation Examples for RCD: Representation conflict in zero-shot TSAD.
Figure 3: TimeRCD Architecture
Figure 4: Synthetic data generation procedure.
Metric
Model
Univariate Datasets
Multivariate Datasets
Total
Total
IOPS
MGAB
NAB
NEK
Power
SED
Stock
TODS
UCR
WSD
YAHOO
MSL
PSM
SMAP
SMD
SWaT
1st
2nd
Zero-Shot Models
Affiliation-F
TimeRCD
86.98
74.54
93.81
83.95
85.02
88.99
41.31
84.86
84.34
91.00
95.94
84.66
82.31
86.01
91.75
69.43
07
04
DADA †
89.37 ∗
67.66 ∗
86.56
95.40
69.79
65.18
98.77
76.89
72.21
93.92
92.20 ∗
76.57
81.27
76.92
83.74
76.18
03
03
MOMENT †
87.54 ∗
66.76 ∗
90.45 ∗
92.26
75.97
59.13
45.26
59.76
75.77
95.39
79.99 ∗
74.55 ∗
65.79
77.42 ∗
74.00 ∗
70.17
01
01
TimesFM
81.88
66.95
79.73
90.49
69.88
67.14
97.53
89.08
70.03
78.97
91.28
20.35
71.24
45.44
62.85
44.37
00
02
Table 1: Performance of TimeRCD against zero-shot and full-shot baselines. TimeRCD operates in a strictly zero-shot capacity in all comparisons. Best results are highlighted in red ; second-best results are shown in blue . Asterisked (*) results are excluded from ranking due to potential data leakage.
Figure 5: Qualitative comparison of anomaly scores for point and contextual anomalies.
Figure 6: Comparison on specialized datasets containing either point or contextual anomalies.
Figure 7: The effect of input window size on datasets (Power, UCR, YAHOO, SMAP, and SMD) with sizes ranging from 1k to 13k.
Figure 8: Empirical scaling trend for average VUS-PR across our benchmarks when increasing the number of training observations (350M, 700M, 2.5B).
Dataset
Aff-F
F1-T
Std-F1
VUS-PR
Our Synthetic Data
0.878
0.569
0.523
0.478
Our Synthetic + DADA Injection
0.878
0.505
0.462
0.487
Real-world Data + DADA Injection
0.716
0.073
0.062
0.102
Table 2: Weighted average performance across all univariate benchmarks.
Exp.
Training Objective
Inference Rule
VUS-PR
Exp1
Reconstruction + Anomaly
Anomaly head
33.57
Exp2
Reconstruction + Anomaly
Reconstruction error
4.08
Exp3
Reconstruction only
Reconstruction error
3.35
Exp4
Anomaly only
Anomaly head
5.90
Exp5
Reconstruction pretraining, frozen encoder, then anomaly-head training
Anomaly head
26.11
Table 3: Controlled UCR ablation with the same backbone, tokenization, and synthetic corpus.
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
Name
Typical range / rule
Applies to
Intended effect
Number of samples
positive integer
whole dataset
Total number of generated sequences.
Sequence length
uniformly in {100,…,10000}
per sample
Time horizon of each sequence.
Anomalous-sample ratio
real in [0,1]
per sample
Probability a sample contains anomalies.
Multivariate flag
{True, False}
per sample
Whether to generate multi-channel series.
Number of features
fixed or uniformly in {2,…,50}
multivariate only
Channel count when multivariate.
Random seed (optional)
user-provided integer
whole run
Reproducibility of the random draws.
Appendix
Table 4: Dataset-level generation controls and intended effects.
Category
Options
Probability
Seasonality type
no periodic fluctuation
0.3
sine
0.3
square
0.05
triangle
0.05
wavelet
0.3
Trend type
decrease
0.2
Appendix
Table 5: Attribute categories, options, and relative probability.
Name
Typical range / rule
Applies to
Intended role
Number of nodes
Uniformly in 1 to 50
system graph
Dimensionality of the multivariate system.
Number of edges
roughly linear in nodes (acyclic)
system graph
Connectivity while preserving acyclicity.
Parent lags
nonnegative integers up to a small fraction of length
per edge
Causal delays between channels.
ARX autoregression ai
real in [−0.8,0.8]
per node
Decay/stability of latent causal influence.
ARX exogenous gains bij
zero-mean with finite variance
per edge
Strength of parent-to-child coupling.
ARX bias ci
bounded real interval
per node
Baseline offset in causal channel.
Appendix
Table 6: Multivariate and causal-dynamics hyperparameters and intended roles.
Figure 9: Illustration of synthetic anomaly archetypes.
Family
Type
Intent (one sentence)
Formal definition (within [ts,te) )
Local
Upward spike
A single sharp positive glitch
Δ(t)=Amax(1−∣t−t0∣/w,0)
Downward spike
A single sharp negative glitch
Δ(t)=−Amax(1−∣t−t0∣/w,0)
Continuous upward spikes
Rapid consecutive positive spikes
∑m=0M−1Ammax(1−∣t−(t0+md)∣/wm,0)
Continuous downward spikes
Rapid consecutive negative spikes
∑m=0M−1(−Am)max(1−∣t−(t0+md)∣/wm,0)
Wide upward spike
Longer rise/plateau/fall pulse
piecewise linear rise/hold/fall with amplitude A
Wide downward spike
Longer fall/plateau/rise pulse
piecewise linear with amplitude −A
Appendix
Table 7: Summary of anomaly archetypes, intents, and formal definitions.
Name
Domain
#TS
Avg Length
AR (%)
UCR
Misc.
228
67818.7
0.6
NAB
Web
28
5099.7
10.6
YAHOO
Web
259
1560.2
0.6
IOPS
Operations
17
72792.3
1.3
MGAB
Sensor
9
97777.8
0.2
SED
Energy
3
23332.3
4.1
Appendix
Table 8: Univariate Datasets
Name
Domain
#TS
Avg Length
AR (%)
MSL
Space
16
3119.4
5.1
PSM
Sensor
1
217624.0
11.2
SMAP
Space
27
7855.9
2.9
SMD
Server
22
25466.4
3.8
SWaT
ICS
2
207457.5
12.7
Appendix
Table 9: Multivariate Datasets
Figure 10: Distribution of time series lengths within our 2.5B point synthetic pre-training dataset. The histogram follows a long-tailed distribution, demonstrating that the pre-training curriculum is highly diverse. It contains a large volume of shorter series (under 4,000 steps) to teach common patterns, while also including a significant number of longer series (up to 10,000 steps) to ensure the model learns long-range temporal dependencies.
Type
Metric
TimeRCD
Chronos
DADA
MOMENT
TSPulse
Time MOE
TimesFM
Point
Affiliation-F
0.912
0.899
0.823
0.886
0.733
0.793
0.889
F1 T
0.604
0.441
0.387
0.551
0.214
0.303
0.446
Standard-F1
0.521
0.352
0.121
0.472
0.090
0.149
0.397
VUS-PR
0.666
0.293
0.396
0.538
0.063
0.190
0.385
Contextual
Affiliation-F
0.949
0.804
0.721
0.813
0.730
0.756
0.792
F1 T
0.781
0.174
0.227
0.284
0.210
0.269
0.154
Appendix
Table 10: Quantitative comparison on specialized point and contextual anomaly datasets. The table is grouped by anomaly type, with metrics listed vertically for each. TimeRCD is competitive on point anomalies and stronger on contextual anomalies on the reported metrics. Best results in each row are highlighted in bold .
Figure 11: Affiliation-F performance across all 14 datasets as a function of the input window size from 1k to 13k.
Figure 12: F1 T performance across all 14 datasets as a function of the input window size from 1k to 13k.
Figure 13: Standard-F1 performance across all 14 datasets as a function of the input window size from 1k to 13k.
Figure 14: VUS-PR performance across all 14 datasets as a function of the input window size from 1k to 13k.
Metric
Model
Univariate Datasets
Total
Total
IOPS
MGAB
NAB
NEK
Power
SED
TODS
UCR
YAHOO
Stock
WSD
1st
2nd
Affiliation-F
1k
91.34
67.15
89.60
83.95
66.26
81.19
85.03
80.55
94.30
48.81
91.93
03
01
2k
89.18
68.38
90.31
83.95
75.63
90.47
85.72
81.81
95.94
46.25
91.81
03
01
3k
89.87
72.80
92.71
83.95
83.05
95.12
85.43
83.47
95.94
43.45
92.06
03
02
4k
89.92
73.34
93.39
83.95
80.87
90.00
84.91
83.54
95.94
42.96
92.20
03
00
5k
86.98
74.54
93.81
83.95
85.02
88.99
84.86
84.34
95.94
41.31
91.00
03
01
Appendix
Table 11: Impact of Context Window Size: Performance comparison across available datasets. Best values are highlighted in red , second-best in blue .
Metric
Model
Datasets
Total
Total
IOPS
MGAB
NAB
NEK
Power
SED
TODS
UCR
YAHOO
1st
2nd
Affiliation-F
2.5B
84.79
70.69
79.70
79.73
68.30
96.87
85.91
84.63
96.65
06
01
700M
86.46
68.87
86.43
72.74
73.02
92.07
83.95
82.23
93.74
02
05
350M
88.24
68.19
86.21
79.27
63.30
89.21
83.22
82.49
92.35
01
03
F1_T
2.5B
27.70
01.81
42.90
35.87
20.17
69.43
65.89
34.30
85.86
06
00
700M
40.56
01.49
27.82
42.31
05.13
59.02
64.07
28.88
86.88
02
05
Appendix
Table 12: Performance comparison across different models and metrics. Best results for each dataset-metric combination are highlighted in red , and second-best are in blue .
Scenario
Affiliation-F
F1_T
Standard-F1
VUS-PR
Avg Rank
Zero-shot Univariate
2nd (MR=2.73, M=0.844)
1st (MR=2.45, M=0.414)
1st (MR=2.64, M=0.393)
1st (MR=2.27, MD=0.243)
1.8 / 7
Zero-shot Multivariate
1st (MR=1.2, M=0.829)
1st (MR=1.2, M=0.397)
1st (MR=1.2, M=0.322)
1st (MR=1.4, M=0.233)
1.2 / 7
Full-shot Univariate
1st (MR=1.82, M=0.844)
1st (MR=2.27, MD=0.350)
1st (MR=2.64, MD=0.320)
1st (MR=2.55, MD=0.243)
2.3 / 9
Full-shot Multivariate
4th (MR=3.2, MD=0.816)
4th (MR=3.2, M=0.397)
4th (MR=4.4, M=0.322)
4th (MR=3.6, M=0.233)
3.6 / 9
Appendix
Table 13: TimeRCD Performance Summary across All Scenarios. Legend: MR = Mean Rank, M = Mean, MD = Median
Figure 15: Statistical ranking visualization for zero-shot univariate anomaly detection.
Figure 16: Statistical ranking visualization for zero-shot multivariate anomaly detection.
Figure 17: Statistical ranking visualization for full-shot univariate anomaly detection.
Figure 18: Statistical ranking visualization for full-shot multivariate anomaly detection.
Model
Seq=1K
Seq=2K
Seq=5K
Seq=10K
TimeRCD
8.0
9.2
12.2
21.8
TimeMOE
36.5
66.7
130.8
274.2
DADA
207.6
423.1
1042.3
2074.0
Appendix
Table 14: Inference time (ms) as a function of sequence length for TimeRCD and baselines.
Model
Seq=1K
Seq=2K
Seq=5K
Seq=10K
Parameters
TimeRCD
295
434
858
1561
35.5M
TimeMOE
462
462
462
462
113.4M
DADA
17.8
17.8
17.8
17.8
1.8M
Appendix
Table 15: Peak memory usage (MB) and parameter counts for TimeRCD and baselines.
Sequence Length
Inference (ms)
Memory (MB)
Efficiency (ms/1k steps)
1,000
14.37
295
14.37
5,000
28.39
858
5.68
10,000
51.38
1561
5.14
15,000
86.22
2230
5.75
Appendix
Table 16: Scalability of TimeRCD up to 15,000 timesteps.
Time-Series Anomaly Detection identifies unusual patterns or events in sequential data, from sensor readings and network traffic to health and industrial telemetry.
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
Current time series foundation models (TSFMs) primarily focus on learning prevalent and regular patterns within a predefined time or frequency domain to enable supervised downstream tasks (e.g., forecasting). Consequently, they are often ineffective for inherently unsupervised downstream tasks-such as time series anomaly detection (TSAD), which aims to identify rare, irregular patterns. This limitation arises because such abnormal patterns can closely resemble the regular patterns when presented in the same time/frequency domain. To address this issue, we introduce TimeRadar, an innovative TSFM built in a fractional time-frequency domain to support generalist TSAD across diverse unseen datasets. Our key insight is that rotating a time series into a data-dependent fractional time-frequency representation can adaptively differentiate the normal and abnormal signals across different datasets. To this end, a novel component, namely Fractionally modulated Time-Frequency Reconstruction (FTFRecon), is proposed in TimeRadar to leverage a learnable fractional order to rotate the time series to the most pronounced angle between a continuous time and frequency domain for accurate data reconstruction. This provides adaptive data reconstruction in an optimal time-frequency domain for each data input, enabling effective differentiation of the unbounded abnormal patterns from the regular ones across datasets, including unseen datasets. To allow TimeRadar to model local abnormality that is not captured by the global data reconstruction, we further introduce a Contextual Deviation Learning (CDL) component to model the local deviation of the input relative to its contextual time series data in the rotatable domain.
Hui He, Hezhe Qiao, Yutong Chen +2
School of Computing and Information Systems, Singapore Management University, Singapore · Chongqing Institute of Green and Intelligent Technology, University of Chinese Academy of Sciences, Chongqing, China · State Information Center, Beijing, China
Time-series anomaly detection (TSAD) requires identifying both immediate Point Anomalies and long-range Context Anomalies. However, existing foundation models face a fundamental trade-off: 1D temporal models provide fine-grained pointwise localization but lack a global contextual perspective, while 2D vision-based models capture global patterns but suffer from information bottlenecks due to a lack of temporal alignment and coarse-grained pointwise detection. To resolve this dilemma, we propose VETime, the first TSAD framework that unifies temporal and visual modalities through fine-grained visual-temporal alignment and dynamic fusion. VETime introduces a Reversible Image Conversion and a Patch-Level Temporal Alignment module to establish a shared visual-temporal timeline, preserving discriminative details while maintaining temporal sensitivity. Furthermore, we design an Anomaly Window Contrastive Learning mechanism and a Task-Adaptive Multi-Modal Fusion to adaptively integrate the complementary perceptual strengths of both modalities. Extensive experiments demonstrate that VETime significantly outperforms state-of-the-art models in zero-shot scenarios, achieving superior localization precision with lower computational overhead than current vision-based approaches. Code available at: https://github.com/yyyangcoder/VETime .
Yingyuan Yang, Tian Lan, Yifei Gao +6
Department of Industrial Engineering, Tsinghua University, Beijing, China · Lab, Huawei Technologies Ltd, Shenzhen, China · Datadog AI Research