Zero-Shot Wireless Sensor Anomaly Detection via Global-Local Temporal Representation Learning
Abstract
Zero-shot anomaly detection (ZSAD) in wireless sensor networks (WSNs) is essential for mission-critical applications such as smart homes and assisted living. However, existing methods rely heavily on large annotated datasets, limiting their ability to generalize to unseen anomaly types and increasing deployment costs. The key challenge is to learn discriminative and generalizable representations in open-set scenarios, where normal and anomalous patterns often exhibit subtle distributional differences. To address this issue, we propose the unsupervised spatiotemporal anomaly detection (USAD) network, a lightweight and effective framework for ZSAD. USAD introduces a bidirectional multihead attention mechanism to capture long-range temporal dependencies and extract global contextual information from both past and future sequences. Furthermore, an adaptive feature fusion module enhances representation robustness, enabling precise characterization of normal behaviors and reliable identification of diverse anomalies. Comprehensive ablation studies substantiate the effectiveness of each core component, confirming the integrity of the architectural design and highlighting the critical role of the Neuro-Temporal Attentive Len (NeuroTAL) and dynamic fusion strategy in driving performance improvements. Extensive experiments on the three benchmark datasets demonstrate that USAD consistently outperforms state-of-the-art approaches. Compared with the baseline AMSL, USAD achieves an average relative improvement of 15.92% in $F1$ -score and 27.96% in overall accuracy, while boosting average anomaly recall by 16.17% to significantly minimize critical missed detections. Moreover, USAD surpasses recent Transformer-based models (e.g., RTdetector, CrossAD) while maintaining an ultra-lightweight footprint of only 1.017M parameters, making it highly suitable for IoT edge deployment.