Self-Supervised Spatial-Temporal Normality Learning for Time Series Anomaly Detection
Yutong Chen, Hongzuo Xu, Guansong Pang, Hezhe Qiao, Yuan Zhou, Mingsheng Shang
TL;DR
Time series anomaly detection often emphasizes temporal continuity while underutilizing spatial relations among sequences. The authors propose STEN, a self-supervised framework that jointly learns spatial-temporal normality via two tasks: OTN for temporal order prediction and DSN for spatial distance prediction, optimized by $\mathcal{L}_{STEN}=\mathcal{L}_{otn}+\alpha\mathcal{L}_{dsn}$ and producing an anomaly score $Score(R_i)=Score_{otn}(R_i)+\beta\,Score_{dsn}(R_i)$. STEN is evaluated on five benchmarks (PSM, MSL, SMAP, Epilepsy, DSADS) against eight SotA methods, consistently achieving superior AUC-ROC, AUC-PR, and $F_1$ scores and demonstrating the benefit of incorporating spatial normality. The ablation studies confirm both OTN and DSN contribute meaningfully, with OTN delivering substantial gains in temporal modeling, and qualitative analyses show reduced false positives compared with baselines. Overall, STEN provides a robust, unsupervised approach that enhances TSAD by capturing spatial affinities in addition to temporal patterns, offering improved detection performance in real-world multivariate time series.
Abstract
Time Series Anomaly Detection (TSAD) finds widespread applications across various domains such as financial markets, industrial production, and healthcare. Its primary objective is to learn the normal patterns of time series data, thereby identifying deviations in test samples. Most existing TSAD methods focus on modeling data from the temporal dimension, while ignoring the semantic information in the spatial dimension. To address this issue, we introduce a novel approach, called Spatial-Temporal Normality learning (STEN). STEN is composed of a sequence Order prediction-based Temporal Normality learning (OTN) module that captures the temporal correlations within sequences, and a Distance prediction-based Spatial Normality learning (DSN) module that learns the relative spatial relations between sequences in a feature space. By synthesizing these two modules, STEN learns expressive spatial-temporal representations for the normal patterns hidden in the time series data. Extensive experiments on five popular TSAD benchmarks show that STEN substantially outperforms state-of-the-art competing methods. Our code is available at https://github.com/mala-lab/STEN.
