Optimasi Model XGBoost Dengan Seleksi Fitur Mutual Information Dan Threshold Tuning Untuk Deteksi Intrusi Jaringan

Vicola Nanda Pratama, Wildanil Ghozi

Abstract


Network Intrusion Detection Systems (NIDS) are essential for protecting networks from evolving cyber threats. Although Machine Learning can be relied upon for NIDS, challenges remain in achieving high accuracy while maintaining low false alarm rates. This research proposes an optimized NIDS framework using the Extreme Gradient Boosting (XGBoost) algorithm, which is enhanced through systematic feature selection and hyperparameter tuning. The methodology integrates a two-stage feature selection process that combines ExtraTreesClassifier for initial importance analysis and SelectKBest with mutual information for identifying the optimal feature subset. Hyperparameter optimization is performed using RandomizedSearchCV with 5-fold cross-validation, followed by threshold calibration to balance the False Positive Rate (FPR) and False Negative Rate (FNR). The model is trained and evaluated on the UNSW-NB15 dataset, which contains 257,673 network traffic records with binary classification (normal vs. attack). The results of the experiment show that the optimized XGBoost model achieved an accuracy of 95.4%, precision of 94.81%, recall of 95.29%, F1-score of 95.04%, and a significantly reduced FPR of 5.09%. The feature selection process identified 37 most informative features from the original 42 features, which contributed to improved model performance and efficiency. These findings indicate that an integrated approach of adaptive feature selection and systematic model optimization effectively improves intrusion detection performance, offering a robust and balanced solution for modern network security applications.


Keywords


Feature Selection; Hyperparameter Tuning; Network Intrusion Detection System; UNSW-NB15; XGBoost

Full Text:

References


N. Pansari, S. Srivastava, R. H. Raghavendra, and M. Agarwal, “Attack Classification using Machine Learning on UNSW-NB 15 dataset using XGBoost Feature Selection & Ablation Analysis,” in 2024 IEEE 9th International Conference for Convergence in Technology, I2CT 2024, Institute of Electrical and Electronics Engineers Inc., 2024. doi: 10.1109/I2CT61223.2024.10543523.

V. L. Rismawan and E. Rahmawan Pramudya, “Network Intrusion Detection System Using Convolutional Neural Network And Random Forests Classifiers,” JURNAL INOVTEK POLBENG, vol. 10, no. 2, pp. 753–761, 2025.

O. J. Mebawondu, “Enhancing Intrusion Detection Systems with Efficient Deep Learning Techniques,” in IEEE International Conference on Emerging and Sustainable Technologies for Power and ICT in a Developing Society, NIGERCON, Institute of Electrical and Electronics Engineers Inc., 2024. doi: 10.1109/NIGERCON62786.2024.10927178.

S. Kottilingal, “Deep Learning Based Network Intrusion Detection System: A Deep Abstract Networks (DANets) Model Approach,” IRJCS: International Research Journal of Computer Science, vol. 11, no. 07, pp. 539–544, 2024, doi: 10.26562/irjcs.

Z. Zoghi and G. Serpen, “Building an Intrusion Detection System on UNSW-NB15: Reducing the margin of error to deal with data overlap and imbalance,” Concurr. Comput., vol. 36, no. 25, Nov. 2024, doi: 10.1002/cpe.8242.

Z. Chen, Z. W. Li, J. Huang, S. Z. Liu, and H. X. Long, “An effective method for anomaly detection in industrial Internet of Things using XGBoost and LSTM,” Sci. Rep., vol. 14, no. 1, Dec. 2024, doi: 10.1038/s41598-024-74822-6.

P. Ferreira, E. Martins, J. Silva, and P. Teixeira, “Feature Selection and XGBoost for Enhanced Intrusion Detection: A Comparative Study Across Benchmark Datasets,” in ISDFS 2025 - 13th International Symposium on Digital Forensics and Security, Institute of Electrical and Electronics Engineers Inc., 2025. doi: 10.1109/ISDFS65363.2025.11012060.

V. Nwachukwu and A. John-Otumu, “Improved Machine Learning-Based Model for Network Traffic Anomaly Detection,” in 2024 IEEE SmartBlock4Africa: Emerging and Resilient Technologies in Building and Securing African Nations, Institute of Electrical and Electronics Engineers Inc., 2024. doi: 10.1109/SmartBlock4Africa61928.2024.10779548.

K. K. Pal, A. V. Eriksen, and N. Dinh, “XGBoost Feature Selection for Multi-class and Binary Classification on UNSW-NB15 Dataset,” in Digest of Technical Papers - IEEE International Conference on Consumer Electronics, Institute of Electrical and Electronics Engineers Inc., 2025. doi: 10.1109/ICCE63647.2025.10930023.

T. Agustina, M. Masrizal, and I. Irmayanti, “Performance Analysis of Random Forest Algorithm for Network Anomaly Detection using Feature Selection,” Sinkron : Jurnal dan Penelitian Teknik Informatika, vol. 8, no. 2, Apr. 2024, doi: 10.33395/sinkron.v8i2.13625.

Z. P. Putra, “Evaluating the Performance of Classification Algorithms on the UNSW-NB15 Dataset for Network Intrusion Detection,” Jurnal Ilmiah FIFO, vol. 16, no. 1, p. 84, Jun. 2024, doi: 10.22441/fifo.2024.v16i1.009.

B. Nugraha Kasmara, E. Tri Esti Handayani, N. Dian Nathasia, and U. Nasional, “PERBANDINGAN KINERJA ALGORITMA K-NEAREST NEIGHBORS (K-NN) DAN DECISION TREE DALAM DETEKSI PAKET MALIS PADA JARINGAN,” STRING (Satuan Tulisan Riset dan Inovasi Teknologi), pp. 320–329, Apr. 2024.

