Abstract
Real-world industrial systems contain a large number of interconnected sensors that generate a significant amount of time series data during system operation. Performing anomaly detection on these multivariate time series data can timely find faults, prevent malicious attacks, and ensure these systems safe and reliable operation. However, the rarity of abnormal instances leads to a lack of labeled data, so the supervised machine learning methods are not applicable. Furthermore, most current techniques do not take full advantage of the spatial and temporal dependencies implied among multiple variables to detect anomalies. Hence, we propose STADN, a novel Anomaly Detection Network Using Spatial and Temporal Information. STADN models the relationship graph between variables for a graph attention network to capture the spatial dependency between variables and utilizes a long short-term memory network to mine the temporal dependency of time series to fully use the spatial and temporal information of multivariate time series. STADN predicts the future behavior of each sensor by combining the historical behavior of the sensor and its neighbors, then detects and locates anomalies according to the prediction error. Furthermore, we improve the proposed model's ability to discriminate anomaly and regularity and expand the prediction error gap between normal and abnormal instances by reconstructing the prediction errors. We conduct experiments on two real-world datasets, and the experimental results suggested that STADN achieves state-of-the-art outperformance.
Introduction
Modern industrial systems, such as water treatment plants or power grids, rely on hundreds of interconnected sensors. Detecting anomalies in these systems is notoriously difficult due to the lack of labeled data, as anomalies are rare events. Furthermore, these systems exhibit complex dependencies: a spike in one sensor might be normal if correlated with others (spatial dependency), or it might represent a slow-developing fault (temporal dependency). Most existing models fail to capture both simultaneously. Finally, many predictive models suffer from the "Gap Problem," where the difference in prediction error between a noisy normal state and an actual anomaly is too small to set an effective alarm threshold.
Methodology
The proposed STADN (Spatial and Temporal Anomaly Detection Network) framework utilizes a two-stage architecture to address these challenges.
Predictive Module (PM)
The PM learns the baseline of "normal" operations. It employs a Graph Attention Network (GAT) to model the relationship between sensors (nodes) and their neighbors (edges), capturing spatial dependencies. Simultaneously, a Long Short-Term Memory (LSTM) network captures sequential temporal patterns. By fusing these inputs, the model predicts the next state of every sensor based on its own history and the behavior of its neighbors.
Error Refinement Module (ERM)
The ERM is the core innovation of STADN. Instead of relying on raw prediction error, the ERM uses an encoder-decoder structure to reconstruct the error. This process amplifies the signal of true anomalies while smoothing out normal noise, effectively expanding the "error gap" and making anomalies much easier to distinguish from baseline fluctuations.
Abnormal Scoring
The system calculates a normalized score for each sensor. If any sensor's score exceeds a threshold determined using validation data, an anomaly is flagged. To measure how well the model separates normal from abnormal states globally, the researchers introduced a regularity score ratio ($r$).
Experimental Evaluation
The model was evaluated on two prominent real-world benchmarks for industrial cybersecurity:
- WADI (Water Distribution): A large-scale dataset with 127 sensors featuring 15 different attack scenarios, characterized by high dimensionality.
- SWaT (Secure Water Treatment): A dataset from a scaled-down industrial water plant with 51 sensors, covering both normal operations and staged cyber-physical attacks.
Key Results
STADN achieved state-of-the-art (SOTA) performance, outperforming established baselines like KNN, Autoencoders, and MAD-GAN. On the WADI dataset, STADN achieved a precision of 98.49%, meaning almost every flagged anomaly was a legitimate hit. It reached F1-scores of 0.62 on WADI and 0.83 on SWaT. Beyond detection, the model successfully localized specific sensors most affected by attacks, such as identifying maliciously opened valves with high probability.
Discussion and Future Work
STADN demonstrates that spatial awareness is non-negotiable; treating sensors as independent variables leads to high false-alarm rates. By using a "Top-K" neighbor approach in the graph, the model focuses only on the most relevant sensor relationships. Furthermore, the ERM acts as a high-contrast filter, making "blurry" anomalies stand out.
Future work may involve exploring dynamic thresholding to adapt to evolving system states and investigating alternative sequence-learning architectures, such as Transformers, to capture even longer-term dependencies. Additionally, improving localization for complex cyberattacks where the root cause sensor may not show the highest error remains a priority.
Summary updated