DOI 10.1038/s41545-026-00595-2
Toward trustworthy water quality monitoring under sensor unreliability.
Аннотация
BACKGROUND
The influence of pre-pregnancy body mass index (BMI) and gestational weight gain (GWG) on perinatal outcomes of women with polycystic ovary syndrome (PCOS) remains unclear. Therefore, we explored how the above indicators influence pregnancy outcomes in women with PCOS.
METHODS
A retrospective study was conducted involving the baseline characteristics, laboratory data, and pregnancy outcomes of 722 pregnant women with PCOS. Subjects were grouped in a way to find out risks in their pregnancy outcomes. Multivariable logistic regression analysis was performed to investigate how BMI and GWG were associated with perinatal outcomes.
RESULTS
Among women with PCOS, underweight increased the risk of small for gestational age (SGA) (OR 12.35, 95% CI 3.56-42.82), but reduced the risk of large for gestational age (LGA). Overweight but not obese women were more susceptible to developing preeclampsia (PE) than women with normal weight. In PCOS women with BMI < 25 kg/m2 before pregnancy, inadequate GWG was a protective factor for gestational hypertension (GH) and postpartum hemorrhage (PPH), excessive GWG exhibited a positive correlation with LGA. But in PCOS women with BMI ≥ 25 kg/m2, excessive GWG increased the probability of undergoing a cesarean section. Inadequate GWG did not reduce the likelihood of LGA in women with BMI ≥ 25 kg/m2, and excessive GWG did not reduce the probability of SGA in women with BMI < 25 kg/m2.
CONCLUSION
The impacts of pre-pregnancy BMI, GWG on maternal and infant outcomes among PCOS women are similar to reported results in general pregnant women. However, some unique trends were also observed in PCOS women. While the underweight factor significantly increased the risk of SGA birth, overweight but not obesity was correlated with the risk of PE. Inadequate GWG was a protective factor for GH and PPH only in women with pregestational BMI < 25 kg/m2. Inadequate GWG did not reduce the probability of LGA in women with BMI ≥ 25 kg/m2, and similarly, excessive GWG did not reduce the probability of SGA in women with BMI < 25 kg/m2. Overall, these findings indicate that women with PCOS should begin weight management before pregnancy.
Другие публикации по теме
Перевод полного текста: Перевод в очереди
Полный текст источника
https://creativecommons.org/licenses/by-nc-nd/4.0/ Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ .
Текст сохранён. Часть иллюстраций пока доступна только в первоисточнике; загрузка будет проверена повторно.
Introduction
Water Distribution Networks (WDNs) are vital for public health and economic development by providing clean water to customers and industry. Early detection of contamination and prioritization of likely source regions are crucial, as illustrated by major incidents: the Milwaukee Cryptosporidium outbreak affected over 400,000 residents 1 ; in November 2007, a human error in Nokia, Finland led to the injection of 450 m 3 of wastewater into the drinking water distribution system, causing a large gastroenteritis outbreak. Thousands were infected, hundreds hospitalized, and a 12-week total water-use ban was imposed 2 ; and the 2007 Taihu Cyanobacteria Bloom 3 in Jiangsu Province, China, resulted from severe eutrophication, contaminating Wuxi’s tap water and triggering widespread water shortages and public panic. In such cases, while contamination detection in WDNs is essential, narrowing down likely contamination source regions is critical to support timely and effective mitigation.
Ensuring fault-aware water quality monitoring in WDNs is particularly challenging due to the vulnerability of sensor measurements to faults. Sensors may experience communication failures, hardware degradation, calibration drift, or environmental interference 4 , 5 . Such faults can distort measurements, leading to inaccurate contamination detection, false alarms, or even missed contamination events. If sensor unreliability is not properly addressed, monitoring systems may produce misleading decisions, undermining public safety and operational stability. To mitigate these risks, effective mechanisms for handling sensor faults are essential. Dealing with sensor faults typically involves three key steps. First, the presence of a fault must be detected ( Fault detection ). Second, the specific faulty sensor should be identified ( Fault localization ). Third, the underlying cause of the fault should be determined ( Fault isolation ), enabling targeted corrective actions such as recalibration or maintenance. However, because maintenance intervals can span several months, monitoring systems must remain operational despite missing or corrupted inputs. Online monitoring of WDNs relies heavily on accurate sensor measurements; however, sensor faults and data corruption can compromise monitoring performance 6 . In this work, we propose a novel method for faulty signal reconstruction which helps recover the underlying clean signal, thus preserving data continuity and supporting fault-aware downstream monitoring.
Existing research has addressed sensor fault diagnosis and contamination localization largely as separate problems. On one hand, a wide range of approaches have been explored for monitoring sensing reliability in WDNs, including model-based, knowledge-based, and data-driven methods 7 . While model-based techniques depend on accurate hydraulic models or expert knowledge, such requirements are often difficult to satisfy in real-world deployments, where models may be inaccurate, and network topology is only partially known. Under these conditions, data-driven approaches offer a more flexible and scalable alternative by learning system behavior directly from sensor observations. Earlier work has applied tools such as Hidden Markov Models 8 , Gaussian processes 9 , local PCA 10 , and regression-based techniques 11 for fault detection and localization. However, many of these approaches operate offline and cannot isolate fault types. In addition, broader research on sensing systems has explored aspects such as sensor deployment and fault-tolerant architectures to enhance monitoring reliability. For example, 12 investigates learning-based strategies for optimizing mobile sensor placement, while 13 proposes a fault-tolerant UAV-assisted sensing framework. These studies focus on system-level design rather than data-driven fault diagnosis.
On the other hand, a parallel body of work investigates contamination detection and localization. Model-based strategies incorporate hydraulic behavior, water quality dynamics, and reaction mechanisms 14 – 16 , but their reliance on detailed system models limits their applicability. Data-driven methods can alleviate these challenges by exploiting patterns available in sensor observations, thereby reducing the reliance on detailed physical models, particularly when meaningful correlations exist among the monitored variables; an updated overview is provided in ref. 17 . Recent advances include methods that integrate anomaly detection, classification, and probabilistic modeling. For instance, Li et al. 18 integrated individual and aggregated features with adaptive thresholds for alarm generation; however, their approach is restricted to contamination detection and lacks localization capabilities. Similarly, while Grbvcic et al. 19 employed neural networks and random forests alongside Monte Carlo simulations to estimate source characteristics, their method requires extensive contamination scenarios for offline training. Bayesian formulations with mobile sensing platforms enable online intrusion probability updates 20 , and hydraulic-structure-based methods trace contamination via early detections and flow directions 21 . More recently, an online decentralized framework 22 leverages an LSTM-based variational autoencoder with drift-aware thresholds for online detection. Despite these advances, most approaches assume reliable sensing and do not account for the possibility that faulty measurements may disguise or mimic contamination, leaving contamination localization vulnerable under real-world operational uncertainties.
As a result, current WDN monitoring frameworks exhibit a fragmentation gap: they either manage sensor unreliability or perform contamination localization, but rarely consider their interaction. This separation can limit the reliability of online monitoring decisions in realistic operational settings where sensor faults and contamination may coexist.
In response to these limitations, we propose a unified and data-driven machine-learning framework for comprehensive WDN monitoring. Since sparse sensor coverage makes it difficult to uniquely identify the true source node, in this study, we perform contamination source-region prioritization rather than exact contamination source localization. Therefore, the objective is to rank or narrow down likely candidate source regions to support subsequent investigation and response. The main contributions of this work are: We introduce a unified monitoring paradigm that jointly addresses sensor fault management and contamination source-region prioritization within a single pipeline, eliminating the common assumption of fault-free measurements and explicitly handling their coexistence in the tested operational scenarios. We develop a two-component architecture comprising: (i) a CAE for sensor fault detection, localization, and faulty signal reconstruction, and (ii) a CNN–LSTM network for sensor fault isolation and contamination source candidate ranking. The framework incorporates an explicit fault–contamination differentiation mechanism that prevents fault-induced deviations from being misinterpreted as contamination, thereby supporting fault-aware prioritization of candidate contamination source regions under sensor unreliability. To facilitate reproducibility of our results, we make our code and data publicly available to the community. We conduct extensive experiments on three realistic WDNs, including ablation studies on complex scenarios with simultaneous faults and fault-contamination coexistence. The results demonstrate the method’s effectiveness under the tested synthetic chlorine-reactive contamination scenarios, network layouts, and evaluated sensor fault models.
Results
Before presenting the experimental results, we briefly summarize the problem setting, framework workflow, and evaluation context to guide interpretation. We consider WDN monitoring under two interacting anomalies: sensor faults and water contamination. Specifically, sensor fault detection determines whether a sensor fault occurs, fault localization identifies which sensor is faulty, fault isolation classifies the fault type, and faulty signal reconstruction recovers the underlying clean measurement. Contamination source-region prioritization then aims to rank or narrow down likely candidate source regions, rather than necessarily identifying a unique source node, especially under sparse sensor coverage. To address these tasks, the proposed framework integrates CAE-based sensor fault detection, fault localization, and faulty signal reconstruction; CNN–LSTM-based fault isolation; and rule-based fault–contamination differentiation for candidate contamination source-region ranking. The framework is evaluated on three realistic WDNs of different scales, including Hanoi, ZJ, and L-Town, under four representative sensor faults: Missing, Bias, Spiky, and Drift. Here, Missing represents data loss, Bias represents systematic measurement offset, Spiky represents transient abnormal peaks, and Drift represents gradual sensor degradation. Full methodological and experimental details, including the formal problem formulation, network descriptions, fault generation, evaluation metrics, and algorithmic procedure, are provided in the Methods section.
Comparative evaluation against baseline methods
We first evaluate the reconstruction module by comparing the proposed CAE with neural reconstruction baselines. The faulty signal reconstruction capability of the proposed CAE is first assessed, as reconstruction quality underpins subsequent tasks, including fault detection, localization, and isolation. The CAE is compared against commonly used neural reconstruction models, including Deep-RNN 23 , LSTM-RNN 24 , and LSTM-VAE 25 . Experiments are conducted on the Hanoi network using an 80%–20% train-test split. Table 1 shows that the CAE achieves the lowest reconstruction error among all baselines. The performance gains stem from its ability to capture dominant local patterns and short-term dependencies, which are characteristic of chlorine dynamics in WDNs. In contrast, more complex sequence models, such as LSTM-RNN and LSTM-VAE, do not offer additional benefits and, in some cases, lead to higher reconstruction errors due to increased model complexity and optimization difficulty. Table 1 Comparison of reconstruction loss (in %) Deep RNN LSTM-RNN LSTM-VAE CAE (ours) Training loss 0.029(0.009) 0.648(0.123) 9.870(5.404) 0.011(0.002) Testing loss 0.030(0.009) 0.657(0.126) 9.873(5.526) 0.011(0.002) Results are reported as mean (standard deviation).
Table 1
Comparison of reconstruction loss (in %)
Results are reported as mean (standard deviation).
| Deep RNN | LSTM-RNN | LSTM-VAE | CAE (ours) | |
| Training loss | 0.029(0.009) | 0.648(0.123) | 9.870(5.404) | 0.011(0.002) |
| Testing loss | 0.030(0.009) | 0.657(0.126) | 9.873(5.526) | 0.011(0.002) |
We then evaluate the fault isolation module by comparing CNN–LSTM with representative classifier baselines. As shown in Table 2 , CNN-LSTM achieves the best performance (86%) with low variance, outperforming CNN (79%), MLP (78%), and LSTM (45%). This improvement is attributed to its ability to jointly capture local features and temporal dependencies, which are essential for fault patterns in sensor data. In contrast, MLP lacks temporal modeling capability, while standalone LSTM shows limited effectiveness in extracting discriminative features from noisy inputs. These results justify the selection of CNN-LSTM for fault isolation. Table 2 Comparison with other classifiers (in %) Algorithm MLP CNN LSTM CNN-LSTM Accuracy 78(0.172) 79(0.027) 45(0.325) 86(0.023) Results are reported as mean (standard deviation).
Table 2
Comparison with other classifiers (in %)
Results are reported as mean (standard deviation).
| Algorithm | MLP | CNN | LSTM | CNN-LSTM |
| Accuracy | 78(0.172) | 79(0.027) | 45(0.325) | 86(0.023) |
Finally, we evaluate the end-to-end contamination source-region prioritization performance against existing methods and ablated variants. While previous experiments evaluated individual modules, this section assesses the end-to-end candidate contamination source-region ranking performance of the proposed framework. We benchmark against state-of-the-art methods 21 , 22 and perform an ablation study by removing the Signal Reconstruction and Differentiation Rules components to quantify their contributions under sensor fault interference. The evaluation is conducted on 20 randomized scenarios with varying arsenite injection locations and random single-sensor faults (injected in two batches) across the Hanoi and ZJ networks, under sparse sensor coverage (19% and 9%, respectively).
As shown in Table 3 , the Full Pipeline consistently achieves the best Top- k candidate-ranking performance and the lowest false alarm rate. The ablation study highlights two key findings: (1) Signal Reconstruction is essential for preserving data integrity, as faulty measurements otherwise propagate through the latent space and degrade candidate source ranking; (2) Differentiation Rules act as a critical filter to prevent sensor faults from being misclassified as contamination, and their removal leads to a marked increase in false alarms. In comparison, 21 relies on hydraulic backtracking without accounting for sensor faults, limiting its ability to handle fault-contamination coexistence, while 22 adopts a decentralized scheme but similarly lacks fault-awareness, resulting in excessive false alarms and degraded candidate ranking under overlapping events. Despite these constraints, the proposed framework maintains useful Top- k source-region narrowing performance, including 80% Top-10 accuracy on the sparsely monitored ZJ network. This indicates that the framework can help narrow down candidate contamination source regions for further investigation, rather than uniquely identifying the source under sparse sensor coverage, which may be unrealistic in practice. Table 3 Comparison of contamination source-region prioritization performance with baseline methods Network Algorithm Top-1 Top-3 Top-10 # false alarms Full pipeline (ours) 17 (3.214) 67 (4.873) 83 (3.956) 1.010 (0.012) Without reconstruction 12 (3.487) 50 (5.921) 70 (5.214) 1.300 (0.015) Without differentiation rule 14 (3.362) 52 (5.784) 72 (5.103) 2.730 (0.021) Ref. 21 15 (3.105) 56 (5.102) 78 (4.287) 1.852 (0.017) Hanoi Ref. 22 14 (3.256) 54 (5.238) 74 (4.912) 2.232 (0.019) Full pipeline (ours) 5 (2.148) 20 (4.237) 80 (5.103) 1.370 (0.024) Without reconstruction 2 (1.982) 12 (4.521) 68 (5.784) 1.533 (0.023) Without differentiation rule 3 (2.103) 14 (4.387) 72 (5.642) 3.245 (0.045) Ref. 21 4 (2.214) 15 (4.198) 75 (5.214) 2.155 (0.038) ZJ Ref. 22 4 (2.187) 14 (4.265) 72 (5.603) 2.860 (0.041) Results are reported as mean (standard deviation).
Table 3
Comparison of contamination source-region prioritization performance with baseline methods
Results are reported as mean (standard deviation).
| Network | Algorithm | Top-1 | Top-3 | Top-10 | # false alarms |
| Full pipeline (ours) | 17 (3.214) | 67 (4.873) | 83 (3.956) | 1.010 (0.012) | |
| Without reconstruction | 12 (3.487) | 50 (5.921) | 70 (5.214) | 1.300 (0.015) | |
| Without differentiation rule | 14 (3.362) | 52 (5.784) | 72 (5.103) | 2.730 (0.021) | |
| Ref. 21 | 15 (3.105) | 56 (5.102) | 78 (4.287) | 1.852 (0.017) | |
| Hanoi | Ref. 22 | 14 (3.256) | 54 (5.238) | 74 (4.912) | 2.232 (0.019) |
| Full pipeline (ours) | 5 (2.148) | 20 (4.237) | 80 (5.103) | 1.370 (0.024) | |
| Without reconstruction | 2 (1.982) | 12 (4.521) | 68 (5.784) | 1.533 (0.023) | |
| Without differentiation rule | 3 (2.103) | 14 (4.387) | 72 (5.642) | 3.245 (0.045) | |
| Ref. 21 | 4 (2.214) | 15 (4.198) | 75 (5.214) | 2.155 (0.038) | |
| ZJ | Ref. 22 | 4 (2.187) | 14 (4.265) | 72 (5.603) | 2.860 (0.041) |
Computational efficiency study
To empirically validate the online performance of our framework, deployment benchmarks were conducted on an Intel Core i7-8665U (1.90 GHz) processor. The evaluation was performed upon each new signal arrival to simulate a continuous online monitoring scenario, and results were averaged over 50 independent runs to ensure statistical stability. As reported in Table 4 , the proposed method achieves millisecond-level inference latency (approximately 27–30 ms for both detection and isolation), while maintaining a low computational footprint (<11 MFLOPs and <800 KB memory). These results demonstrate that the framework satisfies online response requirements for practical SCADA systems. Table 4 Computational complexity and online performance benchmarks across three WDNs Network Features Det_FLOP (M) Det_Latency (ms) Iso_FLOP (M) Iso_Latency (ms) #Params Memory (KB) Hanoi 6 8.902 27.403 (2.268) 0.55 29.785 (14.121) 188234 735.291 ZJ 10 9.2044 27.663 (2.151) 0.55 27.882 (2.130) 189134 738.820 L-Town 33 10.9432 28.141 (2.726) 0.55 28.805 (4.907) 194309 759.020 Results are reported as mean (standard deviation).
Table 4
Computational complexity and online performance benchmarks across three WDNs
Results are reported as mean (standard deviation).
| Network | Features | Det_FLOP (M) | Det_Latency (ms) | Iso_FLOP (M) | Iso_Latency (ms) | #Params | Memory (KB) |
| Hanoi | 6 | 8.902 | 27.403 (2.268) | 0.55 | 29.785 (14.121) | 188234 | 735.291 |
| ZJ | 10 | 9.2044 | 27.663 (2.151) | 0.55 | 27.882 (2.130) | 189134 | 738.820 |
| L-Town | 33 | 10.9432 | 28.141 (2.726) | 0.55 | 28.805 (4.907) | 194309 | 759.020 |
Sensor fault severity sensitivity analysis
To evaluate the operational boundaries of the proposed framework, we conducted a sensitivity analysis on fault severity across the four representative fault types using the Hanoi network as the experimental benchmark. This analysis aims to quantify the impact of fault magnitude on detection sensitivity, isolation accuracy, and localization performance. Fault magnitudes were categorized into three decreasing intensity levels: Obvious (baseline), Moderate (1/2 of baseline), and Subtle (1/4 of baseline). Except for the Missing fault, the parameters of all other fault types were scaled accordingly. For Bias , the offset ranges were set to [0.05, 0.1] ( Obvious ), [0.025, 0.05] ( Moderate ), and [0.0125, 0.025] ( Subtle ). For Spiky readings, the noise mean and standard deviation were reduced from (0.1, 0.05) to (0.05, 0.025) and (0.025, 0.0125). For Drift , the incremental rates per step were defined as [0.0005, 0.001], [0.00025, 0.0005], and [0.000125, 0.00025], respectively.
Table 5 summarizes the impact of fault severity on detection, isolation, and localization. Results are averaged over 20 independent scenarios and reported as the mean with standard deviation for statistical reliability. As severity decreases from Obvious to Subtle , fault isolation accuracy degrades, particularly for Bias and Spiky faults, whose subtle deviations are more easily confused with Drift . This also leads to increased FNR in some cases (e.g., Spiky ), reflecting reduced detectability under low signal-to-noise conditions. In contrast, detection and fault-localization metrics remain relatively consistent with consistently high HitRate@P% and generally low FNR and FPR across most settings. Overall, while smaller fault magnitudes impair isolation performance, the framework maintains consistent detection and fault-localization performance under the tested fault severity settings. Table 5 Sensitivity analysis of sensor fault severity on the Hanoi network across multiple diagnostic metrics (in %) Network Fault type Sensor fault severity FNR FPR Accuracy HitRate@P% Subtle 0(0.000) 0.367(0.014) 0(0.000) 10(0.000) Moderate 0(0.000) 0.333(0.006) 20(0.400) 100(0.000) Bias Obvious 0(0.000) 0.367(0.008) 95(0.218) 100(0.000) Subtle 25(0.433) 0(0.000) 0(0.000) 75(0.433) Moderate 0(0.000) 0(0.000) 10(0.300) 100(0.000) Spiky Obvious 0(0.000) 0(0.000) 100(0.000) 100(0.000) Subtle 0(0.000) 0.008(0.012) 100(0.000) 100(0.000) Moderate 0(0.000) 0.009(0.012) 100(0.000) 100(0.000) Hanoi Drift Obvious 0(0.000) 0.009(0.013) 100(0.000) 100(0.000) Results are reported as mean (standard deviation).
Table 5
Sensitivity analysis of sensor fault severity on the Hanoi network across multiple diagnostic metrics (in %)
Results are reported as mean (standard deviation).
| Network | Fault type | Sensor fault severity | FNR | FPR | Accuracy | HitRate@P% |
| Subtle | 0(0.000) | 0.367(0.014) | 0(0.000) | 10(0.000) | ||
| Moderate | 0(0.000) | 0.333(0.006) | 20(0.400) | 100(0.000) | ||
| Bias | Obvious | 0(0.000) | 0.367(0.008) | 95(0.218) | 100(0.000) | |
| Subtle | 25(0.433) | 0(0.000) | 0(0.000) | 75(0.433) | ||
| Moderate | 0(0.000) | 0(0.000) | 10(0.300) | 100(0.000) | ||
| Spiky | Obvious | 0(0.000) | 0(0.000) | 100(0.000) | 100(0.000) | |
| Subtle | 0(0.000) | 0.008(0.012) | 100(0.000) | 100(0.000) | ||
| Moderate | 0(0.000) | 0.009(0.012) | 100(0.000) | 100(0.000) | ||
| Hanoi | Drift | Obvious | 0(0.000) | 0.009(0.013) | 100(0.000) | 100(0.000) |
Furthermore, although an increased FPR could potentially activate the differentiation rule and lead to false contamination alarms by introducing false alarms in other dimensions, our empirical results show that the FPR remains consistently low and stable across all severity levels. This indicates that variations in fault severity have a limited impact on contamination detection performance.
Concurrent sensor fault scenarios
We further evaluate the framework under concurrent sensor fault scenarios, including faults of the same type and faults of different types. These experiments assess whether the proposed framework can maintain consistent fault localization, isolation, and reconstruction performance when multiple sensors are faulty simultaneously.
First, we consider concurrent sensor faults of the same type. We first examine the model’s behavior under single-sensor faults in the Hanoi network, with the fault injected at node 18, corresponding to the third feature in Fig. 1 . The results for the four fault types are shown in Fig. 1 . The original signal (blue), reconstructed signal (yellow dashed), and the expected normal signal (red), approximated from the preceding normal batch, reveal two key observations. The large deviation between the original and reconstructed signals at the fault onset indicates the occurrence of a fault and supports fault localization. At the same time, the reconstructed signal closely follows the expected normal signal, demonstrating that the framework can effectively reconstruct the faulty measurement and recover the underlying normal behavior. Fig. 1 Detection, localization, and reconstruction results for different sensor faults in the Hanoi water distribution network. A fault is indicated by a deviation between the original sensor signal (blue) and the reconstructed signal (yellow dashed), enabling fault detection and localization. The reconstructed signal closely follows the expected normal signal (red), demonstrating effective reconstruction of faulty measurements. a Missing fault, where sensor readings are unavailable or lost. b Bias fault, where the measurement is shifted by a systematic offset. c Spiky fault, where transient abnormal peaks occur in the signal. d Drift fault, where the measurement gradually deviates from the normal signal over time.
Иллюстрация — в первоисточнике ↗
To assess performance under more challenging conditions, we evaluate scenarios where 1-4 sensors experience faults of the same type simultaneously (Table 6 ). While reconstruction error (MSE) increases with fault cardinality, HitRate@P% remains at 100% across all settings, indicating that the true faulty sensors are consistently ranked among the selected anomalous dimensions under these concurrent-fault settings. However, isolation accuracy exhibits a noticeable decline in extreme cases, particularly for four-sensor concurrent Drift faults, dropping to 68% in ZJ and 80% in L-Town. This performance dip highlights a limitation: when multiple sensors exhibit simultaneous, subtle drifts that mimic natural water quality fluctuations, the CAE’s global reconstruction can become distorted, thereby challenging the downstream CNN-LSTM classifier. While sensor-specific CAEs could mitigate this, the current approach strikes a practical balance between diagnostic depth and computational scalability for large-scale WDNs. Table 6 Sensor fault isolation, localization, and faulty signal reconstruction performance for single-type fault combinations on ZJ and L-Town (in %) ZJ L-Town Fault combination Accuracy MSE HitRate@P% Accuracy MSE HitRate@P% M #1 100(0.000) 0.033(0.014) 100(0.000) 100(0.000) 0.068(0.026) 100(0.000) M #2 100(0.000) 0.027(0.003) 100(0.000) 100(0.000) 0.057(0.004) 100(0.000) M #3 100(0.000) 0.025(0.060) 100(0.000) 100(0.000) 0.111(0.013) 100(0.000) M #4 100(0.000) 0.025(0.039) 100(0.000) 100(0.000) 0.115(0.018) 100(0.000) B #1 100(0.000) 0.029(0.004) 100(0.000) 100(0.000) 0.068(0.020) 100(0.000) B #2 100(0.000) 0.034(0.001) 100(0.000) 100(0.000) 0.060(0.008) 100(0.000) B #3 100(0.000) 0.037(0.007) 100(0.000) 100(0.000) 0.064(0.014) 100(0.000) B #4 100(0.000) 0.026(0.007) 100(0.000) 100(0.000) 0.101(0.014) 100(0.000) S #1 100(0.000) 0.028(0.004) 100(0.000) 100(0.000) 0.068(0.029) 100(0.000) S #2 100(0.000) 0.049(0.010) 100(0.000) 100(0.000) 0.064(0.007) 100(0.000) S #3 100(0.000) 0.059(0.007) 100(0.000) 100(0.000) 0.071(0.015) 100(0.000) S #4 90(20.000) 0.068(0.012) 100(0.000) 98(5.000) 0.104(0.012) 100(0.000) D #1 100(0.000) 0.028(0.010) 100(0.000) 100(0.000) 0.069(0.017) 100(0.000) D #2 100(0.000) 0.036(0.009) 100(0.000) 100(0.000) 0.061(0.015) 100(0.000) D #3 80(12.000) 0.040(0.007) 100(0.000) 100(0.000) 0.065(0.017) 100(0.000) D #4 68(10.000) 0.047(0.027) 100(0.000) 80(12.000) 0.102(0.011) 100(0.000) Results are reported as mean (standard deviation). M, B, S, and D denote Missing, Bias, Spiky, and Drift, respectively.
Table 6
Sensor fault isolation, localization, and faulty signal reconstruction performance for single-type fault combinations on ZJ and L-Town (in %)
Results are reported as mean (standard deviation). M, B, S, and D denote Missing, Bias, Spiky, and Drift, respectively.
| ZJ | L-Town | |||||
| Fault combination | Accuracy | MSE | HitRate@P% | Accuracy | MSE | HitRate@P% |
| M #1 | 100(0.000) | 0.033(0.014) | 100(0.000) | 100(0.000) | 0.068(0.026) | 100(0.000) |
| M #2 | 100(0.000) | 0.027(0.003) | 100(0.000) | 100(0.000) | 0.057(0.004) | 100(0.000) |
| M #3 | 100(0.000) | 0.025(0.060) | 100(0.000) | 100(0.000) | 0.111(0.013) | 100(0.000) |
| M #4 | 100(0.000) | 0.025(0.039) | 100(0.000) | 100(0.000) | 0.115(0.018) | 100(0.000) |
| B #1 | 100(0.000) | 0.029(0.004) | 100(0.000) | 100(0.000) | 0.068(0.020) | 100(0.000) |
| B #2 | 100(0.000) | 0.034(0.001) | 100(0.000) | 100(0.000) | 0.060(0.008) | 100(0.000) |
| B #3 | 100(0.000) | 0.037(0.007) | 100(0.000) | 100(0.000) | 0.064(0.014) | 100(0.000) |
| B #4 | 100(0.000) | 0.026(0.007) | 100(0.000) | 100(0.000) | 0.101(0.014) | 100(0.000) |
| S #1 | 100(0.000) | 0.028(0.004) | 100(0.000) | 100(0.000) | 0.068(0.029) | 100(0.000) |
| S #2 | 100(0.000) | 0.049(0.010) | 100(0.000) | 100(0.000) | 0.064(0.007) | 100(0.000) |
| S #3 | 100(0.000) | 0.059(0.007) | 100(0.000) | 100(0.000) | 0.071(0.015) | 100(0.000) |
| S #4 | 90(20.000) | 0.068(0.012) | 100(0.000) | 98(5.000) | 0.104(0.012) | 100(0.000) |
| D #1 | 100(0.000) | 0.028(0.010) | 100(0.000) | 100(0.000) | 0.069(0.017) | 100(0.000) |
| D #2 | 100(0.000) | 0.036(0.009) | 100(0.000) | 100(0.000) | 0.061(0.015) | 100(0.000) |
| D #3 | 80(12.000) | 0.040(0.007) | 100(0.000) | 100(0.000) | 0.065(0.017) | 100(0.000) |
| D #4 | 68(10.000) | 0.047(0.027) | 100(0.000) | 80(12.000) | 0.102(0.011) | 100(0.000) |
Next, we evaluate concurrent sensor faults of different types. In real-world scenarios, multiple sensors may exhibit different fault types. However, since concurrent faults of different types are relatively rare, we limit our analysis to cases where two sensors each have a distinct fault type. This experiment is conducted on the ZJ and L-Town networks. The results of each network are summarized in Table 7 . As shown in both tables, isolation accuracy remains high across all sensor fault combinations in both networks, suggesting that, in the tested two-fault settings, heterogeneous fault types have a limited impact on fault isolation. This is expected, as the isolation step, shown in Fig. 2 , is processed independently for each sensor fault, ensuring that concurrent faults do not interfere with each other during isolation. For faulty signal reconstruction, consistent with earlier findings, the MSE for L-Town is higher than that for ZJ. This is attributed to the larger number of sensors in L-Town, which increases the complexity of the learning task. Fig. 2 Framework for online sensor fault diagnosis and contamination source-region prioritization in water distribution networks. a Offline training: a convolutional autoencoder (CAE) learns to reconstruct normal sensor measurements, while a convolutional neural network-long short-term memory (CNN-LSTM) model is trained using the reconstruction residuals between faulty signals and its CAE-reconstructed signals. b Online prediction: incoming signals are reconstructed by the CAE, and deviations measured by a loss function L(.) are used for fault detection. Detected faults are then isolated and classified by the CNN-LSTM model, followed by rule-based logic for contamination identification and source-region prioritization. Table 7 Sensor fault isolation, localization, and faulty signal reconstruction performance for different-type fault combinations on ZJ and L-Town (in %) Fault ZJ L-Town Combination Accuracy MSE HitRate@P% Accuracy MSE HitRate@P% S&D 100(0.000) 0.046(0.020) 100(0.000) 100(0.000) 0.056(0.009) 100(0.000) S&M 100(0.000) 0.027(0.019) 100(0.000) 100(0.000) 0.060(0.010) 100(0.000) B&D 100(0.000) 0.032(0.009) 100(0.000) 100(0.000) 0.061(0.010) 100(0.000) B&M 100(0.000) 0.027(0.008) 100(0.000) 100(0.000) 0.059(0.009) 100(0.000) D&M 100(0.000) 0.081(0.009) 100(0.000) 100(0.000) 0.066(0.009) 100(0.000) B&S 100(0.000) 0.030(0.010) 100(0.000) 100(0.000) 0.067(0.010) 100(0.000) Results are reported as mean (standard deviation). (M, B, S, and D denote Missing, Bias, Spiky, and Drift, respectively).
Иллюстрация — в первоисточнике ↗
Table 7
Sensor fault isolation, localization, and faulty signal reconstruction performance for different-type fault combinations on ZJ and L-Town (in %)
Results are reported as mean (standard deviation). (M, B, S, and D denote Missing, Bias, Spiky, and Drift, respectively).
| Fault | ZJ | L-Town | ||||
| Combination | Accuracy | MSE | HitRate@P% | Accuracy | MSE | HitRate@P% |
| S&D | 100(0.000) | 0.046(0.020) | 100(0.000) | 100(0.000) | 0.056(0.009) | 100(0.000) |
| S&M | 100(0.000) | 0.027(0.019) | 100(0.000) | 100(0.000) | 0.060(0.010) | 100(0.000) |
| B&D | 100(0.000) | 0.032(0.009) | 100(0.000) | 100(0.000) | 0.061(0.010) | 100(0.000) |
| B&M | 100(0.000) | 0.027(0.008) | 100(0.000) | 100(0.000) | 0.059(0.009) | 100(0.000) |
| D&M | 100(0.000) | 0.081(0.009) | 100(0.000) | 100(0.000) | 0.066(0.009) | 100(0.000) |
| B&S | 100(0.000) | 0.030(0.010) | 100(0.000) | 100(0.000) | 0.067(0.010) | 100(0.000) |
Centralized vs. decentralized performance comparison
To justify our architectural choice, we compare the centralized framework with a decentralized alternative (sensor-specific CAEs). Since isolation accuracy drops in both the ZJ and L-Town networks under four concurrent drift faults (Table 6 ), we focus on this case to examine the trade-off between accuracy and computational cost. The results are shown in Table 8 . The decentralized scheme achieves 100% isolation, but at a much higher cost. In the L-Town network ( N = 33), its latency reaches 1474.977 ms—about 52 × higher than the centralized model (28.141 ms), and its memory usage (~816 MB) is three orders of magnitude larger than the centralized approach (759 KB). In contrast, the centralized model keeps low latency and memory while still achieving 100% HitRate@P. These results suggest that, although sensor-specific CAEs can offer stronger performance, the centralized design is a more practical choice for large-scale WDNs when computational cost is taken into account. Table 8 Quantitative comparison of centralized vs. decentralized architectures under four-sensor concurrent drift faults Network Architecture Accuracy(%) HitRate@P Det_Latency(ms) #Params Memory(KB) Centralized (ours) 68(10.000) 100(0.000) 27.663 (2.151) 189134 738.820 ZJ Decentralized 100(0.000) 100(0.000) 399.122(52.149) 389254 472189.500 Centralized (ours) 80(12.000) 100(0.000) 28.141 (2.726) 194309 759.020 L-town Decentralized 100(0.000) 100(0.000) 1474.977 (27.234) 1231429 816392.03 Results are reported as mean (standard deviation).
Table 8
Quantitative comparison of centralized vs. decentralized architectures under four-sensor concurrent drift faults
Results are reported as mean (standard deviation).
| Network | Architecture | Accuracy(%) | HitRate@P | Det_Latency(ms) | #Params | Memory(KB) |
| Centralized (ours) | 68(10.000) | 100(0.000) | 27.663 (2.151) | 189134 | 738.820 | |
| ZJ | Decentralized | 100(0.000) | 100(0.000) | 399.122(52.149) | 389254 | 472189.500 |
| Centralized (ours) | 80(12.000) | 100(0.000) | 28.141 (2.726) | 194309 | 759.020 | |
| L-town | Decentralized | 100(0.000) | 100(0.000) | 1474.977 (27.234) | 1231429 | 816392.03 |
Contamination in the presence of sensor faults
To evaluate the framework’s candidate source-region narrowing performance under sensor faults, a sensitivity analysis was performed on the ZJ network across various sensor coverage rates. For each configuration, 20 randomized scenarios involving diverse injection points and single sensor faults of random types were tested. As shown in Table 9 , Top-1 and Top-3 accuracies are strongly constrained by physical topology in highly sparse networks. Under the 9% coverage setting adopted in this study, the framework achieves 5% Top-1 accuracy, 20% Top-3 accuracy, and 80% Top-10 accuracy, together with a 0% FNR. These results indicate that, under sparse sensing, the framework should be interpreted as narrowing down a set of likely candidate source regions rather than uniquely identifying the contamination source. Notably, as coverage increases to 50%, Top-1 and Top-3 accuracies significantly improve to 70% and 80%, respectively. This trend suggests that denser sensor coverage improves the ability to prioritize more precise candidate source regions, while sparse coverage mainly supports search-area reduction for further investigation. Table 9 Contamination source-region prioritization and sensor fault detection/localization performance under different sensor coverage rates on the ZJ network (in %) Network Sensor cov. Top-1 Top-3 Top-10 FNR FPR HitRate@P% 9 5 (2.148) 20 (4.237) 80 (5.103) 20 20 (3.842) 40 (5.214) 90 (4.378) ZJ 50 70 (4.105) 80 (3.256) 95 (2.148) 0 (0.000) 4.44 (0.002) 100 (0.000) Results are reported as mean (standard deviation).
Table 9
Contamination source-region prioritization and sensor fault detection/localization performance under different sensor coverage rates on the ZJ network (in %)
Results are reported as mean (standard deviation).
| Network | Sensor cov. | Top-1 | Top-3 | Top-10 | FNR | FPR | HitRate@P% |
| 9 | 5 (2.148) | 20 (4.237) | 80 (5.103) | ||||
| 20 | 20 (3.842) | 40 (5.214) | 90 (4.378) | ||||
| ZJ | 50 | 70 (4.105) | 80 (3.256) | 95 (2.148) | 0 (0.000) | 4.44 (0.002) | 100 (0.000) |
We next provide three cases to examine contamination source-region narrowing in the presence of sensor faults. Experiments are conducted on the Hanoi, ZJ, and L-Town networks, with faults injected at nodes 7, 43, and 679, respectively. The contamination injection locations are marked as blue stars in Fig. 3 . In all cases, sensor faults occur prior to and persist throughout the contamination event. Fig. 3 Network topology with sensor placement and contamination source locations of Hanoi, ZJ and L-Town water distribution networks. a Hanoi network topology and flow direction. b ZJ network topology and flow direction. c L-Town network topology and flow direction. (Placed sensors are shown as red dots and contamination sources as blue stars).
Иллюстрация — в первоисточнике ↗
Figure 4 illustrates the sensor fault localization and isolation results before applying the differentiation rules under two scenarios. At node N7, a sensor fault (windows 2–3) and contamination (windows 3–4) overlap in the third window. If only sensor faults are considered, the contamination period would be misclassified as a Missing fault, as shown in Fig. 4 . Conversely, under the fault-free assumption where only contamination is modeled, the sensor fault in the second window would be incorrectly identified as contamination. By jointly considering sensor faults and contamination and introducing an explicit differentiation mechanism, the proposed framework correctly identifies both sensor faults and the true contamination period, as shown in Fig. 4 . Fig. 4 Sensor fault localization and isolation in the Hanoi water distribution network under contamination. Without explicit handling, contaminated measurements are misclassified as Missing faults.
Иллюстрация — в первоисточнике ↗
The candidate source-region narrowing results are summarized in Table 10 . The first row lists the nodes where contamination is detected, while the second row indicates the true contamination source node. The third row reports the number of potential contamination source nodes inferred by the proposed source-region narrowing method. As shown in the last row, the true source is included among the ten inferred candidates, resulting in a Top-10 accuracy of 100% for these specific instances. It should be emphasized, however, that these results represent individual illustrative cases; they are intended to demonstrate the framework’s workflow and do not constitute a comprehensive statistical basis for universal performance claims. The spatial candidate-region narrowing process and corresponding results for the Hanoi network are illustrated in Fig. 5 . This example will be revisited in the Methods section to further explain the proposed contamination source-region narrowing procedure and its mathematical formulation. Fig. 5 Contamination source-region prioritization in the water distribution network of Hanoi. Table 10 Contamination source-region prioritization performance in the presence of sensor faults Metric Hanoi ZJ L-Town M B S D M B S D M B S D Node IDs (detected) 11, 7 11, 26, 38 726, 740, 722, 752, 644, 679, 296 Node IDs (actual) 5 33 739 #Candidate source nodes 4 2 9 Top-10 accuracy (%) 100 100 100 (M, B, S, and D denote Missing, Bias, Spiky, and Drift).
Иллюстрация — в первоисточнике ↗
Table 10
Contamination source-region prioritization performance in the presence of sensor faults
(M, B, S, and D denote Missing, Bias, Spiky, and Drift).
| Metric | Hanoi | ZJ | L-Town | |||||||||
| M | B | S | D | M | B | S | D | M | B | S | D | |
| Node IDs (detected) | 11, 7 | 11, 26, 38 | 726, 740, 722, 752, 644, 679, 296 | |||||||||
| Node IDs (actual) | 5 | 33 | 739 | |||||||||
| #Candidate source nodes | 4 | 2 | 9 | |||||||||
| Top-10 accuracy (%) | 100 | 100 | 100 |
Discussion
Water Distribution Networks are fundamental to public health and wellbeing, as well as economic stability, yet their safe operation is increasingly challenged by the concurrent presence of contamination events and unreliable sensor measurements. In real-world deployments, sensor degradation can obscure contamination signals, thereby undermining monitoring decisions. Achieving fault-aware water quality monitoring, therefore, requires integrated solutions that explicitly account for sensor faults while preserving contamination detection and source-region prioritization capability. In this study, we introduce a unified two-phase deep learning framework that jointly addresses sensor fault diagnosis and contamination source candidate ranking within a single unified architecture. By coupling sensor fault detection, localization, isolation, and faulty signal reconstruction with contamination source-region narrowing, the framework prevents corrupted sensor measurements from propagating errors into downstream contamination analysis. Validation across three realistic WDNs demonstrates that the proposed approach maintains high diagnostic accuracy and improves Top- k candidate source-region narrowing performance under the tested synthetic chlorine-reactive contamination scenarios, network layouts, and sensor fault models.
Intuitively, the improved monitoring performance stems from explicitly accounting for sensor unreliability within the monitoring pipeline. Unlike conventional contamination-localization workflows that implicitly assume fault-free measurements, the proposed framework first performs sensor fault diagnosis (detection, localization, and isolation) and then differentiates sensor faults from contamination events using dedicated decision rules. This design prevents fault-induced deviations from being misinterpreted as contamination signatures, thereby reducing false alarms and improving contamination source candidate ranking when faults and contamination coexist. As a result, contamination detection and source-region narrowing remain useful for decision support under the tested degraded sensing conditions.
Despite these contributions, this study identifies specific limitations that open avenues for future research. From an algorithmic perspective, while the framework maintains high accuracy across most tested sensor fault diagnosis scenarios, its isolation performance exhibits a noticeable decline under extreme cases such as four concurrent Drift faults. Furthermore, the current differentiation and localization mechanisms are established based on chlorine reactivity, with arsenite serving as a representative pollutant; therefore, the results may not be directly generalizable to non-reactive contaminants or systems without chlorine residuals. Future work will therefore focus on developing more robust diagnostic algorithms specifically designed for extreme sensing uncertainties, such as exploring attention-based mechanisms or disentangled representation learning to enhance isolation sensitivity under high-cardinality concurrent faults. Additionally, we aim to extend the framework to incorporate a broader range of water quality signals and diverse contamination types, thereby enhancing the generalization and fault-aware decision-support capability of the monitoring system across more complex, real-world scenarios.
The proposed framework offers several key advantages for fault-aware water-quality monitoring. First, it establishes a unified monitoring paradigm that explicitly accounts for sensor unreliability, eliminating the common assumption of fault-free measurements in contamination analysis. By jointly integrating sensor fault detection, localization, isolation, faulty signal reconstruction, and contamination source candidate ranking within a single pipeline, the framework enhances diagnostic coverage and reduces fault-induced interference under concurrent fault–contamination scenarios. Second, the framework improves Top- k candidate source-region narrowing even when sensor faults and contamination events overlap, demonstrating its potential for decision support under degraded sensing conditions. This capability is particularly important in operational WDNs, where sensor degradation is inevitable. Third, by combining a lightweight CAE with a CNN–LSTM classifier, the framework enables localized, online anomaly interpretation at low computational cost. Our computational analysis (see “Methods”) confirms that the approach remains efficient even in resource-constrained deployments. Finally, the centralized deployment design simplifies real-world implementation. By hosting computation at a single processing unit, the framework reduces communication overhead and synchronization complexity, while avoiding the need for sensor-level processing hardware. This architecture facilitates scalability and cost-effective maintenance in practical WDN settings.
However, the proposed framework has a few limitations. First, the differentiation between contamination events and sensor faults relies on two predefined hydraulic-temporal rules, which are sensitive to network scale and sensing density. In sparse sensing configurations, Rule 1 may encounter identification challenges. This is because the absence of a downstream response, which serves as a key indicator of a local sensor fault, could simply result from insufficient sensor coverage rather than a lack of physical propagation. Furthermore, Rule 2 may be constrained in small-scale networks where the hydraulic transit time between nodes is shorter than the sensor sampling interval. Under these conditions, the sequential propagation pattern along the flow direction becomes difficult to distinguish, as the contaminant can traverse multiple monitoring points within a single sampling step. Consequently, the method is most effective when the sensing frequency is aligned with the network’s hydraulic dynamics and the WDN maintains reasonable sensing coverage.
By improving fault-aware contamination monitoring under sensor degradation, the proposed framework contributes to the resilience and sustainability of water distribution systems. Differentiating sensor faults from genuine contamination events reduces false alarms and unnecessary chemical interventions, while enabling timely and targeted mitigation strategies. In this way, the framework supports proactive water quality management and strengthens infrastructure preparedness against operational uncertainty and environmental stressors.
These findings underscore the necessity of moving beyond fault-free sensing assumptions in WDN monitoring. Designing monitoring systems that explicitly account for sensor unreliability is essential for achieving fault-aware online decision support. This paradigm is particularly relevant for critical infrastructures, where sensing imperfections are inevitable, and system resilience depends on integrated data-driven strategies.
From an implementation perspective, many critical infrastructure (CI) operators have already deployed IoT sensors for routine monitoring. Consequently, adopting the proposed framework primarily involves integrating the proposed intelligent analytics layer into existing SCADA/IoT infrastructures rather than investing in additional hardware. The computational analysis confirms its feasibility. Such integration aligns with ongoing CI digitalization efforts.
Algorithm 1
High-level online procedure for sensor fault diagnosis, faulty signal reconstruction, and contamination source-region inference
1: Input:
2: X = ( x 1 , …, x k ): signals for all sensors
D : labeled data for pre-training, including normal data and sensor faults
Init:
3: C N N _ L S T M . t r a i n ( D ), C A E . t r a i n ( D ) ⊳ Pre-train models
4: θ 1 , …, θ k ← set thresholds ⊳ Eq.
( 2 ) Start:
5: for each batch \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${b}^{i}=({x}_{1}^{i},\ldots ,{x}_{k}^{i})$$\end{document} b i = ( x 1 i , … , x k i ) in X do
6: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{b}}^{i}=({\widehat{x}}_{1}^{i},\ldots ,{\widehat{x}}_{k}^{i})\leftarrow CAE({b}^{i})$$\end{document} b ^ i = ( x ^ 1 i , … , x ^ k i ) ← C A E ( b i )
7: for each sensor j ∈ {1, …, k } do
8: if \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${L}_{CAE}({\widehat{x}}_{j}^{i},{x}_{j}^{i}) > {\theta }_{j}$$\end{document} L C A E ( x ^ j i , x j i ) > θ j then ⊳ Sensor fault detection, localization, and reconstruction
9: if Count( j ) > 1 and contamination check is True then ⊳ More than one sensor fault
10: Infer candidate contamination source region ⊳ Eq. ( 4 )
11: else
12: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{y}}_{j}^{i}\leftarrow CNN\_LSTM({x}_{j}^{i}-{\widehat{x}}_{j}^{i})$$\end{document} y ^ j i ← C N N _ L S T M ( x j i - x ^ j i ) ⊳ Sensor fault isolation
13: Send command: replace \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{(i+1)}$$\end{document} x j ( i + 1 ) with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{x}}_{j}^{i}$$\end{document} x ^ j i
14: else
15: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$({\widehat{y}}_{1}^{i},\ldots ,{\widehat{y}}_{k}^{i})\leftarrow (0,\ldots ,0)$$\end{document} ( y ^ 1 i , … , y ^ k i ) ← ( 0 , … , 0 ) ⊳ Classified as normal
Methods
Problem formulation
WDNs are modeled as graphs, where nodes represent junctions and undirected edges represent pipes 26 . A graph G = ( V , E ) consists of node set V and edge set E , with each edge e i , j = ( v i , v j ) ∈ E , i ≠ j . The sensors are installed on the nodes; as full sensor coverage is impractical, only k ≪ ∣ V ∣ sensors are installed. The input signals from all sensors S = { s 1 ,…, s k } are represented as X ∈ R k × T = { x 1 ,…, x k }, where x j ∈ R T corresponds to the measurements from sensor s j and j = {1, …, k }. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${b}_{i}\in {{\mathbb{R}}}^{k\times d}=\{{x}_{1}^{i},\ldots ,{x}_{k}^{i}\}$$\end{document} b i ∈ R k × d = { x 1 i , … , x k i } represents the i -th batch of signals collected from all k sensors. T and d denote the total signal length and batch length, respectively. In this study, contamination is detected through chlorine measurements, as chlorine is a widely used disinfectant and sensitive indicator of water quality due to its reaction with many contaminants 27 , 28 . However, chlorine sensors themselves are prone to faults. Therefore, we jointly consider sensor fault diagnosis for chlorine sensors and contamination monitoring.
We consider two main types of anomalies in WDNs: sensor faults and water contamination. Consider the i -th batch \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${b}_{i}\in {R}^{k\times d}=\{{x}_{1}^{i},...,{x}_{k}^{i}\}$$\end{document} b i ∈ R k × d = { x 1 i , . . . , x k i } , where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{i}\in {R}^{d}$$\end{document} x j i ∈ R d . Fault detection ( \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${f}_{det}:{{\mathbb{R}}}^{k\times d}\to \{0,1\}$$\end{document} f d e t : R k × d → { 0 , 1 } ) determines whether any sensor fault exists in b i (0 for no fault, 1 for fault detected). Fault localization ( \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${f}_{loc}:{{\mathbb{R}}}^{k\times d}\to {\{0,1\}}^{k}$$\end{document} f l o c : R k × d → { 0 , 1 } k ) identifies which sensors are faulty, assigning 0 for normal and 1 for faulty to each s j . Fault isolation ( \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${f}_{cls}:{{\mathbb{R}}}^{d}\to \{1,...,n\}$$\end{document} f c l s : R d → { 1 , . . . , n } ) classifies the fault type of each detected faulty sensor. Contamination source-region prioritization ( \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${g}_{{\rm{loc}}}:{\{0,1\}}_{{\rm{\det }}}^{k}\to {\{0,1\}}_{{\rm{src}}}^{V}$$\end{document} g loc : { 0 , 1 } det k → { 0 , 1 } src V ) aims to infer a candidate contamination source region from binary sensor detections, rather than necessarily identifying a unique source node under sparse sensor coverage.
Experimental setup
The proposed framework is evaluated with three realistic WDNs: the Hanoi network in Vietnam 29 , the Zhi Jiang (ZJ) network in China 30 , and the widely used benchmark L-Town 31 . Their topologies and sensor placements, optimized via a multi-objective evolutionary algorithm to minimize affected population 32 , are illustrated in Fig. 3 . Table 11 summarizes these networks and their sensor counts. They vary in size from the small Hanoi network to the large L-Town network. Table 11 WDN descriptions Network #Nodes #Sensors #Pipes #Reservoirs #Tanks #Pumps Hanoi 32 6 34 1 0 0 ZJ 113 10 164 1 0 0 L-Town 784 33 905 2 1 1
Table 11
WDN descriptions
| Network | #Nodes | #Sensors | #Pipes | #Reservoirs | #Tanks | #Pumps |
| Hanoi | 32 | 6 | 34 | 1 | 0 | 0 |
| ZJ | 113 | 10 | 164 | 1 | 0 | 0 |
| L-Town | 784 | 33 | 905 | 2 | 1 | 1 |
This study focuses on four representative sensor fault types commonly encountered in sensor networks: Missing (M), Bias (B), Spiky (S), and Drift (D). These fault types capture distinct and fundamental failure mechanisms, including data loss (Missing), systematic offset (Bias), transient anomalies (Spiky), and gradual temporal degradation (Drift), and are widely adopted in the literature 4 , 33 . Their generation in our experiments follows the approach in ref. 34 . While this set does not exhaust all possible fault behaviors, it provides a principled basis for evaluating fault diagnosis performance, as more complex or application-specific faults can often be interpreted as variations or combinations of these basic patterns. Accordingly, we use these four types to assess the effectiveness of the proposed framework, while noting that the methodology is not inherently restricted to this specific set. Detailed descriptions and corresponding illustrations are provided in Fig. 6 . To further assess reliability beyond isolated fault types, we evaluate concurrent fault scenarios across multiple sensors, including both same-type and heterogeneous combinations (see Tables 6 and 7 ), providing additional evidence of consistent fault-diagnosis performance under more complex conditions. Fig. 6 Examples of four typical sensor fault types in water quality monitoring data. a Missing fault, where consecutive readings drop to zero; b Bias fault, where measurements are consistently shifted from the normal range; c Spiky fault, characterized by intermittent abnormal spikes; d Drift fault, showing a gradual deviation over time. The blue solid line represents normal sensor readings, and the orange dashed line indicates faulty measurements.
Иллюстрация — в первоисточнике ↗
Regarding the performance metrics, we use Top-K Accuracy for fault isolation and contamination source-region prioritization, MSE 35 for faulty signal reconstruction, and HitRate@P% 36 for fault localization.
Data generation
In this study, scenario data are generated using EPyT-Flow 37 based on realistic seasonal water demand patterns derived from historical consumption data reported by water utilities 38 at 30-minute resolution. Hydraulic and water-quality dynamics are simulated using EPANET and EPANET-MSX, which model contaminant transport and reaction processes within the network 39 . Gaussian noise N (0, 0.01) is added to all sensors, and chlorine is injected at 0.7 mg/L at the reservoir. The offline dataset comprises six months of normal operation and one month of synthetic fault data for each fault type, while the online dataset contains six months of mixed scenarios with injected faults and contamination events. Fault simulations follow four common types 33 : missing data (value set to zero), bias (offset of 0.05-0.1), spiky readings (noise with mean 0.1, std 0.05), and drift (increase of 0.0005–0.001 per step). Contamination scenarios are generated by injecting arsenite (0.8–1 mg/L) at a random node, specifically N5, N33, and N739 in Hanoi, ZJ, and L-Town, respectively.
Proposed framework
We propose a two-phase data-driven framework designed for integrated sensor fault detection, localization, isolation, faulty signal reconstruction, and contamination source-region inference. As illustrated in Fig. 2 , the architecture comprises an offline training phase and an online prediction phase, with the complete operational procedure detailed in Algorithm 1.
Centrally, the framework employs a Convolutional Autoencoder (CAE) to detect and localize faults while performing faulty signal reconstruction ( \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${f}_{{\rm{corr}}}:{{\mathbb{R}}}^{d}\to {{\mathbb{R}}}^{d}$$\end{document} f corr : R d → R d ). Specifically, for a detected faulty signal \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{i}$$\end{document} x j i (measurement of sensor s j in batch b i ), the CAE restores it to a reconstructed signal \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{x}}_{j}^{i}$$\end{document} x ^ j i , which approximates the underlying fault-free measurement. To better capture spatial features, the CAE utilizes convolutional layers instead of dense layers 40 , while a hybrid 1D CNN-LSTM model is integrated to perform fault isolation and support downstream analysis.
The nomenclature for this framework is summarized in Table 12 . Key hyper-parameters for the CAE and the 1D CNN-LSTM are provided in Table 13 and Fig. 7 , respectively. The selection of these parameters is informed by both the physical characteristics of water distribution networks and empirical validation. Specifically, the window size for the CAE is set to T cae = 336 (one week) to capture a complete cycle of weekly water consumption and chlorine concentration patterns, which is essential for learning baseline behavior. For the CNN-LSTM, a window size of T lstm = 48 (one day) is utilized to ensure sufficient temporal context for fault isolation while maintaining low computational latency for online deployment. Furthermore, we set α = 1.25 to derive sensor-specific thresholds as defined in Eq. ( 2 ); this value was selected to achieve an optimal balance between the True Positive Rate and the False Positive Rate across various fault magnitudes. All experiments in this study are repeated 20 times, and the results are reported as mean values with their corresponding standard deviations. Fig. 7 Architecture of the integrated 1D CNN-LSTM model, where one-dimensional convolutional neural networks (CNN) extract local features and long short-term memory (LSTM) layers capture temporal patterns. The diagram specifies hyper-parameters including kernel sizes, pooling factors, and the dropout rate (0.2) used to prevent overfitting prior to the final dense output layer. Table 12 Nomenclature Variable Description Data D Historical data, including D n (normal) and D f (faulty); dimension: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${R}^{k\times {T}_{off}}$$\end{document} R k × T o f f , where k is number of sensors and T o f f the number of timesteps. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${D}_{n,j}^{i}$$\end{document} D n , j i Historical normal data of sensor j in batch i , \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\bf{D}}}_{n}={\{{D}_{n,j}^{i}\}}_{i=1j=1}^{Nk}$$\end{document} D n = { D n , j i } i = 1 j = 1 N k ; dimension: R d . \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${D}_{f,j}^{i}$$\end{document} D f , j i Historical faulty data of sensor j in batch i , \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\bf{D}}}_{f}={\{{D}_{f,j}^{i}\}}_{i=1j=1}^{Nk}$$\end{document} D f = { D f , j i } i = 1 j = 1 N k ; dimension: R d . X Unlabeled arriving data, X = { x 1 ,…, x k }; dimension: R k × T , where T is number of timesteps. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{i}$$\end{document} x j i Arriving data of sensor j in batch i ; dimension: R d . b i Arriving batch i , \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${b}^{i}=({x}_{1}^{i},\ldots ,{x}_{k}^{i})$$\end{document} b i = ( x 1 i , … , x k i ) ; dimension: R k × d . Reconstruction and prediction \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{b}}^{i}$$\end{document} b ^ i Reconstruction of b i , \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{b}}^{i}=({\widehat{x}}_{1}^{i},\ldots ,{\widehat{x}}_{k}^{i})$$\end{document} b ^ i = ( x ^ 1 i , … , x ^ k i ) ; dimension: R k × d . \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{x}}_{j}^{i}$$\end{document} x ^ j i Reconstruction of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{i}$$\end{document} x j i ; dimension: R d . \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{y}}_{j}^{i}$$\end{document} y ^ j i Prediction of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{i}$$\end{document} x j i ; dimension: R d . Model parameters CAE CAE model. CNN_LSTM CNN-LSTM model. L CAE Loss function of CAE. L CNN−LSTM Loss function of CNN-LSTM. θ j Anomaly threshold of sensor j . α Threshold adjustment parameter. T cae Batch size of CAE input. T lstm Batch size of CNN-LSTM input. Table 13 Detail of different layers of CAE Layer Type Filters Window size Stride Padding 1 Conv 32 3 1 Same 2 Pool(Max) - 2 1 Same 3 Conv 64 3 1 Same 4 Pool(Max) - 2 1 Same 5 Conv 128 3 1 Same 6 Pool(Max) - 2 1 Same 7 TransConv 128 3 1 Same 8 UpSampling - 2 - - 9 TransConv 64 3 1 Same 10 UpSampling - 2 - - 11 TransConv 32 3 1 Same 12 UpSampling - 2 - - 13 Conv Original Features 3 1 Same
Иллюстрация — в первоисточнике ↗
Table 12
Nomenclature
| Variable | Description |
| Data | |
| D | Historical data, including D n (normal) and D f (faulty); dimension: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${R}^{k\times {T}_{off}}$$\end{document} R k × T o f f , where k is number of sensors and T o f f the number of timesteps. |
| \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${D}_{n,j}^{i}$$\end{document} D n , j i | Historical normal data of sensor j in batch i , \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\bf{D}}}_{n}={\{{D}_{n,j}^{i}\}}_{i=1j=1}^{Nk}$$\end{document} D n = { D n , j i } i = 1 j = 1 N k ; dimension: R d . |
| \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${D}_{f,j}^{i}$$\end{document} D f , j i | Historical faulty data of sensor j in batch i , \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\bf{D}}}_{f}={\{{D}_{f,j}^{i}\}}_{i=1j=1}^{Nk}$$\end{document} D f = { D f , j i } i = 1 j = 1 N k ; dimension: R d . |
| X | Unlabeled arriving data, X = { x 1 ,…, x k }; dimension: R k × T , where T is number of timesteps. |
| \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{i}$$\end{document} x j i | Arriving data of sensor j in batch i ; dimension: R d . |
| b i | Arriving batch i , \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${b}^{i}=({x}_{1}^{i},\ldots ,{x}_{k}^{i})$$\end{document} b i = ( x 1 i , … , x k i ) ; dimension: R k × d . |
| Reconstruction and prediction | |
| \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{b}}^{i}$$\end{document} b ^ i | Reconstruction of b i , \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{b}}^{i}=({\widehat{x}}_{1}^{i},\ldots ,{\widehat{x}}_{k}^{i})$$\end{document} b ^ i = ( x ^ 1 i , … , x ^ k i ) ; dimension: R k × d . |
| \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{x}}_{j}^{i}$$\end{document} x ^ j i | Reconstruction of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{i}$$\end{document} x j i ; dimension: R d . |
| \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{y}}_{j}^{i}$$\end{document} y ^ j i | Prediction of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{i}$$\end{document} x j i ; dimension: R d . |
| Model parameters | |
| CAE | CAE model. |
| CNN_LSTM | CNN-LSTM model. |
| L CAE | Loss function of CAE. |
| L CNN−LSTM | Loss function of CNN-LSTM. |
| θ j | Anomaly threshold of sensor j . |
| α | Threshold adjustment parameter. |
| T cae | Batch size of CAE input. |
| T lstm | Batch size of CNN-LSTM input. |
Table 13
Detail of different layers of CAE
| Layer | Type | Filters | Window size | Stride | Padding |
| 1 | Conv | 32 | 3 | 1 | Same |
| 2 | Pool(Max) | - | 2 | 1 | Same |
| 3 | Conv | 64 | 3 | 1 | Same |
| 4 | Pool(Max) | - | 2 | 1 | Same |
| 5 | Conv | 128 | 3 | 1 | Same |
| 6 | Pool(Max) | - | 2 | 1 | Same |
| 7 | TransConv | 128 | 3 | 1 | Same |
| 8 | UpSampling | - | 2 | - | - |
| 9 | TransConv | 64 | 3 | 1 | Same |
| 10 | UpSampling | - | 2 | - | - |
| 11 | TransConv | 32 | 3 | 1 | Same |
| 12 | UpSampling | - | 2 | - | - |
| 13 | Conv | Original Features | 3 | 1 | Same |
During offline training, the multivariate time series data \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\bf{D}}\in {{\mathbb{R}}}^{k\times {T}_{{\rm{off}}}}$$\end{document} D ∈ R k × T off , where k is the number of sensors and T o f f the number of time steps of D , is segmented into batches of length d . Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${D}_{n,j}^{i}\in {{\mathbb{R}}}^{d}$$\end{document} D n , j i ∈ R d and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${D}_{f,j}^{i}\in {{\mathbb{R}}}^{d}$$\end{document} D f , j i ∈ R d denote the i -th batch from sensor j under normal and faulty conditions, respectively. Normal and faulty batches from D are organized into \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\bf{D}}}_{n}=\{{D}_{n,j}^{i}| i=1,\ldots ,N,\,j=1,\ldots ,k\}$$\end{document} D n = { D n , j i ∣ i = 1 , … , N , j = 1 , … , k } and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\bf{D}}}_{f}=\{{D}_{f,j}^{i}| i=1,\ldots ,N,\,j=1,\ldots ,k\}$$\end{document} D f = { D f , j i ∣ i = 1 , … , N , j = 1 , … , k } , respectively, where j is the sensor index, i is the batch index and N is the number of batches.
The CAE \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$({{\mathbb{R}}}^{k\times d}\to {{\mathbb{R}}}^{k\times d})$$\end{document} ( R k × d → R k × d ) is trained on normal data to reconstruct them, yielding \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{D}}_{n,j}^{i}={\rm{CAE}}({D}_{n,j}^{i})$$\end{document} D ^ n , j i = CAE ( D n , j i ) . We did not opt for an edge or on-device design; while training separate CAEs per node or sensor may improve performance, it is costly and limits scalability. The reconstruction loss, computed using the Mean Squared Error (MSE), is used to set the fault detection threshold. For each training batch of size T cae , the per-dimension batch loss for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${b}_{j}^{i}=\{{x}_{j}^{i,1},\ldots ,{x}_{j}^{i,{T}_{{\rm{cae}}}}\}$$\end{document} b j i = { x j i , 1 , … , x j i , T cae } is defined as 1 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${L}_{{\rm{CAE}}}({b}_{j}^{i})=\frac{1}{{T}_{{\rm{cae}}}}\mathop{\sum }\limits_{t=1}^{{T}_{{\rm{cae}}}}{({x}_{j}^{(i,t)}-{\widehat{x}}_{j}^{(i,t)})}^{2}$$\end{document} L CAE ( b j i ) = 1 T cae ∑ t = 1 T cae ( x j ( i , t ) - x ^ j ( i , t ) ) 2 and the corresponding threshold θ j for each sensor j is determined by 2 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\theta }_{j}=\alpha \cdot \mathop{\max }\limits_{i=1,\ldots ,n}{L}_{{\rm{CAE}}}({b}_{j}^{i})$$\end{document} θ j = α ⋅ max i = 1 , … , n L CAE ( b j i ) where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n=\frac{{\rm{len}}({D}_{n})}{{T}_{{\rm{cae}}}}$$\end{document} n = len ( D n ) T cae .
For CNN-LSTM \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$({{\mathbb{R}}}^{d}\to \{1,2,3,4\})$$\end{document} ( R d → { 1 , 2 , 3 , 4 } ) training, the input is the residual between faulty signals and their corresponding CAE-reconstructed normal signals. As illustrated in Fig. 2 , for each sensor j and batch i , the residual \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${D}_{f,j}^{i}-{\widehat{D}}_{n,j}^{i}$$\end{document} D f , j i - D ^ n , j i is used to emphasize fault-related deviations. This process is repeated for all batches and sensors. A smaller batch size T lstm < T cae is adopted in CNN-LSTM, since faults may occur within a batch. The CNN-LSTM is trained using the cross-entropy loss 3 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathcal{L}}}_{{\rm{CNN}}-{\rm{LSTM}}}=-\mathop{\sum }\limits_{c=1}^{{n}_{c}}{{\bf{1}}}_{[y=c]}\log {\widehat{p}}_{c}$$\end{document} L CNN - LSTM = - ∑ c = 1 n c 1 [ y = c ] log p ^ c where n c is the number of fault classes, y ∈ {1, …, n c } is the true label, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{p}}_{c}$$\end{document} p ^ c is the predicted probability for class c .
As shown in Fig. 2 , the online module detects and reconstructs faulty sensor measurements, localizes sensor faults, classifies fault types, and infers candidate contamination source regions using expert knowledge (Rule 1 and Rule 2). The blue line represents the original signal, while the orange dashed line shows the CAE-reconstructed signal.
Step 1: Sensor fault detection and localization. A CAE is used in this step, with input dimension k corresponding to the number of sensors. The input data X ∈ R k × T = { x 1 ,…, x k } captures both normal behavior and potential faults, where T is time steps of arriving time. To model temporal patterns, the data is segmented into batches of size T cae , where each batch b i consists of { \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{1}^{i},\ldots ,{x}_{k}^{i}$$\end{document} x 1 i , … , x k i }, and each \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{i}=\{{x}_{j}^{(i,1)},\ldots ,{x}_{j}^{(i,{T}_{{\rm{cae}}})}\}$$\end{document} x j i = { x j ( i , 1 ) , … , x j ( i , T cae ) } represents consecutive readings from sensor j . The CAE outputs reconstructed signals { \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{x}}_{1}^{i},\ldots ,{\widehat{x}}_{k}^{i}$$\end{document} x ^ 1 i , … , x ^ k i }, and computes the reconstruction loss per sensor. A fault at sensor s j is detected if the loss \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${L}_{CAE}({\widehat{x}}_{j}^{i},{x}_{j}^{i})$$\end{document} L C A E ( x ^ j i , x j i ) exceeds the offline-defined threshold θ j .
Step 2: Faulty signal reconstruction. If \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{i}$$\end{document} x j i is detected as faulty, its reconstruction \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{x}}_{j}^{i}$$\end{document} x ^ j i is as the reconstructed signal. For the next batch, input \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{(i+1)}$$\end{document} x j ( i + 1 ) is replaced with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{x}}_{j}^{i}$$\end{document} x ^ j i to limit fault impact on other sensors, given the multi-dimensional nature of the input. Leveraging signal periodicity (aligned with T cae ), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{x}}_{j}^{i}$$\end{document} x ^ j i approximates normal patterns and supports subsequent fault localization. Persistent or new faults can still be effectively detected in subsequent batches.
Step 3: Sensor fault isolation. Once s j is detected as faulty in b i , the difference \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j}^{i}-{\widehat{x}}_{j}^{i}$$\end{document} x j i - x ^ j i is fed to the CNN-LSTM with batch size T lstm , yielding a prediction \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{y}}_{j}^{i}$$\end{document} y ^ j i . Classification uses majority voting. Each CAE batch of size T cae yields T cae / T lstm predictions. In case of a tie, probabilities are evenly split. For instance, predictions [1, 2, 3, 3, 2, 2] yield class 2, while [1, 2, 1, 2, 2, 1] results in equal probabilities for classes 1 and 2.
Step 4: Contamination detection and candidate source-region inference. While multiple sensors may fail simultaneously, it is crucial to distinguish sensor faults from contamination events. This distinction is grounded in the hydraulic and reactive transport behavior of contaminants in WDNs. Under advective-dispersive transport, contaminant concentrations evolve gradually along the flow direction, resulting in spatially correlated anomalies that typically weaken downstream due to dilution and reaction kinetics. In contrast, common sensor faults (e.g., bias, drift, or missing readings) introduce localized measurement deviations without affecting the physical water quality state, and therefore do not exhibit downstream propagation patterns.
Based on these principles, we apply two differentiation rules: Rule 1: A sudden and localized deviation in chlorine concentration at a node, without a corresponding downstream response, suggests a local sensor fault. Rule 2: Anomalies that exhibit a downstream propagation pattern—i.e., consistent temporal onset along the flow direction and non-increasing magnitude until reaching a physical floor (e.g., zero chlorine)—indicate a contamination event.
These rules are theoretically consistent with mass conservation and contaminant transport dynamics in hydraulic networks. These rules are expected to be most informative when downstream spatial comparisons are available; their effectiveness may be limited in edge cases such as anomalies occurring at the downstream-most node, where spatial comparison is limited.
Once contamination is detected, candidate source-region inference is performed using spatial continuity. As in ref. 22 , the contamination region is estimated by intersecting the upstream of sensors with detected anomalies ( \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{y}}_{j}^{i} > 0$$\end{document} y ^ j i > 0 ) and the complement of the upstream of normal sensors ( \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{y}}_{j}^{i}=0$$\end{document} y ^ j i = 0 ). Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathcal{S}}}_{F}^{i}=\{{S}_{j}^{i}| {\widehat{y}}_{j}^{i} > 0\}$$\end{document} S F i = { S j i ∣ y ^ j i > 0 } and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathcal{S}}}_{N}^{i}=\{{S}_{j}^{i}| {\widehat{y}}_{j}^{i}=0\}$$\end{document} S N i = { S j i ∣ y ^ j i = 0 } ; then the candidate contamination source region is inferred using 4 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{Contam}.\,\mathrm{Reg}.=\mathrm{Upstream}({{\mathcal{S}}}_{F}^{i})\cap {(\mathrm{Upstream}({{\mathcal{S}}}_{N}^{i}))}^{c}.$$\end{document} Contam . Reg . = Upstream ( S F i ) ∩ ( Upstream ( S N i ) ) c . Consider the example in Fig. 5 ; according to Eq. ( 4 ), the contamination region is obtained by intersecting U p s t r e a m ( N 11, N 7) with U p s t r e a m ( N 18, N 20, N 25, N 30) c , resulting in a set of four nodes extending from N5 to N7 along the flow direction, which corresponds to the number of candidate source nodes reported in Table 10 .
Computational analysis
External memory requirements: The proposed framework is lightweight in memory usage. At each online inference step, only a single batch of data needs to be stored, with dimensionality k × T cae , where k is the number of sensors and T cae is the CAE input length.
Model parameters: The total number of learnable parameters for our CAE and CNN-LSTM models is 193 k + 111,040 and 35,940, respectively, where k is the sensor count. In the L-Town scenario, the CAE model occupies approximately 1 MB assuming 8 bytes per parameter; with INT8 quantization (1 byte per parameter), the size reduces to about 120 KB.
Training stage: During offline training, ∣ D n ∣ historical normal signals are used to train the CAE, while ∣ D f ∣ historical faulty signals are used to train the CNN-LSTM. The total historical dataset is D = { D n , D f }, with size k × T o f f . Training is performed entirely offline.
Prediction stage: The system first performs a single forward propagation step of the batch with size k × T cae through the CAE for reconstruction. Sensors with reconstruction losses exceeding their thresholds (i.e., fewer than k dimensions) are flagged as potentially faulty. Each flagged dimension then undergoes a single forward propagation step through the CNN-LSTM module to isolate the fault type. Finally, Rule 1 and Rule 2 are applied to distinguish sensor faults from contamination events. Suppose the average number of downstream sensors for each sensor is h . Then, the complexity of both rules is \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{O}}(k\times h)$$\end{document} O ( k × h ) , where k is the number of sensors to check. Depending on the network topology, h is typically smaller than k and can be significantly smaller. If an event is identified as contamination, the system performs a single forward propagation step using the k prediction results in Eq. ( 4 ) to infer the candidate contamination source region. This design reduces computational overhead by applying the CNN-LSTM only to a small subset of dimensions, ensuring efficient online processing.
Evaluation metrics
Fault detection: False Positive Rate (FPR) and False Negative Rate (FNR) are used to quantify detection reliability. FPR represents the probability that the system triggers a false alarm during normal operation, while FNR measures the risk of missing a genuine fault. Additionally, Detection Latency (Det_Latency) is used to quantify the temporal responsiveness of the framework, which is critical in practice for timely intervention and mitigation of potential water quality risks.
Fault isolation & Contamination source-region prioritization: To evaluate fault isolation and contamination source-region prioritization, we adopt a Top- K Accuracy framework. For fault isolation , we report Top-1 Accuracy , reflecting the model’s ability to correctly identify the dominant fault type. For contamination source-region prioritization , we report Top-1, Top-3, and Top-10 Accuracy . While Top-1 represents exact source identification, Top-3 and Top-10 provide a more practical assessment in water distribution networks, where the inverse source identification problem is often ill-posed due to sparse sensor placement and complex hydraulic interactions. These metrics reflect the model’s ability to narrow down a set of likely candidate locations for further investigation. Importantly, Top-10 Accuracy should not be interpreted as exact source localization; instead, it measures whether the true source is included within a prioritized candidate set.
Faulty signal reconstruction: The Mean Squared Error (MSE) 35 is used to quantify the accuracy of the reconstructed signals. By measuring the deviation between reconstructed outputs and ground-truth normal patterns, MSE provides an indication of how effectively the model removes fault-induced distortions while preserving the underlying system dynamics.
Fault Localization: We utilize HitRate@P% 36 to evaluate anomaly localization in multivariate time series as it provides a more reliable assessment for high-dimensional sensor data compared to fixed-threshold precision metrics. Unlike traditional point-wise evaluations, this ranking-based metric accounts for the relative magnitude of reconstruction errors across all dimensions, which is particularly suitable for identifying faulty sensors when the absolute error magnitude may vary due to different sensor types. The metric is defined as the proportion of true faulty dimensions appearing among the top-ranked reconstruction-loss dimensions 5 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\rm{HitRate@P}} \% =\frac{{\rm{Hit@}}\lfloor P \% \times | G{T}_{i}| \rfloor }{| G{T}_{i}| }$$\end{document} HitRate@P % = Hit@ ⌊ P % × ∣ G T i ∣ ⌋ ∣ G T i ∣ where HitRate@P% measures the overlap between G T _ i and the top ⌊ P % × ∣ G T i ∣⌋ highest-loss dimensions in A S i , which represents the reconstruction loss ranking at batch i , ∣ G T i ∣ is the ground truth length, and P is set to 100 in this study to ensure all truly anomalous dimensions are theoretically reachable in the ranking.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Acknowledgements
This work was supported by the European Research Council (ERC) under grant agreement No. 951424 (Water-Futures), and the Republic of Cyprus through the Deputy Ministry of Research, Innovation, and Digital Policy.
Author contributions
J.L. conceived the study, developed the methodology, and prepared the original manuscript draft. K.M. contributed to manuscript improvement and provided experimental guidance. D.G.E. contributed to manuscript improvement. M.M.P. contributed to problem formulation, manuscript improvement, oversaw the research project, funding acquisition, and overall supervision. All authors reviewed the manuscript.
Data availability
The datasets generated and/or analyzed during the current study are available in the GitHub repository and can be accessed via the link: https://github.com/Jin000001/waterqualitymonitoring .
Code availability
The code used to generate the data and reproduce the results of this study are available in the GitHub repository and can be accessed via the link: https://github.com/Jin000001/waterqualitymonitoring .
Competing interests
The authors declare no competing interests.
References
1. Mac Kenzie WR A massive outbreak in Milwaukee of cryptosporidium infection transmitted through the public water supply N. Engl. J. Med. 1994 331 161 167 10.1056/NEJM199407213310304 7818640 Mac Kenzie, W. R. et al. A massive outbreak in Milwaukee of cryptosporidium infection transmitted through the public water supply. N. Engl. J. Med. 331 , 161–167 (1994). 10.1056/NEJM199407213310304 7818640
2. Lienemann T Shiga toxin-producing Escherichia coli o100: H–: stx 2e in drinking water contaminated by waste water in Finland Curr. Microbiol. 2011 62 1239 1244 10.1007/s00284-010-9832-x 21188590 Lienemann, T. et al. Shiga toxin-producing Escherichia coli o100: H–: stx 2e in drinking water contaminated by waste water in Finland. Curr. Microbiol. 62 , 1239–1244 (2011). 10.1007/s00284-010-9832-x 21188590
3. Xi Z Yun Z Problems and countermeasures of controlling cyanobacteria bloom in Taihu Lake J. Environ. Eng. Technol. 2019 9 714 719 Xi, Z. & Yun, Z. Problems and countermeasures of controlling cyanobacteria bloom in Taihu Lake. J. Environ. Eng. Technol. 9 , 714–719 (2019).
4. Ni K Sensor network data fault types ACM Trans. Sens. Netw. 2009 5 1 29 10.1145/1525856.1525863 Ni, K. et al. Sensor network data fault types. ACM Trans. Sens. Netw. 5 , 1–29 (2009).
5. García, D. et al. Prognosis of quality sensors in the Barcelona drinking water network. In Proc . 2016 3rd Conference on Control and Fault-Tolerant Systems (SysTol) , 446–451 (IEEE, 2016).
6. Creaco E Real time control of water distribution networks: a state-of-the-art review Water Res. 2019 161 517 530 10.1016/j.watres.2019.06.025 31229732 Creaco, E. et al. Real time control of water distribution networks: a state-of-the-art review. Water Res. 161 , 517–530 (2019). 10.1016/j.watres.2019.06.025 31229732
7. Li D Wang Y Wang J Wang C Duan Y Recent advances in sensor fault diagnosis: a review Sens. Actuators A Phys. 2020 309 111990 10.1016/j.sna.2020.111990 Li, D., Wang, Y., Wang, J., Wang, C. & Duan, Y. Recent advances in sensor fault diagnosis: a review. Sens. Actuators A Phys. 309 , 111990 (2020).
8. Ntalampiras S Fault identification in distributed sensor networks based on universal probabilistic modeling IEEE Trans. Neural Netw. Learn. Syst. 2014 26 1939 1949 10.1109/TNNLS.2014.2362015 25347888 Ntalampiras, S. Fault identification in distributed sensor networks based on universal probabilistic modeling. IEEE Trans. Neural Netw. Learn. Syst. 26 , 1939–1949 (2014). 10.1109/TNNLS.2014.2362015 25347888
9. Kullaa J Detection, identification, and quantification of sensor fault in a sensor network Mech. Syst. Signal Process. 2013 40 208 221 10.1016/j.ymssp.2013.05.007 Kullaa, J. Detection, identification, and quantification of sensor fault in a sensor network. Mech. Syst. Signal Process. 40 , 208–221 (2013).
10. Bouzid, S. & Ramdani, M. Sensor fault detection and diagnosis in drinking water distribution networks. In Proc . 2013 8th International Workshop on Systems, Signal Processing and their Applications (WoSSPA) , 378–383 (IEEE, 2013).
11. Vaquet, V., Artelt, A., Brinkrolf, J. & Hammer, B. Taking care of our drinking water: dealing with sensor faults in water distribution networks. In Proc . International Conference on Artificial Neural Networks , 682–693 (Springer, 2022).
12. Kim M Kim H Movable wireless sensor-enabled waterway surveillance with enhanced coverage using multi-layer perceptron and reinforced learning Electronics 2025 14 3295 10.3390/electronics14163295 Kim, M. & Kim, H. Movable wireless sensor-enabled waterway surveillance with enhanced coverage using multi-layer perceptron and reinforced learning. Electronics 14 , 3295 (2025).
13. Kim H Ben-Othman J Famu: fault-tolerant mutual assisted virtual emotion barrier system using intelligent smart uavs IEEE Trans. Veh. Technol. 2021 70 10845 10852 10.1109/TVT.2021.3105530 Kim, H. & Ben-Othman, J. Famu: fault-tolerant mutual assisted virtual emotion barrier system using intelligent smart uavs. IEEE Trans. Veh. Technol. 70 , 10845–10852 (2021).
14. Laird CD Biegler LT van Bloemen Waanders BG Bartlett RA Contamination source determination for water networks J. Water Resour. Plan. Manag. 2005 131 125 134 10.1061/(ASCE)0733-9496(2005)131:2(125) Laird, C. D., Biegler, L. T., van Bloemen Waanders, B. G. & Bartlett, R. A. Contamination source determination for water networks. J. Water Resour. Plan. Manag. 131 , 125–134 (2005).
15. Cristo CD Leopardi A Pollution source identification of accidental contamination in water distribution networks J. Water Resour. Plan. Manag. 2008 134 197 202 10.1061/(ASCE)0733-9496(2008)134:2(197) Cristo, C. D. & Leopardi, A. Pollution source identification of accidental contamination in water distribution networks. J. Water Resour. Plan. Manag. 134 , 197–202 (2008).
16. Adedoja OS Hamam Y Khalaf B Sadiku ER Development of an algorithm for the estimation of contamination sources in a water distribution network IEEE Access 2020 8 200412 200419 10.1109/ACCESS.2020.3035573 Adedoja, O. S., Hamam, Y., Khalaf, B. & Sadiku, E. R. Development of an algorithm for the estimation of contamination sources in a water distribution network. IEEE Access 8 , 200412–200419 (2020).
17. Eliades DG Vrachimis SG Moghaddam A Tzortzis I Polycarpou MM Contamination event diagnosis in drinking water networks: a review Annu. Rev. Control 2023 55 420 441 10.1016/j.arcontrol.2023.03.011 Eliades, D. G., Vrachimis, S. G., Moghaddam, A., Tzortzis, I. & Polycarpou, M. M. Contamination event diagnosis in drinking water networks: a review. Annu. Rev. Control 55 , 420–441 (2023).
18. Li Z Liu H Zhang C Fu G Generative adversarial networks for detecting contamination events in water distribution systems using multi-parameter, multi-site water quality monitoring Environ. Sci. Ecotechnology 2023 14 100231 10.1016/j.ese.2022.100231 PMC9791317 36578363 Li, Z., Liu, H., Zhang, C. & Fu, G. Generative adversarial networks for detecting contamination events in water distribution systems using multi-parameter, multi-site water quality monitoring. Environ. Sci. Ecotechnology 14 , 100231 (2023). 10.1016/j.ese.2022.100231 PMC9791317 36578363
19. Grbčić L Lučin I Kranjčević L Družeta S A machine learning-based algorithm for water network contamination source localization Sensors 2020 20 2613 10.3390/s20092613 PMC7248744 32375289 Grbčić, L., Lučin, I., Kranjčević, L. & Družeta, S. A machine learning-based algorithm for water network contamination source localization. Sensors 20 , 2613 (2020). 10.3390/s20092613 PMC7248744 32375289
20. Sankary N Ostfeld A Bayesian localization of water distribution system contamination intrusion events using inline mobile sensor data J. Water Resour. Plan. Manag. 2019 145 04019029 10.1061/(ASCE)WR.1943-5452.0001086 Sankary, N. & Ostfeld, A. Bayesian localization of water distribution system contamination intrusion events using inline mobile sensor data. J. Water Resour. Plan. Manag. 145 , 04019029 (2019).
21. Costa D Melo L Martins F Localization of contamination sources in drinking water distribution systems: a method based on successive positive readings of sensors Water Resour. Manag. 2013 27 4623 4635 10.1007/s11269-013-0431-z Costa, D., Melo, L. & Martins, F. Localization of contamination sources in drinking water distribution systems: a method based on successive positive readings of sensors. Water Resour. Manag. 27 , 4623–4635 (2013).
22. Li, J., Malialis, K., Vrachimis, S. G. & Polycarpou, M. M. Online detection of water contamination under concept drift. In Proc . 2025 IEEE Symposia on Computational Intelligence for Energy, Transport and Environmental Sustainability (CIETES Companion) , 1–5 (IEEE, 2025).
23. Hermans, M. & Schrauwen, B. Training and analysing deep recurrent neural networks. Advances in Neural Information Processing Systems , Vol. 26. https://proceedings.neurips.cc/paper_files/paper/2013/file/1ff8a7b5dc7a7d1f0ed65aaa29c04b1e-Paper.pdf (2013).
24. Hochreiter S Schmidhuber J Long short-term memory Neural Comput. 1997 9 1735 1780 10.1162/neco.1997.9.8.1735 9377276 Hochreiter, S. & Schmidhuber, J. Long short-term memory. Neural Comput. 9 , 1735–1780 (1997). 10.1162/neco.1997.9.8.1735 9377276
25. Park D Hoshi Y Kemp CC A multimodal anomaly detector for robot-assisted feeding using an lstm-based variational autoencoder IEEE Robot. Autom. Lett. 2018 3 1544 1551 10.1109/LRA.2018.2801475 Park, D., Hoshi, Y. & Kemp, C. C. A multimodal anomaly detector for robot-assisted feeding using an lstm-based variational autoencoder. IEEE Robot. Autom. Lett. 3 , 1544–1551 (2018).
26. Vrachimis SG Timotheou S Eliades DG Polycarpou MM Leakage detection and localization in water distribution systems: a model invalidation approach Control Eng. Pract. 2021 110 104755 10.1016/j.conengprac.2021.104755 Vrachimis, S. G., Timotheou, S., Eliades, D. G. & Polycarpou, M. M. Leakage detection and localization in water distribution systems: a model invalidation approach. Control Eng. Pract. 110 , 104755 (2021).
27. Constans S Brémond B Morel P Simulation and control of chlorine levels in water distribution networks J. Water Resour. Plan. Manag. 2003 129 135 145 10.1061/(ASCE)0733-9496(2003)129:2(135) Constans, S., Brémond, B. & Morel, P. Simulation and control of chlorine levels in water distribution networks. J. Water Resour. Plan. Manag. 129 , 135–145 (2003).
28. Karamouz M Yousefi A Zahmatkesh Z Mahmoodzadeh D Pirooz MD Simulation of chlorine injection in water distribution networks in response to contaminations Int. J. Environ. Res. 2022 16 6 10.1007/s41742-021-00379-1 Karamouz, M., Yousefi, A., Zahmatkesh, Z., Mahmoodzadeh, D. & Pirooz, M. D. Simulation of chlorine injection in water distribution networks in response to contaminations. Int. J. Environ. Res. 16 , 6 (2022).
29. Fujiwara O Khang DB A two-phase decomposition method for optimal design of looped water distribution networks Water Resour. Res. 1990 26 539 549 10.1029/WR026i004p00539 Fujiwara, O. & Khang, D. B. A two-phase decomposition method for optimal design of looped water distribution networks. Water Resour. Res. 26 , 539–549 (1990).
30. Zheng, F., Simpson, A. R. & Zecchin, A. C. A combined NLP-differential evolution algorithm approach for the optimization of looped water distribution systems. Water Resour. Res . 47 (2011).
31. Vrachimis SG Battle of the leakage detection and isolation methods J. Water Resour. 2022 148 04022068 Vrachimis, S. G. et al. Battle of the leakage detection and isolation methods. J. Water Resour. 148 , 04022068 (2022).
32. Eliades D Kyriakou M Polycarpou MM Sensor placement in water distribution systems using the s-place toolkit Procedia Eng. 2014 70 602 611 10.1016/j.proeng.2014.02.066 Eliades, D., Kyriakou, M. & Polycarpou, M. M. Sensor placement in water distribution systems using the s-place toolkit. Procedia Eng. 70 , 602–611 (2014).
33. Sharma, S., Gupta, K., Gupta, D., Rani, S. & Dhiman, G. An insight survey on sensor errors and fault detection techniques in smart spaces. Comput. Model. Eng. Sci . 138 , 2029–2059 (2024).
34. Artelt A Epyt-flow: A toolkit for generating water distribution network data J. Open Source Softw. 2024 9 7104 10.21105/joss.07104 Artelt, A. et al. Epyt-flow: A toolkit for generating water distribution network data. J. Open Source Softw. 9 , 7104 (2024).
35. Schluchter, M. D. Mean square error. In Encyclopedia of Biostatistics , Vol. 5 10.1002/0470011815.b2a15087 (2005).
36. Su, Y. et al. Robust anomaly detection for multivariate time series through stochastic recurrent neural network. In Proc. 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining , 2828-2837. 10.1145/3292500.3330672 (2019).
37. Artelt, A. et al. A toolbox for supporting research on AI in water distribution networks. In Proc . AI for Critical Infrastructure Workshop @ IJCAI-24 https://openreview.net/forum?id=JREiu8ghNz (2024).
38. Vrachimis, S. G. et al. LeakDB: A benchmark dataset for leakage diagnosis in water distribution networks. In Proc. WDSA/CCWI Joint Conference , Vol. 1, 146 (2018).
39. Burkhardt JB Szabo J Klosterman S Hall J Murray R Modeling fate and transport of arsenic in a chlorinated distribution system Environ. Model. Softw. 2017 93 322 331 10.1016/j.envsoft.2017.03.016 PMC6260962 30505209 Burkhardt, J. B., Szabo, J., Klosterman, S., Hall, J. & Murray, R. Modeling fate and transport of arsenic in a chlorinated distribution system. Environ. Model. Softw. 93 , 322–331 (2017). 10.1016/j.envsoft.2017.03.016 PMC6260962 30505209
40. Zhang, Y. A better autoencoder for image: convolutional autoencoder. In ICONIP17-DCEC . Available online: http://users.cecs.anu.edu.au/Tom.Gedeon/conf/ABCs2018/paper/ABCs2018_paper_58.pdf (2018).
Подготовка и перевод публикации
Обработка статьи · этапы, ошибки и управление
Ошибки и ограничения
История · было → стало
Состояние обновляется каждые 5 секунд, пока блок открыт. Процент показывается только там, где известен объём работы. Пауза останавливает продолжение этапа; текущий запрос к источнику может завершиться.
Тип публикации указан по данным источника. Уровень доказательности автоматически не присваивается.