M. A. Rehman, S. I. A. Shah, A. Anwar, and N. Islam, “From Flows to Words: Can Zero-/Few-Shot LLMs Detect Network Intrusions? A Grammar-Constrained, Calibrated Evaluation on UNSW-NB15,” arXiv:2510, Oct. 2025, [Online]. Available: http://arxiv.org/abs/2510.17883

D. Chen, Q. Song, Y. Zhang, Q. Yu, L. Li, and Z. Yang, “Evaluating the Effectiveness of Various Model Combinations for Network Intrusion Detection on UNSW-NB15,” in 2024 6th International Academic Exchange Conference on Science and Technology Innovation, Institute of Electrical and Electronics Engineers Inc., 2024, pp. 312–317. doi: 10.1109/IAECST64597.2024.11117865.

F. O. Albasheer Mohamed and M. Agarwal, “Using Recursive Feature Elimination Feature Selection based Machine Learning Classifier for Attack Classification on UNSW-NB 15 dataset,” in 2024 IEEE 9th International Conference for Convergence in Technology, Institute of Electrical and Electronics Engineers Inc., 2024. doi: 10.1109/I2CT61223.2024.10544076.

A. Kumar, K. Guleria, R. Chauhan, and D. Upadhyay, “Advancing Intrusion Detection with Machine Learning: Insights from the UNSW-NB15 Dataset,” in 2024 IEEE International Conference on Information Technology, Electronics and Intelligent Communication Systems, ICITEICS 2024, Institute of Electrical and Electronics Engineers Inc., 2024. doi: 10.1109/ICITEICS61368.2024.10625148.

K. S. Arlandy, A. Faqih, and A. R. Rinaldi, “Mengoptimalkan Kinerja Naïve Bayes Pada Ancaman Modern Dengan Menggunakan PCA Pada Data Intrusion Detection System (IDS),” Jurnal Ilmu Komputer dan Informatika, pp. 25–37, 2025.

I. H. Putro, “PERFORMANCE COMPARISON OF SVM KERNELS FOR INTRUSION DETECTION SYSTEM USING UNSW-NB15 DATASET,” Jurnal Teknik Elektro, vol. 17, no. 2, 2024.

D. Shafir, A. Wahyu, P. Putra, and I. Made Suartana, “Perbandingan Kinerja Model Deteksi Serangan Pada Intrusion Detection System Dengan Tuning Hyperparameter,” Journal of Informatics and Computer Science, vol. 06, pp. 984–993, 2025.

M. Uppal, D. Gupta, S. Juneja, S. Mapari, C. N. Vanitha, and S. Saini, “Intrusion Detection using Feedforward Neural Network for Enhancing Network Security,” in International Conference on Computing and Intelligent Reality Technologies, Institute of Electrical and Electronics Engineers Inc., 2024, pp. 361–366. doi: 10.1109/ICCIRT59484.2024.10921882.

M. M. Abualhaj, H. Al-Mimi, A. Al-Allawee, Q. Y. Shambour, and M. Anbar, “Enhancing Intrusion Detection Using Dragonfly Algorithm-Based Feature Selection and Extra Trees for Classification,” in 2025 5th International Conference on Emerging Smart Technologies and Applications, eSmarTA 2025, Institute of Electrical and Electronics Engineers Inc., 2025. doi: 10.1109/eSmarTA66764.2025.11132251.

Chalana B Arun, Anusha M, Ashwini Kodipalli, Trupthi Rao, Rohini B R, and Gargi N, “Enhancing Network Intrusion Detection using Artificial Neural Networks: An Analysis of the UNSW-NB15 Dataset,” 2024 IEEE Canadian Conference on Electrical and Computer Engineering, 2024.

A. M. Jose et al., “Multi-Class SVM & Random Forest Based Intrusion Detection Using UNSW-NB15 Dataset,” in 2024 15th International Conference on Computing Communication and Networking Technologies, Institute of Electrical and Electronics Engineers Inc., 2024. doi: 10.1109/ICCCNT61001.2024.10725989.

R. F. Ramadhan and W. M. Ashari, “Performance Comparison of Random Forest and Decision Tree Algorithms for Anomaly Detection in Networks,” 2024. [Online]. Available: http://jurnal.polibatam.ac.id/index.php/JAIC

S. Patil and R. Bansode, “A Hybrid Feature Selection Approach Incorporating Mutual Information and Genetics Algorithm for Web Server Attack Detection,” Indian J. Sci. Technol., pp. 325–332, 2024, doi: 10.17485/IJST/v17i4.2820.

G. Suchetha and K. Pushpalatha, “Optimizing Botnet Detection in IoT Networks: Feature Selection Analysis on the UNSW-NB15 Dataset,” in 2024 IEEE International Conference on Distributed Computing, Institute of Electrical and Electronics Engineers Inc., 2024, pp. 120–125. doi: 10.1109/DISCOVER62353.2024.10750583.

M. A. N. Anargya, W. Ghozi, and F. A. Rafrastara, “Optimizing IoV Attack Detection using Random Under Sampling Techniques,” Jurnal Informatika: Jurnal Pengembangan IT, vol. 10, no. 1, pp. 11–19, Jan. 2025, doi: 10.30591/jpit.v10i1.8034.




DOI: https://doi.org/10.30591/jpit.v11i2.10064

Refbacks

  • There are currently no refbacks.


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

JPIT INDEXED BY

  
  

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