Can an intrusion detection system remain effective across different network datasets while using far less training data and ordinary computing hardware?
This study evaluates whether aggressive dataset reduction, optimized preprocessing, and hybrid class balancing can improve the generalization of machine-learning-based intrusion detection systems for critical infrastructure.
The researchers developed a lightweight Random Forest pipeline using the KDD Cup 1999 dataset and reduced the dataset by 90% through stratified sampling while preserving the relative distribution of attack categories.
The preprocessing pipeline combined outlier filtering, statistical normalization, feature reduction, class balancing, Random Forest training, and cross-dataset validation.
Five class-balancing configurations were compared: ADASYN, Tomek Links, SMOTETomek, ADASYNTomek, and an unmodified baseline.
Although all five approaches achieved approximately 99.99% accuracy in the reduced KDD’99 intra-dataset evaluation, their false-negative performance differed. SMOTETomek produced the lowest number of missed attacks, with six false negatives, compared with eight for the baseline and Tomek Links, nine for ADASYNTomek, and eleven for ADASYN.
Because minimizing missed attacks is particularly important in critical-infrastructure security, SMOTETomek was selected for the cross-dataset validation stage.
The optimized model was trained on approximately 483,863 records from the reduced KDD’99 dataset and tested on the independent NSL-KDD Test+ set containing 22,544 records.
The lightweight model achieved 80.11% accuracy on NSL-KDD, compared with 76.65% for a minimally preprocessed model trained on the full KDD’99 dataset.
It also improved attack recall from 61% to 71% and reduced the false-negative rate from 0.3889 to 0.2918, detecting 1,247 more attacks than the baseline.
The optimized model achieved a Matthews correlation coefficient of 0.6311, a Macro-F1 score of 0.80, and a Weighted-F1 score of 0.80 in the benchmark-transfer evaluation.
The model also demonstrated strong computational efficiency. It processed 22,544 instances in 0.1005 seconds, corresponding to approximately 224,388 instances per second, using commodity hardware with a four-core CPU and 16 GB of RAM without GPU acceleration.
To determine whether the pipeline could generalize beyond the KDD dataset family, the same preprocessing and modelling design was independently retrained and evaluated on UNSW-NB15 and a SCADA/ICS dataset.
On UNSW-NB15, the pipeline achieved 94.66% accuracy and a Matthews correlation coefficient of 0.8849.
On the SCADA/ICS dataset, it achieved 99.98% accuracy, an MCC of 0.9991, and a 0.0% false-positive rate, providing preliminary evidence that the methodology can generalize across different intrusion-detection domains.
Overall, the study shows that carefully reducing redundant training data and applying systematic preprocessing can produce a lightweight intrusion detection system with stronger cross-dataset performance than a full-data baseline.
The findings also challenge the assumption that very high accuracy on a single dataset necessarily indicates strong real-world generalization, particularly for security systems intended for deployment in changing network environments.
The authors note that the KDD’99-to-NSL-KDD evaluation remains a benchmark-to-benchmark transfer rather than live operational validation, while the SCADA/ICS evaluation used a single Modbus-based dataset rather than a physical-process testbed. Further validation on live critical-infrastructure traffic is therefore required.
📖 Read the full article here:
https://doi.org/10.46481/asr.2026.5.3.559
Published in: African Scientific Reports