[Paper Review] Machine learning-based network intrusion detection for big and imbalanced data using oversampling, stacking feature embedding and feature extraction
This paper proposes a machine learning-based network intrusion detection system that combines random oversampling, stacking feature embedding via clustering, and PCA-based dimensionality reduction to address data imbalance and high-dimensional features in big network datasets. The model achieves state-of-the-art accuracy of up to 99.99% on CIC-IDS-2017 and 99.95% on UNSW-NB15, significantly outperforming prior methods by 1.52% to 22.19% across benchmark datasets.
Cybersecurity has emerged as a critical global concern. Intrusion Detection Systems (IDS) play a critical role in protecting interconnected networks by detecting malicious actors and activities. Machine Learning (ML)-based behavior analysis within the IDS has considerable potential for detecting dynamic cyber threats, identifying abnormalities, and identifying malicious conduct within the network. However, as the number of data grows, dimension reduction becomes an increasingly difficult task when training ML models. Addressing this, our paper introduces a novel ML-based network intrusion detection model that uses Random Oversampling (RO) to address data imbalance and Stacking Feature Embedding based on clustering results, as well as Principal Component Analysis (PCA) for dimension reduction and is specifically designed for large and imbalanced datasets. This model's performance is carefully evaluated using three cutting-edge benchmark datasets: UNSW-NB15, CIC-IDS-2017, and CIC-IDS-2018. On the UNSW-NB15 dataset, our trials show that the RF and ET models achieve accuracy rates of 99.59% and 99.95%, respectively. Furthermore, using the CIC-IDS2017 dataset, DT, RF, and ET models reach 99.99% accuracy, while DT and RF models obtain 99.94% accuracy on CIC-IDS2018. These performance results continuously outperform the state-of-art, indicating significant progress in the field of network intrusion detection. This achievement demonstrates the efficacy of the suggested methodology, which can be used practically to accurately monitor and identify network traffic intrusions, thereby blocking possible threats.
Motivation & Objective
- To address the challenge of data imbalance in network intrusion detection, where malicious traffic is vastly underrepresented compared to benign traffic.
- To reduce dimensionality in high-volume network traffic data while preserving discriminative features for improved model efficiency and performance.
- To enhance detection accuracy by integrating stacking feature embedding based on clustering results with traditional ML models.
- To evaluate the proposed model on modern, large-scale, and imbalanced benchmark datasets such as UNSW-NB15, CIC-IDS-2017, and CIC-IDS-2018.
- To provide a robust, scalable, and accurate solution for real-world intrusion detection systems with reduced false positives.
Proposed method
- Random Oversampling (RO) is applied to balance the minority class (intrusions) and mitigate bias in model training.
- Clustering-based feature embedding is used to generate high-level representations of input features, capturing complex patterns and relationships in the data.
- Stacked feature embeddings are created by combining multiple clustering-based representations to enrich feature space and improve model generalization.
- Principal Component Analysis (PCA) is applied post-embedding to reduce dimensionality and eliminate redundant or noisy features.
- Ensemble classifiers—Decision Tree (DT), Random Forest (RF), Extra Trees (ET), and XGBoost (XGB)—are trained on the processed data for both binary and multilabel classification.
- The pipeline is evaluated end-to-end on three real-world benchmark datasets: UNSW-NB15, CIC-IDS-2017, and CIC-IDS-2018.

Experimental results
Research questions
- RQ1Can random oversampling effectively mitigate the performance degradation caused by class imbalance in network intrusion detection?
- RQ2To what extent does stacking feature embedding based on clustering improve detection accuracy compared to standard feature representation?
- RQ3How effective is PCA in reducing dimensionality while preserving critical discriminative information for intrusion detection?
- RQ4Does the integration of oversampling, feature embedding, and dimensionality reduction lead to a significant performance gain over existing state-of-the-art models?
- RQ5Can the proposed model generalize across diverse, large-scale, and imbalanced network traffic datasets?
Key findings
- On the UNSW-NB15 dataset, the Random Forest (RF) and Extra Trees (ET) models achieved 99.59% and 99.95% accuracy, respectively, significantly outperforming prior methods.
- On the CIC-IDS-2017 dataset, DT, RF, and ET models reached 99.99% accuracy, demonstrating near-perfect detection performance.
- On the CIC-IDS-2018 dataset, DT and RF models achieved 99.94% accuracy, with improvements ranging from 1.99% to 8.44% over previous approaches.
- The proposed model improved accuracy by 1.52% to 22.19% on UNSW-NB15, 0.12% to 2.99% on CIC-IDS-2017, and 1.99% to 8.44% on CIC-IDS-2018 compared to existing state-of-the-art methods.
- The integration of feature embedding and PCA reduced computational complexity while enhancing model interpretability and robustness across varying data distributions.
- The model demonstrated low false positive rates, reducing the burden on security teams by focusing attention on high-confidence threats.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.