Lightweight Explainable Ensemble Learning for Real-Time Network Traffic Anomaly Detection on Resource-Constrained Edge Devices
DOI:
https://doi.org/10.66421/int.j.datasci.intell.syst35Keywords:
Network traffic anomaly detection, explainable artificial intelligence, ensemble learning, SHAP, edge computing, embedded systems security, intrusion detectionAbstract
Network traffic anomaly detection on edge devices requires both high detection accuracy and low computational overhead. However, most existing deep learning-based intrusion detection models are difficult to deploy on resource-constrained embedded platforms because of their high memory consumption and limited interpretability. To address this issue, this study proposes a lightweight explainable ensemble learning framework for real-time network traffic anomaly detection in edge security scenarios. The proposed model integrates Random Forest, LightGBM, and Extra Trees through a soft-voting strategy, while SHAP analysis is used to identify the dominant traffic features contributing to abnormal behavior. Experiments are conducted on the CICIDS2017 and UNSW-NB15 datasets, involving 2.83 million and 2.54 million network flow records, respectively. After feature cleaning and class balancing, 41 statistical flow features are retained for model training and interpretation. The proposed ensemble model achieves an accuracy of 98.42%, an F1-score of 97.86%, and an AUC of 99.11% on CICIDS2017, while reducing inference latency to 3.7 ms per flow on a Raspberry Pi 4 platform. Compared with a standalone Random Forest model, the proposed approach improves F1-score by 2.14% and reduces false alarm rate by 18.6%. SHAP-based interpretation further shows that flow duration, packet length variance, backward packet rate, and TCP flag distribution are the most influential indicators of malicious traffic. The results demonstrate that interpretable ensemble learning can provide a practical balance between detection performance, transparency, and deployment efficiency for embedded network security systems.
References
1. Chen, F., Liang, H., Yue, L., Xu, P., & Li, S. (2025). Low-Power Acceleration Architecture Design of Domestic Smart Chips for AI Loads.
2. Mahmood, S., Gohar, M., Khashan, O. A., Alzahrani, N., Ghani, A., & Al-Turjman, F. (2025). Securing Edge Devices in IoT and 6G: A Trust-Based Approach for Resource-Constrained Environments. IEEE Open Journal of the Communications Society.
3. Shao, W. (2026, March). Interpretable Ensemble Learning for Network Traffic Anomaly Detection: A SHAP-based Explainable AI Framework for Embedded Systems Security. In 2026 14th International Symposium on Digital Forensics and Security (ISDFS) (pp. 1-4). IEEE.
4. Mohale, V. Z., & Obagbuwa, I. C. (2025). A systematic review on the integration of explainable artificial intelligence in intrusion detection systems to enhancing transparency and interpretability in cybersecurity. Frontiers in Artificial Intelligence, 8, 1526221.
5. Liang, R., Fan, F., Liang, Y., & Li, S. (2025). Constructing an Adaptive Optimization Model for Ribbon Recommendation and Interface for User Habits.
6. Villafranca, A., Tasic, I., & Cano, M. D. (2026). TRUSTLab dataset: a real-world CICFlowMeter dataset for IoT/edge intrusion detection. Frontiers in Computer Science, 8, 1803271.
7. Wang, Y., Wen, Y., Wu, X., Wang, L., & Cai, H. (2025). Assessing the Role of Adaptive Digital Platforms in Personalized Nutrition and Chronic Disease Management.
8. Polat, O., Ahmad, A. A., Oyucu, S., Algül, E., Doğan, F., & Aksöz, A. (2025). Temporal-spatial feature extraction in IoT-based SCADA system security: Hybrid CNN-LSTM and attention-based architectures for malware classification and attack detection. IEEE Access.
9. Wang, Y., Chen, J., Arias, R., Wang, Y., & Yin, X. (2026). Development and Validation of a Patient-Friendly Digital Assessment Platform for Precision Screening of Oral Anti-Obesity Medications (AOMs).
10. Savitha, C., & Talari, R. (2025). Evaluating the performance of random forest, support vector machine, gradient tree boost, and CART for improved crop-type monitoring using greenest pixel composite in Google Earth Engine. Environmental Monitoring and Assessment, 197(4), 437.
11. Zhu, W., Yang, J., & Yao, Y. (2025). How Cross-Departmental Collaboration Structures Mitigate Cross-Border Compliance Risks: Network Causal Inference Based on ManpowerGroup's Staffing Projects.
12. Hassan, A., Mohamed, R., Abdel-Basset, M., & Abouhawwash, M. (2026). A weighted voting-based ensemble classifier based on manta ray foraging optimizer for cyberattack detection in IoT environments: a comparative study. Evolutionary Intelligence, 19(1), 18.
13. Nian, J., Liang, Z., Liu, H., & Yang, M. (2022). An Efficient Fault-Tolerant Protection Method for L0 BTB. IEEE Transactions on Circuits and Systems I: Regular Papers, 70(3), 1284-1297.
14. Bandar, A. (2026). A Review of Resilient IoT Systems: Trends, Challenges, and Future Directions. Applied Sciences, 16(4), 2079.
15. Yin, J., Huang, Y., & Rao, H. (2026). A Study on the Dynamic Evolution of Learning Behavior and Outcome Prediction in Digital Educational Environments. Available at SSRN 6607139.
16. Ahmed, A. M., Sadiq, A. T., Farhan, A. K., Ahmad, M., & Shakeel, M. R. (2026). A Comprehensive Survey of Lightweight Large Language Models: Architectures, Techniques, and Challenges. Archives of Computational Methods in Engineering, 1-28.
17. Deng, X., & Yang, J. (2026). Design of a Quantitative Futures Trading Model Incorporating Multimodal Feature Fusion and Tail Risk Control. Available at SSRN 6702398.
18. Kiliç, C., & Şengül, G. (2026). SHAP-Guided Feature Selection for Cross-Dataset Generalization in Network Intrusion Detection Systems. IEEE Access.
19. Zhang, Z. (2026). A Study on Multimodal Product Understanding and Assembly Guidance Optimization in e-commerce for Complex Consumer Goods. Available at SSRN 6734559.
20. Panopio, A. J. N., Abushahla, H. A., Sajun, A. R., Alawnah, S., Aloul, F., & Zualkernan, I. (2026). From Sensor to Server: Deployable Lightweight ML for IoT Intrusion Detection Across Network Layers. IEEE Internet of Things Journal.
21. Zhang, Z., Tong, Y., & Gao, Y. (2026). Retrieval-Augmented Generation with Low-Latency Deployment for Vertical Domains Question Answering: A Case Study on Economic Resource Platforms.
22. Naif Alatawi, M. (2025). Enhancing intrusion detection systems with advanced machine learning techniques: an ensemble and explainable artificial intelligence (AI) approach. Security and Privacy, 8(1), e496.
23. Qi, C., & Qiao, X. (2026). Building and Operating a Large Scale Multi-Agent System: A Case Study from Industry. Available at SSRN 6795198.
24. Suwannaphong, T., Jovan, F., Craddock, I., & McConville, R. (2025). Optimising TinyML with quantization and distillation of transformer and mamba models for indoor localisation on edge devices. Scientific Reports, 15(1), 10081.
25. Su, D., & Dong, Y. (2026). Classroom-Based Assessment with Bayesian Learning Analytics for Instructional Decision-Making in ASD Inclusive Education.
26. Adjewa, F., Esseghir, M., & Merghem-Boulahia, L. (2026). From Edge Transformer to IoT Decisions: Offloaded Embeddings for Lightweight Intrusion Detection. Sensors, 26(2), 356.
27. Huang, R. (2026). ConfSched: Confidence-Threshold Routing for Efficient Edge-Cloud Activity Recognition. World Journal of Engineering and Technology, 14(2), 471-486.
28. Ma, Y. (2026). Industrial Financial Risk Prediction Model Based on Graph Neural Network and Knowledge Graph Inference. Journal of Circuits, Systems and Computers, 35(16), 2650103.
29. Georgiades, M., & Hussain, F. (2025). An explainable ai approach for interpretable cross-layer intrusion detection in internet of medical things. Electronics, 14(16), 3218.
30. Gao, G., Gao, R., Lu, C., Gao, R., & Kuang, Y. (2026, March). Security Governance Methods and Quantitative Evaluation for Enterprise SMS and Verification Code Systems. In 2026 International Conference on Generative Artificial Intelligence and Information Security (GAIIS) (pp. 455-458). IEEE.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Emily Carter, Michael Anderson, Sarah Mitchell

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
All articles are published under the Creative Commons Attribution 4.0 (CC BY 4.0) License. Users may share, copy, adapt, and distribute the work for any purpose, provided proper credit is given to the original author(s) and source. Authors retain copyright.
