Investigating the Suitability of Concept Drift Detection for Detecting Leakages in Water Distribution Networks

Valerie Vaquet, Fabian Hinder, Barbara Hammer

Abstract

Leakages are a major risk in water distribution networks as they cause water loss and increase contamination risks. Leakage detection is a difficult task due to the complex dynamics of water distribution networks. In particular, small leakages are hard to detect. From a machine-learning perspective, leakages can be modeled as concept drift. Thus, a wide variety of drift detection schemes seems to be a suitable choice for detecting leakages. In this work, we explore the potential of model-loss-based and distribution-based drift detection methods to tackle leakage detection. We additionally discuss the issue of temporal dependencies in the data and propose a way to cope with it when applying distribution-based detection. We evaluate different methods systematically for leakages of different sizes and detection times. Additionally, we propose a first drift-detection-based technique for localizing leakages.

Introduction

Water Distribution Networks (WDNs) are critical infrastructure components that remain notoriously difficult to monitor. Most pipes are buried underground, and network topologies are frequently outdated or undocumented. Detecting leakages—especially small, slow-developing ones—is essential to prevent resource loss and contamination. However, the task is complicated by the inherent noise of the system: water pressure and flow fluctuate according to complex daily, weekly, and seasonal cycles driven by human behavior.

Traditional hydraulic models often fail because they require precise physical parameters (such as pipe roughness and diameter) that are rarely known with certainty. This research explores an alternative approach: framing leakage detection as a concept drift problem. By treating a leak as a change in the underlying data-generating process, we can apply machine learning techniques to identify anomalies without requiring a perfect physical map of the network.

Methodology: Detecting Drift in Water Data

The study evaluates two primary families of drift detection to determine their efficacy in identifying leakages:

1. Model-Loss-Based Detection

These methods involve training a predictive model (such as a forecaster or interpolator) on historical "normal" data. When the model is applied to new data, a spike in the prediction error (loss) suggests a drift—and therefore a potential leak. The researchers tested several architectures, including k-Nearest Neighbors (kNN), Random Forests, and Ridge Regression.

2. Distribution-Based Detection

Rather than relying on a model's predictive accuracy, these methods compare two windows of raw data (a reference window and a current window) to determine if their statistical distributions have diverged. The techniques evaluated included:

  • Kolmogorov-Smirnov (KS) test: A non-parametric test of the equality of continuous distributions.
  • Maximum Mean Discrepancy (MMD): A kernel-based statistical test.
  • D3 (Discriminative Drift Detector): A virtual classifier trained specifically to distinguish between "old" and "new" data. If the classifier can easily tell the windows apart, a drift is detected.

Addressing Temporal Dependencies

A significant hurdle in WDN data is the strong temporal dependency caused by cyclic demand patterns. To prevent these natural fluctuations from being flagged as drifts, the authors proposed a specific heuristic: using window sizes of exactly one week. By comparing a week-long block of data to a previous week-long block, the "old" and "new" windows contain the same distribution of weekday and weekend patterns, effectively neutralizing the noise of human behavior.

Experimental Setup

The methods were validated using the L-Town Benchmark Data, a high-fidelity simulation of the water network in Limassol, Cyprus. The dataset consists of:

  • Network Scale: 661 nodes and 764 edges.
  • Sensors: 29 pressure sensors providing measurements at 15-minute intervals.
  • Duration: One year of simulated data.
  • Scenarios: Four leakage sizes ranging from 7mm to 19mm.

Key Insights and Results

The Generalization Trap

One of the most significant findings was that high-performing predictive models, such as Random Forests, were surprisingly poor at detecting small leaks. Because these models are designed to generalize well and be robust to noise, they often "smooth over" the subtle pressure changes caused by a minor leak. In this context, the model's strength in prediction becomes a weakness for anomaly detection.

Superiority of Distribution-Based Methods

Distribution-based methods consistently outperformed model-loss methods. Because they do not rely on a model's ability to forecast the future, they are more sensitive to the raw statistical shifts caused by a leak. Specifically, the linear D3 detector proved most effective. Its simplicity prevented it from overfitting to temporal noise, allowing the actual signal of the leak to stand out. Using this method, the researchers could reliably detect the smallest simulated leak (7mm) with a delay of only five days.

Localization via P-Values

Beyond mere detection, the authors proposed a method for localization. By examining feature-wise Kolmogorov-Smirnov tests across all sensors, they found that the sensor with the smallest p-value (indicating the most significant statistical drift) was consistently the one geographically closest to the actual leakage site.

Conclusion

Framing water leakage as concept drift provides a robust framework for monitoring WDNs without the need for complex hydraulic modeling. While distribution-based methods—particularly linear virtual classifiers—show great promise in detecting even small leaks, future work is needed to translate these findings into real-world applications. This includes accounting for sensor failures and developing more sophisticated warning mechanisms to distinguish between leaks and legitimate, temporary changes in network usage.

Summary updated

BibTeX
@inproceedings{vaquet2024investigating,
  author = {Valerie Vaquet and Fabian Hinder and Barbara Hammer},
  title = {{Investigating the Suitability of Concept Drift Detection for Detecting Leakages in Water Distribution Networks}},
  booktitle = {ICPRAM},
  year = {2024},
  url = {https://openreview.net/forum?id=3vwqL9S0iK},
}
Figure