A COMPARATIVE EVALUATION OF CLASS-IMBALANCE HANDLING STRATEGIES FOR MACHINE LEARNING-BASED INTRUSION DETECTION

Authors

  • X.K. Samarov Tashkent University of Information Technologies named after Muhammad al-Khwarizmi, Tashkent, Uzbekistan Author
  • Z. A. Barotova Tashkent University of Information Technologies named after Muhammad al-Khwarizmi, Tashkent, Uzbekistan Author
  • Davlatbek Abduvoxidov State Institution "Inspectorate for Regulation of the Alcohol and Tobacco Market" under the Department for Combating Economic Crimes at the Prosecutor General's Office of the Republic of Uzbekistan. Author

Keywords:

network intrusion detection, machine learning, class imbalance, SMOTE, Random Undersampling, CIC-IDS2017, UNSW-NB15, Macro-F1

Abstract

 In machine learning-based network intrusion detection systems, class imbalance can negatively affect the effectiveness of detecting rare attack types. This article presents a comparative analysis grounded in existing literature of balancing strategies aimed at addressing this issue. Specifically, it examines the advantages and limitations of three approaches: the initial imbalanced state (baseline), the generation of synthetic samples for minority classes (SMOTE), and the reduction of samples from majority classes (Random Undersampling – RUS). The analysis utilizes the CIC-IDS2017 and UNSW-NB15 datasets, alongside classifiers such as Decision Tree (DT), Random Forest (RF), K-Nearest Neighbors (KNN), and Multilayer Perceptron (MLP). Findings from existing research indicate that the effectiveness of class balancing depends on the specific dataset, the classifier employed, and the evaluation conditions. Consequently, the study argues that system performance should not be assessed solely through overall accuracy; rather, it necessitates the use of metrics such as Macro-F1, Macro-Precision, class-specific Recall, and the false positive rate. The study establishes a methodological framework for comparing balancing strategies under identical experimental conditions, along with key criteria for future experimental research.

References

1.Gopalan, S., et al. “Balancing Approaches towards ML for IDS: A Survey for the CSE-CIC IDS Dataset.” 2020 International Conference on Communications, Signal Processing, and their Applications (ICCSPA), 2021. https://doi.org/10.1109/ICCSPA49915.2021.9385742.

2.Ahsan, R., Shi, W., and Corriveau, J.-P. “Network Intrusion Detection Using Machine Learning Approaches: Addressing Data Imbalance.” IET Cyber-Physical Systems: Theory & Applications, 7(1), 30–39, 2022. https://doi.org/10.1049/cps2.12013.

3.Bagui, S., Mink, D., Bagui, S., Subramaniam, S., and Wallace, D. “Resampling Imbalanced Network Intrusion Datasets to Identify Rare Attacks.” Future Internet, 15(4), 130, 2023. https://doi.org/10.3390/fi15040130.

4.Ahmed, H. A., Hameed, A., and Bawany, N. Z. “Network Intrusion Detection Using Oversampling Technique and Machine Learning Algorithms.” PeerJ Computer Science, 8, e820, 2022. https://doi.org/10.7717/peerj-cs.820.

5.“Machine Learning-Based Intrusion Detection on Multi-Class Imbalanced Dataset Using SMOTE.” Procedia Computer Science, 234, 578–583, 2024. https://doi.org/10.1016/j.procs.2024.03.042.

6.Shanmugam, V., Razavi-Far, R., and Hallaji, E. “Addressing Class Imbalance in Intrusion Detection: A Comprehensive Evaluation of Machine Learning Approaches.” Electronics, 14(1), 69, 2025. https://doi.org/10.3390/electronics1401006

7.“Benchmarking of Machine Learning for Anomaly Based Intrusion Detection Systems in the CICIDS2017 Dataset,” IEEE Access, 2021. doi: 10.1109/ACCESS.2021.3056614.

8.[2] S. M. Kasongo and Y. Sun, “Performance Analysis of Intrusion Detection Systems Using a Feature Selection Method on the UNSW-NB15 Dataset,” Journal of Big Data, vol. 7, Art. no. 105, 2020. doi: 10.1186/s40537-020-00379-6.

9.“Multi-layer Perceptron-Based Network Intrusion Detection for the UNSW-NB15,” Lecture Notes in Networks and Systems, 2025. doi: 10.1007/978-981-96-4136-9_6.

10.Ahmed, M. M., Hameed, S., & Bawany, N. Z. “Network intrusion detection using oversampling technique and machine learning algorithms.” PeerJ Computer Science, 8, e820, 2022. https://doi.org/10.7717/peerj-cs.820

11.[2] Widodo, A. A., Setiawan, E. B., & Indraswari, R. “Machine Learning-Based Intrusion Detection on Multi-Class Imbalanced Dataset Using SMOTE.” Procedia Computer Science, 234, 578–583, 2024. https://doi.org/10.1016/j.procs.2024.03.042

12.[3] Zhang, Y., Huang, Y., Wu, Q., & Li, Z. “An effective convolutional neural network based on SMOTE and Gaussian mixture model for intrusion detection in imbalanced dataset.” Computer Networks, 177, 107315, 2020. https://doi.org/10.1016/j.comnet.2020.107315

13.[4] Balla, T. et al. “The Effect of Dataset Imbalance on the Performance of SCADA Intrusion Detection Systems.” Sensors, 23(2), 758, 2023. https://doi.org/10.3390/s23020758

14.[5] “Determining Resampling Ratios Using BSMOTE and SVM-SMOTE for Identifying Rare Attacks in Imbalanced Cybersecurity Data.” Computers, 12(10), 204, 2023. https://www.mdpi.com/2073-431X/12/10/204

15.[6] Li, Z. et al. “Mitigating Class Imbalance in Network Intrusion Detection with Feature-Regularized GANs.” Future Internet, 17(5), 216, 2025. https://doi.org/10.3390/fi17050216

16.7. N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, “SMOTE: Synthetic Minority Over-sampling Technique,” Journal of Artificial Intelligence Research, vol. 16, pp. 321–357, 2002. https://doi.org/10.1613/jair.953

Downloads

Published

2026-11-21