1. Introduction
The rapid growth of urbanization and water demand worldwide has led to the increasingly severe issue of distribution network aging. Frequent network failures not only waste valuable water resources but also significantly increase operation and maintenance costs [
1,
2]. Leaks and pipe bursts in aging networks have become more prevalent, severely impacting the sustainability of water resource management and the reliability of the water supply [
3,
4]. Despite the significant volume of water lost annually through network leaks worldwide, sufficient attention to this issue has not been given in many regions. As distribution networks continue to grow in complexity, the lack of effective management and monitoring methods further exacerbates water loss [
5]. Rapid and accurate leak detection and timely repair have become key challenges in ensuring the reliability of water supply systems. While advanced detection devices and high-density monitoring points can significantly improve leak detection accuracy and efficiency [
6,
7], many regions still lack adequate monitoring equipment due to economic constraints, making leak detection difficult [
8,
9]. In this context, precise leak detection methods based on limited monitoring data have gradually become a research hotspot. These data-driven approaches, which do not require additional investment, can effectively improve network maintenance efficiency and demonstrate broad application potential [
2].
In recent years, data-driven technologies have made significant advancements in the field of leak detection and localization in water distribution networks [
10,
11]. For example, Farley et al. successfully localized burst events by optimizing the sensitivity matrix and used a genetic algorithm (GA) to optimize sensor placement, effectively reducing the search area [
12]. Min et al. developed a two-stage model, initially detecting leaks using the K-means algorithm and then further localizing them through a trial-and-error optimization approach [
13]. Although they overcome the limitations of traditional physical models, these methods are primarily suitable for small-scale networks or can achieve leak localization only at the regional level [
14]. With the rise of deep learning technologies, pattern recognition in complex network structures has gradually shifted from theory to practice, leading to new breakthroughs in leak detection for distribution networks. Garajeh et al. combined deep learning convolutional neural networks (DL-CNNs) with the analytic network process (ANP) method, demonstrating excellent application potential in urban water network management [
15]. Wu et al. integrated fuzzy C-means clustering with the XGBoost algorithm to identify leak areas and predict leak severity based on simulation data [
16]. Kang et al. combined a one-dimensional convolutional neural network (1D-CNN) with a support vector machine (SVM) ensemble model, demonstrating its high efficiency and accuracy in leak detection and localization [
17]. Ran Yan et al. employed a confidence-learning-based Gaussian mixture model (CLGMM) approach to address the challenge of leak detection in the absence of sufficient leak data by cleaning labels and utilizing long-term historical data. This method improved the accuracy of leak detection in water distribution networks [
18]. In addition, the edge-based graph neural network (EGNN) proposed by Kerimov et al. significantly improved the accuracy and transferability of flow and pressure predictions in water distribution systems, demonstrating superior performance and efficient computational capabilities under unknown topologies [
19]. These studies highlight the enormous potential of deep learning algorithms in handling complex data and addressing the dynamic environment of distribution networks [
20]. Neural network models, with their diverse structural designs and exceptional feature learning capabilities, are capable of capturing nonlinear relationships and multivariable interactions within complex networks, providing critical support for further improving the accuracy and efficiency of leak detection.
Neural networks, as the core of deep learning technologies, have demonstrated significant application potential across various fields. Different architectures of neural networks exhibit unique advantages in specific scenarios due to their inherent characteristics. For instance, convolutional neural networks (CNNs) are widely used in image and signal processing due to their ability to extract local features [
21]; recurrent neural networks (RNNs) and their variant, long short-term memory networks (LSTMs), excel in modeling time-series data, particularly for handling dynamic data such as water pressure [
22]; and graph neural networks (GNNs), which can directly operate on graph-structured data, have become an effective tool for solving complex topological relationship problems, demonstrating unique advantages in leak detection and localization in water supply networks [
23]. In contrast, traditional methods such as Shewhart charts, CUSUM charts, and EWMA charts, based on threshold settings and statistical properties, are simple to implement and offer real-time performance, making them widely used in anomaly detection for water pressure fluctuations [
24,
25,
26]. However, these methods fall short when dealing with multivariable features and complex network interactions, particularly in addressing issues such as node pressure, flow fluctuations, and topological relationships in water distribution networks. Convolutional Graph Neural Networks (CGNNs), through graph convolution operations, effectively capture complex interactions and nonlinear relationships between nodes while enabling the unified modeling of multidimensional data, thus overcoming the limitations of traditional methods. In complex network environments, CGNNs demonstrate significant adaptability and generalization ability, not only enhancing leak detection accuracy but also providing technical support for resource optimization and cost control. Based on the CGNNs framework, an improved method is proposed in this study to address the practical challenges in leak detection for water distribution networks.
Although Convolutional Graph Neural Networks (CGNNs) have demonstrated significant potential in leak localization for water distribution networks, their ability to process topological structures and fuse multidimensional data makes them well suited for complex network environments. However, traditional CGNNs frameworks face two major limitations when applied to the problem of leak localization in water distribution networks: first, due to topological constraints, leaks can be localized only at the node level, making precise localization at the pipe segment level difficult; second, in sparsely distributed monitoring networks, there are fewer nodes with monitoring information, making the effective extraction and fusion of data more challenging. To address these issues, in this paper, an innovative method is proposed that integrates node features into pipe segment features by combining the characteristics of the segment’s start and end points, achieving leak localization at the pipe segment level with data-driven precision, thereby overcoming the limitations of the traditional framework. Furthermore, to accommodate the uneven distribution of monitoring points in real-world scenarios, the model introduces improvements to the receptive field setting. By applying multi-layer convolution operations, the receptive field of each node is expanded, allowing it to gather information from a broader neighborhood. This improvement not only ensures high-precision localization in areas with high monitoring point density, but also maintains strong robustness under sparse monitoring conditions. The effectiveness of the proposed method is validated through both simulated data and real-world leak events. The results demonstrate that the model is capable of efficient leak detection and localization under various monitoring point distribution conditions.
2. Methodology
2.1. Overview of the Convolutional Graph Neural Network (CGNN)
The Graph Convolutional Neural Networks (CGNNs) are utilized in this study to achieve leakage localization in water distribution networks. CGNNs are deep learning model specifically designed for efficient feature extraction and information aggregation in graph-structured data. Unlike traditional convolutional neural networks (CNNs), CGNNs can directly handle complex network structures such as water distribution systems. Through the edges in the graph, the CGNN enables the exchange and integration of information between nodes, allowing each node’s features to reflect not only its own data but also the broader structural information of the entire graph. By performing multi-layer convolution operations, the CGNN gradually expands the receptive field of each node, enabling it to gather information from neighboring nodes and even distant nodes. This characteristic makes CGNNs particularly well suited for handling water distribution network data, effectively integrating pressure, flow, and other features from different monitoring points and segments, thereby aiding in the accurate localization of potential leaks.
To provide a clearer overview of the modeling process for the proposed CGNN-based leak localization model,
Figure 1 illustrates the complete sequence of steps. This process summarizes the key stages, including feature engineering, node feature convolution operations, the integration of node features into pipe segment features, and model training and prediction. In
Figure 1, the blue sections in the center represent the primary modeling steps, while the light green sections highlight the key innovations and contributions of this study. The yellow sections on the right indicate the objectives of each step, and the left side expands on specific components of the process. Each component will be discussed in detail in the following sections.
2.2. Feature Engineering
Feature engineering plays a crucial role in the development of deep learning models. Although models such as convolutional neural networks (CNNs) and Convolutional Graph Neural Networks (CGNNs) can automatically extract features, carefully designed feature engineering can still significantly enhance the model’s performance and generalization capability for certain complex tasks.
In this study, to implement data-driven network detection, three key features were analyzed: instantaneous flow, cumulative flow, and instantaneous pressure. However, the performance of these features varies in practical applications. Instantaneous flow often exhibits significant fluctuations, largely influenced by short-term changes in water demand, and tends to be noisy, making it difficult to reliably capture abnormal events. Its variation is often subject to multiple factors, complicating the detection process and increasing the likelihood of false positives or false negatives. Cumulative flow, on the other hand, requires a period of accumulation before an issue becomes apparent, resulting in significant delays and limiting the ability to respond promptly, potentially causing delays in repair efforts.
Among these features, instantaneous water pressure exhibits less fluctuation and is less affected by short-term changes in water demand, resulting in more stable data. This makes it more suitable for detecting and analyzing anomalies in the network. When a leak occurs, the water pressure in the affected area drops rapidly, and this change can directly and promptly indicate a physical anomaly in the system. Leakage detection based on instantaneous water pressure can also be combined with spatial location data to more accurately pinpoint leak locations. By deploying pressure sensors throughout the network, pressure anomalies can be quickly detected, allowing for the precise identification of the leakage location, thereby significantly improving detection efficiency and accuracy. For example,
Figure 2 shows eight warning events in the SCADA system of City H, where (a) in red represents four actual leakage events, and (b) in blue represents four false alarm events. Analysis reveals that in actual leakage events, both instantaneous flow and instantaneous water pressure exhibit significant and sustained changes, while in false alarms, only the instantaneous flow shows inconsistent fluctuations.
In summary, instantaneous water pressure was selected as the primary indicator for leak detection due to its ability to effectively reflect network anomalies. Compared with cumulative flow and instantaneous flow, instantaneous water pressure has the advantage of more stable data with lower noise levels, making it better suited for anomaly detection and precise localization in complex water supply systems. Specifically, current pressure directly reflects the actual pressure state at a node at a given moment, providing the foundation for capturing real-time operational conditions; predicted pressure provides a reference for the expected pressure under normal operating conditions, serving as a basis for identifying abnormal pressure variations; and pressure fluctuation, defined as the difference between current and predicted pressures, quantifies the range of pressure changes at a node, enabling precise detection of abnormal behaviors. Its scientific validity for leak detection has been confirmed by multiple studies, not only reflecting the direct relationship between pressure and leakage, but also demonstrating significant advantages in model performance optimization [
27,
28]. Based on this, three feature engineering steps are designed in the study to extract three key features from the nodes, namely, current pressure, predicted pressure, and pressure fluctuation, aiming to comprehensively capture the operational status and leak characteristics of the water distribution network.
2.3. Convolution Operation on Node Features
To extract higher-order node features, this study employs graph convolution layers to perform multi-layer convolution operations on the node features. The specific convolution operation is defined as follows [
29]:
where
X(l) represents the node feature matrix at layer
l;
A is the adjacency matrix of the graph, indicating the connections between nodes;
D is the degree matrix, used to normalize the adjacency matrix;
W(l) is the weight matrix at layer
l, learned during training; and
σ(⋅) is the activation function, for which the commonly used ReLU activation function is applied in this study. Through multi-layer convolution operations, the node features gradually incorporate information from neighboring nodes, resulting in more expressive higher-order features.
2.4. Synthesis of Node Features into Segment Features
In traditional graph neural networks, node features are typically processed, while edge features are not explicitly considered [
30]. However, in water distribution networks, leak events usually occur on pipe segments (i.e., edges). To address this issue, in this study, an innovative node-based edge feature synthesis method is proposed. Specifically, each node may be connected to one or more edges. By introducing directed edges, the combination of the starting and ending node IDs for each edge becomes a unique identifier. This approach not only overcomes the limitations of traditional graph neural networks in edge feature modeling, but also directly improves leak localization from the traditional node-level or node-referenced fuzzy localization to precise pipe segment-level localization. The specific steps are as follows.
Node Feature Combination: For each segment, its feature vector is constructed by combining the feature vectors of its two endpoints. Let segment
eij connect nodes
vi and
vj; then, the feature vector of segment
eij is represented as follows [
31]:
where
fvi and
fvj are the feature vectors of nodes
vi and
vj, respectively, and
concat(⋅) denotes the concatenation operation of the feature vectors.
Feature Fusion and Dimensionality Reduction: Through feature fusion, the high-dimensional node features are combined into segment features. In practice, to reduce dimensionality and computational complexity, segment features can be further processed through linear transformation or pooling operations [
31]:
where
wf is the linear transformation matrix, and
bf is the bias term.
Figure 3 illustrates the process of fusing node features into segment features through convolutional layers in the water distribution network case study from
Section 5.2. In
Figure 3a, segment 5 is located between nodes 5 and 6. Through the three convolutional layers shown in
Figure 3b, the receptive field of node 5 is progressively expanded. In
Figure 3c, node 5’s receptive field includes nodes 4, 5, 6, and 10 (first layer); nodes 3, 9, 11, and 16 (second layer); and nodes 1, 2, 15, 23, 17, 18, and 19 (third layer). Similarly, in
Figure 3d, node 6’s receptive field includes nodes 5, 6, 7, and 11 (first layer); nodes 4, 10, 18, and 19 (second layer); and nodes 3, 9, 16, 17, 24, 25, and 20 (third layer). By fusing the features of these two nodes, the final receptive field for segment 5, as shown in
Figure 3e, incorporates information from all of the aforementioned nodes. Through the layer-by-layer expansion of the receptive field and feature fusion, the pipe segment features are not only able to integrate information from surrounding nodes, but also significantly improve leak localization accuracy at the pipe segment level.
2.5. Model Architecture and Training
After completing feature engineering and node feature synthesis, the feature matrix of the entire water distribution network is used as the input for the Graph Convolutional Neural Network (CGNN). The model architecture consists of three graph convolutional layers followed by a fully connected layer to output the predicted results. The training process of the model is as follows:
Input Data: The segment features obtained from feature engineering and synthesis are fed into the model.
Convolutional Layers: Multiple convolutional layers are applied sequentially to extract higher-order features.
Global Pooling: Global average pooling is performed on the features of each segment [
21]:
where
N is the number of nodes and
Xi is the feature vector of each node.
Fully Connected Layer and Output: The final features are passed through a fully connected layer, which outputs the probability distribution of failure segments.
Loss Function: The model uses the cross-entropy loss function to measure the error between the predicted and true labels [
32]:
where
yc is the true class label and
is the predicted probability for class c.
2.6. Determination of the Number of Convolutional Layers
In practical water distribution networks, not all nodes are equipped with detection devices, and the model’s ability to localize faulty segments relies on data from monitoring nodes. To meet the basic localization requirements, each segment (edge) must have a receptive field that includes at least two monitoring nodes to enable localization based on pressure data. Therefore, the number of convolutional layers L must satisfy the conditions outlined in the following subsections.
2.6.1. Coverage of the Receptive Field
For a regular node v
o, after L convolutional layers, its receptive field should cover at least two monitoring nodes. This means that after the L-th convolutional layer, the neighborhood set
N(vo,L) of the regular node
vo should contain at least two monitoring nodes. This can be expressed as follows:
where
N(vo,L) is the neighborhood set of the regular node
vo after L layers of convolution, and
vm represents the monitoring nodes in the neighborhood set.
2.6.2. Calculation of the Receptive Field
Each convolutional layer expands the receptive field of a node, allowing the node to receive information from more of its neighboring nodes. The receptive field of a regular node v
o after the l-th convolutional layer can be estimated as follows [
29]:
where
R(vo,l) represents the receptive field of the regular node
vo after l layers of convolution, covering all nodes accessible through l layers of convolution.
N(vo,i) denotes the direct neighborhood set of the regular node
vo after the i-th layer of convolution.
2.6.3. Selection of the Number of Convolutional Layers
Considering regularization and model complexity, the optimal number of convolutional layers
L* should satisfy the receptive field coverage condition while minimizing the model’s loss function. Specifically,
where
is the total loss function, which includes the cross-entropy loss and a regularization term. Using this formula, the required number of convolutional layers L can be systematically determined, ensuring that the model effectively covers all regular nodes while optimizing performance and minimizing overfitting to achieve the best possible outcome.
Figure 4 provides a schematic overview of the entire process of the Convolutional Graph Neural Network (CGNN), visually illustrating the key components of the model and their functions. First, the input layer includes three critical features, namely, current pressure, predicted pressure, and pressure fluctuation, which are used to characterize the real-time status of the network nodes. Next, the three GCN convolutional layers progressively extract higher-order node features while expanding the receptive field of each node, allowing them to gather information from neighboring nodes and their surrounding areas. This layer-by-layer convolution operation enhances feature interactions between nodes, facilitating the effective transmission of information in the complex topology of the water distribution network. The features are then summarized through a global average pooling layer and further refined by a fully connected layer, which outputs the predicted status of each segment (i.e., normal or faulty). Ultimately, the model is able to accurately locate faults for each segment in the network.
3. Water Pressure Forecasting
To meet the real-time and accuracy requirements of the water distribution network leakage localization based on the Convolutional Graph Neural Network (CGNN), water pressure forecasting becomes a crucial step, providing a solid foundation for real-time computation and leak localization. In this study, we compared three commonly used time series forecasting methods: long short-term memory (LSTM), Seasonal Autoregressive Integrated Moving Average (SARIMA), and Random Forest [
33,
34]. These methods are wellsuited for handling typical time series data such as water pressure and flow.
In the experiment, we selected 10 monitoring points with a frequency of once every 5 min for prediction, and applied the 3 methods to predict water pressure at random time points. The training data were sourced from the historical data of the previous seven days, and the Mean Absolute Error (MAE) was used as the main evaluation metric. Additionally, we evaluated the error between the historical water pressure and the actual water pressure.
Table 1 shows the water pressure prediction results.
The experimental results indicate that the errors of all three time series forecasting methods are relatively small, with the maximum absolute error of 0.193 m occurring in the LSTM prediction at node 7. However, this error is far smaller than the pressure fluctuation magnitude during a leak event. Due to the cyclic nature of water pressure, the difference between historical and real-time pressure is also minor, with a maximum error of 0.158 m, which is within the acceptable range for leakage fluctuation detection. This suggests that regardless of the time series forecasting method used, the prediction error has minimal impact on the accuracy of water pressure forecasting. Additionally, historical water pressure data have also been proven to have high reference values, sufficiently supporting efficient leak event detection.
5. Case Study
5.1. Background
The water distribution network in City H is supplied by two long-operating water plants (A and B) with designed daily water supply capacities of 100,000 and 50,000 cu-bic meters, respectively, serving the daily water needs of 600,000 people. The network covers a variety of water usage scenarios, including residential, commercial, and in-dustrial areas and spanning both urban and rural regions.
Figure 5 shows the layout of the City H water distribution network, including water sources, pipe segments, key valves, consumption nodes, and special consumption nodes with monitoring devices. In the urban center near the Ring A Water Plant, the pressure monitoring points are densely distributed, while other areas have sparser and unevenly distributed monitoring points.
Figure 6a shows a field photo of the monitoring device at node 6, and
Figure 6b shows a field photo of the monitoring device at node 49. This study primarily analyzes two aspects:
(1) The prediction accuracy of leak localization using Convolutional Graph Neural Network (CGNN) in the actual water distribution network, evaluating the performance of the CGNN model in City H’s water distribution network, particularly its localization accuracy within different topological distance ranges;
(2) The impact of pressure monitoring point layout on leak localization accuracy and its optimization, analyzing the effect of pressure monitoring point layout in different re-gions on the CGNN leak localization accuracy and offering suggestions for layout op-timization.
5.2. Case Study 1: Core Area Analysis of Plant A
The core area of the Ring A Water Plant has a dense layout of pressure detection points, which facilitates accurate leakage localization analysis. Data gaps are filled using PDA simulation, ensuring that all nodes are equipped with monitoring data to represent the dense distribution of pressure sensors in the actual pipeline network. The distribution network consists of 55 water consumption nodes and 72 supply pipelines.
Figure 7 shows the water supply network map of the core area of the Ring A Water Plant. A training set of 600 leakage conditions was randomly generated, and a CGNN model with three embedded convolutional layers was trained by calculating these conditions. Accuracy tests were conducted on 72 validation sets.
Table 3 presents the leakage localization accuracy of the CGNN model for both the training and validation sets in this area.
As shown in the table, the localization accuracy of the training and validation sets is very close, indicating that the model has been well trained. The topological distance here refers to the shortest path distance between the leak point and the node identified by the model, measured based on the topological structure of the network. A topological distance of 0 indicates that the leak point and the predicted point are exactly the same. As the topological distance increases, the model allows for a small margin of error between the leak point and the predicted point while maintaining high accuracy. As the topological distance increases, the localization accuracy of the model gradually improves, reaching 98.61% in the validation set at a topological distance of 3.
This result indicates that the CGNN model achieves high leak localization accuracy in the water distribution network of the Ring A Water Plant. Additionally, we combined data from four actual leak events in the Ring A Water Plant network (shown in
Figure 1) with PDA-completed data from unmonitored nodes for leak point localization. Specifically, the monitoring data from nodes equipped with monitoring devices during the leak were input into the model, while simulation data from EPANET under leak conditions were used for the other nodes. The model successfully achieved precise localization, reaching 100% localization accuracy. This further demonstrates that the CGNN-based leak localization method, utilizing water pressure as a feature, is highly applicable to urban water distribution networks with dense monitoring points and holds significant practical value.
5.3. Case Study 2: Practical Application in a Large-Scale Dual Water Treatment Plant Network
In this study, we conducted a case analysis of the water distribution network in City H. This network consists of 332 nodes and 442 pipe segments with 2 water sources, covering a wide range of water supply types. It represents a typical structure of a large urban water distribution network. To examine the impact of monitoring point density and distribution on leakage localization accuracy, the study used a training set of 1,800 simulated leakage scenarios to train the CGNN model followed by accuracy testing on a validation set of 442 scenarios. Additionally, real leakage event data were integrated into the model for detection. Given the large network size, the distribution network was divided into seven zones for analysis based on monitoring point density and distribution patterns (
Figure 8). The results are shown in
Table 4.
In these areas, Zone C, as the core area, has a monitoring point density of 70.9%, resulting in significantly higher localization accuracy compared with other regions. In particular, when the topological distance is 3, the accuracy reaches 96.1%. Moreover, data from the monitoring devices during the four actual leak events in City H (all located in Zone C) were input into the model, and the model’s localization results perfectly matched the actual leak segments, achieving a 100% localization accuracy. In contrast, while the monitoring point density in the other six areas is similar, there is a significant difference in localization accuracy, mainly due to the uneven distribution of the monitoring points.
6. Results and Discussion
6.1. Impact of Monitoring Device Distribution on Model Localization Accuracy
Zone C is the most densely monitored area in City H’s water distribution network, with a monitoring point density of 70.9%. In Case 1, after completing the data with EPANET simulation, the monitoring point density was increased to 100%, and the localization accuracy reached 90.28% when the topological error was 0. In contrast, in Case 2, the monitoring point density in Zone C was 70.9%, and the localization accuracy was 84.6%, a decrease of only 5.68%. When the topological error was 3, the localization accuracies in Case 1 and Case 2 were 98.61% and 96.1%, respectively, with a difference of only 2.51%. These results indicate that under high-density monitoring conditions, the model can maintain localization accuracy close to that under 100% coverage even when the monitoring point coverage drops to 70%, demonstrating remarkable adaptability and robustness.
The monitoring point density in the remaining areas ranges from 12.1% to 18.2%, indicating a sparse distribution. Even with a low monitoring point density, the model’s localization accuracy exceeds 50.6% when the topological error is 0, and it reaches over 83.9% when the topological error is 3, demonstrating high robustness. However, localization accuracy is influenced not only by monitoring point density but also by the network’s topological structure and the uniformity of the monitoring point distribution. For example, in Zone A, the localization accuracy at topological errors of 2 and 3 is the most significant among the ABDEFG zones. An analysis reveals that some of the pipelines in Zone A have a single-pipeline ring structure, and high-precision localization can be achieved using two key monitoring points located at nodes 193 and 164. In contrast, although Zone E has a similar monitoring point density to Zone A, its monitoring devices are primarily located at the edges of the area, and the pipeline structure is complex and irregular, leading to lower overall localization accuracy. Zone B has the lowest monitoring point density at only 12.1%. Although the accuracy is lower at topological errors of 0 and 1, due to the relatively regular pipeline structure, the localization accuracy improves significantly at topological errors of 2 and 3.
In summary, the monitoring point density is the primary factor influencing the model’s localization accuracy, while the pipeline structure and the uniformity of monitoring point distribution also play crucial roles. Given the limited construction budget for most water distribution networks, optimizing the layout of monitoring points becomes key to enhancing localization performance. Based on this study and the analysis of the seven regions, the following optimization recommendations are proposed: For networks with regular structures, monitoring points should be distributed evenly both within the area and along its edges to improve coverage and localization accuracy; for single-loop long-distance networks, placing monitoring points only at the start and end can achieve precise localization, thereby maximizing the utilization of monitoring points and reducing construction costs.
6.2. Feature Engineering Contribution Analysis
To assess the importance of each feature in the Graph Convolutional Network (GCN), we adopted a gradient-based method to quantify the contribution of each feature [
35]. This method measures the impact of each feature on the model’s prediction by computing the gradient of the loss function with respect to the input features, thereby providing an effective way to evaluate feature significance.
Forward propagation: The input data are passed through the model to obtain the predicted value .
Loss calculation: The error between the predicted value and the actual label y is computed using the loss function .
Backward propagation: The gradient of the loss with respect to the input features is computed: .
Absolute sum: The absolute value of each feature’s gradient is taken to represent the contribution of that feature to the model’s output:
This method quantifies the influence of each feature on the loss function, thereby estimating its importance in the model.
To standardize the feature contributions so that their sum equals 1, we normalize the importance of each feature. The normalization formula is as follows:
In both cases, we calculated the normalized contribution of each feature to assess its importance in the model’s prediction. Specifically, the feature contributions in Case 1 were current pressure: 14.52%; predicted pressure: 12.58%; and pressure fluctu-ation: 72.90%. In Case 2, the feature contributions were current pressure: 18.63%; pre-dicted pressure: 15.49%; and pressure fluctuation: 65.88%.
Although the contribution values of the features differ between the two cases, their ranking and relative differences remain consistent, indicating a high level of sta-bility in the model’s reliance on these features. Notably, pressure fluctuation consist-ently has a significantly higher contribution than the other features in both cases, demonstrating its dominant role in the model. Specifically, the contribution of pres-sure fluctuation is highest in Case 1 at 72.90%, and in Case 2, it is 65.88%. This finding indicates that pressure fluctuation plays a critical role in predicting the target variable, providing key dynamic information, particularly in capturing the trends and fluctua-tions of water pressure.
Despite pressure fluctuation exhibiting the highest contribution across all features, both current pressure and predicted pressure are also indispensable key features in the model. Current pressure, as a direct monitoring indicator, reflects the system’s current state, making it the most intuitive and fundamental input in the model by providing real-time water pressure data. Predicted pressure, on the other hand, serves as a benchmark for comparison, which is crucial for the prediction task. It helps the model evaluate the future water pressure trends and provides reference information for deci-sion making.
7. Conclusion
In this study, an efficient and robust leak detection method is proposed, offering technical support for the intelligent management of modern urban water supply systems. It also provides a theoretical foundation for optimizing network layout and model design under resource-constrained conditions. The research was applied to two representative water distribution networks in City H, China, leading to the following key conclusions:
CGNN model with pipe segment feature fusion: A Convolutional Graph Neural Network (CGNN) model for rapid leak detection in water distribution networks is presented, utilizing a pipe segment feature fusion strategy. The model leverages current pressure, predicted pressure, and pressure fluctuations as core features. By improving leak localization accuracy from node-level to pipe-segment-level precision, the model achieves more accurate leak detection. Its effectiveness has been validated using both EPANET simulation data and real leak event data, demonstrating excellent performance.
Accuracy in high-density sensor areas: In high-density sensor areas, the CGNN model achieved a leak localization accuracy of 90.28% with zero topological error, demonstrating its strong practical potential for modern urban water distribution networks.
Robustness in low-density sensor areas: In areas with low sensor density (10%-20%) and uneven distribution, the CGNN model maintained a localization accuracy of over 85% within a topological distance of 3, demonstrating strong robustness. This highlights the model’s effectiveness under resource-constrained conditions and its potential for wider application.
Contribution of feature engineering: The study shows that pressure fluctuation is the most influential feature, playing a dominant role in leak localization. Current pressure and predicted pressure, as key features, provide essential real-time monitoring and predictive references. A well-designed feature engineering approach is crucial for enhancing model performance.
Importance of optimizing monitoring point layout: In this study, it was found that optimizing the layout of monitoring points, particularly in areas with complex topologies or significant pipeline variations, can significantly improve the localization accuracy. This offers both theoretical support and practical recommendations for future monitoring point deployment in water distribution networks.
Future work will focus on refining leak localization at the pipeline segment level by analyzing data from monitoring devices at both ends of a segment and surrounding areas. This will be combined with advanced deep learning frameworks to achieve precise leak localization within specific segments. Additionally, the feature engineering process will be further optimized through multi-feature fusion strategies, incorporating factors such as historical maintenance records, pipe material characteristics, and environmental conditions. These improvements aim to enhance the model’s adaptability, accuracy in complex scenarios, and potential for broader real-world applications.