Deteksi Anomali pada Trafik Jaringan Menggunakan Algoritma Deteksi Outlier

Authors

  • Ikbar Athallah Taufik Politeknik Elektronika Negeri Surabaya (PENS), Surabaya
  • Iwan Syarif Politeknik Elektronika Negeri Surabaya (PENS), Surabaya
  • Ferry Astika Saputra Politeknik Elektronika Negeri Surabaya (PENS), Surabaya

DOI:

https://doi.org/10.25126/jtiik.2026135

Keywords:

Anomaly detection, machine learning, hyperparameter tuning, feature selection, Outlier Detection Algorithms, NSL-KDD

Abstract

Deteksi anomali pada trafik jaringan merupakan aspek penting dalam sistem keamanan siber untuk mengidentifikasi pola serangan secara akurat. Namun, pemilihan metode deteksi yang tepat dan konfigurasi parameter optimal masih menjadi tantangan karena karakteristik pola serangan yang beragam. Penelitian ini mengevaluasi dan membandingkan performa empat metode deteksi anomaly berbasis machine learning: Local Outlier Factor (LOF), Density-Based Spatial Clustering of Applications with Noise (DBSCAN), Distance-Based, dan Isolation Forest, dengan mengoptimalkan performa melalui feature selection dan hyperparameter tuning. Feature selection diterapkan menggunakan Variance Threshold, Correlation Filter, dan Mutual Information pada dataset NSL-KDD, diikuti optimasi hyperparameter menggunakan Grid Search dan Random Search. Evaluasi performa menggunakan metrik precision, recall, F1-score, serta analisis kurva ROC dan Precision-Recall untuk mengukur kemampuan diskriminatif setiap model. Hasil menunjukkan hyperparameter tuning meningkatkan performa seluruh model secara signifikan, dengan Distance-Based method mencapai keseimbangan terbaik antara sensitivitas dan ketepatan deteksi, diikuti Isolation Forest yang menunjukkan performa kompetitif. LOF mengalami peningkatan substansial setelah optimasi, sedangkan DBSCAN menunjukkan performa terendah. Penelitian ini menyimpulkan bahwa Distance-Based method dan Isolation Forest merupakan pilihan optimal untuk deteksi anomali jaringan dengan kemampuan mempertahankan precision tinggi pada recall tinggi, efektif meminimalkan false positive dalam aplikasi keamanan siber.   

 

Abstract

Anomaly detection in network traffic is an essential aspect of cybersecurity systems for accurately identifying attack patterns. However, selecting appropriate detection methods and optimal parameter configurations remains challenging due to the diverse characteristics of attack patterns. This study evaluates and compares the performance of four machine learning-based anomaly detection methods: Local Outlier Factor (LOF), Density-Based Spatial Clustering of Applications with Noise (DBSCAN), Distance-Based, and Isolation Forest, by optimizing their performance through feature selection and hyperparameter tuning. Feature selection was applied using Variance Threshold, Correlation Filter, and Mutual Information on the NSL-KDD dataset, followed by hyperparameter optimization using Grid Search and Random Search. Performance evaluation used precision, recall, F1-score metrics, as well as ROC and Precision-Recall curve analysis to measure the discriminative capability of each model. The results show that hyperparameter tuning significantly improved the performance of all models, with the Distance-Based method achieving the best balance between sensitivity and detection accuracy, followed by Isolation Forest which demonstrated competitive performance. LOF showed substantial improvement after optimization, while DBSCAN exhibited the lowest performance. This study concludes that the Distance-Based method and Isolation Forest are optimal choices for network anomaly detection with the ability to maintain high precision at high recall, effectively minimizing false positives in cybersecurity applications.

Downloads

Download data is not yet available.

References

BEDDAR-WIESING, S., MOALLEMY-OUREH, A., KEMPKES, M. AND THOMAS, J.M., 2025. Absolute Evaluation Measures for Machine Learning: A Survey. [online] pp.1–20. Available at: <http://arxiv.org/abs/2507.03392>.

BURMAN, R.K., KUMAR, A., KUMARI, S., KUMAR, N., KUMAR, B. AND KUMAR, V., 2025. Machine Learning Based Anomaly Detection for Network Intrusion Detection in Cyber Security. (Raisd), pp.532–546. https://doi.org/10.2991/978-94-6463-787-8_42.

FERNANDO, G.P., FLORINA, A.M. AND LILIANA, C.B., 2024. Evaluation of the Performance of Unsupervised Learning Algorithms for Intrusion Detection in Unbalanced Data Environments. IEEE Access, 12, pp.190134–190157. https://doi.org/10.1109/ACCESS.2024.3516615.

