Submitted:
25 March 2025
Posted:
25 March 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Introduces Related Definitions and Techniques
2.1. Definition of Anomaly in Wireless Sensor Network (WSN) Anomaly Detection Problem
2.2. Anomaly Detection Problem Description
2.3. Artificial Neural Network
2.3.1. Graph Convolutional Neural Networks
2.3.2. Temporal Convolutional Networks
2.3.3. Graph Attention Network
2.4. Metric Learning
3. WSN Anomaly Node Detection Method Based on Deep Metric Learning and Spatio-Temporal Features Fusion
3.1. Deep Metric Learning Based Anomaly Node Detection Model in WSN
3.2. Feature Extraction Module
3.2.1. Spatial Feature Extraction Module
3.2.2. Temporal Feature Extraction Module
3.3. Distance Metric Module
3.4. Classification Module
3.5. Loss Function
3.6. Experimental Results and Analysis
3.6.1. Experimental Datasets
3.6.2. The Abnormal Mode Was Manually Injected
- Point anomaly
- Context anomalies
- Collective anomaly
- Spatial correlation anomalies
- Time correlation between abnormal
3.6.3. Evaluation Index
3.6.4. Ablation Experiments
3.6.5. Comparative Experiments
- CNN-LSTM
- GCN-LSTM
- GAT-GRU
- GAT-Transformer
3.7. Summary of This Chapter
4. Conclusions
4.1. Summary of Main Research Work
4.2. Prospects for Future Research
5. Statements and Acknowledgements
Funding
References
- GULATI, K.; BODDU, R.S.K.; KAPILA, D.; et al. A review paper on wireless sensor network techniques in Internet of Things (IoT). Materials Today: Proceedings, 2022, 51, 161–165. [Google Scholar] [CrossRef]
- O'Reilly, C.; Gluhak, A.; Imran, A.M.; et al. Anomaly Detection in Wireless Sensor Networks in a Non-Stationary Environment. IEEE Communications Surveys and Tutorials, 2014, 16, 1413–1432. [Google Scholar] [CrossRef]
- Binh, T.D.; Tai, D.L.; Dung, T.N.; et al. Monotone Split and Conquer for Anomaly Detection in IoT Sensory Data. IEEE INTERNET OF THINGS JOURNAL, 2021, 8, 15468–15485. [Google Scholar] [CrossRef]
- Fan, Y.; Lei, S.; Yuli, Y.; et al. Optimal Deployment of Solar Insecticidal Lamps Over Constrained Locations in Mixed-Crop Farmlands. IEEE INTERNET OF THINGS JOURNAL, 2021, 8, 13095–13114. [Google Scholar] [CrossRef]
- Gao, C.; Yang, P.; Chen, Y.; et al. An edge-cloud collaboration architecture for pattern anomaly detection of time series in wireless sensor networks. Complex Intelligent Systems, 2021, 7, 1–16. [Google Scholar] [CrossRef]
- BOUBICHE, D.E.; ATHMANI, S.; BOUBICHE, S.; et al. Cybersecurity issues in wireless sensor networks: current challenges and solutions. Wireless Personal Communications, 2021, 117, 177–213. [Google Scholar] [CrossRef]
- HUANAN, Z.; SUPING, X.; JIANNAN, W. Security and application of wireless sensor network. Procedia Computer Science, 2021, 183, 486–492. [Google Scholar] [CrossRef]
- CHARALAMPIDOU, M.; PAVLIDIS, G.; MOUROUTSOS, S.G. Sensor Analysis and Selection for Open Space WSN Security Applications. Majlesi Journal of Electrical Engineering 2019, 13. [Google Scholar]
- VURAN, M.C.; AKAN, Ö.B.; AKYILDIZ, I.F. Spatio-temporal correlation: theory and applications for wireless sensor networks. Computer Networks, 2004, 45, 245–259. [Google Scholar] [CrossRef]
- Chen L, Xu L, Li G. Anomaly detection using spatio-temporal correlation and information entropy in wireless sensor networks[C] //2020 International Conferences on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData) and IEEE Congress on Cybermatics (Cybermatics). IEEE, 2020, 121-128. [CrossRef]
- Ifzarne S, Tabbaa H, Hafidi I, et al. Anomaly detection using machine learning techniques in wireless sensor networks[C] //Journal of Physics: Conference Series. IOP Publishing, 2021, 1743(1): 012021. [CrossRef]
- Lai K H, Zha D, Xu J, et al. Revisiting time series outlier detection: Definitions and benchmarks[C] //Thirty-fifth conference on neural information processing systems datasets and benchmarks track (round 1). 2021.
- Yogita, Pal V. Data Variance-Based Distributed Outlier Detection in Wireless Sensor Networks[C] //Proceedings of First International Conference on Computational Electronics for Wireless Communications: ICCWC 2021. Springer Singapore, 2022, 465-475. [CrossRef]
- SAMPARTHI, V.K.; VERMA, H.K. Outlier detection of data in wireless sensor networks using kernel density estimation. International Journal of Computer Applications, 2010, 5, 28–32. [Google Scholar] [CrossRef]
- Wang L, Li J, Bhatti U A, et al. Anomaly detection in wireless sensor networks based on KNN[C] //Artificial Intelligence and Security: 5th International Conference, ICAIS 2019, New York, NY, USA, July 26–28, 2019, Proceedings, Part III 5. Springer International Publishing, 2019, 632-643. [CrossRef]
- WAZID, M.; DAS, A.K. An efficient hybrid anomaly detection scheme using K-means clustering for wireless sensor networks. Wireless Personal Communications, 2016, 90, 1971–2000. [Google Scholar] [CrossRef]
- SARANGI, B.; MAHAPATRO, A.; TRIPATHY, B. Outlier Detection Using Convolutional Neural Network for Wireless Sensor Network. International Journal of Business Data Communications and Networking (IJBDCN), 2021, 17, 91–106. [Google Scholar] [CrossRef]
- Lazar V, Buzura S, Iancu B, et al. Anomaly Detection in Software Defined Wireless Sensor Networks Using Recurrent Neural Networks[C] //2021 IEEE 17th International Conference on Intelligent Computer Communication and Processing (ICCP). IEEE, 2021, 19-24. [CrossRef]
- Matar M, Xia T, Huguenard K, et al. Multi-Head Attention based Bi-LSTM for Anomaly Detection in Multivariate Time-Series of WSN[C] //2023 IEEE 5th International Conference on Artificial Intelligence Circuits and Systems (AICAS). IEEE, 2023, 1-5. [CrossRef]
- CHEN, H.; ELDARDIRY, H. Graph Time-series Modeling in Deep Learning: A Survey. ACM Transactions on Knowledge Discovery from Data, 2024, 18, 1–35. [Google Scholar] [CrossRef]
- SCHMIDL, S.; WENIG, P.; PAPENBROCK, T. Anomaly detection in time series: a comprehensive evaluation. Proceedings of the VLDB Endowment, 2022, 15, 1779–1797. [Google Scholar] [CrossRef]
- DING, C.; SUN, S.; ZHAO, J. MST-GAT: A multimodal spatial–temporal graph attention network for time series anomaly detection. Information Fusion, 2023, 89, 527–536. [Google Scholar] [CrossRef]
- Deng, A.; Hooi, B. Graph neural network-based anomaly detection in multivariate time series[C] //Proceedings of the AAAI conference on artificial intelligence. 2021, 35, 4027–4035. [CrossRef]
- WU, Y.; DAI, H.-N.; TANG, H. Graph neural networks for anomaly detection in industrial internet of things. IEEE Internet of Things Journal, 2021, 9, 9214–9231. [Google Scholar] [CrossRef]
- Huang B, Wang X, Cui P, et al. One-class temporal graph attention neural network for dynamic graph anomaly detection[C] //2021 2nd International Conference on Electronics, Communications and Information Technology (CECIT). IEEE, 2021, 783-790. [CrossRef]
- POORNIMA I G A, PARAMASIVAN B. Anomaly detection in wireless sensor network using machine learning algorithm [J]. Computer communications, 2020, 151: 331-7. [CrossRef]
- Luo T, Nagarajan S G. Distributed Anomaly Detection using Autoencoder Neural Networks in WSN for IoT[C] //2018 IEEE International Conference on Communications (ICC 2018).IEEE, 2018. [CrossRef]
- LUO, X.; WU, J.; YANG, J.; et al. Deep graph level anomaly detection with contrastive learning. Scientific Reports, 2022, 12, 19867. [Google Scholar] [CrossRef]
- ZHENG Y, JIN M, LIU Y, et al. Generative and contrastive self-supervised learning for graph anomaly detection. IEEE Transactions on Knowledge and Data Engineering, 2021. [CrossRef]
- VELIČKOVIĆ P, FEDUS W, HAMILTON W L, et al. Deep graph infomax. arXiv preprint arXiv:180910341, 2018. [CrossRef]
- LIU, Y.; LI, Z.; PAN, S.; et al. Anomaly detection on attributed networks via contrastive self-supervised learning. IEEE transactions on neural networks and learning systems, 2021, 33, 2378–2392. [Google Scholar] [CrossRef]
- MAAMAR A, BENAHMED K. A Hybrid Model for Anomalies Detection in AMI System Combining K-means Clustering and Deep Neural Network. Computers, Materials & Continua, 2019, 60(1).
- DU, B.; ZHANG, L. A discriminative metric learning based anomaly detection method. IEEE Transactions on Geoscience and Remote Sensing, 2014, 52, 6844–6857. [Google Scholar] [CrossRef]
- Ding K, Li J, Agarwal N, et al. Inductive anomaly detection on attributed networks[C] //Proceedings of the twenty-ninth international conference on international joint conferences on artificial intelligence. 2021, 1288-1294.
- NIU Z, YU K, WU X. LSTM-Based VAE-GAN for Time-Series Anomaly Detection. Sensors, 2020, 20(13). [CrossRef]
- LI, Z.; YU, J.; ZHANG, G.; et al. Dynamic spatio-temporal graph network with adaptive propagation mechanism for multivariate time series forecasting. Expert Systems with Applications, 2023, 216, 119374. [Google Scholar] [CrossRef]
- Luo X, Wu J, Beheshti A, et al. Comga: Community-aware attributed graph anomaly detection[C] //Proceedings of the Fifteenth ACM International Conference on Web Search and Data Mining. 2022, 657-665. [CrossRef]
- Zheng, L.; Li, Z.; Li, J.; et al. AddGraph: Anomaly Detection in Dynamic Graph Using Attention-based Temporal GCN[C] //IJCAI. 2019, 3, 7.
- WU, P.; LIU, J.; SHEN, F. A deep one-class neural network for anomalous event detection in complex scenes. IEEE transactions on neural networks and learning systems, 2019, 31, 2609–2622. [Google Scholar] [CrossRef]
- LIZNERSKI P, RUFF L, VANDERMEULEN R A, et al. Explainable deep one-class classification. arXiv preprint arXiv:200701760, 2020. [CrossRef]
- Zhang C, Song D, Chen Y, et al. A deep neural network for unsupervised anomaly detection and diagnosis in multivariate time series data[C] //Proceedings of the AAAI conference on artificial intelligence. 2019, 33, 1409-1416. [CrossRef]
- FENG, D.; WU, Z.; ZHANG, J.; et al. Dynamic global-local spatial-temporal network for traffic speed prediction. IEEE Access, 2020, 8, 209296–307. [Google Scholar] [CrossRef]
- THILL, M.; KONEN, W.; WANG, H.; et al. Temporal convolutional autoencoder for unsupervised anomaly detection in time series. Applied Soft Computing, 2021, 112, 107751. [Google Scholar] [CrossRef]
- Park, C.; Kim, D.; Han, J.; et al. Unsupervised attributed multiplex network embedding[C] //Proceedings of the AAAI conference on artificial intelligence. 2020, 34, 5371–5378. [CrossRef]
- XIE, M.; HAN, S.; TIAN, B.; et al. Anomaly detection in wireless sensor networks: A survey. Journal of Network and computer Applications, 2011, 34, 1302–1325. [Google Scholar] [CrossRef]
- BISWAS, P.; SAMANTA, T. Anomaly detection using ensemble random forest in wireless sensor network. International Journal of Information Technology, 2021, 13, 2043–2052. [Google Scholar] [CrossRef]
- Chirayil A, Maharjan R, Wu C S. Survey on anomaly detection in wireless sensor networks (WSNs)[C] //2019 20th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD). IEEE, 2019, 150-157. [CrossRef]
- ZHANG, S.; TONG, H.; XU, J.; et al. Graph convolutional networks: a comprehensive review. Computational Social Networks, 2019, 6, 1–23. [Google Scholar] [CrossRef]
- BHATTI, U.A.; TANG, H.; WU, G.; et al. Deep learning with graph convolutional networks: An overview and latest applications in computational intelligence. International Journal of Intelligent Systems, 2023, 2023, 1–28. [Google Scholar] [CrossRef]
- WAN, R.; MEI, S.; WANG, J.; et al. Multivariate temporal convolutional network: A deep neural networks approach for multivariate time series forecasting. Electronics, 2019, 8, 876. [Google Scholar] [CrossRef]
- He Y, Zhao J. Temporal convolutional networks for anomaly detection in time series[C] //Journal of Physics: Conference Series. IOP Publishing, 2019, 1213(4): 042050. [CrossRef]
- GUI, J.; SUN, Z.; WEN, Y.; et al. A review on generative adversarial networks: Algorithms, theory, and applications. IEEE transactions on knowledge and data engineering, 2021, 35, 3313–3332. [Google Scholar] [CrossRef]
- TU, J.; OGOLA, W.; XU, D.; et al. Intrusion Detection Based on Generative Adversarial Network of Reinforcement Learning Strategy for Wireless Sensor Networks. International Journal of Circuits, Systems and Signal Processing, 2022, 16, 478–482. [Google Scholar] [CrossRef]
- VELIČKOVIĆ P, CUCURULL G, CASANOVA A, et al. Graph attention networks. arXiv preprint arXiv:171010903, 2017. [CrossRef]
- XU J, WU H, WANG J, et al. Anomaly transformer: Time series anomaly detection with association discrepancy. arXiv preprint arXiv:211002642, 2021. [CrossRef]
- HAN, K.; XIAO, A.; WU, E.; et al. Transformer in transformer. Advances in neural information processing systems, 2021, 34, 15908–15919. [Google Scholar]
- KANG, H.; KANG, P. Transformer-based multivariate time series anomaly detection using inter-variable attention mechanism. Knowledge-Based Systems, 2024, 290, 111507. [Google Scholar] [CrossRef]
- ZHOU, W.; WU, S.; WANG, Y.; et al. DMU-TransNet: Dense multi-scale U-shape transformer network for anomaly detection. Measurement, 2024, 229, 114216. [Google Scholar] [CrossRef]
- YU J, XIA X, CHEN T, et al. XSimGCL: Towards extremely simple graph contrastive learning for recommendation. IEEE Transactions on Knowledge and Data Engineering, 2023. [CrossRef]
- LI, X.; YANG, X.; MA, Z.; et al. Deep metric learning for few-shot image classification: A review of recent developments. Pattern Recognition, 2023, 138, 109381. [Google Scholar] [CrossRef]
- XIANG L Y, BO J X, JIE L D, et al. Anomaly Detection Using Multiscale C-LSTM for Univariate Time-Series. Security and Communication Networks, 2023, 2023. [CrossRef]
- Zhao H, Wang Y, Duan J, et al. Multivariate time-series anomaly detection via graph attention network[C] //2020 IEEE International Conference on Data Mining (ICDM). IEEE, 2020, 841-850. [CrossRef]
- HANG, Q.; YE, M.; DENG, X. A novel anomaly detection method for multimodal WSN data flow via a dynamic graph neural network. Connection Science, 2022, 34, 1609–1637. [Google Scholar] [CrossRef]
- YE M, ZHANG Q, XUE X, et al. A Novel Self-Supervised Learning-Based Anomalous Node Detection Method Based on an Autoencoder for Wireless Sensor Networks. IEEE Systems Journal, 2024. [CrossRef]
- WANG Z, YE M, CUI J, et al. Deep metric learning based anomalous node detection method for fused temporal and spatial features WSNs[C] //The 20th International Conference on Computational Intelligence and Security, 2024. [CrossRef]









