SHAP-Ranked Feature Perturbation and Stability in XGBoost-Based Multi-Class Network Intrusion Detection under Class Imbalance
This study evaluates classification performance and SHAP-based model behaviour for a ten-class network intrusion detector using the supplied UNSW-NB15 training and testing partitions. Each input partition contains 82,332 records, and the supplied files report the same class-wise counts in both partitions. Logistic Regression, Random Forest, and XGBoost were compared; XGBoost was retained as the explanation target rather than as the top-performing classifier. Random Forest achieved the highest accuracy (0.9299) and macro-F1 (0.7425), while XGBoost achieved 0.9153 accuracy and 0.7252 macro-F1. TreeSHAP analysis used 1,844 held-out instances, selecting up to 200 examples per true class and all 44 available Worms examples. Cumulative replacement of SHAP-ranked original-feature groups increased mean predicted-class probability drop from 0.1055 at k=1 to 0.3297 at k=10; the prediction-change rate increased from 0.1730 to 0.5428. The class-conditioned perturbation results varied substantially across labels. Explanation-set repeatability was assessed across five XGBoost fits using seeds 17, 37, 73, 101, and 151. The global top-10 feature-set Jaccard similarity was 1.0000, while the mean full-ranking Spearman correlation was 0.9840 (standard deviation 0.0047). These findings characterise model sensitivity and feature-set repeatability under the specified evaluation protocol; they do not establish causal explanation validity or generalisation to other network environments.
Authors
- Krishna Bera (ORCID: https://orcid.org/0009-0000-0600-8765)
- Pawan Kumar Dey (ORCID: https://orcid.org/0009-0001-3984-2585)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-26
- DOI
- https://doi.org/10.5281/zenodo.24547886
- Primary Topic
- Network Security and Intrusion Detection
- Type
- preprint