Main Article Content
Abstract
Detecting cyberattacks in smart-water telemetry is difficult because attack classes are rare and missed attacks cost far more than false alarms. This paper presents the Adaptive Cost-Sensitive Learning Framework (ACSLF), which combines an adaptive per-sample penalty, SMOTE applied only to the training split, a genetic algorithm and SHAP feature selection, gradient-boosted classifiers, and a cost-sensitive focal objective (M1). It is evaluated on 1,048,575 smart-water records and classified into classes named Benign, Web Attack, SQL Injection, DDoS, and DoS. With the AttackPrediction field available, ACSLF reaches 99.74% accuracy and a macro-F1 of 0.9935, and M1 reduces XGBoost's operational cost from 2,145 to 171. Attack labels come from a deterministic rule; we also show that macro-F1 falls to about 0.74 without AttackPrediction and accuracy to about 0.49 without all four rule fields, and applying SMOTE inflates macro-F1 from 0.7572 to 0.9983. SHAP and LIME explanations recover the labeling rule. On the open WDSEventDB dataset, the binary task is solved without errors, but identifying which event occurred remains difficult. We discuss these limitations and outline expert-labeled and drift-aware evaluation as future work.
Keywords
Article Details
References
- M. Lamrini, B. Ben Mahria, M. Y. Chkouri, and A. Touhafi, “Towards Reliability in Smart Water Sensing Technology: Evaluating Classical Machine Learning Models for Outlier Detection,” Sensors, vol. 24, no. 13, p. 4084, 2024. DOI: https: //doi. org/10. 3390/s24134084
- M. N. Kanyama and A. M. Gamundani, “Machine Learning Applications for Anomaly Detection in Smart Water Metering Networks: A Systematic Re-view,” Phys. Chem. Earth, vol. 134, p. 103558, 2024.DOI: https: 10.1016/j.pce.2024.103558
- A. González-Vidal, J. Cuenca-Jara, and A. F. Skarmeta, “IoT for Water Management: Towards Intelligent Anomaly Detection,” 2019 IEEE 5th World Forum on Internet of Things (WF-IoT) 2019. DOI: 10.1109/WF-IoT.2019.8767190
- G. R. M. R. Gauthama, C. M. Ahmed, and A. Mathur, “Machine learning for intrusion detection in industrial control systems: challenges and lessons from experimental evaluation,” Cybersecurity, vol. 4, no. 27, pp. 1-12, 2021. DOI: https://doi.org/10.1186/s42400-021-00095-5.
- A. M. Y. Koay, R. K. L. Ko, H. Hettema, and K. Radke, “Machine learning in industrial control system (ICS) security: current landscape, opportunities and challenges,” Journal of Intelligent Information Systems, vol. 60, pp. 377-405, 2023. DOI: https: //doi. org/10. 1007/s10844— 022—00753—1
- A. Al-Abassi, H. Karimipour, A. Dehghantanha, and R. M. Parizi, “Ensemble Deep Learning-based Cyber-Attack Detection in Industrial Control System,” IEEE Access, vol. 8, 2020. DOI: 10.1109/ACCESS.2020.2992249.
- C. Moore, “Cyber Attack on Florida Water Utility Highlights Vulnerability of Critical Infrastructure,” blog post, March 2, 2021. https://www.rkk.com/blog/cyber-attack-on-florida-water-utility-highlights-vulnerability-of-critical-infrastructure/.
- J. Slay and M. Miller, “Lessons Learned from the Maroochy Water Breach,” IFIP International Federation for Information Processing, vol. 253, pp. 73-82, 2008. DOI: 10.1007/978-0-387-75462-8_6.
- M. Kabore et al., “Review of Anomaly Detection Systems in Industrial Control Systems Using Deep Feature Learning Approach,” Eng., vol. 13, pp. 30-45, 2021. DOI: https: //doi. org/10. 4236/eng. 2021. 131003.
- F. Zare, P. Mahmoudi-Nasr, and R. Yousefpour, “A Real-Time Network Based Anomaly Detection in Industrial Control Systems,” International Journal of Critical Infrastructure Protection, vol. 45, p. 100676, April 2024. DOI: http: //dx. doi. org/10. 1016/j . ij cip. 2024. 100676.
- M. N. Kanyama and F. B. Shava, “AI-Driven Anomaly Detection Framework for Smart Water Metering Using Ensemble Learning,” Water, vol. 17, no. 13, 2025. DOI: https://doi.org/10.3390/w17131933 .
- S. Garg, K. Kaur, N. Kumar, G. Kaddoum, A. Y. Zomaya, and R. Ranjan, “A Hybrid Deep Learning-Based Model for Anomaly Detection in Cloud Datacenter Networks,” IEEE Transactions on Network and service management, PP (99):1-1, 2019. DOI: https: //doi. org/10. 1109/TXSN. 2019. 2927886.
- O. Kainz et al., “Non-standard Situation Detection in Smart Water Metering,” Open Comput. Sci., vol. 11, no. 1, pp. 12-21, 2021. DOI: https: //doi. org/10. 1515/comp—2020—0190
- A. L. Perales Gomez, L. Fernandez Maimo, A. Huertas Celdran, and F. J. García Clemente, “MADICS: A Methodology for Anomaly Detection in Industrial Control Systems,” Symmetry, vol. 12, no. 10,p. 1583, 2020. DOI: https: //doi. org/10. 3390/sym12101583.
- Z. Chen, D. Chen, Z. Yuan, and X. Cheng, “Learning Graph Structures with Transformer for Multivariate Time Series Anomaly Detection in IoT,” IEEE Internet of Things Journal, April 2021. DOI: https: //doi. org/10. 48550/arXiv. 2104. 03466.
- S. Lee et al., “Smart Metering System Capable of Anomaly Detection by Bi-directional LSTM Autoencoder,” 2022 IEEE International Conference on Consumer Electronics (ICCE), , 2021. DOI: 10.1109/ICCE53296.2022.9730398.
- M. Conti, D. Donadel, and F. Turrin, “A Survey on Industrial Control System Testbeds and Datasets for Security Research,” IEEE Communications Surveys A Tutorials, PP (99):1-1, July 2021. DOI: http: // dx. doi. org/10. 1109/COMST. 2021. 3094360.
- A. Dehlaghi Ghadim, M. Helali Moghadam, A. Balador, and H. Hansson, “Anomaly Detection Dataset for Industrial Control Systems,” IEEE Access, vol. 11, pp. 107982-107996, 2023. DOI: https: //doi.org/10. 1109/ACCESS. 2023. 3320928.
- Z. Y. Wu, A. Chew, X. Meng, and J. Cai, “Data-driven and model-based framework for smart water grid anomaly detection and localization,” AQUA — Water Infrastructure, Ecosystems and Society, vol. 71, no. 1, pp. 31-41, 2022. DOI: http: //dx. doi.org/10. 2166/aqua. 2021. 091.
- X. Zhao and L. Zhang, “Anomaly Detection Approach in Industrial Control Systems Based on Measurement Data,” Information, vol. 13, no. 10, p. 450, 2022. DOI: http: //dx. doi. org/10. 3390/info13100450.
- M. M. Aslam,A. Tufail and Muhammad Nauman Irshad “Survey of Deep Learning Approaches for Securing Industrial Control,” Cyber Security and Applications, vol. 3, no. 1, 2025. DOI: 10.1016/j.csa.2025.100096.
- Z. El Mrabet et al., “Deep Learning-Based Intrusion Detection System for Advanced Metering Infrastructure,” NISS '19: Proceedings of the 2nd International Conference on Networking, Information Systems & Security, 2019. DOI : https://doi.org/10.1145/3320326.3320391.
- E. El-Shafeiy and M. Alsabaan, “Real-Time Anomaly Detection for Water Quality Sensor Monitoring Based on Multivariate Deep Learning Technique,” Sensors, vol. 23, no. 20, p. 8613, 2023. DOI: https://doi.org/10.3390/s23208613.
- L. Breiman, “Random Forests,” Mach. Learn., vol. 45, no. 1, pp. 5-32, 2001.
- S. M. Lundberg and S.-I. Lee, “A Unified Approach to Interpreting Model Predictions,” in 31st Conference on Neural Information Processing Systems (NIPS 2017). Syst., vol. 30, 2017. 04018048, 2017.
- S. Kapoor and A. Narayanan, “Leakage and the reproducibility crisis in machine-learning-based science,” Patterns, vol. 4, no. 9, 100804, 2023. DOI 10.1016/j.patter.2023.100804 .
- Raza, Nazia et al., “ WDSEventDB: A real-time benchmark dataset for event diagnosis in water distribution networks,” J. Zenodo. World Environmental & Water Resources Congress 2026 (EWRI 2026).DOI: https://doi.org/10.5281/zenodo.17547955.
- C. Elkan, “The Foundations of Cost-Sensitive Learning” in Proc. Int. Joint Conf. Artif. Intell. (IJCAI), 2001. https://dl.acm.org/doi/10.5555/1642194.1642224
- M. Umer, K. N. Junejo, M. Jilani and A. P. Mathur, “Machine Learning for Intrusion Detection in Industrial Control Systems: Applications, Challenges, and Recommendations,” International Journal of Critical Infrastructure Protection,vol. 38, 2022. DOI: 10.1016/j.ijcip.2022.100516.
- M. Zhao, H. Peng, L. Li, and Y. Ren, “Graph Attention Network and Informer for Multivariate Time Series Anomaly Detection,” Sensors, vol. 24, no. 5, p. 1522, 2024. DOI: https: //doi. org/10. 3390/ s24051522.
- N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, “SMOTE: Synthetic Minority Over-sampling Technique,” J. Artif. Intell. Res., vol. 16, pp. 321-357, 2002. DOI:https://doi.org/10.1613/jair.953.
- T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollár, “Focal Loss for Dense Object Detection,” in Proc. IEEE Int. Conf. Comput. Vis. (ICCV), 2017.
- DOI:https://doi.org/10.48550/arXiv.1708.02002.
- G. Ke et al., “LightGBM: A Highly Efficient Gradient Boosting Decision Tree,” in 31st Conference on Neural Information Processing Systems (NIPS 2017),vol. 30, 2017.
- T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” in Proc. ACM SIGKDD Int. Conf. Knowl. Discov. Data Min., 2016. DOI: https://doi.org/10.1145/2939672.293978.
References
M. Lamrini, B. Ben Mahria, M. Y. Chkouri, and A. Touhafi, “Towards Reliability in Smart Water Sensing Technology: Evaluating Classical Machine Learning Models for Outlier Detection,” Sensors, vol. 24, no. 13, p. 4084, 2024. DOI: https: //doi. org/10. 3390/s24134084
M. N. Kanyama and A. M. Gamundani, “Machine Learning Applications for Anomaly Detection in Smart Water Metering Networks: A Systematic Re-view,” Phys. Chem. Earth, vol. 134, p. 103558, 2024.DOI: https: 10.1016/j.pce.2024.103558
A. González-Vidal, J. Cuenca-Jara, and A. F. Skarmeta, “IoT for Water Management: Towards Intelligent Anomaly Detection,” 2019 IEEE 5th World Forum on Internet of Things (WF-IoT) 2019. DOI: 10.1109/WF-IoT.2019.8767190
G. R. M. R. Gauthama, C. M. Ahmed, and A. Mathur, “Machine learning for intrusion detection in industrial control systems: challenges and lessons from experimental evaluation,” Cybersecurity, vol. 4, no. 27, pp. 1-12, 2021. DOI: https://doi.org/10.1186/s42400-021-00095-5.
A. M. Y. Koay, R. K. L. Ko, H. Hettema, and K. Radke, “Machine learning in industrial control system (ICS) security: current landscape, opportunities and challenges,” Journal of Intelligent Information Systems, vol. 60, pp. 377-405, 2023. DOI: https: //doi. org/10. 1007/s10844— 022—00753—1
A. Al-Abassi, H. Karimipour, A. Dehghantanha, and R. M. Parizi, “Ensemble Deep Learning-based Cyber-Attack Detection in Industrial Control System,” IEEE Access, vol. 8, 2020. DOI: 10.1109/ACCESS.2020.2992249.
C. Moore, “Cyber Attack on Florida Water Utility Highlights Vulnerability of Critical Infrastructure,” blog post, March 2, 2021. https://www.rkk.com/blog/cyber-attack-on-florida-water-utility-highlights-vulnerability-of-critical-infrastructure/.
J. Slay and M. Miller, “Lessons Learned from the Maroochy Water Breach,” IFIP International Federation for Information Processing, vol. 253, pp. 73-82, 2008. DOI: 10.1007/978-0-387-75462-8_6.
M. Kabore et al., “Review of Anomaly Detection Systems in Industrial Control Systems Using Deep Feature Learning Approach,” Eng., vol. 13, pp. 30-45, 2021. DOI: https: //doi. org/10. 4236/eng. 2021. 131003.
F. Zare, P. Mahmoudi-Nasr, and R. Yousefpour, “A Real-Time Network Based Anomaly Detection in Industrial Control Systems,” International Journal of Critical Infrastructure Protection, vol. 45, p. 100676, April 2024. DOI: http: //dx. doi. org/10. 1016/j . ij cip. 2024. 100676.
M. N. Kanyama and F. B. Shava, “AI-Driven Anomaly Detection Framework for Smart Water Metering Using Ensemble Learning,” Water, vol. 17, no. 13, 2025. DOI: https://doi.org/10.3390/w17131933 .
S. Garg, K. Kaur, N. Kumar, G. Kaddoum, A. Y. Zomaya, and R. Ranjan, “A Hybrid Deep Learning-Based Model for Anomaly Detection in Cloud Datacenter Networks,” IEEE Transactions on Network and service management, PP (99):1-1, 2019. DOI: https: //doi. org/10. 1109/TXSN. 2019. 2927886.
O. Kainz et al., “Non-standard Situation Detection in Smart Water Metering,” Open Comput. Sci., vol. 11, no. 1, pp. 12-21, 2021. DOI: https: //doi. org/10. 1515/comp—2020—0190
A. L. Perales Gomez, L. Fernandez Maimo, A. Huertas Celdran, and F. J. García Clemente, “MADICS: A Methodology for Anomaly Detection in Industrial Control Systems,” Symmetry, vol. 12, no. 10,p. 1583, 2020. DOI: https: //doi. org/10. 3390/sym12101583.
Z. Chen, D. Chen, Z. Yuan, and X. Cheng, “Learning Graph Structures with Transformer for Multivariate Time Series Anomaly Detection in IoT,” IEEE Internet of Things Journal, April 2021. DOI: https: //doi. org/10. 48550/arXiv. 2104. 03466.
S. Lee et al., “Smart Metering System Capable of Anomaly Detection by Bi-directional LSTM Autoencoder,” 2022 IEEE International Conference on Consumer Electronics (ICCE), , 2021. DOI: 10.1109/ICCE53296.2022.9730398.
M. Conti, D. Donadel, and F. Turrin, “A Survey on Industrial Control System Testbeds and Datasets for Security Research,” IEEE Communications Surveys A Tutorials, PP (99):1-1, July 2021. DOI: http: // dx. doi. org/10. 1109/COMST. 2021. 3094360.
A. Dehlaghi Ghadim, M. Helali Moghadam, A. Balador, and H. Hansson, “Anomaly Detection Dataset for Industrial Control Systems,” IEEE Access, vol. 11, pp. 107982-107996, 2023. DOI: https: //doi.org/10. 1109/ACCESS. 2023. 3320928.
Z. Y. Wu, A. Chew, X. Meng, and J. Cai, “Data-driven and model-based framework for smart water grid anomaly detection and localization,” AQUA — Water Infrastructure, Ecosystems and Society, vol. 71, no. 1, pp. 31-41, 2022. DOI: http: //dx. doi.org/10. 2166/aqua. 2021. 091.
X. Zhao and L. Zhang, “Anomaly Detection Approach in Industrial Control Systems Based on Measurement Data,” Information, vol. 13, no. 10, p. 450, 2022. DOI: http: //dx. doi. org/10. 3390/info13100450.
M. M. Aslam,A. Tufail and Muhammad Nauman Irshad “Survey of Deep Learning Approaches for Securing Industrial Control,” Cyber Security and Applications, vol. 3, no. 1, 2025. DOI: 10.1016/j.csa.2025.100096.
Z. El Mrabet et al., “Deep Learning-Based Intrusion Detection System for Advanced Metering Infrastructure,” NISS '19: Proceedings of the 2nd International Conference on Networking, Information Systems & Security, 2019. DOI : https://doi.org/10.1145/3320326.3320391.
E. El-Shafeiy and M. Alsabaan, “Real-Time Anomaly Detection for Water Quality Sensor Monitoring Based on Multivariate Deep Learning Technique,” Sensors, vol. 23, no. 20, p. 8613, 2023. DOI: https://doi.org/10.3390/s23208613.
L. Breiman, “Random Forests,” Mach. Learn., vol. 45, no. 1, pp. 5-32, 2001.
S. M. Lundberg and S.-I. Lee, “A Unified Approach to Interpreting Model Predictions,” in 31st Conference on Neural Information Processing Systems (NIPS 2017). Syst., vol. 30, 2017. 04018048, 2017.
S. Kapoor and A. Narayanan, “Leakage and the reproducibility crisis in machine-learning-based science,” Patterns, vol. 4, no. 9, 100804, 2023. DOI 10.1016/j.patter.2023.100804 .
Raza, Nazia et al., “ WDSEventDB: A real-time benchmark dataset for event diagnosis in water distribution networks,” J. Zenodo. World Environmental & Water Resources Congress 2026 (EWRI 2026).DOI: https://doi.org/10.5281/zenodo.17547955.
C. Elkan, “The Foundations of Cost-Sensitive Learning” in Proc. Int. Joint Conf. Artif. Intell. (IJCAI), 2001. https://dl.acm.org/doi/10.5555/1642194.1642224
M. Umer, K. N. Junejo, M. Jilani and A. P. Mathur, “Machine Learning for Intrusion Detection in Industrial Control Systems: Applications, Challenges, and Recommendations,” International Journal of Critical Infrastructure Protection,vol. 38, 2022. DOI: 10.1016/j.ijcip.2022.100516.
M. Zhao, H. Peng, L. Li, and Y. Ren, “Graph Attention Network and Informer for Multivariate Time Series Anomaly Detection,” Sensors, vol. 24, no. 5, p. 1522, 2024. DOI: https: //doi. org/10. 3390/ s24051522.
N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, “SMOTE: Synthetic Minority Over-sampling Technique,” J. Artif. Intell. Res., vol. 16, pp. 321-357, 2002. DOI:https://doi.org/10.1613/jair.953.
T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollár, “Focal Loss for Dense Object Detection,” in Proc. IEEE Int. Conf. Comput. Vis. (ICCV), 2017.
DOI:https://doi.org/10.48550/arXiv.1708.02002.
G. Ke et al., “LightGBM: A Highly Efficient Gradient Boosting Decision Tree,” in 31st Conference on Neural Information Processing Systems (NIPS 2017),vol. 30, 2017.
T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” in Proc. ACM SIGKDD Int. Conf. Knowl. Discov. Data Min., 2016. DOI: https://doi.org/10.1145/2939672.293978.