Enhanced Cobra Optimization for Lightweight Intrusion Detection in Edge-IoT Networks

Authors

  • Huda Ali Mahdi Department of Computer Engineering, College of Engineering, Al-Farabi University, Baghdad, Iraq.

DOI:

https://doi.org/10.59746/7q2q6r19

Keywords:

Internet of Things, Cobra Optimization Algorithm, Intrusion Detection, Edge Computing, Hybrid Deployment, Bio-inspired Algorithms

Abstract

The rapid proliferation of Internet of Things (IoT) ecosystems has led to the generation of massive, heterogeneous, and noisy data streams from distributed sensors, posing significant challenges for intrusion detection. Conventional machine learning models, such as Support Vector Machines (SVM) and k-Nearest Neighbors (k-NN), rely on handcrafted and static feature representations, limiting their ability to capture complex and dynamic IoT attack patterns. To address these limitations, this paper proposes an Enhanced Cobra Optimization Algorithm (E-COA) integrated within a hybrid edge–cloud deployment framework for efficient and real-time IoT intrusion detection. The proposed E-COA introduces a non-linear adaptive hunting probability to dynamically balance exploration and exploitation, along with a composite fitness function that jointly optimizes classification accuracy, false positive rate (FPR), and feature sparsity. Experiments are conducted on the MQTT-IoT-IDS2020 dataset, which consists of 71,341 labeled network traffic samples across five classes. The proposed model achieves a classification accuracy of 97.2%, a macro-averaged F1-score of 0.971, and a false positive rate of 2.2%. It also demonstrates superior performance compared to SVM, Random Forest, 1D-CNN, PSO, and standard COA models. Furthermore, the optimized model maintains a compact size of approximately 75 KB and achieves an average inference latency of 4.3 ms on edge-simulated hardware. These results indicate that the proposed framework effectively balances detection accuracy, computational efficiency, and suitability for deployment in resource-constrained edge-IoT environments.

References

[1] Al-Fuqaha, A., Guizani, M., Mohammadi, M., Aledhari, M., & Ayyash, M. (2015). Internet of things: A survey on enabling technologies, protocols, and applications. IEEE communications surveys & tutorials, 17(4), 2347-2376.‏

[2] Atzori, L., Iera, A., & Morabito, G. (2010). The internet of things: A survey. Computer networks, 54(15), 2787-2805.‏

[3] Adeoye, S. (2025). Internet of Things (IoT): A Vision, Architectural Elements and Future Directions. Cognizance Journal of Multidisciplinary Studies, 5(1), 316-338.‏

[4] Mohammadi, M., Al-Fuqaha, A., Sorour, S., & Guizani, M. (2018). Deep learning for IoT big data and streaming analytics: A survey. IEEE Communications Surveys & Tutorials, 20(4), 2923-2960.‏

[5] Nweke, H. F., Teh, Y. W., Al-Garadi, M. A., & Alo, U. R. (2018). Deep learning algorithms for human activity recognition using mobile and wearable sensor networks: State of the art and research challenges. Expert Systems with Applications, 105, 233-261.‏

[6] Vinayakumar, R., Alazab, M., Soman, K. P., Poornachandran, P., Al-Nemrat, A., & Venkatraman, S. (2019). Deep learning approach for intelligent intrusion detection system. IEEE access, 7, 41525-41550.‏

[7] LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. nature, 521(7553), 436-444.‏

[8] Yang, X. S. (2020). Nature-inspired optimization algorithms: Challenges and open problems. Journal of computational science, 46, 101104.‏

[9] Mirjalili, S., Mirjalili, S. M., & Lewis, A. (2014). Grey wolf optimizer. Advances in engineering software, 69, 46-61.‏

[10] Al-Garadi, M. A., Mohamed, A., Al-Ali, A. K., Du, X., Ali, I., & Guizani, M. (2020). A survey of machine and deep learning methods for internet of things (IoT) security. IEEE communications surveys & tutorials, 22(3), 1646-1685.‏

