Self supervised intrusion detection algorithm based on dynamic spatiotemporal graph
摘要
As digital transformation advances, network threats have grown more severe, and the increasing complexity and dynamism of network environments present major challenges for intrusion detection. Traditional approaches, which depend on static features and rule bases, struggle to detect unknown and zero-day attacks. Existing deep-learning methods often neglect the spatiotemporal evolution of network topology, which limits their effectiveness—especially when labeled data are scarce. To address these limitations, we propose a self-supervised intrusion-detection algorithm based on time-series dynamic spatiotemporal graphs (TS-DSGNN). TS-DSGNN converts network traffic into a sequence of dynamic spatiotemporal graphs and employs a GCN–GRU layer to deeply fuse spatial topology with temporal dependencies, capturing the evolving interactions among hosts. We further introduce a time-series self-supervised learning scheme that combines attribute reconstruction with multi-view comparison tasks, enabling the model to learn a general traffic representation from unlabeled data and thereby reducing reliance on manual annotation. Experiments on four heterogeneous datasets, including NF-BoT-IoT and NF-CSE-CIC-IDS2018, show that TS-DSGNN substantially outperforms mainstream baselines on key metrics: anomaly detection accuracy ranges from 98.85% to 99.78%, demonstrating strong effectiveness and generalization in identifying complex attacks in dynamic network environments.