An Intelligent Cybersecurity Framework for IoT Environments Using a Multi-Stage Heuristic Algorithm Fused with a Spatiotemporal Attention Mechanism
Received: 4 November 2025 | Revised: 6 December 2025 and 11 December 2025 | Accepted: 13 December 2025 | Online: 25 December 2025
Corresponding author: Hassan A. Alterazi
Abstract
With the increasing risk of cyberattacks, cybersecurity has now become a major area of the Internet of Things (IoT). Cyberattacks on IoT devices can result in serious concerns, including unauthorized access, disruption of critical services, and data breaches. IoT security aims to decrease the risk for enterprises and users by ensuring the safety of IoT resources and user privacy. Novel cybersecurity tools and technologies have enabled significant improvements in IoT security management. Recently, Artificial Intelligence (AI) has been applied to identify cyber threats, rapidly analyze millions of events, and detect multiple threats. Deep Learning (DL) has proven effective and offers several advantages for addressing IoT cybersecurity challenges. This study proposes an Optimized Dimensionality Reduction with an Attention Mechanism for Cyberattack Detection using Metaheuristic Optimization Algorithms (ODRAMCD-MOA). First, a min–max normalization model is used in the data preprocessing phase. Next, the Fruit Fly Optimization Algorithm (FOA) is employed for Feature Selection (FS). Subsequently, a hybrid of a Convolutional Neural Network (CNN) and a Bidirectional Long Short-Term Memory (BiLSTM) model with a Spatiotemporal Attention (STA) mechanism (CNN-BiLSTM-STA) is utilized for cybersecurity classification. Finally, the hyperparameters of the CNN-BiLSTM-STA method are optimized using the Augmented Red Panda Optimizer (ARPO). Comparative analysis shows that the ODRAMCD-MOA methodology achieves accuracy values of 99.79% and 99.03% on the ToN-IoT and BoT-IoT datasets, respectively, outperforming existing models.
Keywords:
cyberattack detection, metaheuristic optimization algorithms, Internet of Things (IoT), attention mechanism, cybersecurityDownloads
References
O. Aouedi et al., "A Survey on Intelligent Internet of Things: Applications, Security, Privacy, and Future Directions," IEEE Communications Surveys & Tutorials, vol. 27, no. 2, pp. 1238–1292, Apr. 2025. DOI: https://doi.org/10.1109/COMST.2024.3430368
J. Shehu Yalli, M. Hilmi Hasan, and A. Abubakar Badawi, "Internet of Things (IoT): Origins, Embedded Technologies, Smart Applications, and Its Growth in the Last Decade," IEEE Access, vol. 12, pp. 91357–91382, 2024. DOI: https://doi.org/10.1109/ACCESS.2024.3418995
N. U. Prince, M. A. A. Mamun, A. O. Olajide, O. U. Khan, A. B. Akeem, and A. I. Sani, "IEEE Standards and Deep Learning Techniques for Securing Internet of Things (IoT) Devices Against Cyber Attacks," Journal of Computational Analysis and Applications, vol. 33, no. 7, pp. 1270–1289, Sept. 2024.
Y. N. Soe, Y. Feng, P. I. Santosa, R. Hartanto, and K. Sakurai, "Towards a Lightweight Detection System for Cyber Attacks in the IoT Environment Using Corresponding Features," Electronics, vol. 9, no. 1, Jan. 2020, Art. no. 144. DOI: https://doi.org/10.3390/electronics9010144
E. Altulaihan, M. A. Almaiah, and A. Aljughaiman, "Cybersecurity Threats, Countermeasures and Mitigation Techniques on the IoT: Future Research Directions," Electronics, vol. 11, no. 20, Oct. 2022, Art. no. 3330. DOI: https://doi.org/10.3390/electronics11203330
M. M. Abualhaj, S. N. Al-Khatib, M. A. Zyoud, I. Qaddara, and M. Anbar, "Enhancing Intrusion Detection System Performance Using a Hybrid of Harris Hawks and Whale Optimization Algorithms," Engineering, Technology & Applied Science Research, vol. 15, no. 4, pp. 24354–24361, Aug. 2025. DOI: https://doi.org/10.48084/etasr.10919
W. Ahmad, A. Rasool, A. R. Javed, T. Baker, and Z. Jalil, "Cyber Security in IoT-Based Cloud Computing: A Comprehensive Survey," Electronics, vol. 11, no. 1, Jan. 2022, Art. no. 16. DOI: https://doi.org/10.3390/electronics11010016
A. A. A. Mohammed, "Improving Intrusion Detection Systems by Using Deep Learning Methods on Time Series Data," Engineering, Technology & Applied Science Research, vol. 15, no. 1, pp. 19267–19272, Feb. 2025. DOI: https://doi.org/10.48084/etasr.9417
M. A. Aleisa, "Blockchain-Enabled Zero Trust Architecture for Privacy-Preserving Cybersecurity in IoT Environments," IEEE Access, vol. 13, pp. 18660–18676, 2025. DOI: https://doi.org/10.1109/ACCESS.2025.3529309
T. Sharma and S. K. Prasad, "Enhancing cybersecurity in IoT networks: SLSTM-WCO algorithm for anomaly detection," Peer-to-Peer Networking and Applications, vol. 17, no. 4, pp. 2237–2258, July 2024. DOI: https://doi.org/10.1007/s12083-024-01712-z
R. M. Czekster, T. Webber, L. B. Furstenau, and C. Marcon, "Dynamic risk assessment approach for analysing cyber security events in medical IoT networks," Internet of Things, vol. 29, Jan. 2025, Art. no. 101437. DOI: https://doi.org/10.1016/j.iot.2024.101437
C. Zanasi, S. Russo, and M. Colajanni, "Flexible zero trust architecture for the cybersecurity of industrial IoT infrastructures," Ad Hoc Networks, vol. 156, Apr. 2024, Art. no. 103414. DOI: https://doi.org/10.1016/j.adhoc.2024.103414
A. Chahal, P. Gulia, N. S. Gill, and D. Rani, "Design of a federated ensemble model for intrusion detection in distributed IIoT networks for enhancing cybersecurity," Journal of Industrial Information Integration, vol. 44, Mar. 2025, Art. no. 100800. DOI: https://doi.org/10.1016/j.jii.2025.100800
P. Kaliyaperumal, S. Periyasamy, M. Thirumalaisamy, B. Balusamy, and F. Benedetto, "A Novel Hybrid Unsupervised Learning Approach for Enhanced Cybersecurity in the IoT," Future Internet, vol. 16, no. 7, July 2024, Art. no. 253. DOI: https://doi.org/10.3390/fi16070253
M. Aknan, M. P. Singh, and R. Arya, "Secure Cloud Assisted Fog Computing Framework for IoT Applications Using Ensemble Learning," SN Computer Science, vol. 6, no. 6, Aug. 2025, Art. no. 717. DOI: https://doi.org/10.1007/s42979-025-04257-x
M. Aknan, M. P. Singh, and R. Arya, "AI and Blockchain Assisted Framework for Offloading and Resource Allocation in Fog Computing," Journal of Grid Computing, vol. 21, no. 4, Nov. 2023, Art. no. 74. DOI: https://doi.org/10.1007/s10723-023-09694-7
X. Yang, Y. Cui, and H. Li, "M3NID: an intrusion detection system based on the dual-mode spatio-temporal feature fusion method," PeerJ Computer Science, vol. 11, Nov. 2025, Art. no. e3393. DOI: https://doi.org/10.7717/peerj-cs.3393
X. Kong, Y. Zhou, Y. Xiao, X. Ye, H. Qi, and X. Liu, "iDetector: A Novel Real-Time Intrusion Detection Solution for IoT Networks," IEEE Internet of Things Journal, vol. 11, no. 19, pp. 31153–31166, Oct. 2024. DOI: https://doi.org/10.1109/JIOT.2024.3416746
P. Muhammad Ali and R. Faraj, "Data Normalization and Standardization: A Technical Report," Machine Learning Technical Reports, vol. 1, no. 1, pp. 1–6, Jan. 2014.
H. Iscan and M. Gunduz, "A Survey on Fruit Fly Optimization Algorithm," in 2015 11th International Conference on Signal-Image Technology & Internet-Based Systems, Bangkok, Thailand, 2015, pp. 520–527. DOI: https://doi.org/10.1109/SITIS.2015.55
C. Zhou, C. Sun, Z. Liu, and F. C. M. Lau, "A C-LSTM Neural Network for Text Classification." arXiv, Nov. 30, 2015.
F. Karim, S. Majumdar, H. Darabi, and S. Harford, "Multivariate LSTM-FCNs for time series classification," Neural Networks, vol. 116, pp. 237–245, Aug. 2019. DOI: https://doi.org/10.1016/j.neunet.2019.04.014
H. Givi, M. Dehghani, and Š. Hubálovský, "Red Panda Optimization Algorithm: An Effective Bio-Inspired Metaheuristic Algorithm for Solving Engineering Optimization Problems," IEEE Access, vol. 11, pp. 57203–57227, 2023. DOI: https://doi.org/10.1109/ACCESS.2023.3283422
M. Sarhan, "CIC-ToN-IoT." Kaggle. [Online]. Available: https://www.kaggle.com/datasets/dhoogla/cictoniot.
N. Koroniotis, N. Moustafa, E. Sitnikova, and J. Slay, "Towards Developing Network Forensic Mechanism for Botnet Activities in the IoT Based on Machine Learning Techniques," in International Conference on Mobile Networks and Management, Melbourne, Australia, 2017, pp. 30–44. DOI: https://doi.org/10.1007/978-3-319-90775-8_3
I. Tareq, B. M. Elbagoury, S. El-Regaily, and E.-S. M. El-Horbaty, "Analysis of ToN-IoT, UNW-NB15, and Edge-IIoT Datasets Using DL in Cybersecurity for IoT," Applied Sciences, vol. 12, no. 19, Oct. 2022, Art. no. 9572. DOI: https://doi.org/10.3390/app12199572
I. Katib and M. Ragab, "Blockchain-Assisted Hybrid Harris Hawks Optimization Based Deep DDoS Attack Detection in the IoT Environment," Mathematics, vol. 11, no. 8, Apr. 2023, Art. no. 1887. DOI: https://doi.org/10.3390/math11081887
Downloads
How to Cite
License
Copyright (c) 2025 Hassan A. Alterazi

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain the copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) after its publication in ETASR with an acknowledgement of its initial publication in this journal.
