An explainable stacking ensemble machine learning model for denial-of-service attack detection
DOI:
https://doi.org/10.64497/jssci.245Keywords:
denial-of-Service, ensemble learning, stacking; random forest, artificial neural network, decision tree, mutual information, CIC-IDS2017Abstract
The evolving sophistication of cyber threats, particularly denial-of-service (DoS) and distributed denial-of-service (DDoS) attacks, poses significant challenges to the modern cybersecurity systems, availability, and reliability of digital infrastructures. These attacks often overwhelm network resources, leading to service disruptions and potential data breaches. Traditional intrusion detection systems (IDS) have been developed to mitigate such threats; however, they often struggle with scalability, detection accuracy, and interpretability, especially when processing large-scale network traffic. To address these limitations, this study proposes a stacked ensemble intrusion detection model integrating Decision Tree (DT), Random Forest (RF), and Artificial Neural Network (ANN) classifiers as base learners, with Logistic Regression (LR) serving as the meta-learner. The framework aims to enhance detection accuracy, interpretability, and robustness against DoS and DDoS attacks. Using the CIC-IDS2017 dataset, Mutual Information (MI) was employed for optimal feature selection, ensuring the most relevant attributes were retained for training. SHAP (Shapley Additive exPlanations) was applied to interpret the contribution of each selected feature to the model’s decision-making process. Experimental results demonstrate that the proposed ensemble achieves superior performance compared to individual classifiers and baseline models, with 98.83% accuracy, 96.37% precision, 99.19% recall, 97.76% F1-score, and an AUC of 0.9995. Compared with the baseline [1], accuracy improved by 3.39% and F1-score by 1.57%. SHAP analysis identified flow-based and packet-based features as key contributors in distinguishing normal and malicious traffic. Overall, combining multiple learning algorithms within a stacked ensemble, along with MI feature selection and SHAP explainability, provides a robust, transparent, and effective solution for real-time intrusion detection.
Downloads
References
[1] U. Ahmed et al., “Hybrid bagging and boosting with SHAP based feature selection for enhanced predictive modeling in intrusion detection systems,” Scientific Reports, vol. 14, no. 1, Dec. 2024, doi: 10.1038/s41598-024-81151-1.
[2] A. L. Buczak and E. Guven, “A survey of data mining and machine learning methods for cyber security intrusion detection,” IEEE Communications Surveys & Tutorials, vol. 18, no. 2, pp. 1153–1176, 2016, doi: 10.1109/COMST.2015.2494502.
[3] K. B. Adedeji, A. M. Abu-Mahfouz, and A. M. Kurien, “DDoS attack and detection methods in Internet-enabled networks: Concept, research perspectives, and challenges,” Journal of Sensor and Actuator Networks, vol. 12, no. 4, Art. no. 51, Aug. 2023, doi: 10.3390/jsan12040051.
[4] R. Alzhrani and A. Alliheedi, “5G networks and IoT devices: Mitigating DDoS attacks with deep learning techniques,” arXiv preprint arXiv:2311.06938, Nov. 2023.
[5] C. E. Ben Ncir, M. A. Ben Haj Kacem, and M. Alattas, “Enhancing intrusion detection performance using explainable ensemble deep learning,” PeerJ Computer Science, vol. 10, Art. no. e2289, Sep. 2024, doi: 10.7717/peerj-cs.2289.
[6] P. R. Chithra Rani and K. Baalaji, “Deep learning-based ensemble stacking for enhanced intrusion detection in IoT-edge platforms,” Discover Applied Sciences, vol. 7, Art. no. 928, 2025, doi: 10.1007/s42452-025-06871-z.
[7] M. Gelgi, Y. Guan, S. Arunachala, M. S. S. Rao, and N. Dragoni, “Systematic literature review of IoT botnet DDoS attacks and evaluation of detection techniques,” Sensors, vol. 24, no. 11, Art. no. 3571, 2024, doi: 10.3390/s24113571.
[8] R. Sommer and V. Paxson, “Outside the closed world: On using machine learning for network intrusion detection,” in Proc. IEEE Symp. Security and Privacy, 2010, pp. 305–316, doi: 10.1109/SP.2010.25.
[9] W. F. Urmi et al., “A stacked ensemble approach to detect cyberattacks based on feature selection techniques,” International Journal of Cognitive Computing in Engineering, vol. 5, pp. 316–331, 2024, doi: 10.1016/j.ijcce.2024.07.005.
[10] I. Sharafaldin, A. Habibi Lashkari, and A. A. Ghorbani, “Toward generating a new intrusion detection dataset and intrusion traffic characterization,” in Proc. 4th Int. Conf. Information Systems Security and Privacy (ICISSP), 2018, pp. 108–116, doi: 10.5220/0006639801080116.
[11] N. Shone, T. N. Ngoc, V. D. Phai, and Q. Shi, “A deep learning approach to network intrusion detection,” IEEE Transactions on Emerging Topics in Computational Intelligence, vol. 2, no. 1, pp. 41–50, Feb. 2018, doi: 10.1109/TETCI.2017.2772792.
[12] M. Amara, N. Smairi, and M. Jaballah, “Stacked ensemble deep learning for robust intrusion detection in IoT networks,” in Proc. 14th Int. Conf. Agents and Artificial Intelligence (ICAART), 2025, pp. 1146–1153, doi: 10.5220/0013290700003890.
[13] A. Rosay, E. Cheval, F. Carlier, and P. Leroux, “Network intrusion detection: A comprehensive analysis of CIC-IDS2017,” in Proc. 8th Int. Conf. Information Systems Security and Privacy (ICISSP), 2022, pp. 25–36, doi: 10.5220/0010774000003120.
[14] K. Yang et al., “NIDS-CNNRF integrating CNN and random forest for efficient network intrusion detection model,” Internet of Things, vol. 32, Art. no. 101607, Jul. 2025, doi: 10.1016/j.iot.2025.101607.
[15] T.-T.-H. Le, H. Kim, H. Kang, and H. Kim, “Classification and explanation for intrusion detection system based on ensemble trees and SHAP method,” Sensors, vol. 22, no. 3, Art. no. 1154, 2022, doi: 10.3390/s22031154.
[16] S. Neupane et al., “Explainable intrusion detection systems (X-IDS): A survey of current methods, challenges, and opportunities,” IEEE Access, vol. 10, pp. 112392–112415, 2022, doi: 10.1109/ACCESS.2022.3216617.
[17] N. Khan, K. Ahmad, A. Al Tamimi, M. M. Alani, A. Bermak, and I. Khalil, “Explainable AI-based intrusion detection systems for Industry 5.0 and adversarial XAI: A systematic review,” Information, vol. 16, no. 12, Art. no. 1036, 2025, doi: 10.3390/info16121036.
[18] M. M. J. Ayan et al., “Human-centered explainable AI for security enhancement: A deep intrusion detection framework,” arXiv preprint arXiv:2602.13271, 2026, doi: 10.48550/arXiv.2602.13271.
[19] S. Alsaleh, M. E. B. Menai, and S. Al-Ahmadi, “A heterogeneity-aware semi-decentralized model for a lightweight intrusion detection system for IoT networks based on federated learning and BiLSTM,” Sensors, vol. 25, no. 4, Art. no. 1039, 2025, doi: 10.3390/s25041039.
[20] A. Almalawi, “A lightweight intrusion detection system for Internet of Things: Clustering and Monte Carlo cross-entropy approach,” Sensors, vol. 25, no. 7, Art. no. 2235, 2025, doi: 10.3390/s25072235.
[21] N. Moustafa, B. Turnbull, and K.-K. R. Choo, “An ensemble intrusion detection technique based on proposed statistical flow features for protecting network traffic of Internet of Things,” IEEE Internet of Things Journal, vol. 6, no. 3, pp. 4815–4830, Jun. 2019, doi: 10.1109/JIOT.2018.2871719.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Halimah Muhammad Tukur; Jamilu Awwalu, Salim Ahmad, Ayuba john

This work is licensed under a Creative Commons Attribution 4.0 International License.
- Abstract 228
- PDF 77

