Enhanced Approach for Intrusion Detection System in WSN using Hybrid PSO and Stacked Classifiers
Authors
Department of Computer Science, Funnab, Nigeria (Nigeria)
Department of Software Engineering, Funaab, Nigeria (Nigeria)
Department of Mechanical Engineering, Lautech, Nigeria. (Nigeria)
Article Information
DOI: 10.51244/IJRSI.2025.1210000347
Subject Category: Artificial Intelligence, Machine Learning, Network security and optimization
Volume/Issue: 12/10 | Page No: 4041-4049
Publication Timeline
Submitted: 2025-11-02
Accepted: 2025-11-10
Published: 2025-11-22
Abstract
The determination of unknown attacks remains a major challenge in WSN. Network Intrusion Detection (NIDS) is a proactive network security protection technology, which provides an effective defense system for WSN. NIDS heavily utilizes approaches for data extraction and Machine Learning (ML) to find anomalies. ML is an artificial intelligence subset that refers to a set of approaches allowing to learn from a preset dataset with improvement without human intervention. In terms of feature Importance. Particle Swarm Optimization (PSO) is a method used to select features in the dataset that contribute the most to predicting the target variable. Working with selected features instead of all the features reduces the risk of over-fitting, improves accuracy and decreases the training time. PSO technique selects optimal features from the preprocessed dataset. Residue Number System (RNS) is a numeral system representing integers by their values modulo several pairwise coprime integers called the moduli. This representation is allowed by Forward Conversion, which asserts that if N is the product of the moduli, there is, in an interval of length N, exactly one integer having any given set of modular values. The goal of the study is to provide NIDS with an attribute selection approach. PSO has been used for that purpose. This proposed feature selection method integrates RNS with the advantages of both empirical mode decomposition to retain most of the relevant features. The Network Intrusion Detection model PSO-RNS is being developed to identify any malicious activity in the network or any unusual behavior in the network, allowing the identification of the illegal activities. The proposed framework validated datasets, UNSW NB-15 to train the ensemble Machine Learning classifiers, KNN, Naïve Bayes and Logistic Regression as base classifiers while Random Forest as meta classifier, all been. stacked for feature selection with PSO optimization technique. In order to enhance the accuracy of the model, RNS is used to extract features from the dataset further using moduli set of {2n - 1, 2n, 2n +1}. The proposed PSO-RNS algorithm performs well in the benchmark function test and effectively guarantees the improvement of PSO feature selection approach. Our model achieved a reduced training time with the inclusion of RNS compared with PSO for (Naïve Bayes + KNN) + Random Forest: CASE A and KNN + Logistic Regression) + Random Forest: CASE B and improved accuracy. The experimental results show that the proposed intrusion detection model has good effects and practical application significance.
Keywords
Forward Conversion, Machine Learning Classifiers, Moduli set, NIDS, PSO, RNS, Stack Ensemble, UNSW NB-15, WSN
Downloads
References
1. Liu, Gaoyuan, Huiqi Zhao, Fang Fan, Gang Liu, Qiang Xu, and Shah Nazir. 2022. "An Enhanced Intrusion Detection Model Based on Improved KNN in WSNs" Sensors 22, no. 4: 1407. https://doi.org/10.3390/s22041407 [Google Scholar] [Crossref]
2. Pandey, Vivek & Prakash, Shiv & Gupta, Tarun & Sinha, Priyanshu & Yang, Tiansheng & Rathore, [Google Scholar] [Crossref]
3. Rajkumar Singh & Wang, Lu & Tahir, Sabeen & Bakhsh, Sheikh.(2025).Enhancing intrusion detection [Google Scholar] [Crossref]
4. in wireless sensor networks using a Tabu search based optimized random forest. Scientific Reports. [Google Scholar] [Crossref]
5. 15. 10.1038/s41598-025-03498-3 [Google Scholar] [Crossref]
6. Gad, A.G., Mosa, D.T., Abualigah, L.& Abohany, A.A. (2022). Emerging Trends in Blockchain Technology and Applications: A Review and Outlook. J. King Saud Univ. Computer. Inf. Sci. 2022, 34, 6719–6742. [Google Scholar] [Crossref]
7. Torabi, Z., & Barzegaran, V. (2023). Measuring 3- and 4-Moduli Sets Delay Per Bit in Residue [Google Scholar] [Crossref]
8. Number System: A Survey. IETE Journal of Research, 1–9. https://doi.org/10.1080/03772063.2023.2204854 [Google Scholar] [Crossref]
9. Idowu, I.R., Alobalorun, B.S., Abdulsalam, A. (2024). Enhanced AES for Securing Hand Written Signature Using Residue Number System. In: Latifi, S. (eds) ITNG 2024: 21st International Conference on Information Technology-New Generations. ITNG 2024. Advances in Intelligent Systems and Computing, vol 1456. Springer, Cham. https://doi.org/10.1007/978-3-031-56599-1_4 [Google Scholar] [Crossref]
10. Gbolagade, K. A. (2013). An efficient MRC based RNS-to-binary converter for the {22n - 1,2n, 2 2n+1 -1} moduli set, International Journal of Advanced Research in Computer Engineering and Technology (IJARCET), 2(10), 2661- 2664. [Google Scholar] [Crossref]
11. Talukder, M.A., Khalid, M. & Sultana, N. A hybrid machine learning model for intrusion detection in wireless sensor networks leveraging data balancing and dimensionality reduction. Sci Rep 15, 4617 (2025). https://doi.org/10.1038/s41598-025-87028-1 [Google Scholar] [Crossref]
12. Gebrekiros Gebreyesus Gebremariam, J. Panda & S. Indu (2023) Design of advanced intrusion detection systems based on hybrid machine learning techniques in hierarchically wireless sensor networks, Connection Science, 35:1, 2246703, DOI:10.1080/09540091.2023.2246703 [Google Scholar] [Crossref]
13. Danial, A., Mohammad, E. & Amer, K. (2024). Efficient Implementation of the Sum of Residues Modular Reduction using Arithmetic-Friendly RNS Moduli Set. Educational Administration: Theory and Practice, 30(5), 2305–2316. https://doi.org/10.53555/kuey.v30i5.3278 [Google Scholar] [Crossref]
14. Mahajan, P., Uddin, S., Hajati, F., Ali Moni M. & Gide, E. (2024). A Comparative Evaluation of machine learning ensemble approaches for disease prediction using multiple datasets. Health Technol. 14, 597–613. https://doi.org/10.1007/s12553-024-00835-w [Google Scholar] [Crossref]
15. Sunday Adeola AJAGBE, Ifedotun Roseline IDOWU, John B. OLADOSU and Ademola O. ADESINA (2020) Accuracy of Machine Learning Models for Mortality Rate Prediction in a Crime Dataset International Journal of Information Processing and Communication (IJIPC) Vol. 10 No. 1&2 [December, 2020], pp. 150-160. Online: ISSN 2645-2960; Print ISSN: 2141-3959 [Google Scholar] [Crossref]
16. Alsahli, M. S., Almasri, M. M., Al-Akhras, M., Al-Issa, A. I., & Alawairdhi, M. (2021). Evaluation of machine learning algorithms for intrusion detection system in WSN. International Journal of Advanced Computer Science and Applications, 12(5). https://doi.org/10.14569/IJACSA.2021.0120574 [Google Scholar] [Crossref]
17. Churcher, A., Ullah, R., Ahmad, J., Ur Rehman, S., Masood, F., Gogate, M., Alqahtani, F., Nour, B., & Buchanan, W. J. (2021). An experimental analysis of attack classification using machine learning in IoT networks. Sensors, 21(2), 446. https://doi.org/10.3390/s21020446 [Google Scholar] [Crossref]
18. Kayode A. Okewale, Ifedotun R. Idowu, Bamidele S. Alobalorun, Falilat A. Alabi, (2023)."Effective Machine Learning Classifiers for Intrusion Detection in Computer Network," International Journal of Scientific Research in Computer Science and Engineering, Vol.11, Issue.2, pp.14-22, E-ISSN 2320-7639. | DOI: https://doi.org/10.26438/ijsrcse/ [Google Scholar] [Crossref]
19. Almotairi, A., Atawneh, S., Khashan, O. A., & Khafajah, N. M. (2024). Enhancing intrusion detection in IoT networks using machine learning-based feature selection and ensemble models. Systems Science & Control Engineering, 12(1). https://doi.org/10.1080/21642583.2024.2321381 [Google Scholar] [Crossref]
20. Rahmatinejad, Z., Dehghani, T., Hoseini, B., Rahmatinejad, F., Aynaz Lotfata, A.& Eslami,S. (2024). A comparative study of explainable ensemble learning and logistic regression for predicting in-hospital mortality in the emergency department. Sci Rep 14, https://doi.org/10.1038/s41598-024-54038-4 [Google Scholar] [Crossref]
21. Alotaibi, Y., & Mohammad, I. (2023). Ensemble-Learning Framework for Intrusion Detection to Enhance Internet of Things’ Devices Security Sensors 23, no. 12: 5568. https://doi.org/10.3390/s23125568 [Google Scholar] [Crossref]
22. Abualhaj, M. M., Al-Khatib, S. N., Al Zyoud, M., Qaddara, I., & Anbar, M. (2025). Enhancing Intrusion Detection System Performance Using a Hybrid of Harris Hawks and Whale Optimization Algorithms. Engineering, Technology & Applied Science Research, 15(4), 24354–24361. https://doi.org/10.48084/etasr.10919 [Google Scholar] [Crossref]
23. Mojtahedi, A., Sorouri, F., Souha, A. N., Molazadeh, A., & Mehr, S. S. (2022). Feature selection-based intrusion detection system using genetic whale optimization algorithm and sample-based classification. arXiv preprint arXiv:2201.00584, [Google Scholar] [Crossref]
24. Idowu, I.R., Asaju-Gbolagade, A.W. & Gbolagade, K. A. (2023). Enhancement of Intrusion Detection Dataset in Wireless Sensor Network using RNS - Feature Conversion with Stack Ensemble Technique. University of Ibadan Journal of Science and Logics in ICT Research (UIJSLICTR), Vol. 10 No. 1, pp. 22 - 36. ©U IJSLICTR Vol. 10, No. 1, June 2023 [Google Scholar] [Crossref]
25. Sivagaminathan, V., Sharma, M. & Henge, S.K. (2023). Intrusion detection systems for wireless sensor networks using computational intelligence techniques. Cybersecurity 6, 27 (2023). https://doi.org/10.1186/s42400- 023-00161-0 [Google Scholar] [Crossref]