Open Access
ARTICLE
LLM Enhanced Explainable Intrusion Detection System for Generating Actionable Security Insights
1 Computer Science Department, King Abdullah II Faculty for Information Technology, The University of Jordan, Amman, Jordan
2 Department of Computer Science, Faculty of Information Technology, Al-Ahliyya Amman University, Amman, Jordan
3 Department of Computer Science, University of Bari Aldo Moro, Bari, Italy
* Corresponding Author: Malik Al-Essa. Email:
(This article belongs to the Special Issue: Advanced and Interpretable Malware Detection in Modern Cyber Environments)
Computers, Materials & Continua 2026, 89(2), 50 https://doi.org/10.32604/cmc.2026.085403
Received 11 May 2026; Accepted 29 July 2026; Issue published 15 September 2026
Abstract
With the urgent need for Intrusion Detection Systems (IDS) to protect digital infrastructure, eXplainable Artificial Intelligence (XAI) has become an important supporting layer. The integration of XAI and IDS can rank influential features that affect IDS decisions, yet these outputs often remain difficult to translate into operational security actions. In this work, we propose LEXIS (LLM-Enhanced eXplainable Intrusion detection System), an LLM-enhanced explainable IDS that converts sample-level explanations into structured report drafts that organize feature attributions into candidate response actions for analyst review, through an evidence-bounded reporting process. Given a network trace, the classifier generates a prediction for that sample, while an XAI method generates a top- explanation set with attribution scores. Then, an LLM is prompted to produce a machine-readable incident report in a fixed JSON schema, which includes suspected causes, confidence cues, false-positive checks, and recommended response actions extracted from a predefined action catalog. To investigate the effect of adversarial attacks against both the classifier and the XAI method, we evaluate explanation stability under normalized feature-space Fast Gradient Sign Method (FGSM) and Projected Gradient Descent (PGD) attacks using a signed-rank stability metric that separately reports feature-rank reordering through Kendall tau correlation and attribution-sign agreement between clean and attacked samples, each with bootstrap confidence intervals and permutation-test significance. The experiments are evaluated on the CICIDS2017 dataset, where the proposed model achieves high detection performance on the majority traffic classes, while minority and subtle attack classes remain more challenging. Focal-loss training with per-class threshold calibration raises macro-F1 from 0.726 to 0.776 on the imbalanced class distribution. The stability analysis shows that feature-space adversarial perturbations only partially disrupt explanations, with feature ranks retaining substantial order and attribution signs agreeing significantly above chance level. The findings suggest that coupling XAI with grounded LLM summarization can help transform raw feature attributions into standardized triage-oriented report drafts. We evaluate the framework as a benchmark-based prototype, and broader validation on diverse datasets, real Security Operations Center (SOC) logs, analyst-in-the-loop assessment, and problem-space adversarial attacks remains future work.Keywords
Recently, IDS has been considered a critical layer for protecting modern networks; however, the growing volume and diversity of alerts make manual triage expensive and error-prone. Machine learning (ML) and Deep Learning (DL) techniques are proposed to be used in detecting cyber-attacks due to their powerful capabilities, but their generated decisions are considered as black-box decisions and need to be explained for security analysts. XAI techniques such as SHapley Additive exPlanations (SHAP) [1] provide local-level feature attributions that help answer why an alert was triggered. However, a recurring operational gap remains; ranked feature lists are rarely self-explanatory to security practitioners, particularly when features are domain-specific (e.g., protocol counters or timing statistics). As a result, security analysts still need to manually translate explanations generated by an XAI technique into decisions and actions (e.g., verify false positives, isolate hosts, block indicators), which introduces inconsistency and delays to the work. LLMs, as a new technique, that is becoming widely used, offer a promising bridge from explanations to actions, where LLMs can transform technical evidence into readable incident reports and standardized triage steps. However, the problem is that LLMs can hallucinate facts, overstate certainty, or propose unsafe actions, which may generate unsafe reports that can mislead security analysts. Therefore, what is required is that using LLMs in security triage requires restricting generation to the provided evidence, and responses are auditable and comparable across all generated alerts. Unlike prior IDS studies, in this work we (i) demonstrate an evidence-bounded LLM reporting layer that converts feature-level explanations into structured triage-oriented report drafts, (ii) constrain the generated reports using the supplied XAI evidence and a predefined action catalog, and (iii) analyze explanation stability under normalized feature-space FGSM and PGD attacks using a decomposed, statistically tested stability metric.
We emphasize at the outset that the present work is a benchmark-based prototype for structured explanation-to-action reporting, not a validated SOC triage system. All experiments are conducted offline on the refined CICIDS2017 benchmark; the framework is not evaluated with real SOC logs, human-analyst assessment, operational deployment constraints, latency profiling, or field validation. The SOC-oriented terminology used throughout (e.g., triage, response actions, analyst support) therefore describes the intended use case and the controlled benchmark setting, rather than a demonstrated operational deployment.
The contributions of this work can be summarized as follows:
1. We propose LEXIS (LLM-Enhanced eXplainable Intrusion detection System), an LLM-enhanced explainable intrusion detection framework that transforms quantitative XAI evidence into structured report drafts designed to support SOC-style triage in a controlled benchmark setting.
2. We propose a grounded LLM reasoning engine constrained by explanation evidence and a predefined action catalog. The generated report follows a fixed machine-readable schema and is designed to reduce unsupported reasoning by requiring evidence-bounded claims and catalog-based response actions.
3. We introduce a decomposed signed-rank stability analysis that reports the Kendall rank component and the sign-agreement component separately, with bootstrap confidence intervals and permutation-test significance, in order to evaluate explanation drift under normalized feature-space FGSM and PGD attacks.
4. We conduct experiments on the refined CICIDS2017 dataset to analyze IDS performance, global and local SHAP behavior, attribution drift under feature-space adversarial attacks, explanation stability, class-imbalance treatments, and representative grounded LLM-generated incident reports.
This paper is structured as follows: The related work is discussed in Section 2. Section 3 explains the proposed method. Section 4 discusses the results, and finally, Section 5 concludes the paper and outlines future directions.
2.1 Machine Learning-Based Intrusion Detection Systems
ML and DL-based IDSs have grown substantially over the past few years, driven by the limitations of signature-based systems in addressing novel and polymorphic attacks. ML-based IDS adopted different techniques to detect cyber-threats, such as decision trees, support vector machines,
2.2 Explainable AI for Intrusion Detection
The adoption of post-hoc XAI methods in the IDS domain has been motivated by the requirement for accountability and trust in high-stakes security decisions generated by DNN models. SHAP (SHapley Additive exPlanations) [1] has emerged as the most widely adopted explainable AI (XAI) method due to its theoretical grounding in cooperative game theory and its model-agnostic applicability. In the IDS context, SHAP is typically applied at both global explanations, to identify the most influential features across the dataset, and local explanations, to explain individual decisions [9]. Complementary approaches include Integrated Gradients [10], which attributes predictions to input features by integrating gradients along a straight-line path from a baseline to the input, and LIME (Local Interpretable Model-agnostic Explanations) [11], which fits locally faithful surrogate models around individual predictions. DALEX [12] as an XAI technique that provides both global and local information, is considered as a framework for model-agnostic explanations that supports breakdown profiles and partial dependence plots, enabling comparative analysis across model families. In the literature, several works proposed applying XAI techniques to explain the decisions generated by IDSs. The work in [13] applied SHAP techniques to generate local explanations for a random forest IDS through identifying the top contributing features per attack class, finding flow-level statistics, e.g., packet duration and inter-arrival timing. Similarly, Ref. [14] demonstrated LIME-based explanations for anomaly detection in industrial control system traffic. However, these studies still have limitations related to the explanations generated by an XAI technique used, which remain in the form of ranked feature attribution vectors, quantitative outputs that are interpretable to ML practitioners but opaque to operational security analysts unfamiliar with the underlying feature engineering, which hinder the explainability of the decisions generated by these classifiers. Furthermore, explanation instability is considered as another limitation that is related to the explanations generated by an XAI technique, e.g., SHAP attributions can exhibit high variance across semantically similar samples [9], and adversarial perturbations can cause both prediction flips and attribution sign reversals, a form of semantic instability that undermines trust in explanation-driven workflows [15].
2.3 Adversarial Robustness in Intrusion Detection
Adversarial ML poses a significant threat to learning-based IDS. Fast Gradient Sign Method (FGSM) [16] and Projected Gradient Descent (PGD) [17] are canonical first-order attack algorithms that have been applied in the network security domain to generate adversarial network flow samples that evade classification. In the IDS domain, adversarial samples must satisfy problem-space constraints, where perturbed feature vectors must correspond to realizable network flows, which limits the feasible perturbation factor compared to the image domain. The work in [18] demonstrated FGSM-based evasion against DNN classifiers on network flow datasets, achieving significant accuracy degradation with minimal perturbation factor. Subsequent work explored transferability of adversarial samples across model architectures [19] and proposed adversarial training as a defense mechanism [16]. However, the impact of adversarial perturbations on model explanations, as opposed to predictions alone, has received comparatively little attention. Our work addresses this gap by evaluating explanation stability under FGSM and PGD attacks using a signed rank stability metric that captures both rank reordering and attribution sign flips.
2.4 Large Language Models for Security Analytics
Recently, LLMs have been explored as an interface layer between automated security tools and human analysts in order to generate explanations for human analysts. Their natural language generation capability makes them attractive for generating plain-language summaries of alerts generated by IDS, translating technical log entries into investigative reports, and generating structured triage recommendations [20], which makes it easier for the security analyst to understand the reason behind the generated alerts by an IDS. Early applications have focused on log parsing and threat-intelligence summarization, in which LLMs demonstrated a strong ability to synthesize information from heterogeneous sources into coherent security advisories. More recently, LLMs have been used to support SOC workflows by automating cyber-threat-intelligence analysis, extracting actionable indicators, and generating structured outputs that reduce repetitive analyst effort in analyzing explanations generated by XAI methods [21]. However, the use of LLM in security contexts may introduce hallucination risk [22]. In this case, the LLM model may fabricate indicators of compromise (IoCs) or recommend actions that are inconsistent with the available evidence generated by an IDS. This motivates the grounded reasoning design adopted in this work, where an LLM is constrained to evidence supplied by an XAI technique and instructed to select actions from a controlled catalog to mitigate hallucination. Nowadays, LLM-assisted cybersecurity systems have been used for automated alert interpretation, threat summarization, SOC support, and structured incident reporting [23]. However, LLM generation in security contexts still introduces risks related to unsupported reasoning and hallucinated outputs. This motivates the requirement for grounded reasoning frameworks that constrain generated outputs using evidence derived from explainable IDS components.
The proposed method is illustrated in Fig. 1 (Algorithm 1), which improves an IDS through the use of a grounded LLM layer that converts quantitative model explanations into actionable security insights. The proposed method is organized into three stages as follows:

