An Analysis of Intrusion Detection Classification using Supervised Machine Learning Algorithms on NSL-KDD Dataset


  • Sarthak Rastogi Department of CSE, Jaypee Institute of Information Technology, Sector 62, NOIDA, India
  • Archit Shrotriya Department of CSE, Jaypee Institute of Information Technology, Sector 62, NOIDA, India
  • Mitul Kumar Singh Department of CSE, Jaypee Institute of Information Technology, Sector 62, NOIDA, India
  • Raghu Vamsi Potukuchi Department of CSE, Jaypee Institute of Information Technology, Sector 62, NOIDA, India



NSL-KDD, Intrusion Detection System, Machine Learning, Anomaly, SVM, KNN, Logistic Regression


From the past few years, Intrusion Detection Systems (IDS) are employed as a second line of defence and have shown to be a useful tool for enhancing security by detecting suspicious activity. Anomaly based intrusion detection is a type of intrusion detection system that identifies anomalies. Conventional IDS are less accurate in detecting anomalies because of the decision taking based on rules. The IDS with machine learning method improves the detection accuracy of the security attacks. To this end, this paper studies the classification analysis of intrusion detection using various supervised learning algorithms such as SVM, Naive Bayes, KNN, Random Forest, Logistic Regression and Decision tree on the NSL-KDD dataset. The findings reveal which method performed better in terms of accuracy and running time.


Download data is not yet available.


Abrar, I., Ayub, Z., Masoodi, F., & Bamhdi, A. M. (2020). A machine learning approach for intrusion detection system on NSL-KDD dataset. 2020 International Conference on Smart Electronics and Communication (ICOSEC), (pp. 919–924).

Ahmad, Z., Shahid Khan, A., Wai Shiang, C., Abdullah, J., & Ahmad, F. (2021). Network intrusion detection system: A systematic study of machine learning and deep learning approaches. Transactions on Emerging Telecommunications Technologies, 32, e4150.

Aziz, Z. A., & Abdulazeez, A. M. (2021). Application of Machine Learning Approaches in Intrusion Detection System. Journal of Soft Computing and Data Mining, 2, 1–13.

Chauhan, A., & Vamsi, P. R. (2019). Anomalous Ozone Measurements Detection Using Unsupervised Machine Learning Methods. 2019 International Conference on Signal Processing and Communication (ICSC), (pp. 69–74).

Dhanabal, L., & Shantharajah, S. P. (2015). A study on NSL-KDD dataset for intrusion detection system based on classification algorithms. International journal of advanced research in computer and communication engineering, 4, 446–452.

Ding, Y., & Zhai, Y. (2018). Intrusion detection system for NSL-KDD dataset using convolutional neural networks. Proceedings of the 2018 2nd International Conference on Computer Science and Artificial Intelligence, (pp. 81–85).

Ever, Y. K., Sekeroglu, B., & Dimililer, K. (2019). Classification analysis of intrusion detection on NSL-KDD using machine learning algorithms. International Conference on Mobile Web and Intelligent Information Systems, (pp. 111–122).

Gurung, S., Ghose, M. K., & Subedi, A. (2019). Deep learning approach on network intrusion detection system using NSL-KDD dataset. International Journal of Computer Network and Information Security, 11, 8–14.

Haq, N. F., Onik, A. R., Hridoy, M. A., Rafni, M., Shah, F. M., & Farid, D. M. (2015). Application of machine learning approaches in intrusion detection system: a survey. IJARAI-International Journal of Advanced Research in Artificial Intelligence, 4, 9–18.

Heine, F., Laue, T., & Kleiner, C. (2020). On the Evaluation and Deployment of Machine Learning Approaches for Intrusion Detection. 2020 IEEE International Conference on Big Data (Big Data), (pp. 4594–4603).

Kumar, S., Gupta, S., & Arora, S. (n.d.). A comparative simulation of normalization methods for machine learning-based intrusion detection systems using KDD Cup99 dataset. Journal of Intelligent & Fuzzy Systems, 1–18.

Liu, H., & Lang, B. (2019). Machine learning and deep learning methods for intrusion detection systems: A survey. applied sciences, 9, 4396.

Mahfouz, A. M., Venugopal, D., & Shiva, S. G. (2020). Comparative analysis of ML classifiers for network intrusion detection. Fourth international congress on information and communication technology, (pp. 193–207).

Mahmood, R. A., Abdi, A. H., & Hussin, M. (2021). Performance Evaluation of Intrusion Detection System using Selected Features and Machine Learning Classifiers. Baghdad Science Journal, 18, 0884–0884.

Masoodi, F., & others. (2021). Machine Learning for Classification analysis of Intrusion Detection on NSL-KDD Dataset. Turkish Journal of Computer and Mathematics Education (TURCOMAT), 12, 2286–2293.

Negandhi, P., Trivedi, Y., & Mangrulkar, R. (2019). Intrusion detection system using random forest on the NSL-KDD dataset. In Emerging Research in Computing, Information, Communication and Applications (pp. 519–531). Springer.

Park, D., Ryu, K., Shin, D., Shin, D., Park, J., & Kim, J. (2021). A Comparative Study of Machine Learning Algorithms Using LID-DS DataSet. KIPS Transactions on Software and Data Engineering, 10, 91–98.

Rashid, A., Siddique, M. J., & Ahmed, S. M. (2020). Machine and deep learning based comparative analysis using hybrid approaches for intrusion detection system. 2020 3rd International Conference on Advancements in Computational Sciences (ICACS), (pp. 1–9).

Ravipati, R. D., & Abualkibash, M. (2019). Intrusion detection system classification using different machine learning algorithms on KDD-99 and NSL-KDD datasets-a review paper. International Journal of Computer Science & Information Technology (IJCSIT) Vol, 11.

Saha, B. (2021). Comparison Analysis of Classification Algorithms for Intrusion Detection.

Sekhar, C. H., & Rao, K. V. (2019). A Study: Machine Learning and Deep Learning Approaches for Intrusion Detection System. International Conference on Computer Networks and Inventive Communication Technologies, (pp. 845–849).

Sharma, S., Gigras, Y., Chhikara, R., & Dhull, A. (2019). Analysis of NSL KDD dataset using classification algorithms for intrusion detection system. Recent Patents on Engineering, 13, 142–147.

Singhal, A., Gupta, I., Sharma, U., Sharma, M., & Rana, A. (2021). Experimental Analysis of various Machine Learning approaches for Intrusion Detection. 2021 9th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions)(ICRITO), (pp. 1–7).

Thomas, R., & Pavithran, D. (2018). A survey of intrusion detection models based on NSL-KDD data set. 2018 Fifth HCT Information Technology Trends (ITT), (pp. 286–291).

Vamsi, P. R., & Chahuan, A. (2020). Machine learning based hybrid model for fault detection in wireless sensors data. EAI Endorsed Transactions on Scalable Information Systems, 7.

Zamani, M., & Movahedi, M. (2013). Machine learning techniques for intrusion detection. arXiv preprint arXiv:1312.2177.




How to Cite

Sarthak Rastogi, Archit Shrotriya, Mitul Kumar Singh, & Potukuchi, R. V. (2022). An Analysis of Intrusion Detection Classification using Supervised Machine Learning Algorithms on NSL-KDD Dataset. Journal of Computing Research and Innovation, 7(1), 124–137.



General Computing