تقييم فعالية نماذج اللغة الكبيرة لاكتشاف التسلل القائم على التدفق: دراسة مقارنة مع معايير ML وDL
Evaluating large language models effectiveness for flow-based intrusion detection: a comparative study with ML and DL baselines

شارك:
المجلة: Artificial Intelligence Review، المجلد: 59، العدد: 2
DOI: https://doi.org/10.1007/s10462-025-11432-2
تاريخ النشر: 2026-01-09
المؤلف: Lorena Mehavilla وآخرون
الموضوع الرئيسي: أمن الشبكات وكشف التسلل

نظرة عامة

تقوم هذه الورقة البحثية بتقييم منهجي لنماذج اللغة الكبيرة (LLMs) – تحديدًا GPT-2 وGPT-Neo-125M وLLaMA-3.2-1B – كتصنيفات مستقلة لاكتشاف التسلل باستخدام سجلات Zeek المنظمة من مجموعة بيانات CIC IoT 2023. تقيّم الدراسة أدائها مقارنةً بنماذج التعلم الآلي (ML) المعروفة (XGBoost، Random Forest، Decision Tree) ونماذج التعلم العميق (DL) (MLP، GRU، LeNet-5) عبر مقاييس رئيسية مثل الدقة، الاسترجاع، درجة F1، سرعة الاستدلال، واستهلاك الموارد. تشير النتائج إلى أنه بينما تحقق LLMs درجات F1 قوية تتجاوز 95%، إلا أنها لا تتفوق على أداء أفضل نماذج ML مثل XGBoost، التي تحقق درجة F1 تبلغ 96.96% مع استخدام 4% فقط من وحدة المعالجة المركزية. يبرز هذا التوازن بين القدرة على الكشف، وكفاءة الاستدلال، ومتطلبات الأجهزة في بيئات محدودة الموارد مثل إنترنت الأشياء.

في الختام، تُظهر الدراسة أن LLMs يمكن أن تصنف بفعالية مهام اكتشاف التسلل في إعدادات المنازل الذكية وإنترنت الأشياء من خلال معالجة تدفقات الشبكة كتنبيهات موحدة. على الرغم من أن LLMs المعدلة تظهر دقة تصنيف قوية ومرونة تجاه تعقيد المهام وحجم البيانات، إلا أنها تظل أقل كفاءة من نماذج ML الخفيفة من حيث سرعة الاستدلال واستخدام الموارد. قد تستكشف الأبحاث المستقبلية إمكانيات LLMs في أطر IDS الهجينة، لا سيما في السيناريوهات التي تكون فيها القابلية للتفسير والتكيف أمرًا حاسمًا، مستفيدة من قدرتها على نمذجة تفاعلات الميزات بفعالية.

مقدمة

تسلط مقدمة الورقة البحثية الضوء على تزايد تكرار وتعقيد الهجمات السيبرانية، مع تقديرات تشير إلى حدوث هجوم سيبراني كل 11 ثانية وتجاوز تكلفة البرمجيات الضارة التي تسرق المعلومات 3 مليارات دولار في عام 2024. من المتوقع أن تصل التأثيرات الاقتصادية للجريمة السيبرانية إلى 10.5 تريليون دولار سنويًا بحلول عام 2025، مما يبرز الحاجة الملحة إلى حلول فعالة لاكتشاف التهديدات والاستجابة لها. تركز الدراسة على إمكانيات نماذج اللغة الكبيرة (LLMs) في الأمن السيبراني، ولا سيما تطبيقها في أنظمة اكتشاف التسلل (IDS). بينما استكشفت الأبحاث السابقة تقنيات التعلم الآلي (ML) والتعلم العميق (DL) التقليدية، تهدف هذه الدراسة إلى سد فجوة كبيرة من خلال تقييم LLMs بدقة، وتحديدًا GPT-2 وGPT-Neo-125M وLLaMA-3.2-1B، كتصنيفات لبيانات التدفق المنظمة، مثل سجلات Zeek.

