A Comparative Machine Learning Framework for Network Intrusion Detection Using the NSL-KDD Dataset
Authors:
Open Access
- 1 July 2026
- journal article
- Published by Scholiora Research Publications in International Journal of IoT, Embedded Systems and Industrial Automation
- Vol. 1 (2) , e002-e007
Abstract
Cyber threats are getting more complex and the number of networked systems has grown exponentially, making for greater need of Intelligent and Adaptive Intrusion Detection Systems (IDSs). These conventional signature-based security solutions are not effective against new attacks that have never been seen before, so a machine learning intrusion detection system that can be used to detect unusual network traffic has to be developed. In this study, five supervised machine learning algorithms, linear support vector machine (LSVM), quadratic support vector machine (QSVM), k-nearest neighbor (KNN), linear discriminant analysis (LDA), and quadratic discriminant analysis (QDA) were compared in the detection of network intrusions in the NSL-KDD benchmark dataset. To enhance the classification effectiveness, a systematic preprocessing pipeline was used that involves data cleaning, feature normalization, one-hot encoding, binary label transformation and correlation-based feature analysis. The training and testing sets were split in a 75:25 ratio, and the accuracy, precision, recall, F1-score, mean absolute error (MAE), mean squared error (MSE), and root mean squared error (RMSE) were used to assess the performance of the classifiers. The results of the experiments showed that the KNN classifier outperformed Fuzzy logic, NN and NN-Fuzzy logic in terms of detection accuracy (98.55%), precision (0.99), recall (0.99) and F1 score (0.99). The performance of LSVM and LDA were competitive with accuracy more than 96.7%, and QSVM was able to achieve 95.71% accuracy. The performance of QDA, on the other hand, was significantly lower because of problems of feature collinearity and covariance estimation. The results show that the neighborhood-based learning techniques are still very effective in the binary intrusion detection problem and can be used as a powerful foundation, baseline models in the cyber security field. The presented framework offers a scalable and efficient intrusion detection solution for today's network environmentsKeywords
This publication has 17 references indexed in Scilit:
- Intrusion detection with HACDT-Net and TRBM-Net using a hybrid deep learning framework with enhanced sampling techniquesScientific Reports, 2026
- Deep reinforcement learning-based intrusion detection scheme for software-defined networkingScientific Reports, 2025
- Deep learning for intrusion detection in emerging technologies: a comprehensive survey and new perspectivesArtificial Intelligence Review, 2025
- Network-based intrusion detection using deep learning techniqueScientific Reports, 2025
- Advanced cloud intrusion detection framework using graph based features transformers and contrastive learningScientific Reports, 2025
- Intrusion detection system based on machine learning using least square support vector machineScientific Reports, 2025
- Advanced IDS: a comparative study of datasets and machine learning algorithms for network flow-based intrusion detection systemsApplied Intelligence, 2025
- An optimized LSTM-based deep learning model for anomaly network intrusion detectionScientific Reports, 2025
- A detailed analysis of the KDD CUP 99 data set2009
- The 1999 DARPA off-line intrusion detection evaluationComputer Networks, 2000