With the increasing demand for real-time processing on IoT devices, optimizing machine learning models' size, latency, and efficiency is crucial. This repository implements pruning techniques to improve computational efficiency in resource-constrained environments, specifically targeting Electric Vehicle Charging Infrastructure (EVCI).
This project focuses on optimizing machine learning models for anomaly detection in resource-constrained EVCI environments. Using the CICEVSE2024 dataset, we trained and optimized three models—Multi-Layer Perceptron (MLP), Long Short-Term Memory (LSTM), and XGBoost—by applying Optuna for hyperparameter tuning and SHAP for feature selection. The final models were pruned and converted to CSR (Compressed Sparse Row) format, achieving significant reductions in model size and inference time while retaining robust anomaly detection performance.
Two primary datasets, Final_EVSE_A.csv and Final_EVSE_B.csv, are included for benchmarking and further research. These datasets were used for model training and evaluation, providing a foundation for future research in EVCI anomaly detection.
Fatemeh Dehrouyeh, Ibrahim Shaer, Soodeh Nikan, Firouz Badrkhani Ajaei, and Abdallah Shami. Pruning Based TinyML Optimization of Machine Learning Models for Anomaly Detection in Electric Vehicle Charging Infrastructure. Proceedings of the IEEE International Conference on Communications, 2025. Accepted. To appear. Preprint available at: https://arxiv.org/pdf/2503.14799
@INPROCEEDINGS{11161868, author={Dehrouyeh, Fatemeh and Shaer, Ibrahim and Nikan, Soodeh and Ajaei, Firouz Badrkhani and Shami, Abdallah}, booktitle={ICC 2025 - IEEE International Conference on Communications}, title={Pruning-Based TinyML Optimization of Machine Learning Models for Anomaly Detection in Electric Vehicle Charging Infrastructure}, year={2025}, pages={1195-1200}, keywords={Additives;Computational modeling;Tiny machine learning;Electric vehicle charging;Real-time systems;Computational efficiency;Model compression;Long short term memory;Anomaly detection;Tuning;CICEVSE2024;electric vehicle charging infrastructure (EVCI);model compression;Optuna;pruning;SHapley Additive explanations (SHAP);TinyML}, doi={10.1109/ICC52391.2025.11161868}}
The extended journal version can be fonund in:
@ARTICLE{11303937, author={Dehrouyeh, Fatemeh and Shaer, Ibrahim and Nikan, Soodeh and Ajaei, Firouz Badrkhani and Shami, Abdallah}, journal={IEEE Transactions on Network Science and Engineering}, title={TinyML-Enabled Resource-Efficient Framework for Real-Time Network Securiy in Electric Vehicle Charging Networks}, year={2026}, volume={13}, pages={5092-5109}, keywords={Real-time systems;Computational modeling;Biological system modeling;Accuracy;Security;Protocols;Monitoring;Malware;Long short term memory;Intrusion detection;Cybersecurity;electric vehicle (EV);electric vehicle charging infrastructure (EVCI);model compression;optuna;pruning;shapley additive explanations (SHAP);TinyML}, doi={10.1109/TNSE.2025.3645564}} Github Repository: https://github.com/Western-OC2-Lab/TinyML-NetworkSecurity-EVCI