Unsupervised Online Detection of Pipe Blockages and Leakages in Water Distribution Networks

Jin Li, Kleanthis Malialis, Stelios G. Vrachimis, Marios M. Polycarpou2025

Abstract

Monitoring Water Distribution Networks (WDNs) is critical for infrastructure resilience. This paper introduces an unsupervised, online learning framework designed to simultaneously detect pipe blockages and background leakages. By combining a Long Short-Term Memory Variational Autoencoder (LSTM-VAE) with a dual drift detection mechanism, the system distinguishes between sudden anomalies (blockages) and gradual "concept drift" (leakages). This allows for robust, real-time monitoring at the edge without requiring labeled historical data.

Introduction

Water Distribution Networks are high-stakes systems increasingly strained by climate change and aging infrastructure. Engineers primarily contend with two types of faults: pipe blockages, which cause sudden pressure changes, and background leakages, which result in minor, gradual shifts.

Existing data-driven methods face significant hurdles:

  1. Label Scarcity: Real-world WDN data rarely includes ground-truth labels for every event.
  2. Non-Stationarity: WDNs are dynamic; small leaks shift the "normal" baseline, a phenomenon known as concept drift.
  3. Single-Fault Focus: Most models target either blockages or leaks, but rarely both.

This research proposes a decentralized, unsupervised system capable of adapting to a changing "normal" while flagging critical failures.

Methodology

The proposed framework is deployed at the "edge" (directly at pressure sensors) and consists of several key components:

LSTM-VAE Architecture

The core model is a Variational Autoencoder (VAE) integrated with Long Short-Term Memory (LSTM) layers. Unlike standard VAEs, the LSTM components capture temporal dependencies inherent in pressure time-series data, making the model sensitive to sequences of data rather than just isolated points.

Dual Drift Detection (DD)

The "secret sauce" for handling non-stationary data is the Dual Drift Detection mechanism:

  • DD1 (Statistical): Employs the Kolmogorov-Smirnov (KS) test to compare the distribution of the model's latent space against a reference window.
  • DD2 (Distance-based): Measures the Euclidean distance between encodings of anomalous instances to confirm if a permanent shift (drift) has occurred.
Architecture of the proposed LSTM-VAE with Dual Drift Detection.

Adaptive Retraining

When the DD mechanism flags a change (e.g., a new background leak), the system triggers automated retraining of the LSTM-VAE. This allows the model to "accept" the leak as the new normal, preventing false positives while maintaining sensitivity to new blockages.

Experimental Setup

The framework was evaluated on two simulated WDN environments: the Hanoi Network (32 nodes) and the Zhi Jiang (ZJ) Network (113 demand nodes). Data was generated using WNTR and LeakDB simulations, covering one year with 30-minute sampling intervals. Seasonal and Trend decomposition using Loess (STL) was used to remove predictable weekly patterns.

Results and Discussion

The framework was compared against baselines including iForest++, LOF++, and VAE4AS.

Performance and Robustness

The proposed method consistently achieved higher G-mean scores across different nodes. Notably, while models like VAE4AS became unstable or degraded when background leaks occurred, the proposed framework maintained high performance (G-mean > 0.7 on ZJ; > 0.9 on Hanoi).

Performance comparison (G-mean) across time steps, highlighting the proposed method's robustness against collective anomalies and drift.

Localization Potential

Detection accuracy was significantly higher at nodes downstream of a blockage. This suggests that the decentralized approach could be extended to pinpoint the exact location of faults within the network.

Conclusion

This paper demonstrates an effective unsupervised framework for real-time WDN monitoring. By monitoring the latent space and employing dual drift detection, the system handles the non-stationary nature of water networks. Future work will focus on formalizing localization algorithms and incorporating long-term environmental variables like climate change.

Summary updated

BibTeX
@misc{li2025unsupervised,
  author = {Jin Li and Kleanthis Malialis and Stelios G. Vrachimis and Marios M. Polycarpou},
  title = {{Unsupervised Online Detection of Pipe Blockages and Leakages in Water Distribution Networks}},
  year = {2025},
  eprint = {2508.16336},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.16336},
}
Figure