An Explainable XGBoost-Based Framework for DDoS Attack Detection Using Machine Learning and SHAP Analysis
Keywords:
Distributed Denial-of-Service (DDoS), Intrusion Detection System, XGBoost, Explainable Artificial Intelligence, SHAP, Network Traffic Classification, CIC-DDoS2019, Cloud SecurityAbstract
The increasing dependence on cloud computing and internet-based services has made network security an essential requirement for maintaining service availability and protecting digital infrastructure. Distributed Denial-of-Service (DDoS) attacks represent a significant cybersecurity threat because they can disrupt legitimate network communication through abnormal traffic generation. Traditional detection approaches may face difficulties in identifying evolving attack patterns, creating a need for intelligent and explainable intrusion detection techniques. This research proposes an explainable machine-learning framework based on Extreme Gradient Boosting (XGBoost) for DDoS attack detection using SHapley Additive explanations (SHAP). The proposed approach uses the CIC-DDoS2019 dataset to analyse benign and malicious network traffic. The methodology includes data preprocessing, feature preparation, model training, and performance evaluation using accuracy, precision, recall, and F1-score. Multiple machine-learning classifiers, including Decision Tree, Random Forest, Support Vector Machine, and K-Nearest Neighbors, are considered for comparative evaluation. Furthermore, SHAP analysis is incorporated to interpret model predictions and identify the network traffic features that contribute to classification decisions. By combining classification performance with feature-level explanations, the framework aims to improve the transparency and interpretability of automated DDoS detection. The proposed approach provides a foundation for developing more understandable machine-learning-based network security systems for cloud and other network environments.

