A New Spatiotemporal Correlation Anomaly Detection Method that Integrates Contrastive Learning and Few-Shot Learning in Wireless Sensor Networks

📅 2025-05-31
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
To address key challenges in anomaly detection for wireless sensor networks (WSNs)—including label scarcity, limited anomalous samples, insufficient spatiotemporal dependency modeling, and severe class imbalance—this paper proposes a two-stage learning framework. In the first stage, unsupervised contrastive pretraining enhances spatiotemporal representation learning; in the second stage, cache-assisted few-shot sampling and a dual-graph discriminative joint loss enable low-resource fine-tuning. The core model, MTAD-RD, integrates RetNet with graph attention mechanisms to support multi-granularity spatiotemporal modeling and efficient sequential inference. Evaluated on multiple real-world public WSN datasets, the method achieves an F1-score of 90.97%, substantially outperforming existing supervised approaches. This work is the first to systematically combine contrastive learning and few-shot learning for WSN anomaly detection, advancing both methodology and practical applicability under extreme data constraints.

Technology Category

Application Category

📝 Abstract
Detecting anomalies in the data collected by WSNs can provide crucial evidence for assessing the reliability and stability of WSNs. Existing methods for WSN anomaly detection often face challenges such as the limited extraction of spatiotemporal correlation features, the absence of sample labels, few anomaly samples, and an imbalanced sample distribution. To address these issues, a spatiotemporal correlation detection model (MTAD-RD) considering both model architecture and a two-stage training strategy perspective is proposed. In terms of model structure design, the proposed MTAD-RD backbone network includes a retentive network (RetNet) enhanced by a cross-retention (CR) module, a multigranular feature fusion module, and a graph attention network module to extract internode correlation information. This proposed model can integrate the intermodal correlation features and spatial features of WSN neighbor nodes while extracting global information from time series data. Moreover, its serialized inference characteristic can remarkably reduce inference overhead. For model training, a two-stage training approach was designed. First, a contrastive learning proxy task was designed for time series data with graph structure information in WSNs, enabling the backbone network to learn transferable features from unlabeled data using unsupervised contrastive learning methods, thereby addressing the issue of missing sample labels in the dataset. Then, a caching-based sample sampler was designed to divide samples into few-shot and contrastive learning data. A specific joint loss function was developed to jointly train the dual-graph discriminator network to address the problem of sample imbalance effectively. In experiments carried out on real public datasets, the designed MTAD-RD anomaly detection method achieved an F1 score of 90.97%, outperforming existing supervised WSN anomaly detection methods.
Problem

Research questions and friction points this paper is trying to address.

Detects anomalies in WSN data for reliability assessment
Addresses limited spatiotemporal feature extraction in WSNs
Solves sample imbalance and missing labels in anomaly detection
Innovation

Methods, ideas, or system contributions that make the work stand out.

RetNet with CR module for spatiotemporal feature extraction
Two-stage training with contrastive and few-shot learning
Joint loss function for handling sample imbalance
🔎 Similar Papers
No similar papers found.
M
Miao Ye
Ministry of Education Key Lab of Cognitive Radio and Information Processing, Guilin University of Electronic Technology, Guilin, China; School of Computer Science and Technology, Xidian University, Xi’an, Shaanxi, China; Guangxi Engineering Technology Research Center of Cloud Security and Cloud Service, Guilin University of Electronic Technology, Guilin, China
S
Suxiao Wang
College of Precision Instrument and Optoelectronic Engineering, Tianjin University, Tianjin, China; Guangxi Key Laboratory of Optoelectronic Information Processing, School of Optoelectronic Engineering, Guilin University of Electronic Technology, Guilin, China
J
Jiaguang Han
College of Precision Instrument and Optoelectronic Engineering, Tianjin University, Tianjin, China
Y
Yong Wang
Ministry of Education Key Lab of Cognitive Radio and Information Processing, Guilin University of Electronic Technology, Guilin, China
X
Xiaoli Wang
Ministry of Education Key Lab of Cognitive Radio and Information Processing, Guilin University of Electronic Technology, Guilin, China; School of Computer Science and Technology, Xidian University, Xi’an, Shaanxi, China
J
Jingxuan Wei
Ministry of Education Key Lab of Cognitive Radio and Information Processing, Guilin University of Electronic Technology, Guilin, China; School of Computer Science and Technology, Xidian University, Xi’an, Shaanxi, China
P
Pengxv Wen
Jing Cui
Jing Cui
PhD Student, Research School of Computer Science, Australian National University
Temporal PlanningSchedulingDynamic ControllabilityArtificial Intelligence