Abstract
The Internet of Things (IoT) technology has led to the development of intelligent hardware devices that can interact with each other through the internet, enabling the interconnection of everything. However, this interconnectivity also increases vulnerability to illegal operations by attackers. Therefore, ensuring the security of the IoT system is critical. In this paper, we present an efficient intrusion detection ensemble system for IoT security using metaheuristic (MH) optimization algorithm and machine learning. The system comprises data preprocessing, feature selection, and ensemble classification. Firstly, we propose an enhanced variant of the artificial hummingbird algorithm (EAHA) with three key improvements over the original AHA. The hunger weight is introduced into AHA’s guided foraging behavior to better balance exploration and exploitation. Second, alternating and cooperative foraging strategy is applied in territorial foraging behavior to improve exploitation ability and prevent the algorithm from getting trapped in local optima. Finally, we incorporate greedy Cauchy mutation, using the hummingbirds’ position information as the mutation operator to further strengthen the global search capability of the algorithm. The algorithm is tested on 10 classical benchmark functions and statistically analyzed to demonstrate the feasibility of the improvement. Furthermore, we implement a binary variant of the EAHA (BEAHA) for feature selection. The BEAHA is combined with machine learning classifiers to determine the most optimal feature set. To improve the performance of the proposed network intrusion detection system (NIDS), we construct an ensemble model based on multiple classifiers. We evaluate the feature selection ability of BEAHA and the performance of the developed system using three intrusion detection datasets NSL-KDD, CIC-IDS2017, and CSE-CIC-IDS2018. The experimental results demonstrate that BEAHA selects an average of 7.29, 9.03, and 4.22 features for fitness function evaluation using three classifiers on three datasets, achieving average accuracies of 99.74%, 99.59%, and 98.51%, respectively. By optimizing the ensemble system for intrusion detection with BEAHA, we reduce the number of features by at least 69% on all datasets while maintaining or surpassing the classification accuracy achieved with the full feature set. These results highlight the competitiveness and efficiency of the proposed method.












