Optimizing Machine Learning-Based Network Intrusion Detection System with Oversampling, Feature Selection and Extraction
English
DOI:
https://doi.org/10.26555/jiteki.v11i2.30675Abstract
Network security has become a global challenge that requires effective and innovative solutions. Intrusion Detection Systems (IDS) play a crucial role in protecting network infrastructures from evolving cyberattacks. The use of Machine Learning (ML) techniques in IDS offers high accuracy in detecting and identifying threats. However, challenges arise when dealing with imbalanced and high-dimensional datasets. This paper introduces a novel approach for ML-based network intrusion detection by employing Random Oversampling (RO) to handle data imbalance and K-fold validation, along with Feature Selection and Extraction using Random Forest and Principal
Component Analysis (PCA) to address dimensionality reduction and K-vold validation to ensures that the feature selection process (Random Forest + PCA) and model training are optimized to avoid overfitting. Additionally, each model undergoes Maximum Optimization using Optuna to enhance accuracy, precision, recall, F1-score, NIDS traffic parameters, and ROC Curve performance. The approach was evaluated on three benchmark datasets: UNSW-NB15, CIC-IDS-2017, and CIC-IDS-2018. Each dataset was modeled using KNN, Logistic Regression, Decision Tree, Random Forest, GBM, XGBM, Adaboost, Light GBM, CatBoost, and Extra Tree algorithms to achieve a high accuracy of 99%. Notably, this method proves effective for large and imbalanced datasets, as evidenced by the CIC-IDS2018 dataset, which contains over one million records. The results outperform state-of-the-art models, marking a significant advancement in network intrusion detection. This flexible framework paves the way for further exploration of ML algorithms to enhance IDS effectiveness.
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Rama Wijaya Shiddiq

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with JITEKI agree to the following terms:
- Authors retain copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (CC BY-SA 4.0) that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work.
This work is licensed under a Creative Commons Attribution 4.0 International License