Figure 1: Overview of the proposed schema.

S1: Data, IDS Model, and Adversarial Attacks Testing
Let
We distinguish two notions of robustness that are kept separate throughout this work. Prediction robustness refers to whether the predicted label
where
with step size
S2: XAI
Given a sample
where
where
S3: LLM Contextual Reasoning for Actionable Security Insights
Three components are used in Stage S3 to convert quantitative explanations into operationally meaningful outputs: (i) a quantitative-to-qualitative contextualizer, (ii) an intermediate explanation network, and (iii) a grounded LLM reasoning engine that generates human-readable and actionable results. First, in the Quant-to-Qual Contextualizer, XAI outputs contain cryptic features (e.g., protocol counters, inter-arrival statistics) and raw numeric values that are hard to be interpreted directly. We therefore define a deterministic mapping
The output
Grounded LLM Reasoning Engine phase is where LLM receives only the following inputs: (i) the predicted class
Schema
We enforce two grounding constraints in order to reduce hallucinations and preserve traceability: (C1) Evidence-bounded claims: Every claim in top_evidence must reference a tuple from the explanation evidence set, including the feature name, value, and attribution sign or magnitude. Through this constraint, the LLM is instructed to avoid using indicators that are not present in the input. (C2) Controlled action library: Recommended actions and false-positive checks are selected from the proposed catalog. In the case that critical context is missing, an LLM must return needs_context rather than guessing. Formally, the reasoning engine in this step is defined as in the following Equation:
where
In this work, we use an action catalog

