[Paper Review] Evaluation of Machine Learning Algorithms in Network-Based Intrusion Detection System
This paper proposes a novel evaluation method for machine learning-based network intrusion detection systems (ML-NIDS) by training on an earlier dataset and testing on a later, temporally distinct dataset to assess long-term performance and detect overfitting. The study finds that SVM and ANN are most resistant to overfitting, while DT and RF show significant overfitting despite strong training performance, highlighting the importance of temporal data separation in real-world IDS evaluation.
Cybersecurity has become one of the focuses of organisations. The number of cyberattacks keeps increasing as Internet usage continues to grow. An intrusion detection system (IDS) is an alarm system that helps to detect cyberattacks. As new types of cyberattacks continue to emerge, researchers focus on developing machine learning (ML) based IDS to detect zero-day attacks. Researchers usually remove some or all attack samples from the training dataset and only include them in the testing dataset when evaluating the performance of an IDS on detecting zero-day attacks. Although this method may show the ability of an IDs to detect unknown attacks; however, it does not reflect the long-term performance of the IDS as it only shows the changes in the type of attacks. In this paper, we focus on evaluating the long-term performance of ML based IDS. To achieve this goal, we propose evaluating the ML-based IDS using a dataset that is created later than the training dataset. The proposed method can better assess the long-term performance of an ML-based IDS, as the testing dataset reflects the changes in the type of attack and the changes in network infrastructure over time. We have implemented six of the most popular ML models that are used for IDS, including decision tree (DT), random forest (RF), support vector machine (SVM), naïve Bayes (NB), artificial neural network (ANN) and deep neural network (DNN). Our experiments using the CIC-IDS2017 and the CSE-CIC-IDS2018 datasets show that SVM and ANN are most resistant to overfitting. Besides that, our experiment results also show that DT and RF suffer the most from overfitting, although they perform well on the training dataset. On the other hand, our experiments using the LUFlow dataset have shown that all models can perform well when the difference between the training and testing datasets is small.
Motivation & Objective
- To address the limitation of existing ML-NIDS evaluations that use the same dataset for training and testing, which fails to reflect real-world long-term performance.
- To investigate how ML models used in network-based intrusion detection systems perform when tested on data collected after the training period, simulating real-world temporal changes.
- To identify which ML models are most resilient to overfitting when faced with evolving network traffic and attack patterns.
- To propose and validate a new evaluation methodology that uses temporally separated datasets (e.g., CIC-IDS2017 for training, CSE-CIC-IDS2018 for testing) to better reflect real-world deployment conditions.
- To provide practical guidance on model selection based on organizational threat profile and infrastructure stability.
Proposed method
- The authors train six ML models—DT, RF, SVM, NB, ANN, and DNN—on an earlier dataset (e.g., CIC-IDS2017) and evaluate their performance on a later, temporally distinct dataset (e.g., CSE-CIC-IDS2018) to simulate real-world deployment.
- The evaluation uses two primary datasets: CIC-IDS2017 and CSE-CIC-IDS2018, which differ significantly in network topology, attack types, and class distribution, increasing the realism of the test scenario.
- A second evaluation is conducted using the LUFlow dataset, collected six months apart (July 2020 vs. January 2021), to assess performance under minimal environmental change.
- Model performance is measured using standard metrics such as accuracy, precision, recall, and F1-score, with a focus on detecting overfitting through performance drops between training and testing sets.
- The study compares model behavior across datasets with varying degrees of temporal and environmental divergence to assess robustness.
- Feature selection is applied to the datasets, though the paper notes that further optimization of feature selection could improve model generalization.
Experimental results
Research questions
- RQ1How do different machine learning models perform when evaluated on a dataset collected after the training dataset, simulating real-world temporal evolution of network traffic and attacks?
- RQ2Which ML models exhibit the highest resistance to overfitting when tested on a later, distinct dataset, indicating better long-term generalization?
- RQ3To what extent does the performance gap between training and testing datasets reveal overfitting, and can this be used as a reliable indicator of model robustness?
- RQ4How does the choice of training and testing datasets with significant differences in attack types and network infrastructure affect model generalization?
- RQ5What are the practical implications of model selection for organizations with different threat profiles and infrastructure update frequencies?
Key findings
- SVM and ANN demonstrate the strongest resistance to overfitting when evaluated on a later dataset, indicating superior long-term generalization performance.
- Decision tree (DT) and random forest (RF) models show severe overfitting, achieving high accuracy on the training set but dropping below 80% on the testing set, which is considered unacceptable for intrusion detection.
- The performance drop from training to testing on the CIC-IDS2017 to CSE-CIC-IDS2018 transition indicates that models trained on older data fail to generalize to newer, more complex attack patterns and network environments.
- In contrast, models trained on the LUFlow dataset—collected six months apart but with minimal environmental change—performed well across all models, suggesting that temporal shift alone is not the sole cause of performance degradation.
- The study confirms that existing ML-NIDS evaluations using the same dataset for training and testing may fail to detect overfitting, as the performance gap only becomes apparent when testing on a later dataset.
- ANN is identified as the best model for systems with frequent infrastructure updates and high cyberattack risk, while DT is more suitable for low-target, stable environments due to its efficiency and strong training performance.
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.