No Scale Left Behind: Multi-Scale Autoencoder with Bi-directional Attention for Time Series Anomaly Detection
Organizations: UNITES Lab, University of North Carolina at Chapel Hill
Abstract
Time series anomaly detection (TSAD) plays a crucial role in healthcare, finance, industrial monitoring, and other sectors. Within and between these settings, anomalies span vastly different temporal scales, from sub-second point spikes to multi-hour drift patterns. However, most existing TSAD methods commit to a single temporal granularity, and multi-scale designs either analyze different scales in isolation or are constrained to a predefined coarse-to-fine hierarchy, both failing to sufficiently capture multi-scale interactions. To resolve this limitation, we propose Multi-Scale Autoencoder with Cross-Scale Attention for TSAD (MSCAD), a simple yet powerful semi-supervised TSAD framework founded on parallel autoencoder branches corresponding to different patch sizes. A stack of symmetric bidirectional cross-scale attention blocks enables every pair of scales to exchange information before reconstruction without allowing any single scale to be privileged. On the comprehensive TSB-AD benchmark (40 datasets, 530 series), MSCAD achieves large performance gains against 50 baselines across multiple metrics, with VUS-PR of 0.57(+9.6%) on the univariate split and 0.47(+9.3%) on the multivariate split compared to the state-of-the-art.
Figures & tables
| Configuration | UTS VUS-PR | MTS VUS-PR | Average VUS-PR |
|---|---|---|---|
| No bridge ( ) | 0.5380 | 0.4412 | 0.5051 |
| Identity bridge (FFN residual only) | 0.5399 | 0.4440 | 0.5073 .0017 |
| Symmetric cross-attention bridge (default) | 0.5691 .0018 | 0.4705 .0019 | 0.5356 .0018 |
| Direction | UTS VUS-PR | MTS VUS-PR | Average VUS-PR |
|---|---|---|---|
| c2f (CrossAD-style) | 0.5412 | 0.4529 | 0.5112 |
| f2c | 0.5313 | 0.4511 | 0.5041 |
| sym (default) | 0.5691 | 0.4705 | 0.5356 |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Track | Split | # series | Avg. dim. | Avg. len. | Avg. # ev. | Avg. ev. len. |
|---|---|---|---|---|---|---|
| TSB-AD-U | All | 870 | 1.0 | 38,814.0 | 39.7 | 179.5 |
| Eval | 350 | 1.0 | 51,886.7 | 46.6 | 321.3 | |
| Tuning | 48 | 1.0 | 47,143.3 | 82.6 | 185.9 | |
| TSB-AD-M | All | 200 | 29.3 | 107,760.5 | 71.1 | 582.6 |
| Eval | 180 | 29.1 | 108,826.8 | 67.8 | 591.3 | |
| Tuning | 20 | 30.4 | 98,164.1 | 101.1 | 504.8 |
| Source | # series | Eval | Tune | Avg. length | Anom. ratio | Type |
|---|---|---|---|---|---|---|
| UCR ( Wu and Keogh, 2023 ) | 228 | 70 | 6 | 68,052.9 | 0.6% | P&Seq |
| NAB ( Ahmad et al., 2017 ) | 28 | 23 | 5 | 5,099.8 | 10.6% | Seq |
| YAHOO ( Laptev et al., 2015 ) | 259 | 30 | 5 | 1,561.8 | 0.6% | P&Seq |
| IOPS ( IOPS, n.d. ) | 17 | 15 | 2 | 72,792.3 | 1.4% | Seq |
| MGAB ( Thill et al., 2020 ) | 9 | 8 | 1 | 97,777.8 | 0.2% | Seq |
| WSD ( Zhang et al., 2022 ) | 111 | 20 | 5 | 17,509.5 | 0.6% | Seq |
| Source | # series | Eval | Tune | Avg. dim. | Avg. length | Anom. ratio | Type |
|---|---|---|---|---|---|---|---|
| GHL ( Filonov et al., 2016 ) | 25 | 23 | 2 | 19.0 | 199,001.0 | 1.1% | Seq |
| Daphnet ( Bächlin et al., 2010 ) | 1 | 1 | 0 | 9.0 | 38,774.0 | 5.9% | Seq |
| Exathlon ( Jacob et al., 2021 ) | 27 | 25 | 2 | 20.5 | 60,878.4 | 9.8% | Seq |
| Genesis ( von Birgelen and Niggemann, 2018 ) | 1 | 1 | 0 | 18.0 | 16,220.0 | 0.3% | Seq |
| OPP ( Roggen et al., 2010 ) | 8 | 7 | 1 | 248.0 | 17,426.8 | 4.1% | Seq |
| SMD ( Su et al., 2019 ) | 22 | 20 | 2 | 38.0 | 25,466.4 | 3.8% | Seq |
| Group | Hyperparameter | Value |
| Architecture | Window length | |
| Sliding stride | ||
| Patch sizes | ||
| Number of scales | ||
| Token dim | ||
| Attention heads |
| Method | VUS-PR | VUS-ROC | Range-F1 | AUC-PR | AUC-ROC | Point-F1 |
|---|---|---|---|---|---|---|
| Univariate split (TSB-AD-U, datasets, series, baselines) | ||||||
| Sub-PCA | 0.42 | 0.76 | 0.41 | 0.37 | 0.71 | 0.42 |
| KShapeAD | 0.40 | 0.76 | 0.40 | 0.35 | 0.74 | 0.39 |
| POLY | 0.39 | 0.76 | 0.35 | 0.31 | 0.73 | 0.37 |
| Series2Graph | 0.39 | 0.80 | 0.35 | 0.33 | 0.76 | 0.38 |
| MOMENT (FT) | 0.39 | 0.76 | 0.35 | 0.30 | 0.69 | 0.35 |
| Method | VUS-PR | VUS-ROC | Range-F1 | AUC-PR | AUC-ROC | Point-F1 |
|---|---|---|---|---|---|---|
| Multivariate split (TSB-AD-M, datasets, series, baselines) | ||||||
| CNN | 0.31 | 0.76 | 0.37 | 0.32 | 0.73 | 0.37 |
| OmniAnomaly | 0.31 | 0.69 | 0.37 | 0.27 | 0.65 | 0.32 |
| PCA | 0.31 | 0.74 | 0.29 | 0.31 | 0.70 | 0.37 |
| LSTMAD | 0.31 | 0.74 | 0.38 | 0.31 | 0.70 | 0.36 |
| USAD | 0.30 | 0.68 | 0.37 | 0.26 | 0.64 | 0.31 |
| Dataset | VUS-PR | VUS-ROC | Range-F1 | AUC-PR | AUC-ROC | Point-F1 | |
|---|---|---|---|---|---|---|---|
| Univariate split ( TSB-AD-U , datasets, series) | |||||||
| CATSv2 | 1 | 0.3414 | 0.7490 | 0.3135 | 0.5428 | 0.7533 | 0.6422 |
| Daphnet | 1 | 0.5166 | 0.9489 | 0.5145 | 0.5253 | 0.9521 | 0.5650 |
| Exathlon | 30 | 0.9531 | 0.9975 | 0.9372 | 0.9516 | 0.9975 | 0.9687 |
| IOPS | 15 | 0.2950 | 0.8927 | 0.3269 | 0.3732 | 0.8953 | 0.4213 |
| LTDB | 8 | 0.6291 | 0.7758 | 0.6185 | 0.5633 | 0.7638 | 0.6083 |
| Metric | UTS ( ) | MTS ( ) | Overall ( ) |
|---|---|---|---|
| AUC-PR | |||
| AUC-ROC | |||
| VUS-PR | |||
| VUS-ROC | |||
| Point-F1 | |||
| PA-F1 |
| Method | Params | UTS time/series | MTS time/series | Total per seed |
|---|---|---|---|---|
| MSCAD attn ( , depth ) | 5.97 M | 14.0 s | 7.8 min | 24.8 h |
| MSCAD attn ( , depth ) | 1.01 M | 11.6 s | 4.4 min | 14.4 h |
| MSCAD no-bridge ( , depth ) | 5.18 M | 8.3 s | 3.5 min | 11.2 h |
| ( , ) | Bridge depth ( , ) | Window ( , ) | ||||||||||
| Metric | 64 | 128 | 256 | 512 | 0 | 1 | 2 | 3 | 4 | 64 | 128 | 256 |
| UTS | 0.54 | 0.56 | 0.57 | 0.57 | 0.55 | 0.56 | 0.57 | 0.56 | 0.56 | 0.54 | 0.57 | 0.53 |
| MTS | 0.45 | 0.46 | 0.47 | 0.46 | 0.45 | 0.47 | 0.47 | 0.47 | 0.46 | 0.46 | 0.47 | 0.42 |
| All | 0.51 | 0.53 | 0.54 | 0.53 | 0.52 | 0.53 | 0.54 | 0.53 | 0.53 | 0.51 | 0.54 | 0.49 |
| Scale set | UTS VUS-PR | MTS VUS-PR | Average VUS-PR |
|---|---|---|---|
| , | 0.5599 | 0.4557 | 0.5245 |
| , (default) | 0.5691 | 0.4705 | 0.5356 |
| , | 0.5657 | 0.4698 | 0.5331 |
| Gate variant | UTS VUS-PR | MTS VUS-PR | All VUS-PR |
|---|---|---|---|
| Uniform (default) | 0.5691 | 0.4705 | 0.5356 |
| Learned MLP, all four features | 0.5636 | 0.4782 | 0.5346 |
| Learned MLP, random features | 0.5636 | 0.4783 | 0.5347 |
| Learned MLP, time-only | 0.5647 | 0.4738 | 0.5338 |
| Learned MLP, freq-only | 0.5630 | 0.4750 | 0.5331 |
| Learned MLP, drop | 0.5622 | 0.4707 | 0.5312 |
| Bridge operator | UTS VUS-PR | MTS VUS-PR | All VUS-PR |
|---|---|---|---|
| No bridge ( ) | 0.5380 | 0.4412 | 0.5051 |
| Identity (FFN residual only) | 0.5399 .0004 | 0.4440 .0043 | 0.5073 .0017 |
| Cross-attention | 0.5691 .0018 | 0.4705 .0019 | 0.5356 .0018 |
| Mean-pool | 0.5654 .0010 | 0.4682 .0042 | 0.5324 .0014 |
| Sum-pool | 0.5702 .0022 | 0.4513 .0311 | 0.5312 .0074 |
| Max-pool | 0.5677 .0009 | 0.4630 .0040 | 0.5321 .0017 |
| UTS VUS-PR | MTS VUS-PR | All VUS-PR | |
|---|---|---|---|
| (default) | 0.5691 | 0.4705 | 0.5356 |
| 0.5388 | 0.4559 | 0.5207 |