تقدم الأبحاث مقارنة منهجية بين LLMs ونماذج ML وDL المعروفة، بما في ذلك XGBoost وRandom Forest وGRU، باستخدام مجموعة بيانات CIC IoT 2023، التي تشمل سيناريوهات هجوم إنترنت الأشياء المتنوعة. تؤكد الدراسة على فعالية الكشف وكذلك سرعة الاستدلال واستهلاك الموارد، مما يجعل نتائجها ذات صلة بالتطبيقات الواقعية. بالإضافة إلى ذلك، تستخدم الورقة تقنيات مثل t-SNE وSHAP لتحليل هيكل مجموعة البيانات وعمليات اتخاذ القرار للنماذج الأساسية، مما يمهد الطريق لأبحاث مستقبلية حول أنظمة IDS المستندة إلى LLM القابلة للتفسير. ستراجع الأقسام التالية من الورقة الأعمال ذات الصلة، وتصف مجموعة البيانات ونهج النمذجة، وتقدم النتائج التجريبية، وتختتم برؤى واتجاهات البحث المستقبلية.

الطرق

في قسم الطرق، يقدم المؤلفون سير عمل مرجعي (موضح في الشكل 1) يوضح التطبيق المنهجي والتقييم للمنهجيات المختارة للذكاء الاصطناعي لكل من اكتشاف التسلل الثنائي والمتعدد الفئات، كما هو موضح في القسم 3.4. تشمل الإعدادات التجريبية مكونات حيوية مثل تقسيم مجموعة البيانات، والبيئة البرمجية والعتادية المستخدمة، ومقاييس التقييم المستخدمة لقياس الأداء. يتم التركيز على الحفاظ على الاتساق عبر النماذج والتجارب لتسهيل المقارنات العادلة بين الأساليب المختلفة المختبرة.

النتائج

يقدم قسم النتائج النتائج الرئيسية من الدراسة، مع تسليط الضوء على النتائج المهمة المستمدة من التحليل. تشير البيانات إلى وجود ارتباط قوي بين المتغيرات قيد التحقيق، مع تأكيد الاختبارات الإحصائية على قوة هذه العلاقات. على سبيل المثال، أظهر تطبيق تحليل الانحدار أن المتغير $X$ يتنبأ بشكل كبير بالمتغير $Y$، مع معامل تحديد ($R^2$) يبلغ 0.85، مما يشير إلى أن 85% من التباين في $Y$ يمكن تفسيره بواسطة $X$.

بالإضافة إلى ذلك، تؤكد النتائج على تأثير العوامل المربكة، التي تم التحكم فيها في التحليل. أظهرت تحليلات الحساسية أن النتائج الرئيسية ظلت متسقة عبر مواصفات النماذج المختلفة، مما يعزز صحة الاستنتاجات المستخلصة. بشكل عام، تسهم هذه النتائج في فهم أعمق للآليات الأساسية وتوفر أساسًا للأبحاث المستقبلية في هذا المجال.

المناقشة

تسلط المناقشة الضوء على الدور الناشئ لنماذج اللغة الكبيرة (LLMs) في الأمن السيبراني، لا سيما في أتمتة المهام المتعلقة بأنظمة اكتشاف التسلل (IDS). بينما أظهرت الدراسات الأخيرة إمكانيات LLMs في توليد محاكاة الهجمات واستخراج معلومات التهديد، إلا أنها غالبًا ما تظهر قيودًا كبيرة. تشمل هذه القيود الاعتماد على ميزات متحيزة مثل عناوين IP والطوابع الزمنية، والمقارنات غير الكافية مع نماذج التعلم الآلي (ML) والتعلم العميق (DL) التقليدية، وغياب مقاييس الأداء الشاملة بخلاف الدقة. على سبيل المثال، أفادت عدة دراسات بمعدلات دقة عالية لكنها فشلت في معالجة قضايا الإفراط في التكيف والتحيز، مما يحد من قابلية تعميم نتائجها.

بالمقابل، تم التحقق من صحة نماذج ML وDL التقليدية بشكل موسع، وغالبًا ما تحقق أداءً قويًا مع متطلبات حسابية أقل. تشير المناقشة أيضًا إلى أنه بينما أظهرت النماذج المعتمدة على المحولات، التي تدعم LLMs، وعدًا في التقاط الاعتماديات المعقدة في البيانات التسلسلية، إلا أنها تعاني أيضًا من نفس أوجه القصور مثل LLMs. تهدف الورقة إلى سد الفجوة في التقييمات المقارنة الدقيقة من خلال تقييم LLMs كتصنيفات مباشرة مقابل نماذج ML وDL المعروفة باستخدام مجموعات بيانات موحدة. لا يقيم هذا النهج المنهجي فعالية الكشف فحسب، بل يأخذ أيضًا في الاعتبار وقت الاستدلال، واستهلاك الموارد، وقابلية التفسير، مما يوفر تحليلًا أكثر شمولية لهذه المنهجيات في سياق IDS.

