An efficient method for network traffic anomaly detection based on SHAP and deep learning
To address the critical challenge of Denial-of-Service (DoS) attack detection in wireless sensor networks (WSNs), this study proposes an efficient anomaly detection framework that synergistically integrates SHAP (SHapley Additive exPlanations) for feature interpretation and a deep convolutional neural network (DCNN) with self-attention mechanism. The SHAP algorithm directly selects optimal feature subsets by quantifying feature contributions, eliminating the need for dimensionality reduction. Subsequently, a DCNN model enhanced with self-attention mechanisms learns spatiotemporal patterns from SHAP-refined features, improving discriminative capability for anomaly traffic. Evaluated on the UNSW-NB15 dataset, our model achieves AUROC = 0.999 and AUPRC = 0.992, surpassing state-of-the-art methods (SVM: AUROC = 0.993; XGBoost: AUPRC = 0.988). Ablation studies confirm SHAP improves MCC by 6.1% and attention mechanisms boost DoS detection precision by 3.9%. This work demonstrates that combining interpretable feature selection (SHAP) with attention-driven deep learning significantly enhances detection efficiency and accuracy, providing a viable solution for real-time WSN security.
Authors
- Ping Xuan (ORCID: https://orcid.org/0000-0001-5328-691X)
- Zhaohui Fang (ORCID: https://orcid.org/0000-0003-4181-2294)
- Hong Ding
Institutions
- Hefei University of Technology (CN)
- Anhui Special Equipment Inspection Institute (CN)
- Ningbo Product Quality Supervision and Inspection Institute (CN)
Publication Details
- Journal
- PLoS ONE
- Published
- 2026-08-28
- DOI
- https://doi.org/10.1371/journal.pone.0356069
- Primary Topic
- Network Security and Intrusion Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00