FourStat: A Dual AutoEncoder Leveraging Frequency and Stationarity for Time Series Anomaly Detection
Organizations: Department of Computer Engineering, Sharif University of Technology · Department of Mathematical Sciences, Sharif University of Technology · Department of Mathematics and Computer Science, Amirkabir University of Technology · Department of Electrical Engineering, Sharif University of Technology
Abstract
While numerous studies have focused on multivariate time series anomaly detection, many existing methods perform poorly or are not directly applicable to univariate settings. We introduce FourStat, a dual-model framework for univariate time series anomaly detection that combines two complementary approaches. The Fourier Autoencoder (FAE) captures global patterns like seasonality through frequency-domain analysis, while the Stationary Autoencoder (SAE) focuses on local structures by enforcing statistical stationarity. We also propose a new evaluation metric called Perfect Point that assesses whether perfect F1-scores can be achieved directly from anomaly scores, eliminating thresholding subjectivity. Results demonstrate that FourStat outperforms existing baselines, particularly on challenging anomaly types, while the new metric provides clearer insights into model performance gaps and advantages.
Figures & tables
| Model | Amplitude | Flat | Frequency | Inverted | Local | Missing | Noise | Outlier | Reversed | Time | All |
|---|---|---|---|---|---|---|---|---|---|---|---|
| TFT | 42 | 12 | 3 | 8 | 30 | 2 | 5 | 19 | 10 | 10 | 141 |
| Informer | 40 | 17 | 7 | 12 | 31 | 4 | 12 | 22 | 13 | 16 | 174 |
| Autoformer | 37 | 11 | 4 | 13 | 33 | 4 | 10 | 22 | 8 | 13 | 155 |
| FEDformer | 22 | 8 | 3 | 11 | 28 | 2 | 8 | 13 | 5 | 8 | 108 |
| PSformer | 44 | 8 | 9 | 15 | 34 | 7 | 12 | 27 | 10 | 10 | 176 |
| DAGMM | 29 | 9 | 0 | 7 | 27 | 0 | 2 | 13 | 0 | 3 | 90 |
Appendix figures & tables21 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Window | Seed 0 | Seed 123 | Seed 42 |
|---|---|---|---|---|
| Fixed Window | 32 | 168 | 167 | 170 |
| 64 | 183 | 184 | 185 | |
| 128 | 185 | 188 | 188 | |
| 256 | 174 | 177 | 185 | |
| 512 | 175 | 179 | 171 | |
| 1024 | 145 | 152 | 152 |
| Model | Jensen-Shannon Divergence (JSD) | Correlation |
|---|---|---|
| LSTM-AE | 22 | 30 |
| LSTM-SAE | 124 | 116 |
| Model | Amplitude | Flat | Frequency | Inverted | Local | Missing | Noise | Outlier | Reversed | Time | All |
|---|---|---|---|---|---|---|---|---|---|---|---|
| IOPS | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| MSL | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
| NAB | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
| OPP | 4 | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 |
| SMAP | 4 | 5 | 0 | 0 | 3 | 0 | 0 | 3 | 0 | 0 | 15 |
| SMD | 13 | 0 | 0 | 0 | 1 | 0 | 0 | 7 | 0 | 0 | 21 |
| Method | Amplitude Change | Flat Region | Frequency Change | Inverted Cycle | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AUC | F1 | PP | AUC | F1 | PP | AUC | F1 | PP | AUC | F1 | PP | |||||
| DAGMM | 0.55 | 0.19 | 0.44 | 0.73 | 0.39 | 0.43 | 0.53 | 0.06 | 0.26 | 0.69 | 0.05 | 0.36 | ||||
| MAD-GAN | 0.54 | 0.21 | 0.4 | 0.72 | 0.39 | 0.48 | 0.53 | 0.06 | 0.26 | 0.67 | 0.03 | 0.36 | ||||
| USAD | 0.54 | 0.28 | 0.44 | 0.72 | 0.4 | 0.43 | 0.51 | 0.09 | 0.26 | 0.73 | 0.04 | 0.42 | ||||
| CAE-M | 0.58 | 0.17 | 0.44 | 0.73 | 0.35 | 0.43 | 0.53 | 0.06 | 0.29 | 0.69 | 0.07 | 0.36 | ||||
| LSTM-AE | 0.58 | 0.21 | 0.44 | 0.74 | 0.4 | 0.43 | 0.55 | 0.1 | 0.31 | 0.77 | 0.17 | 0.47 | ||||
| Method | IOPS ( IOPS, Unknown ) | MSL ( Hundman et al., 2018 ) | NAB ( Ahmad et al., 2017 ) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AUC | F1 | PP | AUC | F1 | PP | AUC | F1 | PP | ||||
| DAGMM | 0.66 | 0.03 | 1.0 | 0.59 | 0.1 | 0.5 | 0.67 | 0.56 | 0.5 | |||
| MAD-GAN | 0.73 | 0.02 | 1.0 | 0.59 | 0.1 | 0.5 | 0.66 | 0.56 | 0.5 | |||
| USAD | 0.61 | 0.03 | 1.0 | 0.6 | 0.1 | 0.5 | 0.64 | 0.56 | 0.5 | |||
| CAE-M | 0.67 | 0.04 | 1.0 | 0.56 | 0.1 | 0.5 | 0.68 | 0.56 | 1.0 | |||
| LSTM-AE | 0.84 | 0.02 | 1.0 | 0.62 | 0.1 | 0.5 | 0.56 | 0.72 | 0.5 | |||
| Method | Amp | Flat | Freq | Local | Missing | Noise | Outlier | Rev | Time |
|---|---|---|---|---|---|---|---|---|---|
| Static ( ) | 0.23 | 0.57 | 0.14 | 0.03 | 0.04 | 0.13 | 0.14 | 0.2 | 0.27 |
| Static ( ) | 0.32 | 0.62 | 0.2 | 0.06 | 0.1 | 0.35 | 0.22 | 0.33 | 0.38 |
| Static ( ) | 0.4 | 0.66 | 0.27 | 0.12 | 0.18 | 0.22 | 0.31 | 0.49 | 0.46 |
| Static ( ) | 0.48 | 0.7 | 0.35 | 0.17 | 0.3 | 0.24 | 0.4 | 0.61 | 0.5 |
| Quantile | 0.35 | 0.65 | 0.24 | 0.08 | 0.12 | 0.19 | 0.23 | 0.4 | 0.39 |
| POT | 0.52 | 0.66 | 0.44 | 0.29 | 0.34 | 0.44 | 0.49 | 0.68 | 0.56 |
Time-Series Anomaly Detection
Time-Series Anomaly Detection identifies unusual patterns or events in sequential data, from sensor readings and network traffic to health and industrial telemetry.
See all 234 papers