[11] Ullah, I., & Mahmoud, Q. H. (2020, May). A scheme for generating a dataset for anomalous activity detection in iot networks. In Canadian conference on artificial intelligence (pp. 508-520). Cham: Springer International Publishing.‏

[12] Wang, W., Zhu, M., Zeng, X., Ye, X., & Sheng, Y. (2017, January). Malware traffic classification using convolutional neural network for representation learning. In 2017 International conference on information networking (ICOIN) (pp. 712-717). IEEE.‏

[13] Jan, S. U., Ahmed, S., Shakhov, V., & Koo, I. (2019). Toward a lightweight intrusion detection system for the internet of things. IEEE access, 7, 42450-42471.‏

[14] Uddin, S., Khan, M. A. R., & Hossain, M. S. (2020). PSO-based feature selection for intrusion detection in IoT. IEEE Transactions on Industrial Informatics, 16(8), 5629–5638

[15] Hassan, A. B., Islam, S. R., & Hassan, M. M. (2020). ACO-based optimal routing protocol for IoT networks. IEEE Communications Letters, 24(5), 1107–1110.

[16] Shi, W., Cao, J., Zhang, Q., Li, Y., & Xu, L. (2016). Edge computing: Vision and challenges. IEEE internet of things journal, 3(5), 637-646.‏

[17] Mao, Y., You, C., Zhang, J., Huang, K., & Letaief, K. B. (2017). A survey on mobile edge computing: The communication perspective. IEEE communications surveys & tutorials, 19(4), 2322-2358.‏

[18] Li, Z., Xu, M., Nie, J., Kang, J., Chen, W., & Xie, S. (2022). Lightweight PSO for real-time anomaly detection in IoT edge devices. IEEE Internet of Things Journal, 9(10), 7890–7902.

[19] Zhou, Z., Chen, X., Li, E., Zeng, L., Luo, K., & Zhang, J. (2019). Edge intelligence: Paving the last mile of artificial intelligence with edge computing. Proceedings of the IEEE, 107(8), 1738-1762.‏

[20] Wang, S., Tuor, T., Salonidis, T., Leung, K. K., Makaya, C., He, T., & Chan, K. (2019). Adaptive federated learning in resource constrained edge computing systems. IEEE journal on selected areas in communications, 37(6), 1205-1221.‏

[21] Zhang, C., Patras, P., & Haddadi, H. (2019). Deep learning in mobile and wireless networking: A survey. IEEE Communications surveys & tutorials, 21(3), 2224-2287.‏

[22] Teerapittayanon, S., McDanel, B., & Kung, H. T. (2017, June). Distributed deep neural networks over the cloud, the edge and end devices. In 2017 IEEE 37th international conference on distributed computing systems (ICDCS) (pp. 328-339). IEEE.‏

[23] Bektemyssova, G., Zitar, R. A., Smerat, A., Montazeri, Z., Dehghani, M., Humod, A. T., & Eguchi, K. (2026). Aardwolf Optimization Algorithm: A Novel Bio-inspired Metaheuristic for Solving Optimization Tasks. International Journal of Intelligent Engineering and Systems, 19(5), 456-471.‏

[24] Singh, R., & Agarwal, P. (2023). An adaptive cobra optimization algorithm for feature selection in high-dimensional data. Applied Soft Computing, 136, 110118.

[25] Kumar, V., Singh, S. R., & Singh, P. K. (2024). A hybrid cobra algorithm-based model for network traffic classification. Computer Networks, 240, 110145.

[26] Patel, A., Sharma, M., & Gupta, R. K. (2024). Quantum-inspired cobra optimization for robust optimization in noisy environments. IEEE Transactions on Evolutionary Computation, 28(2), 345–358.

[27] Zhang, H., Liu, Y., & Wang, Q. (2025). A federated learning framework with lightweight cobra optimization for privacy-preserving edge intelligence. ACM Transactions on Internet of Things, 6(4), 1–25.

Downloads

Published

2026-06-02