Performance Comparison of Random Forest and Decision Tree Algorithms for Anomaly Detection in Networks

  • Rafiq Fajar Ramadhan Universitas Amikom Yogyakarta
  • Wahid Miftahul Ashari Universitas Amikom Yogyakarta
Keywords: Decision Tree, Network Security, Random Forest, Intrusion Detection System (IDS), UNSW-NB15

Abstract

The increase in cyber attacks has made network security a very important focus in this digital era. This research compares the performance of two machine learning algorithms, that is Random Forest and Decision Tree for detecting anomalies in networks using the UNSW-NB15 datasets, which include various types of attacks such as DoS, Backdoor, Exploits and others which will be used to train and test both models. The data collection method, pre-processing, data splitting and modelling using SMOTE method to handle data imbalanced were applied in both algorithms and then evaluated using accuracy, precision, recall and f1-score metrics. From the study result, it can be conclude that the Decision Tree algorithm performs better in detecting anomalies in binary data with an accuracy of 99,71%. However, in multi-class data, Random Forest showed slightly better performance, though it required significantly more time for training and prediction. Despite the small difference in accuracy, Decision Tree demonstrated faster prediction times, making it more efficient for time-sensitive applications. This research concludes that while Random Forest provides higher accuracy for complex datasets, Decision Tree offers a more time-efficient solution with comparable accuracy.

Downloads

Download data is not yet available.

References

T. Vimy et al., “Ancaman Serangan Siber Pada Keamanan Nasional Indonesia,” Jurnal Kewarganegaraan, vol. 6, no. 1, 2022.

Badan Siber dan Sandi Nasional, “Lanskap Keamanan Siber Indonesia,” 2023. Accessed: Jul. 13, 2024. [Online]. Available: https://www.bssn.go.id/wp-content/uploads/2024/03/Lanskap-Keamanan-Siber-Indonesia-2023.pdf

G. Saputra and S. Informasi, “Pengamanan Jaringan Komputer: Tantangan Dan Strategi Terkini,” 2023.

S. M. Lestari, “Penerapan Snort Intrusion Detection System Menggunakan Machine Learning,” 2019.

T. Widodo and A. Sekti Aji, “Pemanfaatan Network Forensic Investigation Framework untuk Mengidentifikasi Serangan Jaringan Melalui Intrusion Detection System (IDS),” 2022.

R. Budiarto, Y. Dwi Kuntjoro, and P. Korespondensi, “Analisis Perilaku Entitas Untuk Pendeteksian Serangan Internal Menggunakan Kombinasi Model Prediksi Memori dan Metode PCA,” vol. 10, no. 6, pp. 1223–1232, 2023, doi: 10.25126/jtiik.2023107123.

A. Pashaei, M. E. Akbari, M. Zolfy Lighvan, and A. Charmin, “Early Intrusion Detection System using honeypot for industrial control networks,” Results in Engineering, vol. 16, Dec. 2022, doi: 10.1016/j.rineng.2022.100576.

M. Wang, K. Zheng, Y. Yang, and X. Wang, “An Explainable Machine Learning Framework for Intrusion Detection Systems,” IEEE Access, vol. 8, pp. 73127–73141, 2020, doi: 10.1109/ACCESS.2020.2988359.

M. Haggag, M. M. Tantawy, and M. M. S. El-Soudani, “Implementing a deep learning model for intrusion detection on apache spark platform,” IEEE Access, vol. 8, pp. 163660–163672, 2020, doi: 10.1109/ACCESS.2020.3019931.

A. Fatani, M. A. Elaziz, A. Dahou, M. A. A. Al-Qaness, and S. Lu, “IoT Intrusion Detection System Using Deep Learning and Enhanced Transient Search Optimization,” IEEE Access, vol. 9, pp. 123448–123464, 2021, doi: 10.1109/ACCESS.2021.3109081.

A. Devarakonda, N. Sharma, P. Saha, and S. Ramya, “Network intrusion detection: A comparative study of four classifiers using the NSL-KDD and KDD’99 datasets,” in Journal of Physics: Conference Series, IOP Publishing Ltd, Jan. 2022. doi: 10.1088/1742-6596/2161/1/012043.

C. Liu, Z. Gu, and J. Wang, “A Hybrid Intrusion Detection System Based on Scalable K-Means+ Random Forest and Deep Learning,” IEEE Access, vol. 9, pp. 75729–75740, 2021, doi: 10.1109/ACCESS.2021.3082147.

W. Wijayanto, N. H. Sardini, and G. N. Elsitra, “Menciptakan Ruang Siber yang Kondusif bagi Pegiat Anti-Korupsi,” Integritas : Jurnal Antikorupsi, vol. 7, no. 1, pp. 179–196, Jun. 2021, doi: 10.32697/integritas.v7i1.732.

J. Slay and N. Moustafa, “The evaluation of Network Anomaly Detection Systems: Statistical analysis of the UNSW-NB15 data set and the comparison with the KDD99 data set,” Article in Information Security Journal A Global Perspective, 2016, doi: 10.1080/19393555.2015.1125974.

N. Moustafa and J. Slay, “UNSW-NB15: A comprehensive data set for network intrusion detection systems (UNSW-NB15 network data set),” in 2015 Military Communications and Information Systems Conference, MilCIS 2015 - Proceedings, Institute of Electrical and Electronics Engineers Inc., Dec. 2015. doi: 10.1109/MilCIS.2015.7348942.

D. E. Kurniawan, H. Arif, N. Nelmiawati, A. H. Tohari, and M. Fani, “Implementation and analysis ipsec-vpn on cisco asa firewall using gns3 network simulator,” in Journal of Physics: Conference Series, IOP Publishing, 2019, p. 012031.

Published
2024-11-06
How to Cite
[1]
R. Ramadhan and W. Ashari, “Performance Comparison of Random Forest and Decision Tree Algorithms for Anomaly Detection in Networks”, JAIC, vol. 8, no. 2, pp. 367-375, Nov. 2024.
Section
Articles