AI-Driven Anomaly Detection in Smart Water Metering Systems Using Ensemble Learning

Research output: Contribution to journalResearch articleContributedpeer-review

Contributors

  • Maria Nelago Kanyama - , Namibia University of Science and Technology (Author)
  • Fungai Bhunu Shava - , Namibia University of Science and Technology (Author)
  • Attlee Munyaradzi Gamundani - , Namibia University of Science and Technology (Author)
  • Andreas Hartmann - , Chair of Groundwater Systems (Author)

Abstract

Water, the lifeblood of our planet, sustains ecosystems, economies, and communities. However, climate change and increasing hydrological variability have exacerbated global water scarcity, threatening livelihoods and economic stability. According to the United Nations, over 2 billion people currently live in water-stressed regions, a figure expected to rise significantly by 2030. To address this urgent challenge, this study proposes an AI-driven anomaly detection framework for smart water metering networks (SWMNs) using machine learning (ML) techniques and data resampling methods to enhance water conservation efforts. This research utilizes 6 years of monthly water consumption data from 1375 households from Location A, Windhoek, Namibia, and applies support vector machine (SVM), decision tree (DT), random forest (RF), and k-nearest neighbors (kNN) models within ensemble learning strategies. A significant challenge in real-world datasets is class imbalance, which can reduce model reliability in detecting abnormal patterns. To address this, we employed data resampling techniques including random undersampling (RUS), SMOTE, and SMOTEENN. Among these, SMOTEENN achieved the best overall performance for individual models, with the RF classifier reaching an accuracy of 99.5% and an AUC score of 0.998. Ensemble learning approaches also yielded strong results, with the stacking ensemble achieving 99.6% accuracy, followed by soft voting at 99.2% and hard voting at 98.1%. These results highlight the effectiveness of ensemble methods and advanced sampling techniques in improving anomaly detection under class-imbalanced conditions. To the best of our knowledge, this is the first study to explore and evaluate the combined use of ensemble learning and resampling techniques for ML-based anomaly detection in SWMNs. By integrating artificial intelligence into water systems, this work lays the foundation for scalable, secure, and efficient smart water management solutions, contributing to global efforts in sustainable water governance.

Details

Original languageEnglish
Article number1933
JournalWater
Volume17
Issue number13
Publication statusPublished - 1 Jun 2025
Peer-reviewedYes

External IDs

Scopus 105010262097

Keywords

Keywords

  • ensemble machine learning, class imbalance, SMOTE, SMOTEEN, anomaly detection, smart water metering networks, water efficiency