Similar content being viewed by others
Data availability
The datasets used in this study, CIC-IDS2017 (https://www.unb.ca/cic/datasets/ids-2017.html), CSE-CIC-IDS2018 (https://www.unb.ca/cic/datasets/ids-2018.html), and NSL-KDD (https://www.unb.ca/cic/datasets/nsl.html), can be accessed from their official websites.
References
Rani D, Gill NS, Gulia P, et al. (2023) Design of an intrusion detection model for iot-enabled smart home. IEEE Access p 1–1
Hazman C, Guezzaz A, Benkirane S et al (2022) lids-sioel: intrusion detection framework for iot-based smart environments security using ensemble learning. Clust Comput 26(6):4069–4083
Savanović N, Toskovic A, Petrovic A et al (2023) Intrusion detection in healthcare 4.0 internet of things systems via metaheuristics optimized machine learning. Sustainability 15(16):12563
Ahmad Z, Shahid Khan A, Wai Shiang C et al (2020) Network intrusion detection system: a systematic study of machine learning and deep learning approaches. Trans Emerg Telecommun Technol 32(1):4150
Rostami M, Forouzandeh S, Berahmand K et al (2020) Integration of multi-objective pso based feature selection and node centrality for medical datasets. Genomics 112(6):4370–4384
Tarkhaneh O, Nguyen TT, Mazaheri S (2021) A novel wrapper-based feature subset selection method using modified binary differential evolution algorithm. Inform Sci 565:278–305
JimÃnez-Cordero A, Morales JM, Pineda S (2021) A novel embedded min-max approach for feature selection in nonlinear support vector machine classification. Eur J Oper Res 293(1):24–35
Kasongo SM (2021) An advanced intrusion detection system for iiot based on ga and tree based algorithms. IEEE Access 9:113199–113212
Dickson A, Thomas C (2020) Improved pso for optimizing the performance of intrusion detection systems. J Intell & Fuzzy Syst 38(5):6537–6547
Alzaqebah A, Aljarah I, Al-Kadi O et al (2022) A modified grey wolf optimization algorithm for an intrusion detection system. Mathematics 10(6):999
Alweshah M, Hammouri A, Alkhalaileh S et al (2022) Intrusion detection for the internet of things (iot) based on the emperor penguin colony optimization algorithm. J Ambient Intell Humaniz Comput 14(5):6349–6366
Khammassi C, Krichen S (2020) A nsga2-lr wrapper approach for feature selection in network intrusion detection. Comput Netw 172:107183
Ye Z, Luo J, Zhou W et al (2024) An ensemble framework with improved hybrid breeding optimization-based feature selection for intrusion detection. Futur Gener Comput Syst 151:124–136
Hussein NK, Qaraad M, Amjad S et al (2023) Enhancing feature selection with gmsmfo: a global optimization algorithm for machine learning with application to intrusion detection. J Comput Design and Eng 10(4):1363–1389
Hosseini F, Gharehchopogh FS, Masdari M (2022) Moaeosca: an enhanced multi-objective hybrid artificial ecosystem-based optimization with sine cosine algorithm for feature selection in botnet detection in iot. Multimed Tool Appl 82(9):13369–13399
Barhoush M, Abed-alguni BH, Al-qudah NEA (2023) Improved discrete salp swarm algorithm using exploration and exploitation techniques for feature selection in intrusion detection systems. J Supercomput 79(18):21265–21309
Wolpert D, Macready W (1997) No free lunch theorems for optimization. IEEE Trans Evol Comput 1(1):67–82
Polikar R (2006) Ensemble based systems in decision making. IEEE Circuits and Systems Magazine p 21–45. 10.1109/mcas.2006.1688199,
Jemili F, Meddeb R, Korbaa O (2024) Intrusion detection based on ensemble learning for big data classification. Clust Comput 27(3):3771–3798
Shirley JJ, Priya M (2023) A comprehensive survey on ensemble machine learning approaches for detection of intrusion in iot networks. In: 2023 International Conference on Innovations in Engineering and Technology (ICIET), IEEE, pp 1–10
Nguyen BH, Xue B, Zhang M (2020) A survey on swarm intelligence approaches to feature selection in data mining. Swarm Evol Comput 54:100663
Lv Z, Guo H, Hu J et al (2024) A binary bee foraging algorithm-based feature selection approach for iot intrusion detection. IEEE Internet Things J 11(5):7604–7618
Rabash AJ, Nazri MZA, Shapii A et al (2023) Non-dominated sorting genetic algorithm-based dynamic feature selection for intrusion detection system. IEEE Access 11:125080–125093
Zivkovic M, Bacanin N, Arandjelovic J, et al. (2022) Firefly Algorithm and Deep Neural Network Approach for Intrusion Detection. In: Applications of Artificial Intelligence and Machine Learning: Select Proceedings of ICAAAIML 2021. Springer, p 1–12
Hassan IH, Abdullahi M, Aliyu MM et al (2022) An improved binary manta ray foraging optimization algorithm based feature selection and random forest classifier for network intrusion detection. Intell Syst Appl 16:200114
Sharma S, Kumar V, Dutta K (2024) Multi-objective optimization algorithms for intrusion detection in iot networks: a systematic review. IntThings and Cyber-Phys Syst 4:258–267
Fraihat S, Makhadmeh S, Awad M et al (2023) Intrusion detection system for large-scale iot netflow networks using machine learning with modified arithmetic optimization algorithm. Int Things 22:100819
Abu Alghanam O, Almobaideen W, Saadeh M et al (2023) An improved pio feature selection algorithm for iot network intrusion detection system based on ensemble learning. Expert Syst Appl 213:118745
Tao L, Xueqiang M (2023) Hybrid strategy improved sparrow search algorithm in the field of intrusion detection. IEEE Access 11:32134–32151
Abd Elaziz M, Al-qaness MA, Dahou A, et al. (2023) Intrusion detection approach for cloud and iot environments using deep learning and capuchin search algorithm. Advances in Engineering Software p 103402
Elmasry W, Akbulut A, Zaim AH (2020) Evolving deep learning architectures for network intrusion detection using a double pso metaheuristic. Comput Netw 168:107042
Zhou Z, Liu X, Li P, et al. (2014) Feature selection method with proportionate fitness based binary particle swarm optimization. In: Simulated Evolution and Learning: 10th International Conference, SEAL 2014, Dunedin, New Zealand, December 15-18, 2014. Proceedings 10, Springer, pp 582–592
Yang Z, Wang Q, Zong X et al (2024) Intrusion detection method based on improved social network search algorithm. Comput Sec 140:103781
Khan M, Haroon M (2023) Detecting network intrusion in cloud environment through ensemble learning and feature selection approach. SN Comput Sci 5(1):84
Arreche O, Bibers I, Abdallah M (2024) A two-level ensemble learning framework for enhancing network intrusion detection systems. IEEE Access
Hazman C, Guezzaz A, Benkirane S et al (2023) lids-sioel: intrusion detection framework for iot-based smart environments security using ensemble learning. Clust Comput 26(6):4069–4083
Thockchom N, Singh MM, Nandi U (2023) A novel ensemble learning-based model for network intrusion detection. Complex & Intell Syst 9(5):5693–5714
Khan MH, Javed AR, Iqbal Z et al (2024) Divacan: detecting in-vehicle intrusion attacks on a controller area network using ensemble learning. Comput Sec 139:103712
Saheed YK, Misra S (2024) A voting gray wolf optimizer-based ensemble learning models for intrusion detection in the internet of things. Int J Inf Secur 23(3):1557–1581
Thakkar A, Lohiya R (2023) Attack classification of imbalanced intrusion data for iot network using ensemble-learning-based deep neural network. IEEE Int Things J 10(13):11888–11895
Vo HV, Du HP, Nguyen HN (2024) Apelid: enhancing real-time intrusion detection with augmented wgan and parallel ensemble learning. Comput Sec 136:103567
Zhao W, Wang L, Mirjalili S (2022) Artificial hummingbird algorithm: a new bio-inspired optimizer with its engineering applications. Comput Methods Appl Mech Eng 388:114194
Lokman SF, Othman AT, Bakar MHA, et al. (2020) The impact of different feature scaling methods on intrusion detection for in-vehicle controller area network (can). In: Advances in Cyber Security: First International Conference, ACeS 2019, Penang, Malaysia, July 30–August 1, 2019, Revised Selected Papers 1, Springer, pp 195–205
Yang L, Moubayed A, Shami A (2022) Mth-ids: A multitiered hybrid intrusion detection system for internet of vehicles. IEEE Internet Things J 9(1):616–632
Yang Y, Chen H, Heidari AA et al (2021) Hunger games search: Visions, conception, implementation, deep analysis, perspectives, and towards performance shifts. Expert Syst Appl 177:114864
Betley JN, Xu S, Cao ZFH et al (2015) Neurons for hunger and thirst transmit a negative-valence teaching signal. Nature 521(7551):180–185
Zhang J, Li H, Parizi MK (2022) Hwmwoa: A hybrid wma-woa algorithm with adaptive cauchy mutation for global optimization and data classification. International Journal of Information Technology & Decision Making 22(04):1195–1252
Duraibi S (2023) An improved reptile search algorithm based on cauchy mutation for intrusion detection. Comput Syst Sci Eng 46(2):2509–2525
Grinsztajn L, Oyallon E, Varoquaux G (2022) Why do tree-based models still outperform deep learning on typical tabular data? Adv Neural Inf Process Syst 35:507–520
Mirjalili S, Lewis A (2016) The whale optimization algorithm. Adv Eng Softw 95:51–67
Shen Y, Zhang C, Soleimanian Gharehchopogh F et al (2023) An improved whale optimization algorithm based on multi-population evolution for global optimization and engineering design problems. Expert Syst Appl 215:119269
Mirjalili S, Gandomi AH, Mirjalili SZ et al (2017) Salp swarm algorithm: A bio-inspired optimizer for engineering design problems. Adv Eng Softw 114:163–191
Wang D, Tan D, Liu L (2018) Particle swarm optimization algorithm: an overview. Soft Comput 22:387–408
Heidari AA, Mirjalili S, Faris H et al (2019) Harris hawks optimization: Algorithm andapplications. Futur Gener Comput Syst 97:849–872
Singh A, Kumar S (2016) Differential evolution: An overview. In: Proceedings of Fifth International Conference on Soft Computing for Problem Solving: SocProS 2015, Volume 1, Springer, pp 209–217
Pan H, Chen S, Xiong H (2023) A high-dimensional feature selection method based on modified gray wolf optimization. Appl Soft Comput 135:110031
Thomas R, Pavithran D (2018) A survey of intrusion detection models based on nsl-kdd data set. 2018 Fifth HCT Information Technology Trends (ITT) pp 286–291
Abdulhammed R, Musafer H, Alessa A et al (2019) Features dimensionality reduction approaches for machine learning based network intrusion detection. Electronics 8(3):322
Verkerken M, D’hooge L, Sudyana D, et al (2023) A novel multi-stage approach for hierarchical intrusion detection. IEEE Transactions on Network and Service Management 20(3):3915–3929
Wilcoxon F (1992) Individual comparisons by ranking methods. In: Breakthroughs in statistics: Methodology and distribution. Springer, p 196–202
Funding
No funds, grants, or other support were received.
Author information
Authors and Affiliations
Contributions
LS was involved in conceptualization, methodology. QY helped in investigation, methodology, writing-original draft preparation, validation. LG contributed to writing-review and editing, validation. HG contributed to writing-review and editing, charting.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Code availability
The code that support the findings of this study are available from the corresponding author upon resonable request.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Shi, L., Yang, Q., Gao, L. et al. An ensemble system for machine learning IoT intrusion detection based on enhanced artificial hummingbird algorithm. J Supercomput 81, 110 (2025). https://doi.org/10.1007/s11227-024-06475-1
Accepted:
Published:
DOI: https://doi.org/10.1007/s11227-024-06475-1