arXiv:2609.05701cs.CRSep 2026

Manuscript Offprint

arXiv:2609.05701

XAI-SDN: An Explainable Entropy-Guided Machine Learning Framework for Real-Time DDoS Detection in Software Defined Networks

Adeel Ahmad, Ali Akarma, Ahmad Ali, Hammad Muneer, Toqeer Ali Syed

Adeel Ahmad¹*, Ali Akarma¹,², Ahmad Ali¹, Hammad Muneer³ and Toqeer Ali Syed¹

¹AI Center, Faculty of Computer and Information System, Islamic University of Madinah, Saudi Arabia

²AI V&V Lab, King Fahd University of Petroleum and Minerals, Dhahran, Saudi Arabia

³Department of Computer Science, Islamia University of Bahawalpur, Pakistan

*Corresponding author: 443057803@stu.iu.edu.sa

Abstract—One of the biggest risks faced by Software Defined Networks (SDN) is the Distributed Denial of Service (DDoS) attack in which a compromised controller can make an entire network unusable. To address these challenges, we suggest an entropy-guided machine learning framework, called XAI-SDN, for real-time DDoS detection in SDN environments which is lightweight and explainable. The framework extends the flow features extracted by CICFlowMeter with eight Shannon entropy metrics obtained by an O(1)\mathcal{O}(1) rolling algorithm and uses a Random Forest classifier with SHAP TreeExplainer for providing transparency at the prediction level. On a fixed temporal split, XAI-SDN achieves an accuracy of 99.9987%, a macro F1-score of 99.9621%, and an AUC-ROC of 1.0000 on the full 3.59 million flows of the CIC-DDoS2019 SYN benchmark. The pipeline sustains 0.0165 ms per flow (60,606 flows/s) without the use of SHAP and 0.5122 ms per flow (1,953 flows/s) with full support of SHAP under the 99.14% prevalence of DDoS traffic, which is a step towards achieving a balance between the detection performance and operational transparency in next-generation SDN security.

Index Terms—DDoS Detection, Software Defined Networks, Explainable AI, Shannon Entropy, Random Forest, SHAP, Network Security

I. INTRODUCTION

Software Defined Networking (SDN) separates the data plane from the control plane, establishing centralized, programmatic management through a dedicated network controller [1], [2]. Enterprise data centers and cloud infrastructures widely adopt this architecture for its flexibility, global visibility, and dynamic traffic engineering. However, centralization introduces a single point of failure: a successful Distributed Denial of Service (DDoS) attack targeting the controller or saturating the control channel can render the entire network inoperable.

Modern DDoS attacks execute high-volume flooding through UDP amplification, TCP SYN floods, ICMP sweeps, and application-layer disruptions such as HTTP floods [3]. Machine learning (ML) has emerged as the primary defense against these threats due to its strong generalization compared to static signature tables. Nevertheless, most ML models operate as opaque black boxes that offer no explanation for individual predictions. This lack of transparency presents se-

vere operational risks in production networks, where operators must audit and validate mitigation decisions before disrupting active services [4]. Trustworthy cybersecurity frameworks establish that transparency, explainability, and verifiable decision trails are foundational governance requirements for deploying autonomous AI in critical infrastructure [5].

We propose a lightweight, interpretable and real-time DDoS detection framework, XAI-SDN, in this paper. The main contributions are: (i) an entropy-guided feature augmentation approach enriching CICFlowMeter features with eight interpretable Shannon entropy metrics via an O(1)\mathcal{O}(1) rolling algorithm, (ii) an explainability-integrated pipeline pairing Random Forest with SHAP TreeExplainer for granular transparency, (iii) an empirical evaluation across 3.59 million flows of the CIC-DDoS2019 SYN dataset with a 10-seed ablation study and Wilcoxon signed-rank tests, and (iv) a latency analysis characterizing SHAP explanation overhead under realistic DDoS traffic prevalence.

References (21)