Masked Graph Neural Networks for Unsupervised Anomaly Detection in Multivariate Time Series

Kang Xu, Yuan Li, Yixuan Li, Liyan Xu, Ruiyao Li, Zhenjiang Dong2023 · DOI

TL;DR

This paper introduces MGUAD, a novel method for unsupervised anomaly detection in multivariate time series that leverages masked graph neural networks. By combining graph-based learning of sensor relationships with masked temporal learning, MGUAD effectively captures complex dependencies and achieves state-of-the-art performance on benchmark datasets.

What Problem Does This Paper Address?

Industrial systems generate vast amounts of multivariate time-series data from numerous sensors. Detecting anomalies in this data is crucial for maintaining system operation, preventing faults, and ensuring safety. Traditional anomaly detection methods struggle with the high dimensionality and complex interdependencies of multivariate time series. While Graph Neural Networks (GNNs) can model these relationships, existing approaches often require explicit graph structures or fail to effectively capture temporal dependencies. This paper addresses the challenge of unsupervised anomaly detection in multivariate time series by proposing a method that can learn implicit graph structures and robustly model both temporal and spatial correlations.

Methods

The core of MGUAD lies in its novel "masked graph neural network" architecture. It combines two key strategies:

  • Masked Temporal Learning: To robustly learn temporal context within a single sensor's time series, MGUAD randomly masks portions of the time series and then reconstructs them. This forces the model to learn dependencies between time points.
  • Masked Graph Learning: To capture relationships between different sensors (nodes in a graph), MGUAD employs masking on the graph structure itself. This involves masking nodes or edges within the GNN framework. This strategy helps the model learn robust graph-level context and adapt to changing sensor relationships.

The model uses a Generative Adversarial Network (GAN) framework, where a GNN acts as the generator to reconstruct and predict time-series data, and a Transformer-based discriminator distinguishes between real and generated sequences. The training objective is a combination of reconstruction loss, generator loss, and discriminator loss.

Datasets

The proposed MGUAD model was evaluated on three publicly available multivariate time-series datasets:

  • SWaT: A dataset related to water distribution systems and water security, comprising 51 sensors.
  • WADI: Also from a water distribution system, this dataset is larger and more complex, with 123 sensors. It is noted as being more unbalanced due to a lower anomaly rate.
  • KDDCUP99: A classic dataset from a network intrusion detection competition, simulating a LAN environment with 34 features.

Key Insights and Ideas

  • The Power of Masking: The paper strongly advocates for the use of masking strategies in both temporal and graph domains. It demonstrates that masking is not just a regularization technique but a crucial component for learning robust representations of complex time-series data.
  • Implicit Graph Learning: MGUAD's ability to learn and dynamically update graph structures from data, rather than relying on pre-defined relationships, is a significant advantage for real-world scenarios where explicit sensor connections might be unknown or change over time.
  • Synergy of Temporal and Spatial Learning: The combination of masked temporal learning and masked graph learning allows MGUAD to effectively leverage both the sequential nature of individual sensor data and the inter-sensor dependencies, leading to superior anomaly detection.
  • Robustness through Adversarial Training: The use of a GAN framework, with its adversarial training, helps the model learn a more accurate representation of normal data, making it more adept at identifying deviations.

Key Results

MGUAD demonstrated state-of-the-art performance across all three benchmark datasets.

  • Quantitative Performance: The paper reports significant improvements in Precision, Recall, and F1-score compared to nine baseline methods, including statistical, machine learning, and deep learning approaches. For instance, on the SWaT dataset, MGUAD achieved an F1-score of 0.8332, outperforming the next best baseline (USAD) by over 6%. On the WADI dataset, despite its complexity, MGUAD achieved a 6.22% higher F1-score than the second-best baseline (GDN).
  • Ablation Studies: Experiments on different masking strategies (no mask, time mask, edge mask, multi-mask) showed that multi-masking (combining time-series and graph masking) consistently yielded the best results across all metrics and datasets, highlighting the importance of both masking approaches.
  • Adaptability: The model showed strong performance on datasets with varying dimensions and anomaly rates, indicating its adaptability to different data characteristics.

Limitations and Future Work

  • Hyperparameter Sensitivity: While the paper explores hyperparameter tuning (e.g., masking ratios), it acknowledges that optimal settings might vary across datasets. The study used fixed hyperparameters for consistency in ablation studies, suggesting that further fine-tuning could yield even better results.
  • Interpretability: The authors mention that further research on the interpretability of this GNN-based model is a future direction. Understanding why the model flags certain points as anomalous would be valuable.
  • Future Work: The authors plan to extend their experiments to optimize graph initialization, explore more advanced masking strategies, and investigate hyperparameter optimization further. They also aim to enhance the interpretability of their GNN-based model.

Summary updated

BibTeX
@misc{xu2023masked,
  author = {Kang Xu and Yuan Li and Yixuan Li and Liyan Xu and Ruiyao Li and Zhenjiang Dong},
  title = {{Masked Graph Neural Networks for Unsupervised Anomaly Detection in Multivariate Time Series}},
  year = {2023},
  doi = {10.3390/s23177552},
}
Figure