DESIGN AND IMPLEMENTATION OF A MACHINE LEARNING MODEL FOR NETWORK INTRUSION DETECTION
Abstract
Network intrusion detection has become difficult because enterprise traffic is high-volume, heterogeneous and continuously altered by encryption, cloud adoption, remote access and adversarial behaviour. This study designed and implemented a supervised machine-learning model that classifies network flows as benign or intrusive while preserving operational interpretability and low false-alarm rates. The proposed architecture integrates traffic capture, flow aggregation, data cleaning, encoding, scaling, feature screening, imbalance-aware model training, thresholded inference and alert generation. Five classifiers logistic regression, decision tree, random forest, gradient boosting and linear support vector machine were compared on a reproducible 15,000-record flow-like benchmark containing 32 statistical attributes and an 82:18 benign-to-intrusion ratio. Evaluation used a stratified 75:25 split and accuracy, precision, recall, F1-score, receiver operating characteristic area under the curve and confusion-matrix analysis. Random forest produced the strongest overall balance, attaining 94.72% accuracy, 97.10% precision, 73.32% recall and an F1-score of 83.55% in the implemented benchmark, while linear models offered lower computational cost but weaker nonlinear discrimination. The findings show that preprocessing, class-aware learning and per-class metrics are as important as classifier choice. The paper contributes an implementation-ready framework, pseudocode, data schema, model-comparison evidence and deployment controls for drift, privacy and retraining. Because benchmark accuracy may overstate field performance, the proposed system requires temporal validation and monitoring before production use. The architecture is suitable for campus, small-enterprise and cloud-edge networks where explainable flow-based detection is preferred to payload inspection.
Downloads
References
Abdelaziz, M. T., et al. (2025). Enhancing network threat detection with random forest-based intrusion detection. Journal of Network and Systems Management. https://doi.org/10.1007/s10922-024-09874-0
Ahmad, T., Truscan, D., Vain, J., & Porres, I. (2022). Early detection of network attacks using deep learning. arXiv. https://doi.org/10.48550/arXiv.2201.11628
Ajagbe, S. A., et al. (2024). Intrusion detection: A comparison study of machine learning models using unbalanced dataset. SN Computer Science. https://doi.org/10.1007/s42979-024-03369-0
Canadian Institute for Cybersecurity. (n.d.). Intrusion detection evaluation dataset (CIC-IDS2017). University of New Brunswick.
Chen, Z., Yu, W., & Zhou, L. (2021). ADASYN-random forest based intrusion detection model. arXiv. https://doi.org/10.48550/arXiv.2105.04301
Chinnasamy, R., et al. (2025). Deep learning-driven methods for network-based intrusion detection systems: A systematic review. Array, 25, 100390. https://doi.org/10.1016/j.array.2025.100390
Chua, T.-H., & Salam, I. (2022). Evaluation of machine learning algorithms in network-based intrusion detection system. arXiv. https://doi.org/10.48550/arXiv.2203.05232
Disha, R. A., & Waheed, S. (2021). A comparative study of machine learning models for network intrusion detection system using UNSW-NB15 dataset. In 2021 International Conference on Electronics, Communications and Information Technology. IEEE. https://doi.org/10.1109/ICECIT54077.2021.9641471
Engelen, G., Rimmer, V., & Joosen, W. (2021). Troubleshooting an intrusion detection dataset: The CICIDS2017 case study. In 2021 IEEE Security and Privacy Workshops (SPW). IEEE.
More, S., Idrissi, M., Mahmoud, H., & Asyhari, A. T. (2024). Enhanced intrusion detection systems performance with UNSW-NB15 data analysis. Algorithms, 17(2), 64. https://doi.org/10.3390/a17020064
Mutembei, L. L., et al. (2025). Deep learning-based network intrusion detection systems: A systematic review. International Journal of Information Security Science.
Waghmode, P., et al. (2025). Intrusion detection system based on machine learning using feature extraction across NSL-KDD, CICIDS2017 and UNSW-NB15. Scientific Reports, 15.
Zoghi, Z., & Serpen, G. (2021). UNSW-NB15 computer security dataset: Analysis through visualization. arXiv. https://doi.org/10.48550/arXiv.2101.05067
The authors and co-authors warrant that the article is their original work, does not infringe any copyright, and has not been published elsewhere. By submitting the article to GPH-International Journal of Computer Science and Engineering (GPH-IJCSE), the authors agree that the journal has the right to retract or remove the article in case of proven ethical misconduct.