| Module package | Version number |
|---|---|
| datashape | 0.5.4 |
| matplotlib | 3.5.2 |
| matplotlib-inline | 0.1.6 |
| numpy | 1.21.5 |
| pandas | 1.4.4 |
| pip | 22.2.2 |
| scipy | 1.9.1 |
| torch | 1.13.0 |
| torchvision | 0.14.0 |
| tqdm | 4.64.1 |
| wheel | 0.37.1 |
| zipp | 3.8.0 |
| Serial number | Feature extraction method | Similarity acquisition method | Prec | Rec | F1 | ||
| GCN | This feature extraction module | Similarity score calculation module | This design distance measurement module | ||||
| 1 | √ | √ | 0.72 | 0.53 | 0.61 | ||
| 2 | √ | √ | 0.97 | 0.76 | 0.85 | ||
| 3 | √ | √ | 0.8 | 0.83 | 0.82 | ||
| 4 | √ | √ | 0.95 | 0.84 | 0.89 | ||
| Option | Prec | Rec | F1 |
| CNN-LSTM | 0.75 | 0.6 | 0.67 |
| GCN-LSTM | 0.79 | 0.73 | 0.76 |
| GAT-GRU | 0.89 | 0.82 | 0.85 |
| GAT-Transformer | 0.95 | 0.71 | 0.81 |
| ST-DMLAD | 0.95 | 0.84 | 0.89 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).