SwinIoT: A Hierarchical Transformer-Based Framework for Behavioral Anomaly Detection in IoT-Driven Smart Cities
Open Access
- 13 March 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 13, 48758-48774
Abstract
Internet of Things (IoT) devices become more and more important because they are useful in different applications, for example, traffic monitoring, public safety, and environmental management. However, the vastness and diversity of IoT data and the requirement for real-time decision-making create a big challenge for anomaly detection frameworks. In this work, we propose SwinIoT, a new framework with hierarchical and windowed attention mechanisms of Swin Transformer that is especially good for the purpose of behavioral anomaly detection in IoT settings. SwinIoT would solve important problems of class imbalance, noisy data, and heterogeneous devices through the introduction of custom attention models embedding real-time optimizations. The proposed framework was benchmarked on nine datasets such as ARAS, CASAS, WESAD, and UCF Crime compared to the above-mentioned state-of-the-art algorithms like Active Learning-Based Anomaly Detection, Deep Support Vector Data Description (DSVDD), Deep Support Vector Data Description Contractive Autoencoder (DSVDD-CAE), and Federated Principal Component Analysis (FedPCA). It is proven to be better than the above algorithms by attaining up to 96% accuracy, 97% Mean Average Precision (mAP), and excellent Area Under the Receiver Operating Characteristic curve (AUC-ROC) as well as Precision-Recall (PR) metrics, especially in low-resource and unbalanced data scenarios. The results indicate the potential of SwinIoT in scalable and accurate anomaly detection to the development of safer, smarter cities, ensuring reliability and security in critical systems.Keywords
Funding Information
- Prince Sattam bin Abdulaziz University
This publication has 34 references indexed in Scilit:
- IoT applications and challenges in smart cities and servicesThe Journal of Engineering, 2023
- IoT anomaly detection methods and applications: A surveyInternet of Things, 2022
- Simulation and Modeling for Anomaly Detection in IoT Network Using Machine LearningInternational Journal of Wireless Information Networks, 2022
- Machine Learning Approaches for Anomaly Detection in IoT: An Overview and Future Research DirectionsWireless Personal Communications, 2021
- Towards the development of realistic botnet dataset in the Internet of Things for network forensic analytics: Bot-IoT datasetFuture Generation Computer Systems, 2019
- Sensor-Based Datasets for Human Activity Recognition – A Systematic Review of LiteratureIEEE Access, 2018
- Distributed attack detection scheme using deep learning approach for Internet of ThingsFuture Generation Computer Systems, 2018
- The Internet of Things for Health Care: A Comprehensive SurveyIEEE Access, 2015
- The Pascal Visual Object Classes (VOC) ChallengeInternational Journal of Computer Vision, 2009
- A systematic analysis of performance measures for classification tasksInformation Processing & Management, 2009