Table of Contents
Fetching ...

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.

Self-Supervised Spatial-Temporal Normality Learning for Time Series Anomaly Detection

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 and producing an anomaly score . STEN is evaluated on five benchmarks (PSM, MSL, SMAP, Epilepsy, DSADS) against eight SotA methods, consistently achieving superior AUC-ROC, AUC-PR, and 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.
Paper Structure (18 sections, 7 equations, 4 figures, 5 tables)

This paper contains 18 sections, 7 equations, 4 figures, 5 tables.

Figures (4)

  • Figure 1: Our key insights. (a) A sequence containing abnormal data is divided into equal-length sub-sequences by dashed lines, with anomalies presented in the first three sub-sequences. (b) Sub-sequences arranged according to the predicted order distribution, showing differences between the predicted order distribution and the original data due to the presence of the anomaly. (c) The distribution of distances between sequence pairs in a random projection space, which can well preserve the spatial information of the sequences within the feature space. (d) The distribution of distances between sequence pairs learned by a trainable network, effectively resembling the distance distribution. (e) The distribution of anomaly scores obtained by considering the prediction discrepancies in both temporal and spatial dimensions for normal and abnormal data. The results are based on the Epilepsy dataset xu2022calibrated.
  • Figure 2: Overview of STEN. STEN consists of two self-supervised components: DSN and OTN. In DSN, the distances between sequence pairs after being projected by a random network $\eta$ form a compact distribution, from which we distill the spatial normality patterns using a MSE loss function $\mathcal{L}_{dsn}$. OTN captures temporal normality by predicting the order among sub-sequences after a random shuffling using a distribution similarity-based loss function, Jensen-Shannon divergence.
  • Figure 3: (Top to Bottom) Training/testing segments of the PSM dataset, and the anomalous timestamps (marked by small dots) predicted by STEN and the five best-performing competing methods. The ground truth anomalous segments are highlighted in gold. The most prominent false-positive data segments are encircled in red dashed lines.
  • Figure 4: AUC-PR results of STEN w.r.t different hyperparameters.