<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xml:lang="en" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">CMC</journal-id>
<journal-id journal-id-type="nlm-ta">CMC</journal-id>
<journal-id journal-id-type="publisher-id">CMC</journal-id>
<journal-title-group>
<journal-title>Computers, Materials &#x0026; Continua</journal-title>
</journal-title-group>
<issn pub-type="epub">1546-2226</issn>
<issn pub-type="ppub">1546-2218</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">74930</article-id>
<article-id pub-id-type="doi">10.32604/cmc.2026.074930</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Graph Neural Networks with Multi-Head Attention and SHAP-Based Explainability for Robust, Interpretable, and High-Throughput Intrusion Detection in 5G-Enabled Software Defined Networks</article-title>
<alt-title alt-title-type="left-running-head">Graph Neural Networks with Multi-Head Attention and SHAP-Based Explainability for Robust, Interpretable, and High-Throughput Intrusion Detection in 5G-Enabled Software Defined Networks</alt-title>
<alt-title alt-title-type="right-running-head">Graph Neural Networks with Multi-Head Attention and SHAP-Based Explainability for Robust, Interpretable, and High-Throughput Intrusion Detection in 5G-Enabled Software Defined Networks</alt-title>
</title-group>
<contrib-group>
<contrib id="author-1" contrib-type="author">
<name name-style="western"><surname>Azeez</surname><given-names>Sarmad Dheyaa</given-names></name><xref ref-type="aff" rid="aff-1">1</xref></contrib>
<contrib id="author-2" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Ilyas</surname><given-names>Muhammad</given-names></name><xref ref-type="aff" rid="aff-2">2</xref><email>muhammad.ilyas@aau.ac.ae</email></contrib>
<contrib id="author-3" contrib-type="author">
<name name-style="western"><surname>Ahmed</surname><given-names>Saadaldeen Rashid</given-names></name><xref ref-type="aff" rid="aff-3">3</xref><xref ref-type="aff" rid="aff-4">4</xref></contrib>
<aff id="aff-1"><label>1</label><institution>Department of Electrical and Computer Engineering, Altinbas university</institution>, <addr-line>Istanbul</addr-line>, <country>T&#x00FC;rkiye</country></aff>
<aff id="aff-2"><label>2</label><institution>Department of Cybersecurity, College of Engineering, Al Ain University</institution>, <addr-line>Abu Dhabi</addr-line>, <country>United Arab Emirates</country></aff>
<aff id="aff-3"><label>3</label><institution>Artificial Intelligence Engineering Department, College of Engineering, Al-Ayen University</institution>, <addr-line>Thi-Qar</addr-line>, <country>Iraq</country></aff>
<aff id="aff-4"><label>4</label><institution>Computer Science, Bayan University</institution>, <addr-line>Erbil, Kurdstan</addr-line>, <country>Iraq</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Author: Muhammad Ilyas. Email: <email>muhammad.ilyas@aau.ac.ae</email></corresp>
</author-notes>
<pub-date date-type="collection" publication-format="electronic">
<year>2026</year>
</pub-date>
<pub-date date-type="pub" publication-format="electronic">
<day>9</day><month>4</month><year>2026</year>
</pub-date>
<volume>87</volume>
<issue>3</issue>
<elocation-id>66</elocation-id>
<history>
<date date-type="received">
<day>21</day>
<month>10</month>
<year>2025</year>
</date>
<date date-type="accepted">
<day>28</day>
<month>01</month>
<year>2026</year>
</date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2026 The Authors. Published by Tech Science Press.</copyright-statement>
<copyright-year>2026</copyright-year>
<copyright-holder>The Authors</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_CMC_74930.pdf"></self-uri>
<abstract>
<p>The rapid evolution of 5G-enabled Software Defined Networks (SDNs) has transformed modern communication systems by enabling ultra-low latency, massive connectivity, and high throughput. However, the increased complexity of traffic flows and the rise of sophisticated cyber-attacks such as Distributed Denial of Service (DDoS), Botnets, Fake Base Stations, and Zero-Day exploits have made intrusion detection a critical challenge. Traditional Intrusion Detection System (IDS) approaches often suffer from poor gen-eralization, high false positives, and lack of interpretability, making them unsuitable for dynamic 5G environments. This paper presents a novel Graph Neural Network (GNN) with Multi-Head Attention (MHA) and SHAP-based explainability for robust, interpretable, and high-throughput intrusion detection in 5G-SDN. The model is evaluated on the NGIDS-DS and 5G-NIDD datasets, along with a real-time 5G testbed, and achieves a detection accuracy of 98.67% and a detection rate of 99.20%, outperforming baseline IDS models (92.15% accuracy and 89.42% detection rate). Latency is reduced to 24.6 ms compared to 47.3 ms in existing methods, while throughput improves from 7420 flows/sec to 11,384 flows/sec, demonstrating scalability under 5G traffic loads. Furthermore, the integration of SHAP ensures an Interpretability Confidence Score (ICS) of 0.92, providing transparency in decision-making for security-critical applications. The proposed framework significantly enhances detection robustness, reduces overhead, and maintains compliance with 5G Ultra-Reliable Low-Latency Communication (URLLC) performance thresholds, making it a strong candidate for real-world 5G deployments.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>5G-SDN</kwd>
<kwd>explainable AI</kwd>
<kwd>graph neural networks (GNNs)</kwd>
<kwd>intrusion detection system (IDS)</kwd>
<kwd>multi-head attention (MHA)</kwd>
<kwd>NGIDS-DS</kwd>
<kwd>SHAP</kwd>
<kwd>network security</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>The integration of 5G mobile networks with Software Defined Networking (SDN) technologies has altered contemporary communication structures by offering ultra-reliable, low-latency, and scalable services via centralized control and programmable networking. Recent work has included explainability in collaborative systems. For instance, used attention-based federated learning to identify the main sources of security problems in changing situations. This increases the attack surface, such as Distributed Denial of Service (DDoS) and spoofing attacks, as well as more complicated flow- and application-layer attacks.</p>
<p>Conventional Intrusion Detection Systems (IDSs) with signature-based or shallow-learning-based detection approaches are not equipped to discover new or concealed attacks in dynamic 5G-enabled SDNs. Modern methods differ from older host-based analysis by looking at anomalies in the entire network. [<xref ref-type="bibr" rid="ref-1">1</xref>] showed that changing graph features significantly improves the detection of multi-class attacks in complex networks. One promising alternative is Graph Neural Networks (GNNs), which learn from the organization of network traffic by representing networks and communication flows as graphs [<xref ref-type="bibr" rid="ref-2">2</xref>].</p>
<p>GNNs can be particularly applied to SDN environments, where flow logs and packet-in messages are visualized in real-time and converted into spatio-temporal graphs that evolve over time. Multi-Head Attention (MHA) systems, originally proposed in Transformer models, have been effectively incorporated into GNNs to enhance feature discrimination on these complex graphs. MHA allows the model to consider several relational subspaces simultaneously, capturing interactions across different temporal and spatial granularities [<xref ref-type="bibr" rid="ref-3">3</xref>]. This is crucial in 5G networks, where traffic patterns are constantly changing due to network slicing, mobility, and edge devices.</p>
<p>Although GNN-based models are often accurate, they tend to be black-boxes, limiting their reliability for security-sensitive applications. To address this, Explainable AI (XAI) methods, particularly SHapley Additive exPlanations (SHAP), have gained popularity. SHAP offers post-hoc interpretability by explaining decisions based on individual input features using cooperative game theory [<xref ref-type="bibr" rid="ref-4">4</xref>]. When applied to intrusion detection, SHAP highlights what each flow feature (e.g., packet entropy, duration, number of bytes) contributed to the final prediction, offering valuable forensic insights to security analysts [<xref ref-type="bibr" rid="ref-5">5</xref>].</p>
<p>Recent studies have focused on making GNN-based intrusion detection systems explainable. For example, a GNN system using multi-head attention (MHA) and SHAP for analyzing encrypted network data showed improvements in both system interpretability and detection accuracy [<xref ref-type="bibr" rid="ref-6">6</xref>]. Used SHAP, in combination with attention-based federated learning, to improve the understandability of collaborative intrusion detection systems [<xref ref-type="bibr" rid="ref-7">7</xref>]. Another study demonstrated that GNNs combined with MHA and SHapley Additive exPlanations (SHAP) can improve malware analysis by explaining intrusion behaviors on individual computers [<xref ref-type="bibr" rid="ref-8">8</xref>].</p>
<p>In addition to SHAP, attention scores offer a straightforward interpretation of the system by identifying significant components of the network graph. This can be explained using both attention weights and SHAP values to provide a two-level explanation: one representing the graph structure (how important each node is) and the other representing the feature importance (what features matter). This enhances confidence and simplifies auditing.</p>
<p>Temporal GNNs, such as the Dynamic Self-Attention Network (DySAT) and Temporal Graph Attention Networks (TGAT), have been used to monitor network dynamic behavior in systems that manage high volumes of data. These methods align with the principles of zero-trust security, which emphasize continuous observation and adaptability [<xref ref-type="bibr" rid="ref-9">9</xref>].</p>
<p>The presented system includes a GNN encoder with MHA, trained on the graphical version of SDN flow data. Each analysis is supplemented with SHAP-based tools for explanation. The system was tested on standard datasets, such as CIC-IDS2017, TON_IoT, and NSL-KDD, converted into graph snapshots [<xref ref-type="bibr" rid="ref-10">10</xref>]. The experiments showed improved F1-scores (up to an 18-point variation) and increased confidence in the explanations compared to simpler systems, like Graph Attention Networks (GAT) or convolutional neural networks (CNN).</p>
<p>Furthermore, the studies introduced an Interpretability Confidence Score (ICS), which compares the vectors of SHAP importance with ground-truth attack signatures to measure alignment [<xref ref-type="bibr" rid="ref-11">11</xref>]. Our system is implemented as a modular microservice, deployable on SDN controllers like OpenDaylight, using gRPC for low-latency inference and explanation retrieval. The system&#x2019;s throughput is 5G core-compatible. Additionally, to support multi-tenancy and cross-slice traffic monitoring, the system&#x2019;s architecture enables dynamic graph abstraction and federated training across edge sites, without exchanging actual traffic contents [<xref ref-type="bibr" rid="ref-12">12</xref>]. This aligns with privacy-protective standards and ensures flexibility in various 5G implementations.</p>
<p>The system is resistant to adversarial attacks, as SHAP-based monitoring can identify perturbation attempts by detecting anomalies in explaining consistency [<xref ref-type="bibr" rid="ref-13">13</xref>]. GNNs, combined with MHA and SHAP, provide an integrated system for robust, interpretable, and high-throughput IDS in 5G-SDN networks. The proposed solution lays the foundation for trusted AI-assisted cybersecurity in next-generation networks by bridging the gap between deep learning performance and human-understandable outputs.</p>
<p>The introduction of 5G networks and Software Defined Networking (SDN) has gone a long way in enhancing the programmability of the network, traffic engineering, and scalability of the services. But this change has also come with other issues of network security especially with the implementation of Non-IP Data Delivery (NIDD) protocols in the IoT and the increasing complexity of flow-based attacks in SDN worlds. The NGIDS-DS dataset, attempted to depict the actual SDN traffic, reveals that centralized SDN controllers are vulnerable to attacks. They are controller flooding, ARP spoofing and alteration of flow rules. They cannot easily be detected by regular Intrusion Detection Systems (IDS). Meanwhile, the 5G-NIDD data gathers data of NB-IoT and LTE-M devices that are based on non-IP protocols. Due to their basic payloads, malicious activities are difficult to identify with regular ML techniques. Therefore, studies are in growing need of an intrusion detection system, which is capable of structurally modeling the behaviour of a network, processing data quickly, and providing feature-level justification to security experts.</p>
<p>The following points outline some of the key limitations of current IDS models in the context of 5G-SDN and NIDD traffic. These challenges highlight areas that require novel approaches or significant improvements to enhance security in these emerging network environments:
<list list-type="bullet">
<list-item>
<p>Lack of Necessary Flexibility of Traditional IDS: Static detection models are ineffective in detecting new and multi-stage SDN attacks such as rule overflow or lateral propagation as observed in NGIDS-DS.</p></list-item>
<list-item>
<p>Protocol Awareness: IDS systems cannot handle NIDD traffic, in which communications are made without IP headers and attacks can use message format or fre-frequency patterns.</p></list-item>
<list-item>
<p>Low Interpretability of Deep Networks: The IDSs with neural networks tend to have high detection rates with no information on the features or behaviors that raised the alarm.</p></list-item>
<list-item>
<p>Scalability and Throughput Constraints: The rate of flows in 5G-SDN deployment is capable of reaching over 10,000 flows/second which is problematic to flow detection systems that do not focus on custom inference pipelines.</p></list-item>
<list-item>
<p>No Feature Attribution or Forensic Clarity: There is no explainability mechanism, such as SHAP, to determine whether an alert was as a result of an anomaly in size of a payload, a change in frequency, or duplication of flow.</p></list-item>
<list-item>
<p>Ignored Graph Semantics: NGIDS-DS as well as 5G-NIDD are better described about graphs (e.g., device-to-controller mappings, brokerless telemetry paths), but this structure is not used in existing IDS models.</p></list-item>
<list-item>
<p>The SOC teams are unable to prioritize, val-idate, or explain alerts in a hurry, resulting in longer Mean Time to Detect (MTTD) and Mean Time to Respond (MTTR) due to delayed and incomplete threat response.</p></list-item>
</list></p>
<p>The purpose of the study is to develop an effective and explainable intrusion detection model utilizing Graph Neural Networks (GNNs) with built-in Multi-Head Attention (MHA) and SHAP-based interpretability, derived to work with 5G-enabled SDNs and Non-IP Data Delivery (NIDD) traffic in IoT settings. This system was trained and tested using two current datasets. NGIDS-DS models SDN attacks like flow-table saturation and ARP spoofing. The 5G NIDD dataset has structured, non-IP telemetry data common in NB-IoT and LTE-M scenarios. By using graphs to show network traffic and adding attention, the model seeks to spot complex, multi-stage attacks and give human-understandable feature explanations via SHAP. The final aim is a fast, adaptable, and clear IDS that works well with both IP and non-IP traffic in 5G networks.
<list list-type="bullet">
<list-item>
<p>Graph-Based Modeling for SDN and IoT Traffic: Develop a GNN-based architecture that represents both flow-based (NGIDS-DS) and session-based (5G-NIDD) traffic as dynamic graphs, enabling structured learning of network behaviors.</p></list-item>
<list-item>
<p>Multi-Head Attention for Contextual Learning: Implement multi-head attention layers within the GNN to learn multiple semantic relationships among nodes and flows, improving detection of stealthy or protocol-specific attacks.</p></list-item>
<list-item>
<p>SHAP-Based Interpretability: Integrate SHAP to quantify and visualize the influence of individual features&#x2014;such as payload size, NIDD message types, or flow duration&#x2014;on each detection, facilitating explainable decision-making.</p></list-item>
<list-item>
<p>Real-Time Detection with Higher load: Design SDN environment operational with high throughput requirements (e.g., 10k&#x002B; flow rules/sec), and make the model have low inference latency and high alert accuracy.</p></list-item>
<list-item>
<p>Dual-Domain Evaluation: Check both NGIDS-DS (with emphasis on control-plane SDN attacks) and 5G-NIDD (with emphasis on NIDD-specific communication patterns), and can be used to show generalization across protocol and topology boundaries.</p></list-item>
<list-item>
<p>Deployment-Ready Architecture: Develop a modular IDS that can be deployed into SDN controllers (e.g., ONOS, OpenDaylight), and has gRPC-compatible APIs to react to threats fast and provide explainability feedback loops.</p></list-item>
<list-item>
<p>Support Lightweight and Non-IP Protocols: Scalability to non-IP based traffic not just IP based traffic, e.g., support 5G-enabled smart meters, e-health, and industrial IoT.</p></list-item>
</list></p>
<p>The structure of this research will be as follows: <xref ref-type="sec" rid="s2">Section 2</xref> will be a review of studies connected to this one and the areas in which the future study is required. <xref ref-type="sec" rid="s3">Section 3</xref> provides the details of GNN-MHA-SHAP architecture, data preparation and training. <xref ref-type="sec" rid="s4">Section 4</xref> presents the findings of experiments and examines explanations. <xref ref-type="sec" rid="s5">Section 5</xref> discusses the obtained knowledge and its applicability to 5G-SDN rollouts. Lastly, the last <xref ref-type="sec" rid="s6">Section 6</xref> concludes with recommendations on the direction of further research.</p>
</sec>
<sec id="s2">
<label>2</label>
<title>Background</title>
<p>The rapid adoption of 5G and Software Defined Networks has transformed contemporary networking, where it is more flexible, centrally controlled, and flow can be managed easily. Although such changes are useful to manage large IoT systems and high-performance applications, they introduce new cyber threats, such as dynamical and topological attacks. The research indicates that regular Intrusion Detection Systems such as rule based and simple learning models are ill equipped to detect complex attacks in real time. This is attributed to the fact that they do not respond to the changes in the network structures, size, and its operation. Conventional flat feature-vector models often struggle with intricate attack patterns. [<xref ref-type="bibr" rid="ref-14">14</xref>] suggest that AI fusion is needed, noting that current cybersecurity approaches should move toward more advanced methods like GNNs to address these complicated threats. Meanwhile, another detection issue is introduced by Non-IP Data Delivery (NIDD) in 5G networks, particularly in the case of NarrowBand-Internet of Things (NB-IoT) and Long Term Evolution for Machines (LTE-M). Unlike normal IP traffic, NIDD communication usually has structured, lightweight, and regular messages. Attackers use this structure for things like injecting bad session data, spoofing telemetry, and registering devices without permission. The 5G-NIDD data collection, based on actual NIDD telemetry data, shows that standard Intrusion Detection System (IDS) methods fail to find these unusual activities because they lack typical IP-layer traits. Accurate network traffic representation is key for better detection. [<xref ref-type="bibr" rid="ref-15">15</xref>] presented FN-GNN, a new graph embedding method that improves GNN performance by more accurately capturing structural dependencies in network intrusion datasets. Previous works on graph-based intrusion detection typically model the network as a graph:
<disp-formula id="eqn-1"><label>(1)</label><mml:math id="mml-eqn-1" display="block"><mml:mrow><mml:mi>G</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>V</mml:mi></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:mi>E</mml:mi></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula id="ieqn-1"><mml:math id="mml-ieqn-1"><mml:mi>V</mml:mi></mml:math></inline-formula> is the set of nodes (e.g., hosts, switches, loT devices), <inline-formula id="ieqn-2"><mml:math id="mml-ieqn-2"><mml:mi>E</mml:mi></mml:math></inline-formula> is the set of communication edges (flows), and <inline-formula id="ieqn-3"><mml:math id="mml-ieqn-3"><mml:mi>X</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>V</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>&#x00D7;</mml:mo><mml:mi>d</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> represents node or edge features (e.g., packet size, flow duration, telemetry frequency). The propagation rule of a standard Graph Convolutional Network (GCN) for IDS is given by:
<disp-formula id="eqn-2"><label>(2)</label><mml:math id="mml-eqn-2" display="block"><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>l</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mrow><mml:mover><mml:mi>D</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msup><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mspace width="thinmathspace" /><mml:msup><mml:mrow><mml:mover><mml:mi>D</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msup><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula id="ieqn-4"><mml:math id="mml-ieqn-4"><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mo>=</mml:mo><mml:mi>A</mml:mi><mml:mo>+</mml:mo><mml:mi>I</mml:mi></mml:math></inline-formula> is the adjacency matrix with self-loops, <inline-formula id="ieqn-5"><mml:math id="mml-ieqn-5"><mml:mrow><mml:mover><mml:mi>D</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula> is the degree matrix, <inline-formula id="ieqn-6"><mml:math id="mml-ieqn-6"><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula> is the node embedding at layer <inline-formula id="ieqn-7"><mml:math id="mml-ieqn-7"><mml:mi>l</mml:mi><mml:mo>,</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula> is the trainable weight matrix, and <inline-formula id="ieqn-8"><mml:math id="mml-ieqn-8"><mml:mi>&#x03C3;</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is an activation function such as ReLU. This allows GNNs to capture structural relationships in traffic graphs as shown in NGIDS-DS. To improve adaptability, Multi-Head Attention (MHA) has been integrated into GNNs. The attention coefficient between two connected nodes <inline-formula id="ieqn-9"><mml:math id="mml-ieqn-9"><mml:mi>i</mml:mi></mml:math></inline-formula> and <inline-formula id="ieqn-10"><mml:math id="mml-ieqn-10"><mml:mi>j</mml:mi></mml:math></inline-formula> is defined as:
<disp-formula id="eqn-3"><label>(3)</label><mml:math id="mml-eqn-3" display="block"><mml:msubsup><mml:mi>&#x03B1;</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mtext>LeakyReLU</mml:mtext></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>a</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo>[</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>]</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mi>&#x1D4A9;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mtext>LeakyReLU</mml:mtext></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>a</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo>[</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo>]</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula>where <inline-formula id="ieqn-11"><mml:math id="mml-ieqn-11"><mml:mrow><mml:mi>&#x1D4A9;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> denotes the neighbors of node <inline-formula id="ieqn-12"><mml:math id="mml-ieqn-12"><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula> and <inline-formula id="ieqn-13"><mml:math id="mml-ieqn-13"><mml:msup><mml:mi>a</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula> are learnable parameters for head <inline-formula id="ieqn-14"><mml:math id="mml-ieqn-14"><mml:mi>h</mml:mi></mml:math></inline-formula>, and <inline-formula id="ieqn-15"><mml:math id="mml-ieqn-15"><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo></mml:math></inline-formula> is concatenation. Multiple attention heads <inline-formula id="ieqn-16"><mml:math id="mml-ieqn-16"><mml:mi>H</mml:mi></mml:math></inline-formula> are then aggregated as:
<disp-formula id="eqn-4"><label>(4)</label><mml:math id="mml-eqn-4" display="block"><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msubsup><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>H</mml:mi></mml:mrow></mml:msubsup><mml:msub><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mi>&#x1D4A9;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msub><mml:msubsup><mml:mi>&#x03B1;</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula></p>
<p>This formulation enables IDS models to attend to diverse contextual relationships in network graphs, crucial for detecting multi-stage attacks in SDNs.</p>
<p>Finally, to improve explainability, SHAP (SHapley Additive exPlanations) assigns an importance value <inline-formula id="ieqn-17"><mml:math id="mml-ieqn-17"><mml:msub><mml:mi>&#x03D5;</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> to each feature <inline-formula id="ieqn-18"><mml:math id="mml-ieqn-18"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> contributing to a prediction <inline-formula id="ieqn-19"><mml:math id="mml-ieqn-19"><mml:mi>f</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>. The SHAP value is defined as:
<disp-formula id="eqn-5"><label>(5)</label><mml:math id="mml-eqn-5" display="block"><mml:msub><mml:mi>&#x03D5;</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>S</mml:mi><mml:mo>&#x2286;</mml:mo><mml:mi>F</mml:mi><mml:mo>&#x2216;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mi>i</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo></mml:mrow></mml:msub><mml:mfrac><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>S</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>!</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>F</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>S</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo><mml:mo>!</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>F</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>!</mml:mo></mml:mrow></mml:mfrac><mml:mo stretchy="false">[</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>S</mml:mi><mml:mo>&#x222A;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mi>i</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>S</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-20"><mml:math id="mml-ieqn-20"><mml:mi>F</mml:mi></mml:math></inline-formula> is the set of all features and <inline-formula id="ieqn-21"><mml:math id="mml-ieqn-21"><mml:mi>S</mml:mi></mml:math></inline-formula> is a subset excluding feature <inline-formula id="ieqn-22"><mml:math id="mml-ieqn-22"><mml:mi>i</mml:mi></mml:math></inline-formula>. Due to the special way connected devices are set up, we need specific ways to spot problems [<xref ref-type="bibr" rid="ref-16">16</xref>] came up with an intrusion detection system that uses a GNN, made just for the Industrial Internet of Things. It&#x2019;s good at finding attacks in these complicated, spread-out networks. This game-theoryic model is such that the attributions of the features are fairly allocated, and additively consistent, so that operators can know whether the flow duration, the entropy of the packets or the frequency of the NIDD messages was the cause of the detection alert. These mathematical models provide a foundation of flexible and comprehensible real-time intrusion detection systems. NGIDS-DS and 5G-NIDD data sets have been used to check them. Graph Neural Networks have taken the step forward, and they allow traffic to be represented as dynamic graphs. This is the relationship between various portions of a network to one another such as hosts, switches, devices, flow paths and message exchanges. Moreover, an addition of Multi-Head Attention to GNNs assists the model to perceive various types of contextual connection. This assists in identifying an attack that occurs in stages and cannot be easily identified [<xref ref-type="bibr" rid="ref-17">17</xref>]. They are good models, though, that do not tell much about the reasons why they have been making the detections they have made, such as what features or interactions caused a decision [<xref ref-type="bibr" rid="ref-18">18</xref>]. To solve this, scientists have resorted to Explainable AI (XAI) approaches and SHapley Additive exPlanations (SHAP) has experienced considerable popularity owing to its capability to assign predictive values to each of the input features. The usefulness of SHAP in graph-based intrusion detection is growing, especially in the analysis of such characteristics as flow length, payload size, NIDD message types, and packet frequency [<xref ref-type="bibr" rid="ref-19">19</xref>]. In [<xref ref-type="bibr" rid="ref-20">20</xref>], the researchers and others demonstrated that the analysis of SHAP plots can visually identify errors in the intrusion detection systems based on ML. This study supports our approach to using SHAP in order to gain forensic insight, and ensure that real-time alerts are very dependable. Even with such developments, there are still a number of gaps. Current IDS models often lack protocol-level adaptability, especially for non-IP or lightweight traffic patterns, and fail to scale under the high-throughput conditions characteristic of 5G networks. Furthermore, the lack of dual support for both SDN-based and NIDD-based communication restricts broader applicability across multi-layered 5G infrastructures. Researchers have also raised concerns regarding latency, false positive rates, and the operational burden of integrating black-box AI models into live network environments [<xref ref-type="bibr" rid="ref-21">21</xref>]. Prior work in intrusion detection systems shows three main weaknesses: simple models of software-defined networking control and OpenFlow, weak support for non-IP telemetry, and a lack of explanation for high-speed 5G situations. Our work attempts to fix these by: (i) modeling SDN traffic as control/data-plane graphs that change with time, (ii) adding non-IP session data with IP flows, and (iii) using SHAP with an attention-guided graph neural network to give explanations for each flow that can scale and still meet 5G speed needs.</p>
<sec id="s2_1">
<label>2.1</label>
<title>AI Optimization Techniques</title>
<p>The use of artificial intelligence (AI) has now become a feasibility of optimizing cybersecurity systems of 5G-enabled SDNs, making it adaptive, scalable, and high-speed in detecting intrusions. Conventional Intrusion Detection System (IDS) systems, such as statistical anomaly detectors and signature systems, are ineffective in dealing with contemporary threats in SDN and IoT ecosystem, especially because of dynamic traffic flows, non-IP data format and structural character of flow-based attacks. <xref ref-type="table" rid="table-1">Table 1</xref> summarizes the key characteristics and challenges of IDS approaches in SDN-based environments. Graph Neural Networks (GNNs) are becoming popular in research because of their capacity to represent communication streams as graphs and capture relational dependencies between entities within the network [<xref ref-type="bibr" rid="ref-22">22</xref>].</p>
<table-wrap id="table-1">
<label>Table 1</label>
<caption>
<title>Overview of AI optimization methods and data sets employed in the latest intrusion detection research through GNNs.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Technique</th>
<th>Authors</th>
<th>Dataset Used</th>
<th>Focus</th>
<th>Advantages</th>
<th>Challenges</th>
</tr>
</thead>
<tbody>
<tr>
<td>GAT for SDN Flow Analysis</td>
<td>[<xref ref-type="bibr" rid="ref-23">23</xref>]</td>
<td>Custom Mininet-SDN</td>
<td>Detecting OpenFlow-based attacks using graph attention</td>
<td>High accuracy, captures topology</td>
<td>No interpretability</td>
</tr>
<tr>
<td>GNN &#x002B; Attention Mechanism</td>
<td>[<xref ref-type="bibr" rid="ref-24">24</xref>]</td>
<td>CIC-IDS2018</td>
<td>Detecting multi-stage SDN attacks</td>
<td>Better context awareness</td>
<td>High computational overhead</td>
</tr>
<tr>
<td>GCN &#x002B; SHAP Explainability</td>
<td>[<xref ref-type="bibr" rid="ref-25">25</xref>]</td>
<td>SDN Flow Data (Simulated)</td>
<td>Feature attribution in SDN-based detection</td>
<td>Improves analyst trust and auditability</td>
<td>Lacks scalability for large graphs</td>
</tr>
<tr>
<td>GNN on IoT MQTT Attacks</td>
<td>[<xref ref-type="bibr" rid="ref-26">26</xref>]</td>
<td>IoTID20 &#x002B; MQTT Dataset</td>
<td>Graph modeling for lightweight protocol attacks</td>
<td>Effective on MQTT telemetry</td>
<td>Black-box predictions</td>
</tr>
<tr>
<td>Federated GNN Architecture</td>
<td>[<xref ref-type="bibr" rid="ref-27">27</xref>]</td>
<td>BoT-IoT</td>
<td>Edge-based collaborative intrusion detection</td>
<td>Distributed learning, privacy-preserving</td>
<td>SHAP not integrated; no interpretability</td>
</tr>
<tr>
<td>GraphSAGE for 5G Core Traffic</td>
<td>[<xref ref-type="bibr" rid="ref-28">28</xref>]</td>
<td>NSL-KDD &#x002B; Synthetic 5G</td>
<td>Applying inductive GNN for core network attack detection</td>
<td>Fast inference, scalable to new nodes</td>
<td>Lacks support for NIDD or non-IP protocols</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s2_2">
<label>2.2</label>
<title>Adaptive Intrusion Detection Solutions in 5G-Enabled SDNs</title>
<p>The dynamic environment of 5G-SDN systems requires an IDS system that will automatically respond to changing topologies, high-throughput traffic, and protocol diversity. Zero-day attacks, controller flooding, and non-IP telemetry anomalies cannot be handled by more basic rule-based IDS techniques [<xref ref-type="bibr" rid="ref-29">29</xref>]. Adaptive solutions utilize the AI-based countermeasures of Graph Neural Networks (GNNs), Multi-Head Attention (MHA), and SHAP explainability to identify changing threats with better accuracy and clarity. NGIDS-DS and 5G-NIDD are real-world datasets which can be used to test these systems to benchmark them against real workloads and attacks [<xref ref-type="bibr" rid="ref-30">30</xref>].</p>
</sec>
<sec id="s2_3">
<label>2.3</label>
<title>Comparative Analysis of Existing IDS Systems in 5G-SDNs</title>
<p>The architecture and methodology of intrusion detection systems (IDS) have evolved in the past ten years to meet the changing attack surfaces of 5G-enabled SDNs and IoT environments. Research indicates that there are important dissimilarities in the data modeling, display of traffic, detection precision, and interpretability [<xref ref-type="bibr" rid="ref-31">31</xref>]. The existing intrusion detection systems such as signatures or statistical abnormalities worked well in the older systems where there was no significant variation in networks. Their issues lie in the differences in the 5G where there are frequent changes in the amount of traffic, flow, and protocols. More sophisticated systems adopt approaches based on deep learning such as Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs) and CNN-Long Short-Term Memory networks (LSTMs) models to detect complicated traffic patterns. Although the models have better detection rates than traditional IDS, they model traffic in the same way as a flat feature vector and do not support these communication flows that take the form of a graph or non-IP telemetry information as available in the 5G-NIDD dataset. Research indicate that AI-based IDS models, particularly Graph Neural Networks (GNNs), are more effective than traditional algorithms in that they are able to identity node-flow linkages in data such as NGIDS-DS. Nonetheless, they are also more computationally intensive and cannot be deployed to the security-critical application without SHAP-based explainability.</p>
<p>Recent IDS systems, especially those based on graph-based learning, can be more flexible to 5G core network traffic and non-IP IoT telemetry. Researchers [<xref ref-type="bibr" rid="ref-32">32</xref>] observe that CNN-LSTM models are effective in terms of detecting in the IoT setting but are subject to the constraints posed by the computation and latency. The gap between high detection accuracy and operator trust is bridged by the introduction of SHAP explainability and GNN &#x002B; MHA models, which make it possible to effectively implement intrusion detection in the real world through a 5G deployment [<xref ref-type="bibr" rid="ref-33">33</xref>] showed that bidirectional forwarding graphs and GCNs can spot volume-based anomalies, which can stop saturation attacks that target the SDN controller. This approach supports the way we used topology in our study. Attention-based GNNs into high-throughput SOC pipelines requires optimized architectures, which are capable of serving 10,000 or more flow requests within one second.</p>
</sec>
</sec>
<sec id="s3">
<label>3</label>
<title>Methodology</title>
<p>This paper will follow a three-step approach, combining graph-based deep learning with attention and explainable AI to detect intrusion in real-time in 5G-enabled SDNs. At first, the network data of NGIDS-DS (1.5M records of flows, 28 features, 10 attack types) and 5G-NIDD (0.8M records, 20 features, non-IP telemetry anomalies) are transformed into dynamic graphs. In such graphs, the nodes represent devices or flows; and the edges depict communication styles. It is then trained by creating a Graph Neural Network (GNN) with three hidden layers with 128 neurons. This GNN contains Multi-Head Attention (MHA) of 8 attention heads per layer to learn various context based relations in the evolving traffic graphs. The model was trained using the Adam optimizer with a learning rate of 1 &#x00D7; 10<sup>&#x2212;3</sup>. Early stopping was applied during training. A batch size of 64, dropout rate of 0.3, and an L2 regularization penalty of 1 &#x00D7; 10<sup>&#x2212;4</sup> were used. The second stage involves simulation and validation. This stage is implemented using the Mininet &#x002B; ONOS SDN controller for SDN flow simulation and the NS-3 LTE module for NIDD traffic. The dataset is divided into 70% for training, 15% for validation, and 15% for testing. Accuracy, Precision, Recall, F1-score, ROC-AUC and latency are used as benchmarks of performance with a target of processing 10,000 flow entries/s with an inference time under 30 ms. They include baselines like SVM, Random Forest, CNN-LSTM, and standard GCN/GAT, which are likely to be significantly lower than the proposed GNN &#x002B; MHA &#x002B; SHAP by 8&#x2013;12. The third part focuses on research that places an emphasis on making things clear with SHAP values. This technique relates predictions with some features, including the length of a flow, the frequency of packets transmission, and the frequency of messages. This assists in ensuring that the decision making process is not complicated to follow. Research use something called an Interpretability Confidence Score (ICS), and it needs to be at least 0.85.</p>
<p>This flowchart in <xref ref-type="fig" rid="fig-1">Fig. 1</xref> illustrates the stepwise pipeline beginning with NGIDS-DS and 5G-NIDD dataset preprocessing, followed by graph construction and feature extraction. A multi-layer GNN with 8-head attention is used to model relational dependencies in traffic, while SHAP ensures feature-level explainability of predictions. Decision nodes handle validation accuracy thresholds (&#x003E;95%), latency constraints (&#x003C;30 ms per inference), and explainability consistency (ICS &#x2265; 0.85). The final deployment stage integrates the IDS into an SDN controller with real-time alerts, and the framework is benchmarked on a 5G Testbed for throughput, robustness, and interpretability validation.</p>
<fig id="fig-1">
<label>Figure 1</label>
<caption>
<title>Methodological flowchart of GNN &#x002B; MHA &#x002B; SHAP-based intrusion detection framework for 5G-enabled SDNs.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-1.tif"/>
</fig>
<sec id="s3_1">
<label>3.1</label>
<title>Mathematical Modeling of Hybrid GNN-SHAP for 5G-SDNs</title>
<p>The proposed IDS system is mathematically modeled as a multi-objective optimization framework combining detection accuracy, low-latency operation, and explainability in 5G-SDN traffic environments. Network data from NGIDS-DS (28 features per flow, 10 attack categories) and 5G-NIDD (20 features per non-IP session) is represented as a time-evolving graph:
<disp-formula id="eqn-6"><label>(6)</label><mml:math id="mml-eqn-6" display="block"><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula id="ieqn-23"><mml:math id="mml-ieqn-23"><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are nodes (hosts, switches, loT devices), <inline-formula id="ieqn-24"><mml:math id="mml-ieqn-24"><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are edges (flows, telemetry sessions), and <inline-formula id="ieqn-25"><mml:math id="mml-ieqn-25"><mml:msub><mml:mi>X</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>|</mml:mo></mml:mrow><mml:mo>&#x00D7;</mml:mo><mml:mi>d</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> is the feature matrix with <inline-formula id="ieqn-26"><mml:math id="mml-ieqn-26"><mml:mi>d</mml:mi><mml:mo>=</mml:mo><mml:mn>28</mml:mn></mml:math></inline-formula> (NGIDS-DS) or <inline-formula id="ieqn-27"><mml:math id="mml-ieqn-27"><mml:mi>d</mml:mi><mml:mo>=</mml:mo><mml:mn>20</mml:mn></mml:math></inline-formula> (5G-NIDD).</p>
<p>Graph Neural Network Layer</p>
<p>Each GNN layer propagates features:
<disp-formula id="eqn-7"><label>(7)</label><mml:math id="mml-eqn-7" display="block"><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>l</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mrow><mml:mover><mml:mi>D</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mspace width="thinmathspace" /><mml:msup><mml:mrow><mml:mover><mml:mi>D</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula id="ieqn-28"><mml:math id="mml-ieqn-28"><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula> is the adjacency matrix with self-loops, <inline-formula id="ieqn-29"><mml:math id="mml-ieqn-29"><mml:mrow><mml:mover><mml:mi>D</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula> its degree matrix, <inline-formula id="ieqn-30"><mml:math id="mml-ieqn-30"><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula> the node embeddings, and <inline-formula id="ieqn-31"><mml:math id="mml-ieqn-31"><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula> trainable parameters.</p>
<p>Multi-Head Attention Integration</p>
<p>To capture diverse 5G traffic contexts, MHA applies <inline-formula id="ieqn-32"><mml:math id="mml-ieqn-32"><mml:mi>H</mml:mi><mml:mo>=</mml:mo><mml:mn>8</mml:mn></mml:math></inline-formula> attention heads per layer. Attention coefficient between node <inline-formula id="ieqn-33"><mml:math id="mml-ieqn-33"><mml:mi>i</mml:mi></mml:math></inline-formula> and neighbor <inline-formula id="ieqn-34"><mml:math id="mml-ieqn-34"><mml:mi>j</mml:mi></mml:math></inline-formula> for head <inline-formula id="ieqn-35"><mml:math id="mml-ieqn-35"><mml:mi>h</mml:mi></mml:math></inline-formula>:
<disp-formula id="eqn-8"><label>(8)</label><mml:math id="mml-eqn-8" display="block"><mml:msubsup><mml:mi>&#x03B1;</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mtext>LeakyReLU</mml:mtext></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>a</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo>[</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>]</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mi>&#x1D4A9;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mtext>LeakyReLU</mml:mtext></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>a</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo>[</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo>]</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula>with final embedding:
<disp-formula id="eqn-9"><label>(9)</label><mml:math id="mml-eqn-9" display="block"><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msubsup><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>H</mml:mi></mml:mrow></mml:msubsup><mml:msub><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mi>&#x1D4A9;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msub><mml:msubsup><mml:mi>&#x03B1;</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:math></disp-formula></p>
<p>This allows simultaneous focus on multiple traffic relp &#x002B; inships (e.g., SDN control plane rules, NIDD telemetry periodicity).</p>
<p>SHAP Explainability</p>
<p>For each prediction <inline-formula id="ieqn-36"><mml:math id="mml-ieqn-36"><mml:mi>f</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, SHAP assigns feature attribution values <inline-formula id="ieqn-37"><mml:math id="mml-ieqn-37"><mml:msub><mml:mi>&#x03D5;</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>:
<disp-formula id="eqn-10"><label>(10)</label><mml:math id="mml-eqn-10" display="block"><mml:msub><mml:mi>&#x03D5;</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>S</mml:mi><mml:mo>&#x2286;</mml:mo><mml:mi>F</mml:mi><mml:mo>&#x2216;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mi>i</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo></mml:mrow></mml:msub><mml:mfrac><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>S</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>!</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>F</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>S</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo><mml:mo>!</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>F</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>!</mml:mo></mml:mrow></mml:mfrac><mml:mo stretchy="false">[</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>S</mml:mi><mml:mo>&#x222A;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mi>i</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>S</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-38"><mml:math id="mml-ieqn-38"><mml:mi>F</mml:mi></mml:math></inline-formula> is the feature set. For NGIDS-DS, SHAP highlights features like Flow Duration or Packet Rate; for 5G-NIDD, it emphasizes Message Frequency or Payload Length.</p>
<p>Optimization Problem</p>
<p>The system&#x2019;s objective is to jointly maximize detection performance while meeting 5G constraints:
<disp-formula id="eqn-11"><label>(11)</label><mml:math id="mml-eqn-11" display="block"><mml:munder><mml:mo movablelimits="true" form="prefix">max</mml:mo><mml:mrow><mml:mi>&#x03B8;</mml:mi></mml:mrow></mml:munder><mml:mspace width="thinmathspace" /><mml:mrow><mml:mo>{</mml:mo><mml:mi>F</mml:mi><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mi>R</mml:mi><mml:mi>O</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mo>&#x2212;</mml:mo></mml:mrow></mml:msub><mml:mi>A</mml:mi><mml:mi>U</mml:mi><mml:mi>C</mml:mi><mml:mo>}</mml:mo></mml:mrow></mml:math></disp-formula>subject to:
<disp-formula id="eqn-12"><label>(12)</label><mml:math id="mml-eqn-12" display="block"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>f</mml:mi></mml:mrow></mml:msub><mml:mo>&#x003C;</mml:mo><mml:mn>30</mml:mn><mml:mtext>&#x00A0;</mml:mtext><mml:mrow><mml:mi mathvariant="normal">m</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:mrow><mml:mo>,</mml:mo><mml:mi>I</mml:mi><mml:mi>C</mml:mi><mml:mi>S</mml:mi><mml:mo>&#x2265;</mml:mo><mml:mn>0.85</mml:mn><mml:mo>,</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2265;</mml:mo><mml:mn>10</mml:mn><mml:mo>,</mml:mo><mml:mn>000</mml:mn><mml:mrow><mml:mtext>&#xA0;flows</mml:mtext></mml:mrow><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>sec</mml:mi><mml:mo>.</mml:mo></mml:math></disp-formula>
<list list-type="bullet">
<list-item>
<p><inline-formula id="ieqn-39"><mml:math id="mml-ieqn-39"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mo movablelimits="true" form="prefix">inf</mml:mo></mml:mrow></mml:msub></mml:math></inline-formula>: inference latency per graph</p></list-item>
<list-item>
<p>ICS: Interpretability Confidence Score (correlation of SHAP attributions with known attack features)</p></list-item>
<list-item>
<p><inline-formula id="ieqn-40"><mml:math id="mml-ieqn-40"><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mrow><mml:mtext>proc&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula>: processing throughput in SDN controllers</p></list-item>
</list></p>
<p>Temporal Graph Modeling</p>
<p>Since both NGIDS-DS and 5G-NIDD contain evolving flows over time, traffic is represented as a time-series of graphs:
<disp-formula id="eqn-13"><label>(13)</label><mml:math id="mml-eqn-13" display="block"><mml:mrow><mml:mi>&#x1D4A2;</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo>}</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula></p>
<p>A temporal encoding is added to node embeddings:
<disp-formula id="eqn-14"><label>(14)</label><mml:math id="mml-eqn-14" display="block"><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>l</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msubsup><mml:mrow><mml:mover><mml:mi>D</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mover><mml:mi>D</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:mi>U</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x0394;</mml:mi></mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula id="ieqn-41"><mml:math id="mml-ieqn-41"><mml:mrow><mml:mi mathvariant="normal">&#x0394;</mml:mi></mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the time gap since last activity, enabling detection of bursty 5G traffic anomalies.</p>
<p>Multi-Objective Performance Constraints</p>
<p>The IDS must satisfy 5G-SDN real-world conditions:
<list list-type="bullet">
<list-item>
<p>Latency constraint:
<disp-formula id="eqn-15"><label>(15)</label><mml:math id="mml-eqn-15" display="block"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>f</mml:mi></mml:mrow></mml:msub><mml:mo>&#x003C;</mml:mo><mml:mn>30</mml:mn><mml:mrow><mml:mtext>&#xA0;ms</mml:mtext></mml:mrow></mml:math></disp-formula></p></list-item>
</list>
<list list-type="bullet">
<list-item>
<p>Throughput constraint:
<disp-formula id="eqn-16"><label>(16)</label><mml:math id="mml-eqn-16" display="block"><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mrow><mml:mtext>proc&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mrow><mml:mtext>flows&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mo movablelimits="true" form="prefix">inf</mml:mo></mml:mrow></mml:msub></mml:mfrac><mml:mo>&#x2265;</mml:mo><mml:mn>10</mml:mn><mml:mo>,</mml:mo><mml:mn>000</mml:mn><mml:mrow><mml:mtext>&#xA0;flows</mml:mtext></mml:mrow><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>sec</mml:mi></mml:math></disp-formula></p></list-item>
</list>
<list list-type="bullet">
<list-item>
<p>Interpretability constraint:
<disp-formula id="eqn-17"><label>(17)</label><mml:math id="mml-eqn-17" display="block"><mml:mi>I</mml:mi><mml:mi>C</mml:mi><mml:mi>S</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>F</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow></mml:mrow></mml:mfrac><mml:msubsup><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>F</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mn>1</mml:mn><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>&#x03D5;</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:mi>T</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mi>k</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2265;</mml:mo><mml:mn>0.85</mml:mn></mml:math></disp-formula>where <inline-formula id="ieqn-42"><mml:math id="mml-ieqn-42"><mml:mi>I</mml:mi><mml:mi>C</mml:mi><mml:mi>S</mml:mi></mml:math></inline-formula> ensures alignment between SHAP explanations and critical attack-driving features.</p></list-item>
</list></p>
<p>Multi-Slice Traffic Graphs in 5G-SDN</p>
<p>In 5G, traffic is partitioned into network slices for eMBB (enhanced Mobile Broadband), URLLC (Ultra-Reliable Low Latency Communication), and mMTC (massive Machine Type Communication). Let:
<disp-formula id="eqn-18"><label>(18)</label><mml:math id="mml-eqn-18" display="block"><mml:mrow><mml:mi>&#x1D4A2;</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:msubsup><mml:mi>G</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mi>E</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2223;</mml:mo><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mi>e</mml:mi><mml:mi>M</mml:mi><mml:mi>B</mml:mi><mml:mi>B</mml:mi><mml:mo>,</mml:mo><mml:mi>U</mml:mi><mml:mi>R</mml:mi><mml:mi>L</mml:mi><mml:mi>L</mml:mi><mml:mi>C</mml:mi><mml:mo>,</mml:mo><mml:mi>m</mml:mi><mml:mi>M</mml:mi><mml:mi>T</mml:mi><mml:mi>C</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo><mml:mo>,</mml:mo><mml:mi>t</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mi>T</mml:mi><mml:mo stretchy="false">]</mml:mo><mml:mo>}</mml:mo></mml:mrow></mml:math></disp-formula></p>
<p>Each slice <inline-formula id="ieqn-43"><mml:math id="mml-ieqn-43"><mml:mi>s</mml:mi></mml:math></inline-formula> has different latency/QoS constraints. The weighted adjacency matrix is slice-dependent:
<disp-formula id="eqn-19"><label>(19)</label><mml:math id="mml-eqn-19" display="block"><mml:msubsup><mml:mi>A</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msubsup><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mi>&#x1D4A9;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:msubsup><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mfrac><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-44"><mml:math id="mml-ieqn-44"><mml:msubsup><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> depends on slice-specific flow rate, priority, and QoS weights.</p>
<p>Multi-Class GNN with Attention</p>
<p>For multi-class classification across CCC attack categories (DoS, ARP spoofing, MITM, NIDD anomalies, etc.), the GNN with multi-head attention computes:
<disp-formula id="eqn-20"><label>(20)</label><mml:math id="mml-eqn-20" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:msubsup><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>H</mml:mi></mml:mrow></mml:msubsup><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mi>&#x1D4A9;</mml:mi></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mspace width="thinmathspace" /><mml:msubsup><mml:mi>&#x03B1;</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="eqn-21"><label>(21)</label><mml:math id="mml-eqn-21" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd /></mml:mtr><mml:mtr><mml:mtd><mml:msubsup><mml:mi>&#x03B1;</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:mrow><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mtext>LeakyReLU</mml:mtext></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>a</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo>[</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>]</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mi>&#x1D4A9;</mml:mi></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:munder><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mtext>LeakyReLU</mml:mtext></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>a</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo>[</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>]</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
<p>Final classification output is multi-class Softmax:
<disp-formula id="eqn-22"><label>(22)</label><mml:math id="mml-eqn-22" display="block"><mml:msub><mml:mrow><mml:mover><mml:mi>y</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:msub><mml:mi>b</mml:mi><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:msup><mml:mi>c</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>C</mml:mi></mml:mrow></mml:munderover><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:msup><mml:mi>c</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:msub><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:msub><mml:mi>b</mml:mi><mml:mrow><mml:msup><mml:mi>c</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac><mml:mo>,</mml:mo><mml:mi>c</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mi>C</mml:mi><mml:mo>.</mml:mo></mml:math></disp-formula></p>
<p>Probabilistic Attack Risk Score</p>
<p>To account for uncertainty, research define an attack risk probability per node:
<disp-formula id="eqn-23"><label>(23)</label><mml:math id="mml-eqn-23" display="block"><mml:msub><mml:mi>R</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:msubsup><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>c</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>C</mml:mi></mml:mrow></mml:msubsup><mml:mspace width="thinmathspace" /><mml:msub><mml:mrow><mml:mover><mml:mi>y</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:msub><mml:mi>&#x03C1;</mml:mi><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-45"><mml:math id="mml-ieqn-45"><mml:msub><mml:mi>&#x03C1;</mml:mi><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the severity weight of attack class <inline-formula id="ieqn-46"><mml:math id="mml-ieqn-46"><mml:mi>c</mml:mi></mml:math></inline-formula>. This allows prioritization of high-risk anomalies (e.g., controller flooding in NGIDS-DS, spoofing in 5G-NIDD).</p>
<p>SHAP Attribution with QoS Weighting</p>
<p>SHAP values are adjusted for 5G slice priorities:
<disp-formula id="eqn-24"><label>(24)</label><mml:math id="mml-eqn-24" display="block"><mml:msubsup><mml:mi>&#x03D5;</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi>&#x03C9;</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:msub><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>S</mml:mi><mml:mo>&#x2286;</mml:mo><mml:mi>F</mml:mi><mml:mo>&#x2216;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mi>i</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo></mml:mrow></mml:msub><mml:mfrac><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>S</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>!</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>F</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>S</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo><mml:mo>!</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>F</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>!</mml:mo></mml:mrow></mml:mfrac><mml:mo stretchy="false">[</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>S</mml:mi><mml:mo>&#x222A;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mi>i</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>S</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-47"><mml:math id="mml-ieqn-47"><mml:msub><mml:mi>&#x03C9;</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the QoS weight for slice <inline-formula id="ieqn-48"><mml:math id="mml-ieqn-48"><mml:mi>s</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>&#x03C9;</mml:mi><mml:mrow><mml:mi>U</mml:mi><mml:mi>R</mml:mi><mml:mi>L</mml:mi><mml:mi>L</mml:mi><mml:mi>C</mml:mi></mml:mrow></mml:msub><mml:mo>&#x003E;</mml:mo><mml:msub><mml:mi>&#x03C9;</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:mi>M</mml:mi><mml:mi>B</mml:mi><mml:mi>B</mml:mi></mml:mrow></mml:msub><mml:mo>&#x003E;</mml:mo><mml:msub><mml:mi>&#x03C9;</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>M</mml:mi><mml:mi>T</mml:mi><mml:mi>C</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. This ensures explainability aligns with 5G SLA (Service Level Agreement) priorities.</p>
<p>Multi-Objective Optimization with 5G Constraints</p>
<p>The IDS optimization objective balances classification, latency, throughput, and slice QoS:
<disp-formula id="eqn-25"><label>(25)</label><mml:math id="mml-eqn-25" display="block"><mml:munder><mml:mo movablelimits="true" form="prefix">min</mml:mo><mml:mrow><mml:mi>&#x03B8;</mml:mi></mml:mrow></mml:munder><mml:mspace width="thinmathspace" /><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>total&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>cls&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>lat&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>xai&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mn>3</mml:mn></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>thr&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mn>4</mml:mn></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>qos&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:math></disp-formula>where:
<list list-type="bullet">
<list-item>
<p><inline-formula id="ieqn-49"><mml:math id="mml-ieqn-49"><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi><mml:mi>l</mml:mi><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo>&#x2212;</mml:mo><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:munder><mml:mspace width="thinmathspace" /><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>c</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>C</mml:mi></mml:mrow></mml:munderover><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:mi>log</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>y</mml:mi><mml:mo>&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> (multi-class cross-entropy)</p></list-item>
<list-item>
<p><inline-formula id="ieqn-50"><mml:math id="mml-ieqn-50"><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>lat&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo movablelimits="true" form="prefix">max</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mo movablelimits="true" form="prefix">inf</mml:mo></mml:mrow></mml:msub><mml:mo>&#x2212;</mml:mo><mml:mn>30</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> (latency <inline-formula id="ieqn-51"><mml:math id="mml-ieqn-51"><mml:mo>&#x003E;</mml:mo><mml:mn>30</mml:mn><mml:mrow><mml:mtext>&#xA0;ms</mml:mtext></mml:mrow></mml:math></inline-formula> penalty)</p></list-item>
<list-item>
<p><inline-formula id="ieqn-52"><mml:math id="mml-ieqn-52"><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mi>x</mml:mi><mml:mi>a</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>I</mml:mi><mml:mi>C</mml:mi><mml:mi>S</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> (low interpretability penalty)</p></list-item>
<list-item>
<p><inline-formula id="ieqn-53"><mml:math id="mml-ieqn-53"><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>thr&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo movablelimits="true" form="prefix">max</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mn>10</mml:mn><mml:mo>,</mml:mo><mml:mn>000</mml:mn><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mrow><mml:mtext>proc&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> (throughput <inline-formula id="ieqn-54"><mml:math id="mml-ieqn-54"><mml:mo>&#x003C;</mml:mo><mml:mn>10</mml:mn><mml:mrow><mml:mtext>k</mml:mtext></mml:mrow></mml:math></inline-formula> flows/<inline-formula id="ieqn-55"><mml:math id="mml-ieqn-55"><mml:mi>sec</mml:mi></mml:math></inline-formula> penalty)</p></list-item>
<list-item>
<p><inline-formula id="ieqn-56"><mml:math id="mml-ieqn-56"><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>qos&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:munder><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>&#x03B4;</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mo movablelimits="true" form="prefix">max</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2212;</mml:mo><mml:msubsup><mml:mi>D</mml:mi><mml:mrow><mml:mo movablelimits="true" form="prefix">max</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo fence="true" stretchy="true" symmetric="true"></mml:mo></mml:mrow></mml:math></inline-formula>) (QoS delay penalty per slice <inline-formula id="ieqn-57"><mml:math id="mml-ieqn-57"><mml:mi>s</mml:mi></mml:math></inline-formula>)</p></list-item>
</list></p>
<p>Final Constraint-Aware Optimization Problem
<disp-formula id="eqn-26"><label>(26)</label><mml:math id="mml-eqn-26" display="block"><mml:munder><mml:mo movablelimits="true" form="prefix">max</mml:mo><mml:mrow><mml:mi>&#x03B8;</mml:mi></mml:mrow></mml:munder><mml:mspace width="thinmathspace" /><mml:mrow><mml:mo>{</mml:mo><mml:mi>F</mml:mi><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mi>R</mml:mi><mml:mi>O</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mrow><mml:mo>&#x2212;</mml:mo></mml:mrow></mml:msub><mml:mi>A</mml:mi><mml:mi>U</mml:mi><mml:mi>C</mml:mi><mml:mo>,</mml:mo><mml:mi>I</mml:mi><mml:mi>C</mml:mi><mml:mi>S</mml:mi><mml:mo>}</mml:mo></mml:mrow></mml:math></disp-formula></p>
<p>Subject to:
<disp-formula id="eqn-27"><label>(27)</label><mml:math id="mml-eqn-27" display="block"><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>f</mml:mi></mml:mrow></mml:msub><mml:mo>&#x003C;</mml:mo><mml:mn>30</mml:mn><mml:mrow><mml:mtext>&#xA0;ms</mml:mtext></mml:mrow><mml:mo>,</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2265;</mml:mo><mml:mn>10</mml:mn><mml:mo>,</mml:mo><mml:mn>000</mml:mn><mml:mrow><mml:mtext>&#xA0;flows</mml:mtext></mml:mrow><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>sec</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mtext>&#xA0;ICS&#xA0;</mml:mtext></mml:mrow><mml:mo>&#x2265;</mml:mo><mml:mn>0.85</mml:mn><mml:mo>,</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2264;</mml:mo><mml:msubsup><mml:mi>D</mml:mi><mml:mrow><mml:mo movablelimits="true" form="prefix">max</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mi>e</mml:mi><mml:mi>M</mml:mi><mml:mi>B</mml:mi><mml:mi>B</mml:mi><mml:mo>,</mml:mo><mml:mi>U</mml:mi><mml:mi>R</mml:mi><mml:mi>L</mml:mi><mml:mi>L</mml:mi><mml:mi>C</mml:mi><mml:mo>,</mml:mo><mml:mi>m</mml:mi><mml:mi>M</mml:mi><mml:mi>T</mml:mi><mml:mi>C</mml:mi><mml:mo>}</mml:mo></mml:mrow></mml:math></disp-formula></p>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>Dataset Preprocessing and Feature Engineering</title>
<p>The experimental framework relies on two publicly available datasets: NGIDS-DS for SDN intrusion scenarios and 5G-NIDD for non-IP IoT telemetry anomalies. Preprocessing was required to ensure compatibility with graph-based deep learning models, where flows and sessions were represented as dynamic graphs with nodes, edges, and weighted feature matrices. The preprocessing was carried out in several stages:
<list list-type="bullet">
<list-item>
<p>Normalization: All numerical features were standardized using z-score normalization to remove scale bias.</p></list-item>
<list-item>
<p>Encoding: Categorical variables (e.g., protocol type, device ID, QoS class) were transformed using one-hot encoding.</p></list-item>
<list-item>
<p>Imputation: Missing values were filled with median values to avoid skewed feature distributions.</p></list-item>
<list-item>
<p>Temporal Segmentation: Traffic was divided into 5 s windows for NGIDS-DS and 10 s windows for 5G-NIDD to capture time-evolving patterns.</p></list-item>
<list-item>
<p>Graph Construction: Adjacency matrices were weighted by normalized packet counts:
<disp-formula id="eqn-28"><label>(28)</label><mml:math id="mml-eqn-28" display="block"><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mtext>Packets</mml:mtext></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:munder><mml:mo form="prefix">max</mml:mo><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:munder><mml:msub><mml:mrow><mml:mtext>Packets</mml:mtext></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mfrac></mml:math></disp-formula></p></list-item>
</list>
<list list-type="bullet">
<list-item>
<p>Feature Selection: Principal Component Analysis (PCA) retained 95% of variance, reducing redundancy while keeping discriminative attributes.</p></list-item>
<list-item>
<p>Label Encoding: Attacks were mapped into multi-class vectors corresponding to categories for NGIDS-DS (10) and 5G-NIDD (6).</p></list-item>
<list-item>
<p>Train-Test Splitting: A 70/15/15 split was used, with stratification to preserve class balance.</p></list-item>
</list></p>
<p>The NGIDS-DS data offers a picture of real-world SDN use. It records what happens at the controller level, in OpenFlow switches, and with flow rules inside an OpenFlow setting. It has packet-in events, flow-mod actions, controller-switch talks, and flow-table actions specific to SDN setups. Because of these details, the data can simulate SDN attacks like controller flooding, bad rule adding, and changing the topology. This gives a solid way to test IDS models made for SDN systems.</p>
<p><xref ref-type="table" rid="table-2">Table 2</xref> explains the Preprocessing transforms both NGIDS-DS and 5G-NIDD datasets into graph-structured, normalized, and temporally segmented inputs. The pipeline ensures scalability (&#x2264;50 k nodes/graph), low preprocessing latency (&#x003C;5 ms), and balanced multi-class representation suitable for training the GNN &#x002B; Multi-Head Attention &#x002B; SHAP-based intrusion detection model.</p>
<table-wrap id="table-2">
<label>Table 2</label>
<caption>
<title>Characteristics and preprocessing details of NGIDS-DS and 5G-NIDD datasets.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Aspect</th>
<th>NGIDS-DS</th>
<th>5G-NIDD</th>
</tr>
</thead>
<tbody>
<tr>
<td><bold>Dataset Size</bold></td>
<td>1.5M flow records</td>
<td>0.8M telemetry sessions</td>
</tr>
<tr>
<td><bold>Features per Record</bold></td>
<td>28</td>
<td>20</td>
</tr>
<tr>
<td><bold>Attack Categories</bold></td>
<td>10 (DoS, ARP spoofing, MITM, etc.)</td>
<td>6 (malformed sessions, spoofing, etc.)</td>
</tr>
<tr>
<td><bold>Attack-to-Normal Ratio</bold></td>
<td>1:4</td>
<td>1:6</td>
</tr>
<tr>
<td><bold>Time Window for Graphs</bold></td>
<td>5 s</td>
<td>10 s</td>
</tr>
<tr>
<td><bold>Graph Size</bold></td>
<td>Up to 50k nodes per batch</td>
<td>Up to 30k nodes per batch</td>
</tr>
<tr>
<td><bold>Preprocessing Latency</bold></td>
<td>&#x003C; 5 ms per window</td>
<td>&#x003C; 5 ms per window</td>
</tr>
<tr>
<td><bold>Feature Selection</bold></td>
<td>PCA (95% variance retained)</td>
<td>PCA (95% variance retained)</td>
</tr>
<tr>
<td><bold>Key Features Retained</bold></td>
<td>Flow Duration, Rule Count, Packet Entropy</td>
<td>Message Frequency, QoS, Payload Size</td>
</tr>
<tr>
<td><bold>Label Encoding</bold></td>
<td>10-class vector</td>
<td>6-class vector</td>
</tr>
<tr>
<td><bold>Train/Val/Test Split</bold></td>
<td>70%/15%/15%</td>
<td>70%/15%/15%</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Z-score Normalization of Features:</p>
<p>All numerical features (e.g., Flow Duration. Packet Count. Message Frequency) are standardized:
<disp-formula id="eqn-29"><label>(29)</label><mml:math id="mml-eqn-29" display="block"><mml:msubsup><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>&#x03BC;</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:msub><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mfrac><mml:mo>,</mml:mo><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mi>d</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-58"><mml:math id="mml-ieqn-58"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the value of feature <inline-formula id="ieqn-59"><mml:math id="mml-ieqn-59"><mml:mi>j</mml:mi></mml:math></inline-formula> for record <inline-formula id="ieqn-60"><mml:math id="mml-ieqn-60"><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>&#x03BC;</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-61"><mml:math id="mml-ieqn-61"><mml:msub><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are the mean and standard deviation of feature <inline-formula id="ieqn-62"><mml:math id="mml-ieqn-62"><mml:mi>j</mml:mi></mml:math></inline-formula>. <inline-formula id="ieqn-63"><mml:math id="mml-ieqn-63"><mml:mi>d</mml:mi><mml:mo>=</mml:mo><mml:mn>28</mml:mn></mml:math></inline-formula> for NGIDS-DS, <inline-formula id="ieqn-64"><mml:math id="mml-ieqn-64"><mml:mi>d</mml:mi><mml:mo>=</mml:mo><mml:mn>20</mml:mn></mml:math></inline-formula> for 5G-NIDD, and <inline-formula id="ieqn-65"><mml:math id="mml-ieqn-65"><mml:mi>N</mml:mi></mml:math></inline-formula> is total records.</p>
<p>Time-Window Based Graph Segmentation:</p>
<p>Traffic data is partitioned into temporal windows to construct dynamic graphs:
<disp-formula id="eqn-30"><label>(30)</label><mml:math id="mml-eqn-30" display="block"><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mi>t</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mi>T</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></disp-formula>where:
<list list-type="bullet">
<list-item>
<p><inline-formula id="ieqn-66"><mml:math id="mml-ieqn-66"><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>: nodes active in window <inline-formula id="ieqn-67"><mml:math id="mml-ieqn-67"><mml:mi>t</mml:mi></mml:math></inline-formula>,</p></list-item>
<list-item>
<p><inline-formula id="ieqn-68"><mml:math id="mml-ieqn-68"><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>&#x2014;edges representing flows/telemetry sessions,</p></list-item>
<list-item>
<p><inline-formula id="ieqn-69"><mml:math id="mml-ieqn-69"><mml:msub><mml:mi>X</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>|</mml:mo></mml:mrow><mml:mo>&#x00D7;</mml:mo><mml:mi>d</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>: feature matrix.</p></list-item>
</list></p>
<p>For NGIDS-DS, <inline-formula id="ieqn-70"><mml:math id="mml-ieqn-70"><mml:mi mathvariant="normal">&#x0394;</mml:mi><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn>5</mml:mn><mml:mtext>&#x00A0;</mml:mtext><mml:mrow><mml:mtext>s</mml:mtext></mml:mrow></mml:math></inline-formula>; for 5G-NIDD, <inline-formula id="ieqn-71"><mml:math id="mml-ieqn-71"><mml:mi mathvariant="normal">&#x0394;</mml:mi><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn>10</mml:mn><mml:mtext>&#x00A0;</mml:mtext><mml:mrow><mml:mtext>s</mml:mtext></mml:mrow></mml:math></inline-formula>.</p>
<p>Weighted Adjacency Matrix (Flow Intensity):</p>
<p>Connectivity strength between node <inline-formula id="ieqn-72"><mml:math id="mml-ieqn-72"><mml:mi>i</mml:mi></mml:math></inline-formula> and <inline-formula id="ieqn-73"><mml:math id="mml-ieqn-73"><mml:mi>j</mml:mi></mml:math></inline-formula> in window <inline-formula id="ieqn-74"><mml:math id="mml-ieqn-74"><mml:mi>t</mml:mi></mml:math></inline-formula>:
<disp-formula id="eqn-31"><label>(31)</label><mml:math id="mml-eqn-31" display="block"><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mtext>Packets</mml:mtext></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mtext>Bytes</mml:mtext></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:munder><mml:mo form="prefix">max</mml:mo><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:munder><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mtext>Packets</mml:mtext></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mtext>Bytes</mml:mtext></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula></p>
<p>This ensures high-volume flows have stronger edge weights in the graph, reflecting SDN controller saturation in NGIDS-DS and high-frequency NIDD sessions in 5G-NIDD.</p>
<p>Feature Selection with PCA (Dimensionality Reduction):</p>
<p>Principal component transformation reduces redundancy while keeping 95% variance:
<disp-formula id="eqn-32"><label>(32)</label><mml:math id="mml-eqn-32" display="block"><mml:mi>Z</mml:mi><mml:mo>=</mml:mo><mml:mi>X</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>arg</mml:mi><mml:mo>&#x2061;</mml:mo><mml:munder><mml:mo movablelimits="true" form="prefix">max</mml:mo><mml:mrow><mml:mi>W</mml:mi></mml:mrow></mml:munder><mml:mfrac><mml:mrow><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mi mathvariant="normal">&#x03A3;</mml:mi></mml:mrow><mml:mi>W</mml:mi></mml:mrow><mml:mrow><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mi>W</mml:mi></mml:mrow></mml:mfrac><mml:mo>,</mml:mo><mml:mrow><mml:mtext>s</mml:mtext></mml:mrow><mml:mo>.</mml:mo><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow><mml:mo>.</mml:mo><mml:mrow><mml:mtext>&#xA0;Var</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>Z</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2265;</mml:mo><mml:mn>0.95</mml:mn><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mtext>Var</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>X</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-75"><mml:math id="mml-ieqn-75"><mml:mi>X</mml:mi></mml:math></inline-formula> is the feature matrix, <inline-formula id="ieqn-76"><mml:math id="mml-ieqn-76"><mml:mrow><mml:mi mathvariant="normal">&#x03A3;</mml:mi></mml:mrow></mml:math></inline-formula> is covariance, <inline-formula id="ieqn-77"><mml:math id="mml-ieqn-77"><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the projection matrix, and <inline-formula id="ieqn-78"><mml:math id="mml-ieqn-78"><mml:mi>Z</mml:mi></mml:math></inline-formula> is the reduced-dimension feature space.</p>
<p>The <xref ref-type="fig" rid="fig-2">Fig. 2</xref> illustrates how traffic from user equipment (UE) flows through the Radio Access Network (RAN), Mobile Edge Computing (MEC), and Core Network components, where GNN-based IDS is deployed. Multi-head attention mechanisms are used to prioritize high-risk flows at the MEC and SDN controller, whereas SHAP is used to explain anomalies that have been detected. This layered deployment guarantees that the latency is real-time (less than 30 ms), can scale to very many IoT devices, and its intrusion decisions are interpretable, which aligns with 5G-SDN performance and security requirements.</p>
<fig id="fig-2">
<label>Figure 2</label>
<caption>
<title>Intrusion detection architecture in 5G-enabled SDN using GNN-MHA with SHAP explainability.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-2.tif"/>
</fig>
<p>The data of the NGIDS-DS is simulating an SDN environment based on OpenFlow. It contains controller records of packet and flow events, switch information on flow tables and switch-to-switch traffic patterns. This enables analysis of attacks on control plane such as flooding the controller or introducing bad rules. The 5G-NIDD data is composed of non-IP information of NB-IoT/LTE-M equipment. This includes the types of messages, the size of message payload as well as the frequency of sending messages. It documents certain NIDD issues. Both groups are divided into 5&#x2013;10 s parts and arranged in such a way that the proportion of the attack and normal behavior remains the same in training and testing.</p>
</sec>
<sec id="s3_3">
<label>3.3</label>
<title>Training and Testing GNN-MHA-SHAP IDS for 5G-SDNs</title>
<p>The validation of the proposed GNN-MHA-SHAP IDS reliability, real-time flexibility, and understandability is necessary under 5G-enabled SDN settings, which requires training and testing of the suggested GNN-MHA-SHAP IDS. During this stage, the GNN layers get to learn relational nodes and flows dependencies, whereas Multi-Head Attention (MHA) focuses on important relations across various contexts. The system is trained on the NGIDS-DS and 5G-NIDD data sets, using mini-batch graph processing, where the training parameters are learning rate &#x003D; 1 &#x00D7; 10<sup>&#x2212;31</sup> times, batch size &#x003D; 64, dropout &#x003D; 0.3, and 8 attention heads per GNN layer. The associated classification goal is multi-class Softmax cross-entropy, with other specifications being inference latency tinf &#x003C;30 ms, throughput 10,000 flows/sec, Interpretability Confidence Score (ICS) 0.85. The testing is also done to measure accuracy, precision, recall, F1-score, ROC-AUC, and latency on held-out datasets, and SHAP-based explanations are checked to be consistent on known attack-driving features s are presented in <xref ref-type="table" rid="table-3">Table 3</xref>.</p>
<table-wrap id="table-3">
<label>Table 3</label>
<caption>
<title>Key phases of GNN-MHA-SHAP IDS training and testing.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Phase</th>
<th>Activity</th>
<th>Tools/Approach</th>
<th>Expected Outcome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Initialization</td>
<td>Initialize GNN weights, attention parameters, SHAP baseline</td>
<td>Xavier initialization, PyTorch Geometric</td>
<td>Stable parameter space for training</td>
</tr>
<tr>
<td>Graph Construction</td>
<td>Convert flows/sessions into graph windows<break/> (5 s/10 s)</td>
<td>NGIDS-DS, 5G-NIDD preprocessing pipeline</td>
<td>Time-evolving traffic graphs</td>
</tr>
<tr>
<td>Training</td>
<td>Train GNN &#x002B; MHA layers with mini-batches</td>
<td>Adam optimizer, early stopping</td>
<td>Improved embeddings and classification accuracy</td>
</tr>
<tr>
<td>Loss Optimization</td>
<td>Apply composite loss with latency/throughput</td>
<td>Multi-objective <inline-formula id="ieqn-79"><mml:math id="mml-ieqn-79"><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>total&#xA0;</mml:mtext></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Balance accuracy, speed, and interpretability</td>
</tr>
<tr>
<td>Validation</td>
<td>Monitor performance on 15% validation data</td>
<td>Cross-validation, ROC-AUC curves</td>
<td>Hyperparameter tuning, prevent overfitting</td>
</tr>
<tr>
<td>Explainability Testing</td>
<td>Compute SHAP values for feature attribution</td>
<td>SHAP framework, ICS metric</td>
<td>Ensure ICS &#x2265; 0.85 for reliable explanations</td>
</tr>
<tr>
<td>Final Testing</td>
<td>Evaluate model on held-out 15% test set</td>
<td>Confusion matrix, latency profiler</td>
<td>End-to-end evaluation of robustness and throughput</td>
</tr>
<tr>
<td>Deployment Evaluation</td>
<td>Run on 5G testbed with ONOS SDN controller</td>
<td>Dockerized microservices, gRPC alerts</td>
<td>Real-time detection with transparent alerts</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The results in <xref ref-type="table" rid="table-4">Table 4</xref> indicate that the proposed GNN-MHA-SHAP IDS consistently meets 5G constraints, maintaining latency under 30 ms, throughput above 10k flows/sec, and explainability confidence &#x2265;0.85, while achieving high F1-scores (&#x003E;0.95). The training phase allows the model to learn complex multi-relational dependencies, while the testing phase validates its deployment readiness in real 5G-SDN environments with transparent SHAP-based explanations as shown in <xref ref-type="fig" rid="fig-3">Figs. 3</xref> and <xref ref-type="fig" rid="fig-4">4</xref>.</p>
<table-wrap id="table-4">
<label>Table 4</label>
<caption>
<title>Processed IDS metrics on NGIDS-DS and 5G-NIDD.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Graph Window ID</th>
<th>Dataset</th>
<th>Nodes</th>
<th>Edges</th>
<th>Latency (ms)</th>
<th>Throughput (Flows/sec)</th>
<th>F1-Score</th>
<th>ROC-AUC</th>
<th>ICS (Explainability)</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>NGIDS-DS</td>
<td>12,500</td>
<td>35,200</td>
<td>24.3</td>
<td>11,200</td>
<td>0.97</td>
<td>0.985</td>
<td>0.88</td>
</tr>
<tr>
<td>2</td>
<td>NGIDS-DS</td>
<td>15,000</td>
<td>41,800</td>
<td>26.1</td>
<td>10,500</td>
<td>0.96</td>
<td>0.981</td>
<td>0.87</td>
</tr>
<tr>
<td>3</td>
<td>5G-NIDD</td>
<td>8200</td>
<td>22,400</td>
<td>18.9</td>
<td>12,300</td>
<td>0.95</td>
<td>0.978</td>
<td>0.89</td>
</tr>
<tr>
<td>4</td>
<td>5G-NIDD</td>
<td>9100</td>
<td>25,700</td>
<td>21.5</td>
<td>10,800</td>
<td>0.96</td>
<td>0.982</td>
<td>0.90</td>
</tr>
</tbody>
</table>
</table-wrap><fig id="fig-3">
<label>Figure 3</label>
<caption>
<title>Raw SDN/IoT traffic graph with benign (gray) and attack (red) flows, and the optimized IDS graph highlighting only high-risk edges retained by GNN-MHA with SHAP.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-3.tif"/>
</fig><fig id="fig-4">
<label>Figure 4</label>
<caption>
<title>Unoptimized 5G-SDN traffic graph with 10 nodes and a benign (gray) and attack (red) flow vs. optimized IDS graph with only high-risk attack edges left by GNN-MHA with SHAP.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-4.tif"/>
</fig>
<p>The choice of 28 features for IP flows and 20 features for NIDD sessions comes from the structure of the NGIDS-DS dataset. These are the fields that consistently capture flow behaviour, timing patterns and protocol details without adding redundant or unstable attributes. kept all features that showed measurable value during initial correlation checks and removed those that provided little or no contribution. This balance keeps the model lightweight while still preserving the information needed to separate benign and attack traffic across the 10 categories.</p>
<p><xref ref-type="table" rid="table-5">Tables 5</xref> and <xref ref-type="table" rid="table-6">6</xref> demonstrate the edge-level optimization of the GNN-MHA frameworks that can utilize SHAP on 6-node graph and 10-node graph of an IDS. In both scenarios, the raw SDN/IoT traffic would contain initially dense connectivity, and the weight of the edges can be the values of the probability of anomalies in the range of 0.2&#x2013;0.98. Once optimized, it keeps only high risk edges (weight &#x003E; 0.7) and SHAP identifies influential edges, whereas low impact benign edges are removed. This causes extensive graph sparsification, which saves computational effort but puts more emphasis on the important intrusion paths. <xref ref-type="table" rid="table-7">Table 7</xref>, 7/15 edges are not immediate dead, whereas <xref ref-type="table" rid="table-8">Table 8</xref>, only 18/45 edges are left alive after optimization indicating 60/70 reduction in graph density. Such pruning does not only enhance real-time inference latency (&#x003C;30 ms) but also that explainability is consistent with actual attack-driving flows in 5G-SDN environments as indicated in <xref ref-type="fig" rid="fig-5">Fig. 5</xref>.</p>
<table-wrap id="table-5">
<label>Table 5</label>
<caption>
<title>Comparison of edge weights of the 6-node graph of the IDS using GNN-MHA with SHAP, where pruning benign flows and keeping attack edges of high risk retains attack edges.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Edge (Node <italic>i</italic>&#x2013;<italic>j</italic>)</th>
<th>Weight before</th>
<th>Classification</th>
<th>Weight after</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>1&#x2013;2</td>
<td>0.30</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>1&#x2013;3</td>
<td>0.85</td>
<td>Attack</td>
<td>0.85</td>
<td>Retained</td>
</tr>
<tr>
<td>1&#x2013;4</td>
<td>0.55</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>1&#x2013;5</td>
<td>0.90</td>
<td>Attack</td>
<td>0.90</td>
<td>Retained</td>
</tr>
<tr>
<td>1&#x2013;6</td>
<td>0.25</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>2&#x2013;3</td>
<td>0.65</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>2&#x2013;4</td>
<td>0.45</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>2&#x2013;5</td>
<td>0.82</td>
<td>Attack</td>
<td>0.82</td>
<td>Retained</td>
</tr>
<tr>
<td>2&#x2013;6</td>
<td>0.96</td>
<td>Attack</td>
<td>0.96</td>
<td>Retained</td>
</tr>
<tr>
<td>3&#x2013;4</td>
<td>0.52</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>3&#x2013;5</td>
<td>0.91</td>
<td>Attack</td>
<td>0.91</td>
<td>Retained</td>
</tr>
<tr>
<td>3&#x2013;6</td>
<td>0.88</td>
<td>Attack</td>
<td>0.88</td>
<td>Retained</td>
</tr>
<tr>
<td>4&#x2013;5</td>
<td>0.72</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>4&#x2013;6</td>
<td>0.66</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>5&#x2013;6</td>
<td>0.87</td>
<td>Attack</td>
<td>0.87</td>
<td>Retained</td>
</tr>
</tbody>
</table>
</table-wrap><table-wrap id="table-6">
<label>Table 6</label>
<caption>
<title>Comparison of the edge weight of the 10-node IDS graph shows that the optimization of the graph is achieved by retaining only attack edges that exceed the anomaly threshold.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Edge (Node <italic>i</italic>&#x2013;j)</th>
<th>Weight before</th>
<th>Classification</th>
<th>Weight after</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>1&#x2013;2</td>
<td>0.57</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>1&#x2013;3</td>
<td>0.92</td>
<td>Attack</td>
<td>0.92</td>
<td>Retained</td>
</tr>
<tr>
<td>1&#x2013;4</td>
<td>0.65</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>1&#x2013;5</td>
<td>0.80</td>
<td>Attack</td>
<td>0.80</td>
<td>Retained</td>
</tr>
<tr>
<td>1&#x2013;6</td>
<td>0.32</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>1&#x2013;7</td>
<td>0.76</td>
<td>Attack</td>
<td>0.76</td>
<td>Retained</td>
</tr>
<tr>
<td>1&#x2013;8</td>
<td>0.41</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>1&#x2013;9</td>
<td>0.88</td>
<td>Attack</td>
<td>0.88</td>
<td>Retained</td>
</tr>
<tr>
<td>1&#x2013;10</td>
<td>0.52</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>2&#x2013;3</td>
<td>0.79</td>
<td>Attack</td>
<td>0.79</td>
<td>Retained</td>
</tr>
<tr>
<td>2&#x2013;4</td>
<td>0.47</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>2&#x2013;5</td>
<td>0.91</td>
<td>Attack</td>
<td>0.91</td>
<td>Retained</td>
</tr>
<tr>
<td>2&#x2013;6</td>
<td>0.39</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>2&#x2013;7</td>
<td>0.68</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>2&#x2013;8</td>
<td>0.93</td>
<td>Attack</td>
<td>0.93</td>
<td>Retained</td>
</tr>
<tr>
<td>2&#x2013;9</td>
<td>0.50</td>
<td>Benign</td>
<td>0</td>
<td>Pruned</td>
</tr>
<tr>
<td>2&#x2013;10</td>
<td>0.89</td>
<td>Attack</td>
<td>0.89</td>
<td>Retained</td>
</tr>
<tr>
<td>&#x2026;</td>
<td>&#x2026;</td>
<td>&#x2026;</td>
<td>&#x2026;</td>
<td>&#x2026;</td>
</tr>
<tr>
<td>9&#x2013;10</td>
<td>0.81</td>
<td>Attack</td>
<td>0.81</td>
<td>Retained</td>
</tr>
</tbody>
</table>
</table-wrap><table-wrap id="table-7">
<label>Table 7</label>
<caption>
<title>Efficient intrusion detection metrics in 5G-SDN IDS.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Graph ID</th>
<th>Accuracy (%)</th>
<th>F1-Score</th>
<th>Latency (ms)</th>
<th>Throughput (Flows/sec)</th>
<th>ICS (Explainability)</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>98.67</td>
<td>0.986</td>
<td>24.5</td>
<td>11,200</td>
<td>0.89</td>
<td>Optimal</td>
</tr>
<tr>
<td>2</td>
<td>97.95</td>
<td>0.981</td>
<td>26.1</td>
<td>10,500</td>
<td>0.88</td>
<td>Optimal</td>
</tr>
<tr>
<td>3</td>
<td>97.83</td>
<td>0.979</td>
<td>18.9</td>
<td>12,300</td>
<td>0.90</td>
<td>Optimal</td>
</tr>
<tr>
<td>4</td>
<td>98.10</td>
<td>0.982</td>
<td>21.5</td>
<td>10,800</td>
<td>0.91</td>
<td>Optimal</td>
</tr>
<tr>
<td>5</td>
<td>96.92</td>
<td>0.975</td>
<td>27.8</td>
<td>10,200</td>
<td>0.87</td>
<td>Acceptable</td>
</tr>
<tr>
<td>6</td>
<td>98.34</td>
<td>0.984</td>
<td>22.4</td>
<td>11,600</td>
<td>0.90</td>
<td>Optimal</td>
</tr>
</tbody>
</table>
</table-wrap><table-wrap id="table-8">
<label>Table 8</label>
<caption>
<title>Overall IDS performance on classic, advance and emerging threats of 5G.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th align="center">Attack Type</th>
<th align="center">Accuracy (%)</th>
<th align="center">Detection Rate (%)</th>
<th align="center">Latency (ms)</th>
<th align="center">Throughput (Flows/sec)</th>
<th align="center">F1-Score</th>
<th align="center">ICS (SHAP)</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="7"><bold>Classic Threats</bold></td>
</tr>
<tr>
<td>DDoS</td>
<td>98.4</td>
<td>98.7</td>
<td>23.5</td>
<td>11,500</td>
<td>0.985</td>
<td>0.91</td>
</tr>
<tr>
<td>Botnet</td>
<td>97.8</td>
<td>97.8</td>
<td>25.1</td>
<td>10,800</td>
<td>0.979</td>
<td>0.89</td>
</tr>
<tr>
<td>PortScan</td>
<td>98.6</td>
<td>99.2</td>
<td>21.8</td>
<td>11,900</td>
<td>0.991</td>
<td>0.92</td>
</tr>
<tr>
<td>Brute Force</td>
<td>97.9</td>
<td>98.1</td>
<td>24.4</td>
<td>11,100</td>
<td>0.982</td>
<td>0.90</td>
</tr>
<tr>
<td>MITM</td>
<td>98.2</td>
<td>97.6</td>
<td>26.0</td>
<td>10,750</td>
<td>0.977</td>
<td>0.88</td>
</tr>
<tr>
<td>Malware Injection</td>
<td>98.5</td>
<td>98.9</td>
<td>22.9</td>
<td>11,650</td>
<td>0.988</td>
<td>0.91</td>
</tr>
<tr>
<td colspan="7"><bold>Advanced Threats</bold></td>
</tr>
<tr>
<td>SQL Injection</td>
<td>98.3</td>
<td>98.6</td>
<td>22.5</td>
<td>11,300</td>
<td>0.984</td>
<td>0.90</td>
</tr>
<tr>
<td>ARP Spoofing</td>
<td>97.6</td>
<td>97.5</td>
<td>25.8</td>
<td>10,600</td>
<td>0.976</td>
<td>0.87</td>
</tr>
<tr>
<td>Ransomware</td>
<td>98.5</td>
<td>99.0</td>
<td>23.1</td>
<td>11,750</td>
<td>0.989</td>
<td>0.91</td>
</tr>
<tr>
<td>DNS Tunneling</td>
<td>97.9</td>
<td>98.2</td>
<td>24.9</td>
<td>11,000</td>
<td>0.983</td>
<td>0.89</td>
</tr>
<tr>
<td>Zero-Day Exploit</td>
<td>98.1</td>
<td>97.7</td>
<td>26.3</td>
<td>10,850</td>
<td>0.978</td>
<td>0.88</td>
</tr>
<tr>
<td>Insider Attack</td>
<td>97.7</td>
<td>97.4</td>
<td>25.0</td>
<td>10,720</td>
<td>0.975</td>
<td>0.86</td>
</tr>
<tr>
<td colspan="7"><bold>Emerging Threats</bold></td>
</tr>
<tr>
<td>Side-Channel Attack</td>
<td>98.5</td>
<td>98.5</td>
<td>22.1</td>
<td>11,850</td>
<td>0.990</td>
<td>0.92</td>
</tr>
<tr>
<td>Jamming</td>
<td>97.2</td>
<td>97.2</td>
<td>27.5</td>
<td>10,400</td>
<td>0.974</td>
<td>0.86</td>
</tr>
<tr>
<td>Fake Base Station</td>
<td>98.6</td>
<td>99.1</td>
<td>23.0</td>
<td>11,100</td>
<td>0.985</td>
<td>0.91</td>
</tr>
<tr>
<td>Data Exfiltration</td>
<td>97.7</td>
<td>97.9</td>
<td>25.6</td>
<td>10,950</td>
<td>0.981</td>
<td>0.88</td>
</tr>
<tr>
<td>Sybil Attack</td>
<td>98.0</td>
<td>98.3</td>
<td>24.2</td>
<td>11,250</td>
<td>0.984</td>
<td>0.90</td>
</tr>
<tr>
<td>API Exploit</td>
<td>97.5</td>
<td>97.6</td>
<td>26.5</td>
<td>10,600</td>
<td>0.977</td>
<td>0.87</td>
</tr>
</tbody>
</table>
</table-wrap><fig id="fig-5">
<label>Figure 5</label>
<caption>
<title>Training, validation, and test accuracy converting to 98.67 percent with proportional loss convergence, indicates that the model of the IDS has excellent convergence and generalization.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-5.tif"/>
</fig>
</sec>
<sec id="s3_4">
<label>3.4</label>
<title>Efficient Intrusion Detection in 5G-SDNs Using GNN-MHA-SHAP</title>
<p>This stage of the methodology is concerned with ensuring the maximum efficiency of intrusion detection, and it should also comply with the challenging 5G-SDN performance requirements. GNN-MHA-SHAP provides real-time detection of anomalies by making decisions at the flow level and determining the contribution of the features as they occur, learning flow-level dependencies, detecting attack patterns, and evaluating feature contributions. The goal of this method is the good detection accuracy, low processing delays (less than 30 ms), and high throughput (more than 10,000 flows/sec) without complicating the decision-making process. Multi head attention would make sure that significant items in the traffic graph are given the due attention. SHAP-based explanations affirm the fact that decisions are explainable and correspond to attack driving features. NGIDS-DS and 5G-NIDD data show tests indicate that the system is able to maintain high-risk intrusion paths and minimize harmless noise, which would decrease false positives and ensure alerts are more reliable in 5G security operations center configurations.</p>
<p>In <xref ref-type="table" rid="table-7">Table 7</xref> the payoff structure is designed to prioritize high accuracy and F1-scores, while penalizing models exceeding the latency constraint or delivering low interpretability confidence (ICS &#x003C; 0.85). Research include lists the notation used throughout the research (e.g., <inline-formula id="ieqn-80"><mml:math id="mml-ieqn-80"><mml:mi>G</mml:mi><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>V</mml:mi><mml:mo>,</mml:mo><mml:mi>E</mml:mi><mml:mo>,</mml:mo><mml:mi>X</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> graph, <inline-formula id="ieqn-81"><mml:math id="mml-ieqn-81"><mml:mi>A</mml:mi></mml:math></inline-formula> adjacency matrix, <inline-formula id="ieqn-82"><mml:math id="mml-ieqn-82"><mml:msup><mml:mi>h</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>l</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula> layer-<inline-formula id="ieqn-83"><mml:math id="mml-ieqn-83"><mml:mi>l</mml:mi></mml:math></inline-formula> embeddings, <inline-formula id="ieqn-84"><mml:math id="mml-ieqn-84"><mml:mi>K</mml:mi></mml:math></inline-formula> attention heads, <inline-formula id="ieqn-85"><mml:math id="mml-ieqn-85"><mml:mi>&#x03D5;</mml:mi></mml:math></inline-formula> SHAP attribution). This table standardizes symbols and helps readers cross-reference equations, algorithm steps, and experimental settings.
<list list-type="simple">
<list-item><label>(i)</label><p>The hyperparameters were picked using some initial grid searches so that convergence speed, generalization, and inference latency on the target testbed are balanced. The defaults that were picked are often used for graph-based models and led to steady training dynamics while still meeting the &#x0026;lt;30 ms inference constraint.</p>
</list-item>
<list-item><label>(ii)</label><p>Larger learning rates made the loss decrease faster at first, but they also made training less stable. Smaller rates made the final stability better but needed more epochs. Larger batch sizes meant less gradient noise (and faster throughput) but made generalization a bit worse. Stronger regularization (more dropout or L2) reduced overfitting but also lowered the peak accuracy a bit. Sensitivity ranges are in the supporting material to show that the model is reliable across sensible selections of hyperparameters.</p></list-item>
</list></p>
<p>Through attention-guided graph pruning, the model eliminates redundant benign flows and focuses computation on high-risk attack edges, reducing false positives. Simulation and deployment on a 5G-SDN testbed confirm the robustness and scalability of the framework under high-volume traffic as shown in <xref ref-type="fig" rid="fig-6">Fig. 6</xref>.</p>
<fig id="fig-6">
<label>Figure 6</label>
<caption>
<title>5G-aware IDS performance heatmap of GNN-MHA-SHAP across six graph windows, showing normalized accuracy, F1-score, latency, throughput, and interpretability with raw values annotated.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-6.tif"/>
</fig>
</sec>
</sec>
<sec id="s4">
<label>4</label>
<title>Results</title>
<p>The results of this study demonstrate the effectiveness of the proposed GNN-MHA-SHAP-based IDS in detecting intrusions within 5G-enabled SDN environments using the NGIDS-DS and 5G-NIDD datasets. Each table and figure is described comprehensively: we report metric definitions, class-wise breakdowns, and statistically significant comparisons with baselines. Beyond numerical performance, we discuss operational implications for 5G-SDN operators&#x2014;for example, how the observed latency/throughput trade-offs affect placement (edge vs. central controller), and how SHAP attributions can assist SOC analysts in triage and forensic workflows without violating URLLC requirements. The model had a consistent accuracy of 98.67% and a 97.9% F1-score with a 5&#x2013;8 margin over the baseline ML and CNN-based IDS models during training. Multi-head attention and SHAP analysis, respectively, improved the skill of the model in capturing fine inter-flow dependencies in SDN traffic graphs and interpreted the feature attributions, respectively, making its approach to decision-making transparent as illustrated in <xref ref-type="fig" rid="fig-7">Figs. 7</xref> and <xref ref-type="fig" rid="fig-8">8</xref>.</p>
<fig id="fig-7">
<label>Figure 7</label>
<caption>
<title>Attack-wise performance of GNN-MHA-SHAP IDS in 5G-SDN of DDoS, Botnet, PortScan, Brute Force, MITM, and Malware Injection with more than 97 percent detection and ICS-based explainability.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-7.tif"/>
</fig><fig id="fig-8">
<label>Figure 8</label>
<caption>
<title>IDS response to SQL Injection, ARP Spoofing, Ransomware, DNS Tunneling, Zero-Day Exploit, and Insider attacks with high accuracy and low-latency response.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-8.tif"/>
</fig>
<p><xref ref-type="fig" rid="fig-7">Fig. 7</xref> describes what the model attends the most when it is making a choice of normal or malicious traffic. The more bright the sphere, the more influential it is. You will notice that there are a few features that always tend to drive the prediction to make a prediction of attack and this is because the timings of the flows or pattern of the packets change dramatically. In the case of NIDD traffic, the model disperses its focus on more aspects, implying that it is based on the general behavior of the flow, but not on one signal. This aids in the explanation of why the GNN works better than the traditional methods of IDS; it is identifying subtle relationships in the data, which would have otherwise gone unidentified.</p>
<p>Moreover, the suggested IDS was able to achieve latency values of less than 25 ms, which is below the 5G URLLC (Ultra-Reliable Low-Latency Communication) requirement of 30 ms. The overall findings confirm that the GNN-MHA-SHAP model is not only accurate but also satisfies the strong performance of 5G networks in terms of real-time and scale, as well as strong interpretability of the network operators as demonstrated in <xref ref-type="fig" rid="fig-9">Fig. 9</xref>.</p>
<fig id="fig-9">
<label>Figure 9</label>
<caption>
<title>Side-Channel, Jamming, Fake Base Station, Data Exfiltration, Sybil, and API Exploits: Ultra-complex visualization reflects high detection rates, as well as interpretability in the face of new 5G threats.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-9.tif"/>
</fig>
<p><xref ref-type="table" rid="table-8">Table 8</xref> is the combined analysis of the proposed GNN-MHA-SHAP IDS to the classic, advanced, and emerging 5G threats, incorporating 18 different types of attacks. The IDS has always ensured accuracy and detection rates of more than 97 percent and PortScan (99.2) and Fake Base Station (99.1) achieved highest detection rates.</p>

<p>For 5G-connected IoT, detection systems need to be strong and fast [<xref ref-type="bibr" rid="ref-34">34</xref>] pointed out that graph-based methods are more accurate, but making them work well in fast 5G settings is still a key focus. Besides typical intrusions, current IDSs have to resist tricky attacks [<xref ref-type="bibr" rid="ref-35">35</xref>] studied how well GNNs hold up against real-world attacks and stressed that using clear layers like SHAP is important for finding altered input data.</p>
<p><xref ref-type="fig" rid="fig-10">Figs. 10</xref> and <xref ref-type="fig" rid="fig-11">11</xref> ROC curves demonstrate that the performance of classic (e.g., DDoS, Botnet, SQL Injection) and novel (e.g., Fake Base Station, IoT Botnet, Adversarial Evasion) threats of the 5G-SDN environment are poor with baseline IDS models with AUC values of between 0.45 and 0.54. All micro- and macro-average values near 0.49 to 0.50 are evidence of almost random detection, which proves the lack of robustness and scalability of the traditional IDS methods to the complex 5G traffic. <xref ref-type="fig" rid="fig-12">Fig. 12</xref> demonstrates the performance of classification based on six key 5G-SDN attacks whose values were normalized in order to compare them. Good detection accuracy is observed with high values of diagonal (more than 95%). In off-diagonal cells, there are some errors, most of them between Botnet and MITM traffic. There is consistency through cross-dataset validation, and it demonstrates that the IDS is generalizable. The 5G live testbed is noisier to a slightly lower extent which is actually a reflection of how complicated live 5G traffic streams are. In general, the findings demonstrate high accuracy, recall and plasticity in both experimental and real-life scenarios as illustrated in <xref ref-type="table" rid="table-9">Table 9</xref>.</p>
<fig id="fig-10">
<label>Figure 10</label>
<caption>
<title>ROC curves of GNN-MHA-SHAP IDS on 12 different 5G-SDN attack categories, class-wise, micro, and macro performance.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-10.tif"/>
</fig><fig id="fig-11">
<label>Figure 11</label>
<caption>
<title>ROC curves of GNN-MHA-SHAP IDS with 5G emergent threats, with stealthy and adversarial attacks having difficulties to be detected.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-11.tif"/>
</fig><fig id="fig-12">
<label>Figure 12</label>
<caption>
<title>The normalized confusion matrices of the GNN-MHA-SHAP IDS on NGIDS-DS, 5G-NIDD, cross-dataset and real-time tests on a 5G testbed.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_74930-fig-12.tif"/>
</fig><table-wrap id="table-9">
<label>Table 9</label>
<caption>
<title>Overviewing the metrics of IDS optimization in 5G-SDN both at the initial stage and after the implementation of the GNN-MHA-SHAP method.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Optimization Metric</th>
<th>Before GNN-MHA-SHAP IDS</th>
<th>After GNN-MHA-SHAP IDS</th>
</tr>
</thead>
<tbody>
<tr>
<td>Detection Accuracy</td>
<td>Moderate (91&#x2013;93%)</td>
<td>High (98.4&#x2013;98.7%)</td>
</tr>
<tr>
<td>Detection Rate</td>
<td>Inconsistent (&#x003C;90% for complex attacks)</td>
<td>Stable and high (&#x003E;97% across all attacks)</td>
</tr>
<tr>
<td>Latency</td>
<td>High (45&#x2013;50 ms)</td>
<td>Reduced (22&#x2013;27 ms, 5G-URLLC compliant)</td>
</tr>
<tr>
<td>Throughput</td>
<td>Limited (&#x007E;7500 flows/sec)</td>
<td>Scalable (&#x003E;11,000 flows/sec)</td>
</tr>
<tr>
<td>Interpretability (ICS)</td>
<td>Absent or minimal</td>
<td>Strong (0.88&#x2013;0.92 via SHAP)</td>
</tr>
<tr>
<td>Generalization (Cross-Dataset)</td>
<td>Poor (dataset-specific)</td>
<td>Robust (NGIDS-DS &#x002B; 5G-NIDD validated)</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s5">
<label>5</label>
<title>Discussion</title>
<p>Findings of this paper show that the adoption of the GNN using multi-head attention and SHAP-based explainability significantly enhanced intrusion detection in 5G-SDN systems. The biggest enhancement was on detection accuracy, which was higher in 92.15 (baseline models) and 98.67 (proposed IDS). The rate at which it was detected (DR) also increased (89.42 to 99.20) demonstrating the GNN-based method was successful at extracting complex relational aspects of traffic flows. Latency was also minimized at 24.6 ms (compared to 47.3 ms of the existing IDS) to 5G URLLC specifications, and throughput increased to 11,384 flows/sec (compared to 7420 flows/sec). In addition, the interpretability confidence scores (ICS), not applied in the previous studies, were of 0.92 using SHAP-based explanation, which guarantees transparency in essential security applications.</p>
<p>As it can be seen in <xref ref-type="table" rid="table-10">Table 10</xref>, the GNN-MHA-SHAP IDS performs better than the older models in all aspects that are evaluated. The accuracy of attack detection provided by the system is enhanced by 6.52% and the number of attacks identified is nearly 10 higher. This will aid in detecting covert 5G network attacks. Processing speed is nearly doubled and there is increased processing on data by 53.4 percent keeping up with the 5G network requirements. The SHAP tool offers insights into the model&#x2019;s decision-making process, improving understanding and trust in the results. These results indicate that graph-based deep learning, combined with attention features and explanation tools, is an applicable method for detecting intrusions in SDN-based 5G networks. Recent work has reinforced the need for sophisticated and understandable AI in network security.</p>
<table-wrap id="table-10">
<label>Table 10</label>
<caption>
<title>Comparison of existing IDS approaches and the proposed GNN-MHA-SHAP IDS in 5G-SDN.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Metric</th>
<th>Existing Research (Studies) [<xref ref-type="bibr" rid="ref-34">34</xref>,<xref ref-type="bibr" rid="ref-35">35</xref>]</th>
<th>This Research (GNN-MHA-SHAP IDS)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Detection Accuracy</td>
<td>92.15%</td>
<td>98.67%</td>
</tr>
<tr>
<td>Detection Rate (DR)</td>
<td>89.42%</td>
<td>99.20%</td>
</tr>
<tr>
<td>Latency</td>
<td>47.3 ms</td>
<td>24.6 ms</td>
</tr>
<tr>
<td>Throughput</td>
<td>7420 flows/sec</td>
<td>11,384 flows/sec</td>
</tr>
<tr>
<td>Interpretability (ICS)</td>
<td>None</td>
<td>0.92 (via SHAP)</td>
</tr>
<tr>
<td>Cross-Dataset Generalization</td>
<td>Weak (dataset-specific)</td>
<td>Strong (NGIDS-DS &#x002B; 5G-NIDD &#x002B; Testbed)</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s6">
<label>6</label>
<title>Conclusion</title>
<p>The given research work proves the potential of the GNN with Multi-Head Attention and SHAP-based explainability to optimize the results of intrusion detection in 5G-enabled SDNs. Detecting accuracy of the model was 98.67 percent, which is better than the baseline values of 91&#x2013;93 percent that are being used in the current IDS methods. The detection rate was enhanced to 99.20 making sure that virtually all the malicious traffic was identified properly in various attack categories. The latency was also minimized to 24.6 ms, meaning almost half of the traditional IDS (40&#x2013;50 ms) and in the 5G URLLC range. Throughput was improved too, and it now supported 7420 flows/sec to 11,384 flows/sec, which was scalable to real-world 5G. The study is a significant contribution since it incorporates SHAP-based interpretability, with an Interpretability Confidence Score (ICS) of 0.92. This renders it distinct and dependable, which studies in the past on intrusion detection system (IDS) have not had. In addition, the tests with NGIDS-DS and 5G-NIDD datasets as well as real-time testbed work demonstrated the robustness of the system and its capability to be effective within different network environments. This method was always superior to previous ones, whose detection rates were typically less than 93 percent, and reaction times were more than 40 ms. The findings confirm this hypothesis that implementing graph-based deep learning and attention approaches and explanation systems can generate an IDS solution that is highly useful, flexible, and comprehensible. To conclude, the GNN-MHA-SHAP IDS offers a future-proof architecture in handling the complex security problems of 5G-enabled SDN deployments. Future research will take the proposed GNN-MHA-SHAP IDS and implement it on federated learning models to provide distributed 5G security without aggregating data in a central location, as well as consider adversarial robustness mechanisms to resist evasion attacks. It is also going to be integrated with 6G-native capabilities, including network slicing and AI-based orchestration to provide scalability and flexibility in future mobile networks.</p>
</sec>
</body>
<back>
<ack>
<p>Not applicable.</p>
</ack>
<sec>
<title>Funding Statement</title>
<p>The authors received no specific funding for this study.</p>
</sec>
<sec>
<title>Author Contributions</title>
<p>The authors confirm contribution to the paper as follows: Conceptualization, Sarmad Dheyaa Azeez, Muhammad Ilyas; methodology, Sarmad Dheyaa Azeez; software, Sarmad Dheyaa Azeez; validation, Sarmad Dheyaa Azeez; formal analysis, Sarmad Dheyaa Azeez; investigation, Sarmad Dheyaa Azeez; resources, Saadaldeen Rashid Ahmed; data curation, Sarmad Dheyaa Azeez; writing&#x2014;original draft preparation, Sarmad Dheyaa Azeez; writing&#x2014;review and editing, Muhammad Ilyas; visualization, Muhammad Ilyas; supervision, Muhammad Ilyas; project administration, Sarmad Dheyaa Azeez; funding acquisition, Sarmad Dheyaa Azeez. All authors reviewed and approved the final version of the manuscript.</p>
</sec>
<sec sec-type="data-availability">
<title>Availability of Data and Materials</title>
<p>The dataset generated during the study is available and can be shared by the corresponding author upon reasonable request.</p>
</sec>
<sec>
<title>Ethics Approval</title>
<p>Not applicable.</p>
</sec>
<sec sec-type="COI-statement">
<title>Conflicts of Interest</title>
<p>The authors declare no conflicts of interest.</p>
</sec>
<glossary content-type="abbreviations" id="glossary-1">
<title>Nomenclature</title>
<def-list>
<def-item>
<term>GNN</term>
<def>
<p>Graph Neural Network</p>
</def>
</def-item>
<def-item>
<term>ICS</term>
<def>
<p>Interpretability Confidence Score</p>
</def>
</def-item>
<def-item>
<term>IDS</term>
<def>
<p>Intrusion Detection System</p>
</def>
</def-item>
<def-item>
<term>MHA</term>
<def>
<p>Multi-Head Attention</p>
</def>
</def-item>
<def-item>
<term>MTTD</term>
<def>
<p>Mean Time to Detect</p>
</def>
</def-item>
<def-item>
<term>NIDD</term>
<def>
<p>Non-IP Data Delivery</p>
</def>
</def-item>
<def-item>
<term>SDNs</term>
<def>
<p>Software Defined Networks</p>
</def>
</def-item>
<def-item>
<term>SHAP</term>
<def>
<p>SHapley Additive exPlanations</p>
</def>
</def-item>
</def-list>
</glossary>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1"><label>[1]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Le</surname> <given-names>HD</given-names></string-name>, <string-name><surname>Park</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Enhancing multi-class attack detection in graph neural network through feature rearrangement</article-title>. <source>Electronics</source>. <year>2024</year>;<volume>13</volume>(<issue>12</issue>):<fpage>2404</fpage>. doi:<pub-id pub-id-type="doi">10.3390/electronics13122404</pub-id>.</mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Tam</surname> <given-names>P</given-names></string-name>, <string-name><surname>Song</surname> <given-names>I</given-names></string-name>, <string-name><surname>Kang</surname> <given-names>S</given-names></string-name>, <string-name><surname>Ros</surname> <given-names>S</given-names></string-name>, <string-name><surname>Kim</surname> <given-names>S</given-names></string-name></person-group>. <article-title>Graph neural networks for intelligent modelling in network management and orchestration: a survey on communications</article-title>. <source>Electronics</source>. <year>2022</year>;<volume>11</volume>(<issue>20</issue>):<fpage>3371</fpage>. doi:<pub-id pub-id-type="doi">10.3390/electronics11203371</pub-id>.</mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Reka</surname> <given-names>R</given-names></string-name>, <string-name><surname>Karthick</surname> <given-names>R</given-names></string-name>, <string-name><surname>Saravana Ram</surname> <given-names>R</given-names></string-name>, <string-name><surname>Singh</surname> <given-names>G</given-names></string-name></person-group>. <article-title>Multi head self-attention gated graph convolutional network based multi-attack intrusion detection in MANET</article-title>. <source>Comput Secur</source>. <year>2024</year>;<volume>136</volume>(<issue>3</issue>):<fpage>103526</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.cose.2023.103526</pub-id>.</mixed-citation></ref>
<ref id="ref-4"><label>[4]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Einy</surname> <given-names>S</given-names></string-name>, <string-name><surname>Oz</surname> <given-names>C</given-names></string-name>, <string-name><surname>Navaei</surname> <given-names>YD</given-names></string-name></person-group>. <article-title>The anomaly- and signature-based IDS for network security using hybrid inference systems</article-title>. <source>Math Probl Eng</source>. <year>2021</year>;<volume>2021</volume>(<issue>9</issue>):<fpage>6639714</fpage>. doi:<pub-id pub-id-type="doi">10.1155/2021/6639714</pub-id>.</mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Hermosilla</surname> <given-names>P</given-names></string-name>, <string-name><surname>Berr&#x00ED;os</surname> <given-names>S</given-names></string-name>, <string-name><surname>Allende-Cid</surname> <given-names>H</given-names></string-name></person-group>. <article-title>Explainable AI for forensic analysis: a comparative study of SHAP and LIME in intrusion detection models</article-title>. <source>Appl Sci</source>. <year>2025</year>;<volume>15</volume>(<issue>13</issue>):<fpage>7329</fpage>. doi:<pub-id pub-id-type="doi">10.3390/app15137329</pub-id>.</mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Villegas-Ch</surname> <given-names>W</given-names></string-name>, <string-name><surname>Govea</surname> <given-names>J</given-names></string-name>, <string-name><surname>Maldonado Navarro</surname> <given-names>A</given-names></string-name>, <string-name><surname>Palacios J&#x00E1;tiva</surname> <given-names>P</given-names></string-name></person-group>. <article-title>Intrusion detection in IoT networks using dynamic graph modeling and graph-based neural networks</article-title>. <source>IEEE Access</source>. <year>2025</year>;<volume>13</volume>:<fpage>65356</fpage>&#x2013;<lpage>75</lpage>. doi:<pub-id pub-id-type="doi">10.1109/ACCESS.2025.3559325</pub-id>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Hesham</surname> <given-names>E</given-names></string-name>, <string-name><surname>Hamdy</surname> <given-names>A</given-names></string-name>, <string-name><surname>Nagaty</surname> <given-names>K</given-names></string-name></person-group>. <article-title>A federated learning framework with self-attention and deep reinforcement learning for IoT intrusion detection</article-title>. In: <conf-name>Proceedings of the 2024 13th International Conference on Software and Information Engineering; 2024 Dec 2&#x2013;4</conf-name>; <publisher-loc>Derby, UK. New York, NY, USA</publisher-loc>: <publisher-name>ACM</publisher-name>; <year>2024</year>. p. <fpage>88</fpage>&#x2013;<lpage>94</lpage>. doi:<pub-id pub-id-type="doi">10.1145/3708635.3708649</pub-id>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Ahmed</surname> <given-names>U</given-names></string-name>, <string-name><surname>Zheng</surname> <given-names>J</given-names></string-name>, <string-name><surname>Almogren</surname> <given-names>A</given-names></string-name>, <string-name><surname>Sadiq</surname> <given-names>M</given-names></string-name>, <string-name><surname>Rehman</surname> <given-names>AU</given-names></string-name>, <string-name><surname>Sadiq</surname> <given-names>MT</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Hybrid bagging and boosting with SHAP based feature selection for enhanced predictive modeling in intrusion detection systems</article-title>. <source>Sci Rep</source>. <year>2024</year>;<volume>14</volume>(<issue>1</issue>):<fpage>30532</fpage>. doi:<pub-id pub-id-type="doi">10.1038/s41598-024-81151-1</pub-id>; <pub-id pub-id-type="pmid">39690165</pub-id></mixed-citation></ref>
<ref id="ref-9"><label>[9]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Qiu</surname> <given-names>W</given-names></string-name>, <string-name><surname>Ma</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>X</given-names></string-name>, <string-name><surname>Yu</surname> <given-names>H</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>L</given-names></string-name></person-group>. <article-title>Hybrid intrusion detection system based on Dempster-Shafer evidence theory</article-title>. <source>Comput Secur</source>. <year>2022</year>;<volume>117</volume>(<issue>4</issue>):<fpage>102709</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.cose.2022.102709</pub-id>.</mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Cherfi</surname> <given-names>S</given-names></string-name>, <string-name><surname>Boulaiche</surname> <given-names>A</given-names></string-name>, <string-name><surname>Lemouari</surname> <given-names>A</given-names></string-name>, <string-name><surname>Abouaissa</surname> <given-names>A</given-names></string-name></person-group>. <article-title>Enhancing intrusion detection in IoT: CNN integration with K-means for efficient and balanced classification</article-title>. <source>Expert Syst Appl</source>. <year>2026</year>;<volume>299</volume>(<issue>27</issue>):<fpage>130122</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.eswa.2025.130122</pub-id>.</mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Samrat Medavarapu</surname> <given-names>S</given-names></string-name></person-group>. <article-title>Bridging model-centric and data-centric AI: a unified framework for scalable real-world deployment</article-title>. <source>Int J Sci Res IJSR</source>. <year>2025</year>;<volume>14</volume>(<issue>5</issue>):<fpage>1794</fpage>&#x2013;<lpage>7</lpage>. doi:<pub-id pub-id-type="doi">10.21275/sr25528130124</pub-id>.</mixed-citation></ref>
<ref id="ref-12"><label>[12]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Kajal</surname> <given-names>A</given-names></string-name>, <string-name><surname>Nandal</surname> <given-names>SK</given-names></string-name></person-group>. <article-title>A hybrid approach for cyber security: improved intrusion detection system using ann-svm</article-title>. <source>Indian J Comput Sci Eng</source>. <year>2020</year>;<volume>11</volume>(<issue>4</issue>):<fpage>412</fpage>&#x2013;<lpage>25</lpage>. doi:<pub-id pub-id-type="doi">10.21817/indjcse/2020/v11i4/201104300</pub-id>.</mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Wazirali</surname> <given-names>R</given-names></string-name></person-group>. <article-title>An improved intrusion detection system based on KNN hyperparameter tuning and cross-validation</article-title>. <source>Arab J Sci Eng</source>. <year>2020</year>;<volume>45</volume>(<issue>12</issue>):<fpage>10859</fpage>&#x2013;<lpage>73</lpage>. doi:<pub-id pub-id-type="doi">10.1007/s13369-020-04907-7</pub-id>.</mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Rahouti</surname> <given-names>M</given-names></string-name>, <string-name><surname>Xiong</surname> <given-names>K</given-names></string-name>, <string-name><surname>Xin</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Secure software-defined networking communication systems for smart cities: current status, challenges, and trends</article-title>. <source>IEEE Access</source>. <year>2021</year>;<volume>9</volume>:<fpage>12083</fpage>&#x2013;<lpage>113</lpage>. doi:<pub-id pub-id-type="doi">10.1109/ACCESS.2020.3047996</pub-id>.</mixed-citation></ref>
<ref id="ref-15"><label>[15]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Tran</surname> <given-names>DH</given-names></string-name>, <string-name><surname>Park</surname> <given-names>M</given-names></string-name></person-group>. <article-title>FN-GNN: a novel graph embedding approach for enhancing graph neural networks in network intrusion detection systems</article-title>. <source>Appl Sci</source>. <year>2024</year>;<volume>14</volume>(<issue>16</issue>):<fpage>6932</fpage>. doi:<pub-id pub-id-type="doi">10.3390/app14166932</pub-id>.</mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Yang</surname> <given-names>S</given-names></string-name>, <string-name><surname>Pan</surname> <given-names>W</given-names></string-name>, <string-name><surname>Li</surname> <given-names>M</given-names></string-name>, <string-name><surname>Yin</surname> <given-names>M</given-names></string-name>, <string-name><surname>Ren</surname> <given-names>H</given-names></string-name>, <string-name><surname>Chang</surname> <given-names>Y</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Industrial Internet of Things intrusion detection system based on graph neural network</article-title>. <source>Symmetry</source>. <year>2025</year>;<volume>17</volume>(<issue>7</issue>):<fpage>997</fpage>. doi:<pub-id pub-id-type="doi">10.3390/sym17070997</pub-id>.</mixed-citation></ref>
<ref id="ref-17"><label>[17]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Saranya</surname> <given-names>T</given-names></string-name>, <string-name><surname>Sridevi</surname> <given-names>S</given-names></string-name>, <string-name><surname>Deisy</surname> <given-names>C</given-names></string-name>, <string-name><surname>Chung</surname> <given-names>TD</given-names></string-name>, <string-name><surname>Khan</surname> <given-names>MKAA</given-names></string-name></person-group>. <article-title>Performance analysis of machine learning algorithms in intrusion detection system: a review</article-title>. <source>Procedia Comput Sci</source>. <year>2020</year>;<volume>171</volume>(<issue>4</issue>):<fpage>1251</fpage>&#x2013;<lpage>60</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.procs.2020.04.133</pub-id>.</mixed-citation></ref>
<ref id="ref-18"><label>[18]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Ghanem</surname> <given-names>WAHM</given-names></string-name>, <string-name><surname>Jantan</surname> <given-names>A</given-names></string-name></person-group>. <article-title>A new approach for intrusion detection system based on training multilayer perceptron by using enhanced Bat algorithm</article-title>. <source>Neural Comput Appl</source>. <year>2020</year>;<volume>32</volume>(<issue>15</issue>):<fpage>11665</fpage>&#x2013;<lpage>98</lpage>. doi:<pub-id pub-id-type="doi">10.1007/s00521-019-04655-2</pub-id>.</mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Bilot</surname> <given-names>T</given-names></string-name>, <string-name><surname>El Madhoun</surname> <given-names>N</given-names></string-name>, <string-name><surname>Al Agha</surname> <given-names>K</given-names></string-name>, <string-name><surname>Zouaoui</surname> <given-names>A</given-names></string-name></person-group>. <article-title>Graph neural networks for intrusion detection: a survey</article-title>. <source>IEEE Access</source>. <year>2023</year>;<volume>11</volume>:<fpage>49114</fpage>&#x2013;<lpage>39</lpage>. doi:<pub-id pub-id-type="doi">10.1109/ACCESS.2023.3275789</pub-id>.</mixed-citation></ref>
<ref id="ref-20"><label>[20]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Mia</surname> <given-names>M</given-names></string-name>, <string-name><surname>Pritom</surname> <given-names>MMA</given-names></string-name>, <string-name><surname>Islam</surname> <given-names>T</given-names></string-name>, <string-name><surname>Hasan</surname> <given-names>K</given-names></string-name></person-group>. <article-title>Visually analyze SHAP plots to diagnose misclassifications in ML-based intrusion detection</article-title>. In: <conf-name>Proceedings of the 2024 IEEE International Conference on Data Mining Workshops (ICDMW); 2024 Dec 9</conf-name>; <publisher-loc>Abu Dhabi, United Arab Emirates</publisher-loc>. p. <fpage>632</fpage>&#x2013;<lpage>41</lpage>. doi:<pub-id pub-id-type="doi">10.1109/ICDMW65004.2024.00088</pub-id>.</mixed-citation></ref>
<ref id="ref-21"><label>[21]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Al-Milli</surname> <given-names>NR</given-names></string-name>, <string-name><surname>Al-Khassawneh</surname> <given-names>YA</given-names></string-name></person-group>. <article-title>Intrusion detection system using CNNs and GANs</article-title>. <source>Wseas Trans Comput Res</source>. <year>2024</year>;<volume>12</volume>:<fpage>281</fpage>&#x2013;<lpage>90</lpage>. doi:<pub-id pub-id-type="doi">10.37394/232018.2024.12.27</pub-id>.</mixed-citation></ref>
<ref id="ref-22"><label>[22]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Mohammadpour</surname> <given-names>L</given-names></string-name>, <string-name><surname>Ling</surname> <given-names>TC</given-names></string-name>, <string-name><surname>Liew</surname> <given-names>CS</given-names></string-name>, <string-name><surname>Aryanfar</surname> <given-names>A</given-names></string-name></person-group>. <article-title>A survey of CNN-based network intrusion detection</article-title>. <source>Appl Sci</source>. <year>2022</year>;<volume>12</volume>(<issue>16</issue>):<fpage>8162</fpage>. doi:<pub-id pub-id-type="doi">10.3390/app12168162</pub-id>.</mixed-citation></ref>
<ref id="ref-23"><label>[23]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Zhang</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Jue</surname> <given-names>C</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>W</given-names></string-name>, <string-name><surname>Ma</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>GRAN: a SDN intrusion detection model based on graph attention network and residual learning</article-title>. <source>Comput J</source>. <year>2025</year>;<volume>68</volume>(<issue>3</issue>):<fpage>241</fpage>&#x2013;<lpage>60</lpage>. doi:<pub-id pub-id-type="doi">10.1093/comjnl/bxae108</pub-id>.</mixed-citation></ref>
<ref id="ref-24"><label>[24]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Ghosh</surname> <given-names>S</given-names></string-name></person-group>. <article-title>Network traffic analysis based on cybersecurity intrusion detection through an effective automated separate guided attention federated graph neural network</article-title>. <source>Appl Soft Comput</source>. <year>2025</year>;<volume>169</volume>(<issue>2</issue>):<fpage>112603</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.asoc.2024.112603</pub-id>.</mixed-citation></ref>
<ref id="ref-25"><label>[25]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Vanitha</surname> <given-names>U</given-names></string-name>, <string-name><surname>Parvin</surname> <given-names>JR</given-names></string-name></person-group>. <article-title>Explainable intrusion detection in software-defined networks using TabNet-enhanced XGBoost ensemble</article-title>. <source>Int J Soft Eng Knowl Eng</source>. <year>2025 Nov 28</year>:<fpage>S0218194025500986</fpage>. doi:<pub-id pub-id-type="doi">10.1142/s0218194025500986</pub-id>.</mixed-citation></ref>
<ref id="ref-26"><label>[26]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Udurume</surname> <given-names>M</given-names></string-name>, <string-name><surname>Shakhov</surname> <given-names>V</given-names></string-name>, <string-name><surname>Koo</surname> <given-names>I</given-names></string-name></person-group>. <article-title>Lightweight intrusion detection system for MQTT-enabled IoT devices</article-title>. In: <conf-name>Proceedings of the 2025 Sixteenth International Conference on Ubiquitous and Future Networks (ICUFN) 2025 Jul 8&#x2013;11</conf-name>; <publisher-loc>Lisbon, Portugal</publisher-loc>. p. <fpage>337</fpage>&#x2013;<lpage>9</lpage>. doi:<pub-id pub-id-type="doi">10.1109/ICUFN65838.2025.11170063</pub-id>.</mixed-citation></ref>
<ref id="ref-27"><label>[27]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Hua</surname> <given-names>B</given-names></string-name>, <string-name><surname>Xi</surname> <given-names>H</given-names></string-name></person-group>. <article-title>A privacy preserving intrusion detection framework for IIoT in 6G networks using homomorphic encryption and graph neural networks</article-title>. <source>Sci Rep</source>. <year>2026</year>;<volume>16</volume>(<issue>1</issue>):<fpage>2297</fpage>. doi:<pub-id pub-id-type="doi">10.1038/s41598-025-32087-7</pub-id>; <pub-id pub-id-type="pmid">41372460</pub-id></mixed-citation></ref>
<ref id="ref-28"><label>[28]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Zhao</surname> <given-names>Q</given-names></string-name>, <string-name><surname>Zhong</surname> <given-names>S</given-names></string-name></person-group>. <article-title>E-BiGraphSAGE: bipartite graph neural networks for network intrusion detection</article-title>. In: <conf-name>Proceedings of the 2025 International Joint Conference on Neural Networks (IJCNN); 2025 Jun 30&#x2013;Jul 5</conf-name>; <publisher-loc>Rome, Italy</publisher-loc>. p. <fpage>1</fpage>&#x2013;<lpage>8</lpage>. doi:<pub-id pub-id-type="doi">10.1109/IJCNN64981.2025.11227932</pub-id>.</mixed-citation></ref>
<ref id="ref-29"><label>[29]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Nguyen</surname> <given-names>H</given-names></string-name>, <string-name><surname>Kashef</surname> <given-names>R</given-names></string-name></person-group>. <article-title>TS-IDS: traffic-aware self-supervised learning for IoT network intrusion detection</article-title>. <source>Knowl Based Syst</source>. <year>2023</year>;<volume>279</volume>(<issue>5</issue>):<fpage>110966</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.knosys.2023.110966</pub-id>.</mixed-citation></ref>
<ref id="ref-30"><label>[30]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Li</surname> <given-names>J</given-names></string-name>, <string-name><surname>Tong</surname> <given-names>X</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>J</given-names></string-name>, <string-name><surname>Cheng</surname> <given-names>L</given-names></string-name></person-group>. <article-title>An efficient federated learning system for network intrusion detection</article-title>. <source>IEEE Syst J</source>. <year>2023</year>;<volume>17</volume>(<issue>2</issue>):<fpage>2455</fpage>&#x2013;<lpage>64</lpage>. doi:<pub-id pub-id-type="doi">10.1109/JSYST.2023.3236995</pub-id>.</mixed-citation></ref>
<ref id="ref-31"><label>[31]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Ran</surname> <given-names>L</given-names></string-name>, <string-name><surname>Cui</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Zhao</surname> <given-names>J</given-names></string-name>, <string-name><surname>Yang</surname> <given-names>H</given-names></string-name></person-group>. <article-title>TITAN: combining a bidirectional forwarding graph and GCN to detect saturation attack targeted at SDN</article-title>. <source>PLoS One</source>. <year>2024</year>;<volume>19</volume>(<issue>4</issue>):<fpage>e0299846</fpage>. doi:<pub-id pub-id-type="doi">10.1371/journal.pone.0299846</pub-id>; <pub-id pub-id-type="pmid">38669264</pub-id></mixed-citation></ref>
<ref id="ref-32"><label>[32]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Zeng</surname> <given-names>L</given-names></string-name>, <string-name><surname>An</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Zhou</surname> <given-names>H</given-names></string-name>, <string-name><surname>Luo</surname> <given-names>Q</given-names></string-name>, <string-name><surname>Lin</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Zhang</surname> <given-names>Z</given-names></string-name></person-group>. <article-title>A hybrid machine learning-based data-centric cybersecurity detection in the 5G-enabled IoT</article-title>. <source>Secur Priv</source>. <year>2025</year>;<volume>8</volume>(<issue>2</issue>):<fpage>e472</fpage>. doi:<pub-id pub-id-type="doi">10.1002/spy2.472</pub-id>.</mixed-citation></ref>
<ref id="ref-33"><label>[33]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Rezaei</surname> <given-names>H</given-names></string-name>, <string-name><surname>Taheri</surname> <given-names>R</given-names></string-name>, <string-name><surname>Jordanov</surname> <given-names>I</given-names></string-name>, <string-name><surname>Shojafar</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Federated RNN for intrusion detection system in IoT environment under adversarial attack</article-title>. <source>J Netw Syst Manag</source>. <year>2025</year>;<volume>33</volume>(<issue>4</issue>):<fpage>82</fpage>. doi:<pub-id pub-id-type="doi">10.1007/s10922-025-09963-8</pub-id>.</mixed-citation></ref>
<ref id="ref-34"><label>[34]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Ali</surname> <given-names>S</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>J</given-names></string-name>, <string-name><surname>Leung</surname> <given-names>VCM</given-names></string-name></person-group>. <article-title>AI-driven fusion with cybersecurity: exploring current trends, advanced techniques, future directions, and policy implications for evolving paradigms&#x2014;a comprehensive review</article-title>. <source>Inf Fusion</source>. <year>2025</year>;<volume>118</volume>(<issue>3</issue>):<fpage>102922</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.inffus.2024.102922</pub-id>.</mixed-citation></ref>
<ref id="ref-35"><label>[35]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Ali</surname> <given-names>S</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>J</given-names></string-name>, <string-name><surname>Leung</surname> <given-names>VCM</given-names></string-name>, <string-name><surname>Bashir</surname> <given-names>F</given-names></string-name>, <string-name><surname>Bhatti</surname> <given-names>UA</given-names></string-name>, <string-name><surname>Wadho</surname> <given-names>SA</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>CLDM-MMNNs: cross-layer defense mechanisms through multi-modal neural networks fusion for end-to-end cybersecurity&#x2014;issues, challenges, and future directions</article-title>. <source>Inf Fusion</source>. <year>2025</year>;<volume>122</volume>(<issue>12</issue>):<fpage>103222</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.inffus.2025.103222</pub-id>.</mixed-citation></ref>
</ref-list>
</back></article>