Fine-Grained Leakage Detection for Water Supply Pipelines Based on CNN and Selective State-Space Models
Abstract
:1. Introduction
2. Experimental Setup and Data Collection
2.1. Water Supply Pipeline Leakage Test Bench
2.2. Data Acquisition and Processing
3. Methodology
3.1. Overall Model Architecture
3.2. A Hybrid Model Based on CNN and Mamba
3.3. Fine-Grained Leakage Degree Recognition Method Based on Increasing Class Spacing
3.4. Evaluation Metrics
4. Results and Discussion
4.1. Analysis of Experimental Results
4.2. Comparative Analysis of Different Methods
5. Conclusions
- (1)
- In this study, we developed an experimental setup to simulate various leakage conditions and collected a high-quality dataset using multi-axis sensors, encompassing a wide range of leakage levels and environmental conditions. We proposed a hybrid model that integrates Convolutional Neural Networks (CNN) with Mamba, effectively combining frequency-domain image features with one-dimensional long-sequence time-dynamic characteristics. This approach addresses the challenge of capturing weak signals and non-linear features, which traditional methods often fail to detect. Experimental results show that our proposed method significantly outperforms existing techniques. Compared to SVM, BP, LSTM-AM, CNN, and iTransformer, the accuracy improved by 17.9%, 15.9%, 7.8%, 3.0%, and 2.3%, respectively.
- (2)
- The impact of different factors on the experimental results was analyzed. It was found that increasing the input window length up to 5000 data points improved model accuracy; however, further increases did not yield significant benefits and could introduce processing delays. The proposed method exhibits greater robustness in noisy environments, showing a smaller decrease in accuracy compared to traditional methods when subjected to varying Signal-to-Noise Ratios.
- (3)
- To enhance the distinguishability between different leakage levels, this study introduced a fine-grained classification method for water supply pipeline leak levels based on CosFace, which enhances inter-class distances and improves distinguishability between different leakage levels. t-SNE visualization confirms that after incorporating CosFace, data points for different leakage levels form clearer and more distinct clusters in two-dimensional space. Additionally, by removing or modifying specific parts of the model, we systematically analyzed the contributions of each component. The results showed that using MobileNetV3 alone achieved an accuracy of 0.960, which improved to 0.975 when combined with Mamba, and further integrating CosFace raised the accuracy to 0.983. These findings highlight the significant role of each component in enhancing overall recognition performance and underscore the effectiveness of our integrated approach.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- El-Zahab, S.; Zayed, T. Leak detection in water distribution networks: An introductory overview. Smart Water 2019, 4, 5. [Google Scholar] [CrossRef]
- Khulief, Y.A.; Khalifa, A.; Mansour, R.B.; Habib, M.A. Acoustic detection of leaks in water pipelines using measurements inside pipe. J. Pipeline Syst. Eng. Pract. 2012, 3, 47–54. [Google Scholar] [CrossRef]
- Korlapati, N.V.; Khan, F.; Noor, Q.; Mirza, S.; Vaddiraju, S. Review and analysis of pipeline leak detection methods. J. Pipeline Sci. Eng. 2022, 2, 100074. [Google Scholar] [CrossRef]
- Fan, H.; Tariq, S.; Zayed, T. Acoustic leak detection approaches for water pipelines. Autom. Constr. 2022, 138, 104226. [Google Scholar] [CrossRef]
- Lai, W.W.; Lau, T.C.; Cheng, A.Y.; Liu, P.K.; Leung, J.W. Outcome-Based blind tests for leakage diagnosis in underground watermains by acoustic technologies. Tunn. Undergr. Space Technol. 2023, 142, 105413. [Google Scholar]
- Rizzo, P. Water and wastewater pipe nondestructive evaluation and health monitoring: A review. Adv. Civ. Eng. 2010, 2010, 818597. [Google Scholar] [CrossRef]
- Deshpande, A.; Kalikate, S.; Ranade, N.; Diwanji, A.; Pawar, J.; Kshirsagar, K. Water leakage detection system. Int. J. Eng. Manag. Res. 2022, 12, 259–263. [Google Scholar]
- Brunone, B.; Maietta, F.; Capponi, C.; Keramat, A.; Meniconi, S. A review of physical experiments for leak detection in water pipes through transient tests for addressing future research. J. Hydraul. Res. 2022, 60, 894–906. [Google Scholar] [CrossRef]
- Islam, M.R.; Azam, S.; Shanmugam, B.; Mathur, D. An intelligent IoT and ML-based water leakage detection system. IEEE Access 2023, 11, 123625–123649. [Google Scholar] [CrossRef]
- Banjara, N.K.; Sasmal, S.; Voggu, S. Machine learning supported acoustic emission technique for leakage detection in pipelines. Int. J. Press. Vessel. Pip. 2020, 188, 104243. [Google Scholar] [CrossRef]
- Yussif, A.M.; Sadeghi, H.; Zayed, T. Application of machine learning for leak localization in water supply networks. Buildings 2023, 13, 849. [Google Scholar] [CrossRef]
- Hu, X.; Han, Y.; Yu, B.; Geng, Z.; Fan, J. Novel leakage detection and water loss management of urban water supply network using multiscale neural networks. J. Clean. Prod. 2021, 278, 123611. [Google Scholar] [CrossRef]
- Boaventura, O.D.; Proença, M.S.; Obata, D.H.; Paschoalini, A.T. Convolutional neural network for leak location in buried pipes of underground water supply. J. Braz. Soc. Mech. Sci. Eng. 2024, 46, 352. [Google Scholar] [CrossRef]
- Candelieri, A.; Soldi, D.; Conti, D.; Archetti, F. Analytical leakages localization in water distribution networks through spectral clustering and support vector machines. The icewater approach. Procedia Eng. 2014, 89, 1080–1088. [Google Scholar] [CrossRef]
- Shen, Y.; Cheng, W. A Tree-Based Machine Learning Method for Pipeline Leakage Detection. Water 2022, 14, 2833. [Google Scholar] [CrossRef]
- Shukla, H.; Piratla, K.R. Leakage Detection in Water Distribution Network Using Machine Learning. Pipelines 2023, 192–200. [Google Scholar]
- Shin, Y.; Na, K.Y.; Kim, S.E.; Kyung, E.J.; Choi, H.G.; Jeong, J. LSTM-Autoencoder Based Detection of Time-Series Noise Signals for Water Supply and Sewer Pipe Leakages. Water 2024, 16, 2631. [Google Scholar] [CrossRef]
- Ahmad, S.; Ahmad, Z.; Kim, C.H.; Kim, J.M. A method for pipeline leak detection based on acoustic imaging and deep learning. Sensors 2022, 22, 1562. [Google Scholar] [CrossRef] [PubMed]
- Boujelben, M.; Benmessaoud, Z.; Abid, M.; Elleuchi, M. An efficient system for water leak detection and localization based on IoT and lightweight deep learning. Internet Things 2023, 24, 100995. [Google Scholar] [CrossRef]
- McMillan, L.; Fayaz, J.; Varga, L. Machine-Learning-Based Health Monitoring and Leakage Management of Water Distribution Systems. In Proceedings of the International Conference on Evolving Cities, Online, 12–14 September 2023; Evolving Cities Publications: Southampton, UK, 2023; Volume 2022. [Google Scholar]
- Nam, Y.W.; Arai, Y.; Kunizane, T.; Koizumi, A. Water leak detection based on convolutional neural network using actual leak sounds and the hold-out method. Water Supply 2021, 21, 3477–3485. [Google Scholar] [CrossRef]
- Wang, C.; Chen, X.; Xu, Y.; Yan, W.; Yang, Y.; Shao, Y.; Yu, T. A two-stage leak monitoring framework for water distribution networks based on acoustic signals. Mech. Syst. Signal Process. 2025, 225, 112275. [Google Scholar] [CrossRef]
- Cody, R.A.; Dey, P.; Narasimhan, S. Linear prediction for leak detection in water distribution networks. J. Pipeline Syst. Eng. Pract. 2020, 11, 04019043. [Google Scholar] [CrossRef]
- Bick, A.; Li, K.; Xing, E.; Kolter, J.Z.; Gu, A. Transformers to ssms: Distilling quadratic knowledge to subquadratic models. Adv. Neural Inf. Process. Syst. 2024, 37, 31788–31812. [Google Scholar]
- Howard, A.; Sandler, M.; Chu, G.; Chen, L.C.; Chen, B.; Tan, M.; Wang, W.; Zhu, Y.; Pang, R.; Vasudevan, V.; et al. Searching for mobilenetv3. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; IEEE: Piscataway, NJ, USA, 2019. [Google Scholar]
- Wang, H.; Wang, Y.; Zhou, Z.; Ji, X.; Gong, D.; Zhou, J.; Li, Z.; Liu, W. Cosface: Large margin cosine loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018. [Google Scholar]
- Kammoun, M.; Kammoun, A.; Abid, M. LSTM-AE-WLDL: Unsupervised LSTM auto-encoders for leak detection and location in water distribution networks. Water Resour. Manag. 2023, 37, 731–746. [Google Scholar] [CrossRef]
- Zou, Y.; Chen, Y.; Xu, Y.; Zhang, H.; Zhang, S. Short-term freeway traffic speed multistep prediction using an iTransformer model. Phys. A Stat. Mech. Its Appl. 2024, 655, 130185. [Google Scholar] [CrossRef]
Input | Operator | Number of Expansion Filters | Number of Projection Filters | SE Module | Nonlinearity Types |
---|---|---|---|---|---|
2242 × 3 | conv2d, 3 × 3 | / | 16 | / | HS |
1122 × 16 | bneck, 3 × 3 | 16 | 16 | √ | RE |
562 × 16 | bneck, 3 × 3 | 72 | 24 | / | RE |
282 × 24 | bneck, 3 × 3 | 88 | 24 | / | RE |
282 × 24 | bneck, 5 × 5 | 96 | 40 | √ | HS |
142 × 40 | bneck, 5 × 5 | 240 | 40 | √ | HS |
142 × 40 | bneck, 5 × 5 | 240 | 40 | √ | HS |
142 × 40 | bneck, 5 × 5 | 120 | 48 | √ | HS |
142 × 48 | bneck, 5 × 5 | 144 | 48 | √ | HS |
142 × 48 | bneck, 5 × 5 | 288 | 96 | √ | HS |
72 × 96 | bneck, 5 × 5 | 576 | 96 | √ | HS |
72 × 96 | bneck, 5 × 5 | 576 | 96 | √ | HS |
72 × 96 | onv2d, 1 × 1 | / | 576 | √ | HS |
72 × 576 | pool, 7 × 7 | / | / | / | / |
12 × 576 | conv2d, 1 × 1, NBN | / | 1280 | / | HS |
12 × 1280 | conv2d, 1 × 1, NBN | / | k | / | / |
Method | Accuracy | Precision | Recall | F1 Score |
---|---|---|---|---|
MobileNet3 | 0.960 | 0.976 | 0.952 | 0.964 |
Mamba | 0.955 | 0.953 | 0.944 | 0.948 |
MobileNet3 + Mamba | 0.975 | 0.978 | 0.972 | 0.975 |
MobileNet3 + Mamba + CosFace | 0.983 | 0.984 | 0.983 | 0.984 |
Method | Accuracy | Precision | Recall | F1 Score |
---|---|---|---|---|
SVM | 0.804 | 0.828 | 0.792 | 0.810 |
BP | 0.824 | 0.831 | 0.806 | 0.818 |
LSTM-AM | 0.905 | 0.913 | 0.935 | 0.924 |
CNN | 0.953 | 0.962 | 0.947 | 0.954 |
iTransformer | 0.960 | 0.957 | 0.959 | 0.958 |
Our | 0.983 | 0.984 | 0.983 | 0.984 |
Method | Class 1 | Class 2 | Class 3 | Class 4 | Class 5 |
---|---|---|---|---|---|
SVM | 0.791 | 0.817 | 0.803 | 0.789 | 0.804 |
BP | 0.811 | 0.828 | 0.823 | 0.821 | 0.822 |
LSTM-AM | 0.902 | 0.912 | 0.909 | 0.917 | 0.926 |
CNN | 0.961 | 0.947 | 0.953 | 0.949 | 0.971 |
iTransformer | 0.958 | 0.961 | 0.957 | 0.959 | 0.963 |
Our | 0.991 | 1.000 | 0.992 | 0.992 | 0.982 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wang, N.; Du, W.; Liu, H.; Zhang, K.; Li, Y.; He, Y.; Han, Z. Fine-Grained Leakage Detection for Water Supply Pipelines Based on CNN and Selective State-Space Models. Water 2025, 17, 1115. https://doi.org/10.3390/w17081115
Wang N, Du W, Liu H, Zhang K, Li Y, He Y, Han Z. Fine-Grained Leakage Detection for Water Supply Pipelines Based on CNN and Selective State-Space Models. Water. 2025; 17(8):1115. https://doi.org/10.3390/w17081115
Chicago/Turabian StyleWang, Niannian, Weiyi Du, Hongjin Liu, Kuankuan Zhang, Yongbin Li, Yanquan He, and Zejun Han. 2025. "Fine-Grained Leakage Detection for Water Supply Pipelines Based on CNN and Selective State-Space Models" Water 17, no. 8: 1115. https://doi.org/10.3390/w17081115
APA StyleWang, N., Du, W., Liu, H., Zhang, K., Li, Y., He, Y., & Han, Z. (2025). Fine-Grained Leakage Detection for Water Supply Pipelines Based on CNN and Selective State-Space Models. Water, 17(8), 1115. https://doi.org/10.3390/w17081115