Performance Comparison of Random Forest and Decision Tree Algorithms for Anomaly Detection in Networks
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
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.
Copyright (c) 2024 Rafiq Fajar Ramadhan, Wahid Miftahul Ashari
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).