HARUN AL RASYID, M.U., NADHORI, I.U., SYARIF, I., WINARNO, I., FUROIDA, F. AND AMRULLAH, A., 2021. Anomaly Detection in Wireless Body Area Network using Mahalanobis Distance and Sequential Minimal Optimization Regression. Proceedings - 2021 International Seminar on Application for Technology of Information and Communication: IT Opportunities and Creativities for Digital Innovation and Communication within Global Pandemic, iSemantic 2021, pp.64–69. https://doi.org/10.1109/iSemantic52711.2021.9573193.

HILMI, F., TAQIYASSAR, K., ROMERO, N., PRATAMA, P., KUSUMA, S.C., NURWACHID, H.R., FATYANOSA, T.N. AND KORESPONDENSI, P., 2025. Analisis Perbandingan Model Machine Learning Tree-Based Dan Non-Tree-Based Untuk Tugas Klasifikasi Comparative Analysis of Tree-Based and Non-Tre-Based Machine Learning Models for Classification Tasks. 12(4), pp.875–884.

IANNUCCI, S., ABLES, J., ANDERSON, W., ABBURI, B., CARDELLINI, V. AND BANICESCU, I., 2021. A Performance-Oriented Comparison of Neural Network Approaches for Anomaly-based Intrusion Detection. In: 2021 IEEE Symposium Series on Computational Intelligence, SSCI 2021 - Proceedings. Institute of Electrical and Electronics Engineers Inc. https://doi.org/10.1109/SSCI50451.2021.9660100.

INAYAH, K. AND RAMLI, K., 2024. Analisis Kinerja Intrusion Detection System Berbasis Algoritma Random Forest Menggunakan Dataset Unbalanced Honeynet BSSN. Jurnal Teknologi Informasi dan Ilmu Komputer, 11(4), pp.867–876. https://doi.org/10.25126/jtiik.1148911.

KHALIF, M.I. AND EDI PRABOWO, L., 2025. Penerapan Model Algoritma Unsupervised Learning untuk Klasterisasi Tingkat Kenyamanan Ruang Tidur berdasarkan Faktor Lingkungan. Jurnal Teknologi Informasi dan Ilmu Komputer, 12(2), pp.311–320. https://doi.org/10.25126/jtiik.2025129456.

KNUTMEJER, V., LEÓNORTIZ, M., MARKOVIC, T. AND ELFVING, H., 2023. FEATURE SELECTION FOR SENSOR FAILURE DETECTION IN MANUFACTURING ENVIRONMENT Hannes Elfving Examiner: Sasikumar Punnekkat.

MAHDI, Z. AND MAJMA, N., 2024. A Proposed Intrusion Detection System Based on an Improved Random Forest Using a Double Feature Selection Method. Trends in Applied Sciences Research, 19(1), pp.51–60. https://doi.org/10.3923/tasr.2024.51.60.

MEJRI, N., LOPEZ-FUENTES, L., ROY, K., CHERNAKOV, P., GHORBEL, E. AND AOUADA, D., 2024. Unsupervised anomaly detection in time-series: An extensive evaluation and analysis of state-of-the-art methods. Expert Systems with Applications, [online] 256(July), p.124922. https://doi.org/10.1016/j.eswa.2024.124922.

NUR FAUZI, N.P., KHOMSAH, S. AND PUTRA WICAKSONO, A.D., 2025. Penerapan Feature Engineering dan Hyperparameter Tuning untuk Meningkatkan Akurasi Model Random Forest pada Klasifikasi Risiko Kredit. Jurnal Teknologi Informasi dan Ilmu Komputer, 12(2), pp.251–262. https://doi.org/10.25126/jtiik.2025128472.

PRIYA, S. AND PRADEEPMOHANKUMAR, K., 2021. Intelligent Outlier Detection with Optimal Deep Reinforcement Learning Model for Intrusion Detection. In: Proceedings of the 2021 4th International Conference on Computing and Communications Technologies, ICCCT 2021. Institute of Electrical and Electronics Engineers Inc. pp.336–341. https://doi.org/10.1109/ICCCT53315.2021.9711837.

SEKHAR, C., RAO, K.V. AND KRISHNA, M.H.M., 2021. Turkish Journal of Computer and Mathematics Education Vol . 12 No . 11 (2021 ), 2990- 3000 Research Article Deep Learning Algorithms for Intrusion Detection Systems : Extensive Comparison Analysis Turkish Journal of Computer and Mathematics Education Vol. 12(11), pp.2990–3000.

VIKRAM, A., 2020. Anomaly detection in Network Traffic Using Unsupervised Machine learning Approach. (Icces), pp.18–21.

Published

02-11-2026

Issue

Section

Ilmu Komputer

How to Cite

Deteksi Anomali pada Trafik Jaringan Menggunakan Algoritma Deteksi Outlier. (2026). Jurnal Teknologi Informasi Dan Ilmu Komputer, 13(5), 1087-1096. https://doi.org/10.25126/jtiik.2026135