Algorithm-Informed Graph Neural Networks for Leakage Detection and Localization in Water Distribution Networks

Zepeng Zhang, Olga Fink · DOI

Abstract

Detecting and localizing leakages is a significant challenge for the efficient and sustainable management of water distribution networks (WDN). Leveraging the inherent graph structure of WDNs, recent approaches have used graph-based data-driven methods. However, these methods often learn shortcuts that work well with in-distribution data but fail to generalize to out-of-distribution data. To address this limitation and inspired by the perfect generalization ability of classical algorithms, we propose an algorithm-informed graph neural network (AIGNN). Recognizing that WDNs function as flow networks, incorporating max-flow information can be beneficial for inferring pressures. In the proposed framework, we first train AIGNN to emulate the Ford-Fulkerson algorithm for solving max-flow problems. This algorithmic knowledge is then transferred to address the pressure estimation problem in WDNs. Two AIGNNs are deployed, one to reconstruct pressure based on the current measurements, and another to predict pressure based on previous measurements. Leakages are detected and localized by comparing the outputs of the reconstructor and the predictor. By pretraining AIGNNs to reason like algorithms, they are expected to extract more task-relevant and generalizable features. Experimental results demonstrate that the proposed algorithm-informed approach achieves superior results with better generalization ability compared to GNNs that do not incorporate algorithmic knowledge.

Introduction

Water Distribution Networks (WDNs) are critical infrastructure systems, yet they suffer from significant inefficiencies due to leakages, which cost an estimated $39 billion annually worldwide. Monitoring these underground networks is inherently difficult because they are "partially observable"; economic constraints limit sensor placement to only a small fraction of the network's junctions.

While Graph Neural Networks (GNNs) have shown promise in interpolating data across these grids, they are prone to "shortcut learning." Instead of capturing the underlying hydraulic principles, standard GNNs often learn specific correlations tied to a fixed set of sensor locations. Consequently, when the network configuration changes or sensors are relocated, model performance typically collapses. This paper introduces the Algorithm-Informed Graph Neural Network (AIGNN), a framework designed to bake "algorithmic common sense" into data-driven models to ensure robustness and generalization.

Methodology

Neural Algorithmic Reasoning (NAR)

The core innovation of AIGNN lies in the application of Neural Algorithmic Reasoning. The authors hypothesize that if a model can emulate the logic of classical algorithms, it will learn structural representations that are invariant to specific data distributions.

The AIGNN training process occurs in two distinct phases:

  1. Algorithmic Pre-training: A GNN (specifically a Pointer Graph Network) is trained to solve the "Max-Flow" problem using the Ford-Fulkerson algorithm. Rather than just learning the final output, the model is supervised using "hints"—the intermediate steps of the algorithm—to ensure it captures the logic of flow augmentation and pathfinding.
  2. Knowledge Transfer: The "processor" of this algorithmically-trained model is extracted and integrated into a new architecture. To handle the noisy, high-dimensional pressure data of real-world WDNs, the simple linear layers are replaced with Chebyshev convolutional layers (ChebNet).

Detection and Localization Pipeline

The system employs a dual-model architecture to identify leaks:

  • The Reconstructor: This model takes current sparse sensor data and estimates the actual pressure across the entire network.
  • The Predictor: This model uses historical sensor data to estimate what the pressure should be under normal operating conditions (i.e., a leak-free state).
  • Residual Analysis: By comparing the outputs of the Reconstructor and the Predictor, the system generates residuals. Significant discrepancies between the estimated actual pressure and the predicted normal pressure signal the presence and location of a leak.

Experimental Evaluation

Dataset and Setup

The framework was evaluated using the L-town WDN, a benchmark dataset from the BattleDIM competition. The network consists of 785 junctions and 905 pipes, but is monitored by only 33 pressure sensors. The study utilized two years of hydraulic simulations: 2018 data for calibration and 2019 data for evaluation, featuring realistic noise and various leakage scenarios.

Results and Generalization

The AIGNN approach demonstrated a significant advantage over standard GNN baselines, particularly in its ability to generalize to unseen scenarios:

  • Pressure Reconstruction: AIGNN variants significantly reduced relative error compared to standard ChebNet models.
  • Out-of-Distribution (OOD) Performance: When tested on random sensor configurations—placements the model never encountered during training—the standard ChebNet's error spiked to 17.06%. In contrast, the algorithm-informed variant (ChebNet_IN) maintained a much lower error of 2.28%.
  • Leak Detection Success: In the 2019 evaluation set, the AIGNN model successfully detected 22 out of 23 leaks, whereas the baseline ChebNet only identified 15.

Discussion and Conclusion

The success of AIGNN suggests that the topology of how a max-flow algorithm explores a graph is highly relevant to how pressure signals propagate through a water network. Interestingly, the researchers found that "freezing" the algorithm-informed processor during the transfer phase yielded the best results, indicating that the algorithmic logic provides a robust foundation that does not require further tuning on domain-specific data.

While this work represents a significant step forward, limitations remain. The current model relies specifically on the Ford-Fulkerson algorithm; other engineering challenges may require different algorithmic priors, such as shortest-path or minimum spanning tree logic. Furthermore, while the model excels on simulated data, future work must address the complexities of aging physical infrastructure and unpredictable demand patterns.

In conclusion, this research provides a pioneering application of Neural Algorithmic Reasoning to engineering problems, offering a path toward more reliable and generalizable AI for critical infrastructure management.

Summary updated

BibTeX
@misc{zhang2024algorithm,
  author = {Zepeng Zhang and Olga Fink},
  title = {{Algorithm-Informed Graph Neural Networks for Leakage Detection and Localization in Water Distribution Networks}},
  year = {2024},
  eprint = {2408.02797},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.02797},
}
Figure