International Science and Technology Journal

Home < Articles < Article Details

Comparison of Different Machine Learning Techniques for Network Intrusion Detection

الملخص
أصبح كشف الأختراقات في الشبكات عنصراً أساسيًا في أنظمة الأمن السيبراني الحديثة نظرًا للنمو السريع في استخدام الإنترنت والزيادة المستمرة في حجم وتعقيد الهجمات السيبرانية. يعمل الأمن السيبراني على حماية أنظمة الحاسوب والشبكات من الوصول غير المصرح به [1[. وتقدم هذه الورقة تقييمًا مقارنًا لثلاث تقنيات من تقنيات التعلم الآلي، وهي: الغابة العشوائية (RF)، وشجرة القرار (DT)، وخوارزمية أقرب الجيران (KNN)، وذلك لكشف الأختراقات باستخدام مجموعة بيانات NSL-KDD المعيارية. وقد تم تقييم النماذج بناءً على مقاييس: الدقة (Accuracy)، والضبط (Precision)، والاسترجاع (Recall)، ومقياس F1، وزمن الاستدلال (Inference Time)، وتحليل مصفوفة الالتباس(Confusion Matrix). أظهرت النتائج التجريبية أن نموذج شجرة القرار حقق أسرع زمن استدلال (0.2397 ثانية) مع أداء متوازن، بينما حقق نموذج الغابة العشوائية أعلى دقة (0.9677)، مما يشير إلى قدرة موثوقة على كشف الهجمات مع عدد أقل من الإنذارات الكاذبة. ورغم أن خوارزمية أقرب الجيران KNN حققت دقة وضبط مقبولين، إلا أنها أظهرت زمن استدلال مرتفعًا جدًا (17.432366 ثانية)، مما يجعلها غير مناسبة للتطبيق في الوقت الفعلي (الزمن الحقيقي). تبرز النتائج أهمية تحقيق التوازن بين دقة الكشف والكفاءة الحاسوبية عند اختيار نماذج التعلم الآلي لأنظمة كشف الأختراقات العملية. وتُظهر هذه النتائج أن نموذج شجرة القرار يوفر مفاضلة فعّالة بين دقة الكشف والكفاءة الحاسوبية لأنظمة كشف الأختراق في الزمن الحقيقي................ الكلمات المفتاحية:............ التعلم الآلي، نظام كشف الأختراقات، شجرة القرار، الغابة العشوائية، خوارومية أقرب الجيران، مجموعة بيانات NSL-KDD المعيارية.
Abstract
Network intrusion detection has become a critical component of modern cybersecurity systems due to the rapid growth of internet usage and the increasing volume and complexity of cyber-attacks. Cybersecurity protects computer systems and networks from unauthorized access [1]. This paper presents a comparative evaluation of three machine learning techniques namely Random Forest (RF), Decision Tree (DT), and K-Nearest Neighbors (KNN) for intrusion detection using the NSL-KDD benchmark dataset. The models were evaluated based on Accuracy, Precision, Recall, F1-score, Inference Time, and Confusion Matrix analysis. Experimental results show that Decision Tree achieved the fastest inference time (0.2397 sec) with balanced performance, while Random Forest achieved the highest precision (0.9677), indicating reliable attack detection with fewer false alarms. However, KNN, despite acceptable accuracy and precision, exhibited very high inference time (17.432366 sec), making it unsuitable for real-time deployment. The results highlight the importance of balancing detection performance and computational efficiency when selecting machine learning models for practical intrusion detection systems. These results demonstrate that Decision Tree provides an effective trade-off between detection accuracy and computational efficiency for real-time intrusion detection systems............... Keywords: ..............Machine learning, Intrusion Detection System, Decision Tree, Random Forest, KNN, NSL-KDD.