As
where
where
This provides a direct measure of whether adversarial perturbations destabilize the explanation evidence that the LLM consumes, which is crucial for trustworthy deployment. To assess robustness, we evaluate explanation stability under adversarial attacks (FGSM and PGD attacks) using a signed rank stability metric
4 Empirical Evaluation and Discussion
CICIDS2017 [24] is a network intrusion dataset from the Canadian Institute for Cybersecurity collected on a dedicated testbed with different hosts and operating systems. The environment separates victim and attacker segments and generates traffic that traverses the public Internet. The captured traces include common application protocols (e.g., HTTP/HTTPS, FTP, SSH, SMTP) and combine benign activity, driven by profiling agents trained on traces of real user behavior, with coordinated attack campaigns. Attacks include brute force attacks, botnet communication, Heartbleed, several variants of DoS and DDoS, infiltration, and web-related threats. Each trace in CICIDS2017 has 78 numeric features and 1 class feature extracted with the CICFlowMeter tool [24]. In our experiments, we adopt the refined CICIDS2017 release introduced by [25]1, which addresses known issues in the original dataset released by the Canadian Institute for Cybersecurity by removing artifacts, correcting errors, and repairing mislabeled samples from the original dataset. This refinement retains 72 numeric features (removing spurious attributes that can promote overfitting) and contains no categorical fields. We use two disjoint subsets of 100,000 flows each for training and testing via stratified sampling without replacement. Both splits preserve the base class distribution, containing 80% benign and 20% attack traffic. The attack traffic is organized into eight categories: Port Scan, DoS Hulk, DDoS, DoS GoldenEye, DoS Slowloris, FTP-Patator, SSH-Patator, and DoS Slowhttptest. CICIDS2017 dataset suffers from the problem of minority classes, where it has six out of eight classes that are under-represented in the dataset.
The implementation of the proposed pipeline was developed in Python 3.9, using the Keras 2.7 API to build the neural models, with TensorFlow as the computational backend. All numerical features were pre-processed using min–max scaling, which linearly rescales each feature into the range
For interpretability, we used explanation techniques at both local and global levels. SHAP (v 0.48.0) was used to generate local feature attributions. For the LLM reasoning stage (S3), we used the gemini-2.5-flash model via the Google Generative AI API, configured with a temperature of
The pipeline incurs three sequential per-sample costs. DNN inference on the trained three-layer model is negligible (sub-millisecond per flow on commodity hardware). The SHAP attribution step is the dominant local cost, since the explainer scales with the size of the background set and the feature count, and it is therefore the bottleneck of the explanation stage rather than the classifier. The grounded LLM reporting stage issues a single gemini-2.5-flash API call per alert (temperature
Table 2 presents the per-class detection performance of the proposed model on the clean CICIDS2017 test set, revealing a generally strong ability to distinguish between benign traffic and multiple attack categories. Overall, the DNN model shows high discriminative capability across all classes, as reflected by the AUC-ROC values, which range from 0.95 to 1.00. This illustrates that the DNN model is highly effective at separating class distributions even when class-wise precision and recall vary. Specifically, the majority of traffic categories, including Benign, DoS Hulk, PortScan, and DDoS, are identified with strong performance, suggesting that the learned feature representation captures the most salient characteristics of large and well-represented classes. The CICIDS2017 dataset is considered a highly imbalanced dataset, where the normal traffic is about 79% of the dataset. The DNN model achieves perfect precision (1.00) and high recall (0.92), resulting in an F1-score of 0.96, predicting normal samples in the testing dataset. This implies that samples predicted as benign are almost always correct, although a subset of benign flows is still mis-classified as malicious due to the nature of this dataset (as a highly imbalanced dataset). From an intrusion detection perspective, this trade-off is often acceptable, since prioritizing attack detection is generally more critical than maximizing benign recall. Among the attack classes, DoS Hulk and DDoS achieve the strongest results, with recall values of 1.00, precision of 0.96 and 0.97, and F1-scores of 0.98 and 0.99, respectively. These findings show that high-volume denial-of-service patterns are highly separable from normal traffic in the dataset. Similarly, FTP-Patator achieves an F1-score of 0.85 with perfect recall, showing that the DNN model can also effectively capture brute-force attack behavior when class signatures are sufficiently distinctive in the dataset.

However, the results showed decreased class-wise reliability for minority classes, where the minority classes are less than 1% of the samples in this CICIDS2017 dataset. Although the class PortScan gets perfect recall (1.00), still its precision decreases to 0.64, which yield an F1-score of 0.78, which means that the DNN model is highly sensitive to scan-related activity, so, it tends to over-predict this class, likely due to scanning behavior sharing common characteristics with other anomalous traffic patterns. A similar trend is observed for SSH-Patator, which reaches a recall of 0.99 but only 0.55 precision, which means effective detection of true attacks but with a non-negligible false positive rate. Furthermore, challenging classes such as DoS GoldenEye, DoS slowloris, and DoS Slowhttptest, whose F1-scores drop to 0.43, 0.36, and 0.49, respectively, are characterized by relatively low support in the training dataset, and markedly lower precision despite moderate-to-high recall. This suggests that the DNN model can often identify them but struggles to distinguish them cleanly from other attack categories. Finally, these results shown in Table 2 confirm that the proposed DNN model performs very well on the majority classes in the CICIDS2017 dataset, while its performance decreases on minority and subtle attack categories, which highlights the importance of improved imbalance handling, stronger class-specific feature discrimination to improve the detection performance for these attack classes by the DNN model.
To address the reduced reliability on minority classes, we evaluated two imbalance-treatment strategies on the same architecture and training protocol: inverse-frequency class weighting and focal loss (


Figure 2: Confusion matrices of the baseline and the focal-loss calibrated model. Each cell shows the raw flow count and the row-normalized fraction.
Two trade-offs of the focal-loss model warrant explicit discussion. First, DoS slowloris is the single class that regresses (F1 0.364 to 0.261): its recall remains high (0.95), but the number of benign flows misclassified as slowloris grows from approximately 655 to 1019, a change that is invisible in a row-normalized confusion matrix, since both correspond to roughly 1% of the benign row. Second, the error structure of DoS GoldenEye changes qualitatively: under the baseline, 30% of GoldenEye flows were misattributed to DoS Hulk, a semantically adjacent HTTP-flood class that still raises an alert—whereas under the focal model this confusion drops to 11%, but the fraction of GoldenEye flows misclassified as Benign rises from 1% to 10%, converting label confusion into silent misses. From an operational standpoint these are different failure modes, and miss-averse deployments may prefer the class-weighted calibrated variant, whose GoldenEye-to-Benign leakage remains at 2% in our experiments.
4.3.2 Global SHAP Explanation Analysis
Fig. 3 shows the global SHAP explanations for the clean test set (Fig. 3a), FGSM adversarial test set (Fig. 3b), and PGD adversarial test set (Fig. 3c). What is clear in Fig. 3 is that under clean conditions, Fwd Bulk Rate Avg emerges as the most globally influential feature that affects the prediction of the DNN model, which exhibits a mean

Figure 3: Global explanations generated by SHAP for the CICIDS2017 dataset.
The heatmap (Fig. 4) reveals that the top-15 global features exhibit highly uniform importance across attack classes under the clean, FGSM, and PGD conditions shown in Fig. 4a–c, respectively: which means that

Figure 4: Global Heatmap explanations generated by SHAP for the CICIDS2017 dataset.
Under adversarial attacks by FGSM, the global ranking of features undergoes a notable reorganization; Fwd Packet Length Std displaces Fwd Bulk Rate Avg as the top-ranked feature across all nine classes (Fig. 3), consistent with the near-uniform cross-class importance profile noted above, while Dst Port, which does not appear among the top-15 global features under clean conditions (Fig. 4a), enters the top-15 for all classes under FGSM (Fig. 4b). This rank disruption is consistent with the adversarial objective: the FGSM perturbation shifts feature values in the direction of the gradient, selectively amplifying the apparent importance of features that are locally sensitive to the perturbation direction. The global heatmap under FGSM (Fig. 4b) confirms that absolute magnitudes increase slightly compared to clean conditions: the mean
4.3.3 Per-Class Feature Importance Comparison
Fig. 5 presents per-class grouped horizontal bar charts, comparing mean

Figure 5: Top feature importance per class: Clean, FGSM, and PGD for CICIDS2017 dataset.
The

Figure 6: SHAP attribution shift (

4.3.4 Explanation Stability Analysis
We recall the distinction established in Stage S1: this subsection analyzes explanation robustness (the stability of the attributions consumed by the LLM), which is conceptually separate from the prediction robustness (label flips) discussed in the local analysis of Section 4.3.5. To isolate explanation robustness, all stability quantities below are computed under the clean-prediction convention, so that a label flip does not by itself register as explanation drift. Table 4 reports the per-class explanation-stability results (with
The decomposition reveals that adversarial perturbations only partially disrupt the explanations: the composite
A paired Wilcoxon signed-rank test over the per-sample
The distinction between the two components has important practical implications. Rank reordering, captured by
4.3.5 Local Explanation Analysis
Fig. 7 presents the local SHAP decision plots for a representative sample under clean, FGSM, and PGD conditions. Under clean conditions (Fig. 7a), the model predicts DDoS with high confidence (probability

Figure 7: Local explanations generated by SHAP for a sample selected from the CICIDS testing set. (a) Represents the top-20 features affecting the prediction of the model for the original sample, (b) represents the top-20 features affecting the prediction of the model for the FGSM sample, and (c) represents the top-20 features affecting the prediction of the model for the PGD sample.
Under FGSM perturbation (Fig. 7b), the predicted class shifts to PortScan (probability
Under PGD (Fig. 7c), the prediction shifts to PortScan with higher confidence (probability
An example of the structured incident report generated by LLM reasoning engine (As reported in Section 3, Stage S3) for the DDoS-classified clean sample analyzed in Section 4.3.5 is illustrated in Table 5. The proposed report is grounded in
Each entry in top_evidence carries six subfields: the raw feature name, its min-max normalized value, the SHAP attribution shap, its sign (

The threat_hypothesis field asks the LLM to synthesize the evidence into a single coherent attack report rather than simply repeating feature attributions to make it easier for the security analyst to understand the report. For the DDoS sample that is provided in Table 5, the engine identifies a high-frequency burst pattern and infers a coordinated source flood, a hypothesis consistent with the local SHAP decision plot in Fig. 7, in which forward inter-arrival timing features collectively dominate the positive-attribution side. The confidence_notes field serves a dual purpose: first, it records the model’s softmax confidence (0.99 for the clean sample) and, second, the adversarial stability context derived from the
The field of false_positive_checks provides the actionable verification steps that a security analyst should perform before escalating the alert (one such step is shown in the abridged listing of Table 5). These are generated by the LLM from the qualitative context
As described in Section 4.3.5, when the same sample is passed through the pipeline under both FGSM and PGD attacks, the predicted class shifts to PortScan. In those cases, the LLM report correctly updates predicted_label and top_evidence to reflect the new prediction and its corresponding
Although the present work demonstrates the structure of the grounded LLM report through the representative case study, a large-scale quantitative evaluation of LLM-generated reports is not included in the current version. We therefore stress that hallucination mitigation in this work is enforced structurally, through the evidence-bounding constraint C1 and the catalog-restriction constraint C2, both checked programmatically by validate_soc_report, but that its effectiveness has not yet been measured quantitatively; consequently we do not report or claim a measured hallucination rate, and the qualitative grounding analysis presented here should not be read as a validation of the LLM reporting stage. Future work will conduct a systematic report-generation evaluation using hallucination rate, evidence faithfulness, schema compliance, action-catalog validity, predicted-label consistency, regeneration frequency, and human analyst usefulness ratings. This evaluation will also compare grounded LLM reports against deterministic non-LLM template reports in order to quantify the additional value of LLM-based contextual reasoning.
This work proposed an LLM-enhanced explainable IDS framework that mitigates the operational gap between raw model explanations and actionable security guidance to enhance the capability of a security analyst taking actions. The proposed method integrates a DNN classifier, a post-hoc XAI method (SHAP), and a grounded LLM reasoning engine that converts sample-level feature attributions into structured, machine-readable incident reports conforming to a fixed JSON schema. Through constraining the LLM to evidence supplied by the XAI stage and restricting recommended actions to a predefined catalog, the proposed method provides an auditable report structure designed to support SOC-style triage in a controlled benchmark setting. Experiments on the refined CICIDS2017 dataset show strong performance on majority traffic classes, while minority and subtle attack classes remain more challenging. Although the present work demonstrates the structure of grounded LLM-generated reports, large-scale quantitative evaluation of hallucination rate, evidence faithfulness, grounding quality, and human analyst usefulness remains future work. To address the highly imbalanced class distribution, we evaluated class weighting and focal loss with per-class threshold calibration: focal-loss training with calibration raises macro-F1 from 0.726 to 0.776 and improves per-class F1 for seven of the nine classes, including most of the minority attack classes, while one class (DoS slowloris) regresses due to a precision effect that we report transparently and that remains an open case for future imbalance treatments. A central finding of this work concerns the robustness under adversarial attacks. Decomposing the signed-rank stability metric
Several directions remain open for future work: First, adversarially robust XAI methods, such as smoothed or certified attribution techniques, should be investigated as a replacement for standard SHAP in high-threat environments. Second, the proposed method should be evaluated on more recent and diverse datasets. A further limitation is that the present work demonstrates the structure of grounded LLM-generated reports through a representative case study, but does not include large-scale quantitative evaluation of hallucination rate, evidence faithfulness, grounding quality, or human analyst usefulness under real SOC conditions.
Acknowledgement: Not applicable.
Funding Statement: The authors received no specific funding for this study.
Author Contributions: Mohammed Atoum: conceptualization, methodology, software, formal analysis, investigation, writing—original draft, writing—review & editing. Malik AL-Essa: conceptualization, methodology, software, formal analysis, investigation, writing—original draft, writing—review & editing, project administration. Yazeed Alsarhan: conceptualization, supervision, writing—review & editing, resources. Ahmad K. Al Hwaitat: conceptualization, supervision, writing—review & editing, resources. Muhammad Imran: supervision, writing—review & editing. All authors reviewed and approved the final version of the manuscript.
Availability of Data and Materials: The dataset analyzed during the current study is publicly available. The code supporting the findings of this study will be made available upon acceptance of the manuscript.
Ethics Approval: Not applicable.
Conflicts of Interest: The authors declare no conflicts of interest.
1downloads.distrinet-research.be/WTMC2021
2Bwd Packet/Bulk Avg and Bwd Bulk Rate Avg are two distinct CICFlowMeter bulk-transfer statistics: the former denotes the average number of packets per bulk transfer in the backward direction (CICFlowMeter field Bwd Avg Packets/Bulk), while the latter denotes the average bulk transfer rate in the backward direction (Bwd Avg Bulk Rate). Both attributes are present in the refined CICIDS2017 release used in this work.
References
1. Lundberg SM, Lee SI. A unified approach to interpreting model predictions. Adv Neural Inf Process Syst. 2017;30:4768–77. [Google Scholar]
2. Al-Essa M, Alsharo M, Alnsour Y, Ali WA, Almomani O. Transforming data representation: a comparative analysis of tabular and image-based approaches with XAI. J Comput Cogn Eng. 2026;5(2):333–40. [Google Scholar]
3. Al-Essa M, Ali WA, Alsharo M, Atoum MS, Imran M. COBRA: counterfactual oversampling framework for imbalanced structured data classification. Expert Syst Appl. 2025;304:130764. [Google Scholar]
4. Lu H, Ma Z, Li X, Bi S, He X, Wang K. TrafficHD: efficient hyperdimensional computing for real-time network traffic analytics. In: Proceedings of the 61st ACM/IEEE Design Automation Conference; 2024 Jun 23–27; San Francisco, CA, USA. p. 1–6. [Google Scholar]
5. AL-Essa M, Andresini G, Appice A, Malerba D. Striving for simplicity in deep neural models trained for malware detection. In: Meo R, Silvestri F, editors. Machine learning and principles and practice of knowledge discovery in databases. Cham, Switzerland: Springer Nature; 2025. p. 529–40. [Google Scholar]
6. Kim H, Yoon Y. An ensemble of text convolutional neural networks and multi-head attention layers for classifying threats in network packets. Electronics. 2023;12(20):4253. doi:10.3390/electronics12204253. [Google Scholar] [CrossRef]
7. Muhuri PS, Chatterjee P, Yuan X, Roy K, Esterline A. Using a long short-term memory recurrent neural network (LSTM-RNN) to classify network attacks. Information. 2020;11(5):243. doi:10.3390/info11050243. [Google Scholar] [CrossRef]
8. Moslemi A, Briskina A, Dang Z, Li J. A survey on knowledge distillation: recent advancements. Mach Learn Appl. 2024;18(6):100605. doi:10.1016/j.mlwa.2024.100605. [Google Scholar] [CrossRef]
9. AL-Essa M, Andresini G, Appice A, Malerba D. An XAI-based adversarial training approach for cyber-threat detection. In: Proceedings of the 2022 IEEE International Conference on Dependable, Autonomic and Secure Computing, International Conference on Pervasive Intelligence and Computing, International Conference on Cloud and Big Data Computing, International Conference on Cyber Science and Technology Congress (DASC/PiCom/CBDCom/CyberSciTech); 2022 Sep 12–15; Falerna, Italy. p. 1–8. [Google Scholar]
10. Sundararajan M, Taly A, Yan Q. Axiomatic attribution for deep networks. In: Proceedings of the 34th International Conference on Machine Learning; 2017 Aug 6–11; Sydney, Australia. p. 3319–28. [Google Scholar]
11. Ribeiro MT, Singh S, Guestrin C. “Why should I trust you?” Explaining the predictions of any classifier. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining; 2016 Aug 13–17; San Francisco, CA, USA. p. 1135–44. [Google Scholar]
12. Biecek P. DALEX: explainers for complex predictive models in R. J Mach Learn Res. 2018;19(84):1–5. [Google Scholar]
13. Hossain MA, Ishtiaq W, Islam MS. A comparative analysis of ensemble-based machine learning approaches with explainable AI for multi-class intrusion detection in drone networks. Secur Priv. 2026;9(1):e70164. doi:10.1002/spy2.70164. [Google Scholar] [CrossRef]
14. Oswal S. From detection to diagnosis: TCAE–DBSCAN with LIME for interpretable ICS anomaly analysis. Int J Appl Math. 2025;38(1s):828–39. [Google Scholar]
15. Al-Essa M, Qatawneh M, Al-Shamayleh AS, Abualghanam O, Almobaideen W. From hardening to understanding: adversarial training vs. CF-Aug for explainable cyber-threat detection system. Comput Mater Contin. 2026;87(3):76608. doi:10.32604/cmc.2026.076608. [Google Scholar] [CrossRef]
16. Goodfellow IJ, Shlens J, Szegedy C. Explaining and harnessing adversarial examples. In: Proceedings of the 3rd International Conference on Learning Representations, ICLR 2015, Conference Track Proceedings; 2015 May 7–9; San Diego, CA, USA. p. 1–11. [Google Scholar]
17. Madry A, Makelov A, Schmidt L, Tsipras D, Vladu A. Towards deep learning models resistant to adversarial attacks. In: Proceedings of the 6th International Conference on Learning Representations, ICLR 2018; 2018 Apr 30–May 3; Vancouver, BC, Canada. [Google Scholar]
18. Rai MHA, Noor Y, Faisal M, Nawazish MF. Adversarial robustness of deep learning-based intrusion detection systems against AI-powered cyber attacks. Spectr Eng Sci. 2025;3(11):899–922. [Google Scholar]
19. Wu L, Zhu Z, Tai C. Understanding and enhancing the transferability of adversarial examples. arXiv:1802.09707. 2018. [Google Scholar]
20. Hassanin M, Moustafa N. A comprehensive overview of large language models (LLMs) for cyber defences: opportunities and directions. arXiv:2405.14487. 2024. [Google Scholar]
21. Tseng P, Yeh Z, Dai X, Liu P. Using LLMs to automate threat intelligence analysis workflows in security operation centers. arXiv:2407.13093. 2024. [Google Scholar]
22. Haque MA, Siddique S, Rahman MM, Hasan AR, Das LR, Kamal M, et al. SOK: exploring hallucinations and security risks in AI-assisted software development with insights for LLM deployment. In: Proceedings of the 2025 Sixth International Conference on Intelligent Data Science Technologies and Applications (IDSTA); 2025 Sep 1–4; Varna, Bulgaria. p. 57–64. [Google Scholar]
23. Alqahtani H, Kumar G. Large language models for cybersecurity intelligence: a systematic review of emerging threats, defensive capabilities, and security evaluation frameworks. Comput Mater Contin. 2026;87(3):77367. [Google Scholar]
24. Sharafaldin I, Lashkari AH, Ghorbani AA. Toward generating a new intrusion detection dataset and intrusion traffic characterization. Int Conf Inf Syst Secur Priv. 2018;1(2018):108–16. doi:10.5220/0006639801080116. [Google Scholar] [CrossRef]
25. Engelen G, Rimmer V, Joosen W. Troubleshooting an intrusion detection dataset: the CICIDS2017 case study. In: Proceedings of the 6th IEEE European Symposium on Security and Privacy Workshops, EuroS&PW 2021; 2021 Sep 6–10; Vienna, Austria. p. 7–12. [Google Scholar]
26. Glorot X, Bordes A, Bengio Y. Deep sparse rectifier neural networks. In: Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics; 2011 Apr 11–13; Fort Lauderdale, FL, USA. p. 315–23. [Google Scholar]
Cite This Article
Copyright © 2026 The Author(s). Published by Tech Science Press.This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.


Submit a Paper
Propose a Special lssue
View Full Text
Download PDF
Downloads
Citation Tools