An Intelligent Machine Learning-Based Framework for IDS Using Clustering-Based Feature Engineering and Soft Voting Ensemble
Keywords:
Intrusion Detection System (IDS), Machine Learning, Clustering-Based Feature Engineering, Principal Component Analysis, Soft Voting Ensemble, Network Security, CICIDS2017Abstract
With the growing complexity of network traffic and the ever-changing landscape of cyber threats, the demand for robust Intrusion Detection Systems (IDSs) powered by machine learning has grown significantly. The rise in network traffic complexity and the ever-changing nature of cyber threats have made Intrusion Detection Systems (IDSs) with machine learning capabilities more necessary than ever before. High-dimensional feature spaces, class imbalance issues, and the correct class identification of minority attack categories are still significant challenges, however. To solve these problems, the proposed solution in this study is the development of an intelligent intrusion detection framework that combines data preprocessing, clustering-based feature engineering, Principal Component Analysis (PCA) and soft-voting ensemble learning. To enhance the uniformity of features and overcome class imbalance, the framework uses feature standardization and random oversampling. Mini-Batch-K-Means clustering is used to assign clusters and add centroid-distance features to extract more traffic characteristics while PCA is used to reduce the dimensionality of features by transforming the expanded feature space into a compact representation. Next, Multiclass intrusion detection is performed by soft voting with probabilities on top of Random Forest (RF), Extra Trees (ET), and XG Boost (XGB) classifiers. The proposed structure is tested on CICIDS2017 dataset via classification performance metrics, class-wise analysis and 6-stage ablation study. The reported results show that the accuracy was 99.92%, macro precision was 96.04%, macro recall was 96.25% and macro F1 score was 96.13%. The results of the ablation study show continuously improved performance in the framework components, with accuracy improving from 99.41% to 99.92% (+0.51 percentage points), and macro F1-score rising from 90.96% to 96.13% (+5.17 percentage points). In addition, underrepresented attack categories (such as Bot and Web Attack) are evaluated to look at detection performance in addition to aggregate accuracy. The results show that clustering-based features, dimensionality reduction, and heterogeneous ensemble learning can be used to enhance the multiclass intrusion detection system for CICIDS2017 benchmark. In any case, evaluation and testing of the proposed framework in operational network environments is required to prove the generalizability and practical reliability of the framework.
References
M. Althunayyan, A. Javed, and O. Rana, “A survey of learning-based intrusion detection systems for in-vehicle networks,” Comput. Networks, vol. 277, Mar. 2026, doi: 10.1016/j.comnet.2026.112031.
Y. Ha and K. Kim, “Operationally Constrained Zero-Day Intrusion Detection with Target-FPR Calibration and Similarity Graph Construction,” Appl. Sci., vol. 16, no. 5, p. 2284, Mar. 2026, doi: 10.3390/APP16052284/S1.
M. S. Harish, S. Lokesh, P. Sakthivel, and B. Akshaya, “Hybrid deep learning model for network intrusion detection using optimal feature fusion,” Ain Shams Eng. J., vol. 17, no. 1, p. 103904, Jan. 2026, doi: 10.1016/J.ASEJ.2025.103904.
R. Ponnumani, N. Vasudeva, T. Elumalai, P. Kaliyaperumal, B. Balusamy, and F. Benedetto, “A multi-stage framework for scalable and context-aware intrusion detection in IoT-cloud systems using deep latent modeling and graph-based attack classification,” Comput. Electr. Eng., vol. 131, p. 110949, Mar. 2026, doi: 10.1016/J.COMPELECENG.2026.110949.
Y. Zhu, Y. Wang, L. Zhou, and Y. Xia, “FC-Trans: Deep learning methods for network intrusion detection in big data environments,” Comput. Secur., vol. 154, p. 104392, Jul. 2025, doi: 10.1016/J.COSE.2025.104392.
L. K. S. Kumar et al., “Anomaly-based intrusion detection on benchmark datasets for network security: a comprehensive evaluation,” Sci. Reports 2026 161, vol. 16, no. 1, pp. 8507-, Mar. 2026, doi: 10.1038/s41598-026-38317-w.
Y. Sun and Z. Wang, “Intrusion detection in IoT and wireless networks using image-based neural network classification,” Appl. Soft Comput., vol. 177, p. 113236, Jun. 2025, doi: 10.1016/J.ASOC.2025.113236.
E. C. P. Neto, S. Iqbal, S. Buffett, M. Sultana, and A. Taylor, “Deep learning for intrusion detection in emerging technologies: a comprehensive survey and new perspectives,” Artif. Intell. Rev. 2025 5811, vol. 58, no. 11, pp. 340-, Aug. 2025, doi: 10.1007/S10462-025-11346-Z.
K. S. Adewole, A. Jacobsson, and P. Davidsson, “Intrusion Detection Framework for Internet of Things with Rule Induction for Model Explanation,” Sensors 2025, Vol. 25, Page 1845, vol. 25, no. 6, p. 1845, Mar. 2025, doi: 10.3390/S25061845.
A. V. Turukmane and R. Devendiran, “M-MultiSVM: An efficient feature selection assisted network intrusion detection system using machine learning,” Comput. Secur., vol. 137, p. 103587, Feb. 2024, doi: 10.1016/J.COSE.2023.103587.
V. Kantharaju, H. Suresh, M. Niranjanamurthy, S. I. Ansarullah, F. Amin, and A. Alabrah, “Machine learning based intrusion detection framework for detecting security attacks in internet of things,” Sci. Reports 2024 141, vol. 14, no. 1, pp. 30275-, Dec. 2024, doi: 10.1038/s41598-024-81535-3.
Y. Huang, J. Gou, Z. Fan, Y. Liao, and Y. Zhuang, “A multi-label network attack detection approach based on two-stage model fusion,” J. Inf. Secur. Appl., vol. 83, p. 103790, Jun. 2024, doi: 10.1016/J.JISA.2024.103790.
J. Azimjonov and T. Kim, “Stochastic gradient descent classifier-based lightweight intrusion detection systems using the efficient feature subsets of datasets,” Expert Syst. Appl., vol. 237, p. 121493, Mar. 2024, doi: 10.1016/J.ESWA.2023.121493.
A. S. Almuflih et al., “Securing IoT devices with zero day intrusion detection system using binary snake optimization and attention based bidirectional gated recurrent classifier,” Sci. Reports 2024 141, vol. 14, no. 1, pp. 29238-, Nov. 2024, doi: 10.1038/s41598-024-80255-y.
P. Waghmode, M. Kanumuri, H. El-Ocla, and T. Boyle, “Intrusion detection system based on machine learning using least square support vector machine,” Sci. Reports 2025 151, vol. 15, no. 1, pp. 12066-, Apr. 2025, doi: 10.1038/s41598-025-95621-7.
S. Kaushik et al., “Robust machine learning based Intrusion detection system using simple statistical techniques in feature selection,” Sci. Reports 2025 151, vol. 15, no. 1, pp. 3970-, Feb. 2025, doi: 10.1038/s41598-025-88286-9.
C. Christy, A. Nirmala, A. M. O. Teena, and A. I. Amali, “Machine learning based multi-stage intrusion detection system and feature selection ensemble security in cloud assisted vehicular ad hoc networks,” Sci. Reports 2025 151, vol. 15, no. 1, pp. 27058-, Jul. 2025, doi: 10.1038/s41598-025-96303-0.
J. Mao, X. Yang, B. Hu, Y. Lu, and G. Yin, “Intrusion Detection System Based on Multi-Level Feature Extraction and Inductive Network,” Electron. 2025, Vol. 14, Page 189, vol. 14, no. 1, p. 189, Jan. 2025, doi: 10.3390/ELECTRONICS14010189.
Y. Cai, J. Zuo, M. Fan, C. Zhao, and Y. Lu, “An Intrusion Detection System for the CAN Bus Based on Locality-Sensitive Hashing,” Electron. 2025, Vol. 14, Page 2572, vol. 14, no. 13, p. 2572, Jun. 2025, doi: 10.3390/ELECTRONICS14132572.
F. Al Tfaily, Z. Ghalmane, M. el A. Brahmia, H. Hazimeh, A. Jaber, and M. Zghal, “Graph-based federated learning approach for intrusion detection in IoT networks,” Sci. Reports 2025 151, vol. 15, no. 1, pp. 41264-, Nov. 2025, doi: 10.1038/s41598-025-25175-1.
N. U. Ain, M. Sardaraz, M. Tahir, M. W. Abo Elsoud, and A. Alourani, “Securing IoT Networks Against DDoS Attacks: A Hybrid Deep Learning Approach,” Sensors 2025, Vol. 25, Page 1346, vol. 25, no. 5, p. 1346, Feb. 2025, doi: 10.3390/S25051346.
Z. kadhim Alitbi, S. A. Hosseini Seno, A. Ghaemi Bafghi, and D. Zabihzadeh, “A Generalized and Real-Time Network Intrusion Detection System Through Incremental Feature Encoding and Similarity Embedding Learning,” Sensors 2025, Vol. 25, Page 4961, vol. 25, no. 16, p. 4961, Aug. 2025, doi: 10.3390/S25164961.
A. A. Abu-Shareha, M. M. Abualhaj, A. Hussein, O. Almomani, A. Amer, and A. Achuthan, “Supervised machine learning intrusion detection review and multi-criteria evaluation,” Sci. Reports 2026 161, vol. 16, no. 1, pp. 14525-, Mar. 2026, doi: 10.1038/s41598-026-44773-1.
A. Kutlimuratov et al., “A Lightweight Cascade-Based Farmework for Real-Time Zero-Day Attack Detection,” Comput. 2026, Vol. 15, Page 174, vol. 15, no. 3, p. 174, Mar. 2026, doi: 10.3390/COMPUTERS15030174.
R. Xie and D. Liu, “A novel hybrid graph neural network and transformer model for intrusion detection,” Peer-to-Peer Netw. Appl. 2026 192, vol. 19, no. 2, pp. 59-, Mar. 2026, doi: 10.1007/S12083-025-02171-W.
P. Appiahene et al., “Network intrusion detection using a hybrid graph-based convolutional network and transformer architecture,” PLoS One, vol. 21, no. 1, p. e0340997, Jan. 2026, doi: 10.1371/JOURNAL.PONE.0340997.
R. Panigrahi and S. Borah, “A detailed analysis of CICIDS2017 dataset for designing Intrusion Detection Systems,” Int. J. Eng. Technol., vol. 7, no. 3.24, pp. 479–482, 2018, doi: 10.14419/IJET.V7I3.24.22797.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 50sea

This work is licensed under a Creative Commons Attribution 4.0 International License.


