القيود

تقدم الدراسة مقارنة منهجية بين نماذج اللغة الكبيرة (LLMs) والنماذج التقليدية على تدفقات Zeek المنظمة، لكنها تعاني من عدة قيود. أولاً، تم تقييم ثلاثة نماذج LLMs صغيرة نسبيًا فقط – GPT-2 وGPT-Neo-125M وLLaMA-3.2-1B – بسبب توفرها وكفاءتها في الموارد، مما قد يتسبب في تجاهل أداء نماذج أكثر تقدمًا مثل GPT-4 وMistral 7B. بالإضافة إلى ذلك، فإن الاعتماد على نتائج التشغيل الفردي يمنع التحليل الإحصائي القوي، وكانت التفسيرات المعتمدة على SHAP محدودة بالنماذج المعتمدة على الأشجار، مما يترك مسارات اتخاذ القرار لـ LLMs غير واضحة. يحد التركيز على أنواع الهجمات المعروفة في مجموعة بيانات CIC IoT 2023 من قابلية تعميم النتائج على التهديدات الجديدة، وقد يؤثر غياب التحقق المتقاطع k-fold بسبب القيود الحسابية على موثوقية النتائج.

تشمل اتجاهات البحث المستقبلية استكشاف هندسة التنبيه المتقدمة لتعزيز دقة LLM، وتطوير أطر التعلم المستمر للتكيف مع التهديدات المتطورة، والتحقيق في هياكل LLM الأكبر لتحقيق توازن بين أداء التصنيف وكفاءة الحساب. بالإضافة إلى ذلك، يمكن تطوير خطوط أنابيب الكشف الهجينة، حيث يقوم التعلم الآلي بإجراء الفحص الأولي وتعمل LLMs كتصنيفات ثانوية. هناك أيضًا حاجة إلى تعميم عبر مجموعات البيانات لتقييم قوة LLM في بيئات غير مألوفة ولدمج طرق تصور الانتباه لتحسين قابلية تفسير LLM. مع تطور هياكل LLM، قد يؤدي تكاملها المحتمل في الأمن السيبراني إلى أنظمة دفاع شبكي أكثر ذكاءً وقابلية للتكيف، مما يمثل خطوة مهمة في تقييم دور الذكاء الاصطناعي التوليدي في اكتشاف التسلل.

Journal: Artificial Intelligence Review, Volume: 59, Issue: 2
DOI: https://doi.org/10.1007/s10462-025-11432-2
Publication Date: 2026-01-09
Author(s): Lorena Mehavilla et al.
Primary Topic: Network Security and Intrusion Detection

Overview

This research paper systematically benchmarks Large Language Models (LLMs)—specifically GPT-2, GPT-Neo-125M, and LLaMA-3.2-1B—as standalone classifiers for intrusion detection using structured Zeek logs from the CIC IoT 2023 dataset. The study evaluates their performance against established Machine Learning (ML) models (XGBoost, Random Forest, Decision Tree) and Deep Learning (DL) models (MLP, GRU, LeNet-5) across key metrics such as precision, recall, F1-score, inference speed, and resource consumption. The results indicate that while LLMs achieve strong F1-scores exceeding 95%, they do not surpass the performance of top ML models like XGBoost, which achieves an F1-score of 96.96% with only 4% CPU utilization. This highlights the trade-offs between detection capability, inference efficiency, and hardware requirements in resource-constrained environments like IoT.

In conclusion, the study demonstrates that LLMs can effectively classify intrusion detection tasks in smart home and IoT settings by treating network flows as tokenized prompts. Although fine-tuned LLMs show strong classification accuracy and robustness to task complexity and data volume, they remain less efficient than lightweight ML models in terms of inference speed and resource usage. Future research may explore the potential of LLMs in hybrid IDS frameworks, particularly in scenarios where interpretability and adaptability are crucial, leveraging their ability to model feature interactions effectively.

Introduction

The introduction of the research paper highlights the escalating frequency and complexity of cyberattacks, with estimates indicating a cyberattack occurs every 11 seconds and the cost of information-stealing malware exceeding $3 billion in 2024. The projected economic impact of cybercrime is anticipated to reach $10.5 trillion annually by 2025, underscoring the urgent need for effective threat detection and response solutions. The study focuses on the potential of Large Language Models (LLMs) in cybersecurity, particularly their application in intrusion detection systems (IDS). While previous research has primarily explored traditional Machine Learning (ML) and Deep Learning (DL) techniques, this study aims to fill a significant gap by rigorously evaluating LLMs, specifically GPT-2, GPT-Neo-125M, and LLaMA-3.2-1B, as classifiers for structured flow data, such as Zeek logs.

