Transformer-Based Security Anomaly Detection for Wireless Sensor Networks
DOI:
https://doi.org/10.64972/jaat.2026v4.146p24e:317-330Keywords:
Wireless Sensor Network, Anomaly Detection, Security, TransformerAbstract
Although Wireless Sensor Networks (WSNs) are already being used in the development of cyber-physical systems, they are susceptible to several security risks due to their open architecture and few resources. In order to handle high-dimensional time-series data and different kinds of assaults, this study introduces a security anomaly detection technique for WSNs based on Transformer architecture. Eleven different types of attacks and over 240,000 labeled time-series windows were created by merging real data from several sensors and simulated attack situations in multiple networks. Richer information can be extracted from sensor nodes and sequential data using a Multi-Head Self-Attention-based Model and Spatial-Temporal Feature Encoding. With an average area under the ROC curve (AUC) of 0.976, an F1-score of 0.942, and more than 93% recall on an unbalanced test set, the Transformer-based framework outperforms the basic model, Long Short-Term Memory network, and Isolation Forest, according to the experiment results. Additionally, the detection rate decreases by less than 7% under adversarial attacks or increased signal noise, and the system operates steadily in the presence of noise and variations in the environment or parameters. As a result, it is evident that the Transformer approach has improved detection stability and accuracy and is still viable for high-speed use in WSN defense. In order to enhance the security of wireless sensor networks for monitoring vital infrastructure and intelligent environments, this study suggests an effective and comprehensive solution.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Sara Kovačević, Milena Đorđević, Dunja Gajić

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.