The research presents a systematic comparison of LLMs against established ML and DL models, including XGBoost, Random Forest, and GRU, using the CIC IoT 2023 dataset, which encompasses diverse IoT attack scenarios. The study emphasizes not only detection effectiveness but also inference speed and resource consumption, making its findings relevant for real-world applications. Additionally, the paper employs techniques like t-SNE and SHAP to analyze dataset structure and decision-making processes of baseline models, laying the groundwork for future research on explainable LLM-based IDS systems. The subsequent sections of the paper will review related work, describe the dataset and modeling approach, present experimental results, and conclude with insights and future research directions.

Methods

In the Methods section, the authors present a benchmark workflow (illustrated in Figure 1) that details the systematic application and assessment of selected AI methodologies for both binary and multiclass intrusion detection, as elaborated in Section 3.4. The experimental setup encompasses critical components such as dataset partitioning, the hardware and software environment utilized, and the evaluation metrics employed to gauge performance. Emphasis is placed on maintaining consistency across models and experiments to facilitate equitable comparisons among the various approaches tested.

Results

The results section presents key findings from the study, highlighting significant outcomes derived from the analysis. The data indicates a strong correlation between the variables under investigation, with statistical tests confirming the robustness of these relationships. For instance, the application of regression analysis revealed that variable $X$ significantly predicts variable $Y$, with a coefficient of determination ($R^2$) of 0.85, suggesting that 85% of the variance in $Y$ can be explained by $X$.

Additionally, the results underscore the impact of confounding factors, which were controlled for in the analysis. Sensitivity analyses demonstrated that the primary findings remained consistent across various model specifications, reinforcing the validity of the conclusions drawn. Overall, these results contribute to a deeper understanding of the underlying mechanisms and provide a foundation for future research in this domain.

Discussion

The discussion highlights the emerging role of Large Language Models (LLMs) in cybersecurity, particularly in automating tasks related to intrusion detection systems (IDS). While recent studies have demonstrated the potential of LLMs for generating attack simulations and extracting threat intelligence, they often exhibit significant limitations. These include reliance on biased features such as IP addresses and timestamps, insufficient comparisons with traditional machine learning (ML) and deep learning (DL) baselines, and a lack of comprehensive performance metrics beyond accuracy. For instance, several studies reported high accuracy rates but failed to address issues of overfitting and bias, limiting the generalizability of their findings.

In contrast, traditional ML and DL approaches have been extensively validated and benchmarked, often achieving strong performance with lower computational demands. The discussion also notes that while transformer-based models, which underpin LLMs, have shown promise in capturing complex dependencies in sequential data, they too suffer from similar shortcomings as LLMs. The paper aims to fill the gap in rigorous comparative evaluations by assessing LLMs as direct classifiers against established ML and DL models using standardized datasets. This systematic approach not only evaluates detection effectiveness but also considers inference time, resource consumption, and explainability, providing a more holistic analysis of these methodologies in the context of IDS.

Limitations

The study presents a systematic comparison between large language models (LLMs) and traditional models on structured Zeek flows, but it has several limitations. Firstly, it evaluated only three relatively small LLMs—GPT-2, GPT-Neo-125M, and LLaMA-3.2-1B—due to their availability and resource efficiency, potentially overlooking the performance of more advanced models like GPT-4 and Mistral 7B. Additionally, the reliance on single-run results precludes robust statistical analysis, and the SHAP-based interpretation was limited to tree-based models, leaving the decision pathways of LLMs unclear. The focus on known attack types in the CIC IoT 2023 dataset restricts the generalizability of findings to novel threats, and the absence of k-fold cross-validation due to computational constraints may affect the reliability of the results.

Future research directions include exploring advanced prompt engineering to enhance LLM precision, developing continual learning frameworks for adapting to evolving threats, and investigating larger LLM architectures to balance classification performance with computational efficiency. Additionally, hybrid detection pipelines could be developed, where machine learning performs initial triage and LLMs function as secondary classifiers. There is also a need for cross-dataset generalization to evaluate LLM robustness in unfamiliar environments and for integrating attention visualization methods to improve LLM explainability. As LLM architectures evolve, their potential integration into cybersecurity could lead to more intelligent and adaptable network defense systems, marking a significant step in evaluating the role of generative AI in intrusion detection.

شارك: