Research on Gas Pipeline Leakage Prediction Model Based on Physics-Aware GL-TransLSTM
Abstract
1. Introduction
- Proposing Physics-Aware Gated Attention (PAGA), which converts physical variables into gating signals to dynamically adjust self-attention weights. This enhances sensitivity to weak leakage signals and incorporates causal reasoning by focusing on key physical events.
- Designing Physics-Guided Adaptive Sliding Window (PG-ASW) with a Differentiable Window Controller (DWC) that dynamically optimizes window length, position, and feature weights based on real-time parameters. It enhances handling of non-stationary, multi-scale industrial data and aligns data with physical processes.
- Developing the GL-TransLSTM model: a hybrid architecture integrating CEEMDAN decomposition is an improved Transformer with PAGA and positional encoding. It acquires multi-scale feature extraction, long-range dependency capture, and robust prediction in high-noise industrial environments.
2. Related Work
2.1. LSTM
2.2. Transformer
2.3. Deep Learning for Pipeline Leakage Detection
3. GL-TransLSTM Model
3.1. Physics-Aware Gated Attention Mechanism
- Gating Vector Generation
- 2.
- Attention Weight Adjustment
- 3.
- Based on Physical Priors: Attention Coupling and Regularization
3.2. Physics-Informed Adaptive Window Optimization Algorithm
3.2.1. Adaptive Window Generator
3.2.2. Physics-Guided Adaptive Window Constraint Mechanism
3.3. Design of the GL-TransLSTM Model with Multimodal Feature Coordination
| Algorithm 1: GL-TransLSTM for Gas Pipeline Leakage Prediction |
![]() |
4. Experiments and Analysis
4.1. Dataset
4.2. Parameters and Operating Environment
4.3. Evaluation Metrics
4.4. Results and Discussion
4.5. Ablation Study
4.6. Comparative Experiment
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Rai, A.; Kim, J.-M. A novel pipeline leak detection approach independent of prior failure information. Measurement 2021, 167, 108284. [Google Scholar] [CrossRef]
- Quy, T.B.; Kim, J.-M. Leak detection in a gas pipeline using spectral portrait of acoustic emission signals. Measurement 2020, 152, 107403. [Google Scholar] [CrossRef]
- Zhang, Y.; Duan, H.-F.; Keramat, A.; Pan, B.; Meniconi, S.; Brunone, B.; Lee, P.J. Transient wave-leak interaction analysis for improved leak detection in viscoelastic pipelines. Measurement 2023, 208, 112442. [Google Scholar] [CrossRef]
- Wang, W.; Gao, Y. Pipeline leak detection method based on acoustic-pressure information fusion. Measurement 2023, 212, 112691. [Google Scholar] [CrossRef]
- Yang, J.; Mostaghimi, H.; Hugo, R.; Park, S.S. Pipeline leak and volume rate detections through Artificial intelligence and vibration analysis. Measurement 2022, 187, 110368. [Google Scholar] [CrossRef]
- Fang, L.; Liang, Y.; Lu, Q.; Li, X.; Liu, R.; Wang, X. Flow noise characterization of gas–liquid two-phase flow based on acoustic emission. Measurement 2013, 46, 3887–3897. [Google Scholar] [CrossRef]
- Vandrangi, S.K.; Lemma, T.A.; Mujtaba, S.M.; Ofei, T.N. Developments of leak detection, diagnostics, and prediction algorithms in multiphase flows. Chem. Eng. Sci. 2022, 248, 117205. [Google Scholar] [CrossRef]
- Nnabuife, S.G.; Kuang, B.; Whidborne, J.F.; Rana, Z.A. Development of gas-liquid flow regimes identification using a noninvasive ultrasonic sensor, belt-shape features, and convolutional neural network in an s-shaped riser. IEEE Trans. Cybern. 2023, 53, 3–17. [Google Scholar] [CrossRef]
- Zhao, N.; Li, C.; Jia, H.; Wang, F.; Zhao, Z.; Fang, L.; Li, X. Acoustic emission-based flow noise detection andmechanism analysis for gas-liquid two-phase flow. Measurement 2021, 179, 109480. [Google Scholar] [CrossRef]
- Lu, H.; Ma, X.; Azimi, M. US natural gas consumption prediction using an improved kernel-based nonlinear extension of the Arps decline model. Energy 2020, 194, 116905. [Google Scholar] [CrossRef]
- Lu, H.; Ma, X.; Huang, K.; Azimi, M. Carbon trading volume and price forecasting in China using multiple machine learning models. J. Clean. Prod. 2020, 249, 119386. [Google Scholar] [CrossRef]
- Lu, H.; Iseley, T.; Behbahani, S.; Fu, L. Leakage detection techniques for oil and gas pipelines: State-of-the-art. Tunn. Undergr. Space Technol. 2020, 98, 103249. [Google Scholar] [CrossRef]
- Fu, H.; Ling, K.; Pu, H. Identifying two-point leakages in parallel pipelines based on flow parameter analysis. J. Pipeline Sci. Eng. 2022, 2, 100052. [Google Scholar] [CrossRef]
- Perdikou, S.; Themistocleous, K.; Agapiou, A.; Hadjimitsis, D.G. Introduction, The problem of Water Leakages. In Integrated Use of Space, Geophysical and Hyperspectral Technologies Intended for Monitoring Water Leakages in Water Supply Networks; InTech: Houston, TX, USA, 2014. [Google Scholar]
- Rahimi, M.; Alghassi, A.; Ahsan, M.; Haider, J. Deep Learning Model for Industrial Leakage Detection Using Acoustic Emission Signal. Informatics 2020, 7, 49. [Google Scholar] [CrossRef]
- Martini, A.; Troncossi, M.; Rivola, A. Leak detection in water-filled small-diameter polyethylene pipes by means of acoustic emission measurements. Appl. Sci. 2017, 7, 2. [Google Scholar] [CrossRef]
- Shukla, H.; Piratla, K. Leakage detection in water pipelines using supervised classification of acceleration signals. Autom. Constr. 2020, 117, 103256. [Google Scholar] [CrossRef]
- Xiao, B.; Miao, S.; Xia, D.; Huang, H.; Zhang, J. Detecting the backfill pipeline blockage and leakage through an LSTM-based deep learning model. Int. J. Miner. Metall. Mater. 2023, 30, 1573–1583. [Google Scholar] [CrossRef]
- Yang, L.; Zhao, Q. A novel PPA method for fluid pipeline leak detection based on OPELM and bidirectional LSTM. IEEE Access 2020, 8, 107185–107199. [Google Scholar] [CrossRef]
- Lv, F.; Wen, C.; Bao, Z.; Liu, M. Fault diagnosis based on deep learning. In Proceedings of the 2016 American Control Conference (ACC), Boston, MA, USA, 6–8 July 2016; IEEE: New York, NY, USA, 2016; pp. 6851–6856. [Google Scholar]
- Yang, D.; Hou, N.; Lu, J.; Ji, D. Novel leakage detection by ensemble 1DCNN-VAPSO-SVM in oil and gas pipeline systems. Appl. Soft Comput. 2022, 115, 108212. [Google Scholar] [CrossRef]
- Zou, F.; Zhang, H.; Sang, S.; Li, X.; He, W.; Liu, X.; Chen, Y. An anti-noise one-dimension convolutional neural network learning model applying on bearing fault diagnosis. Measurement 2021, 186, 110236. [Google Scholar] [CrossRef]
- Spandonidis, C.; Theodoropoulos, P.; Giannopoulos, F.; Galiatsatos, N.; Petsa, A. Evaluation of deep learning approaches for oil & gas pipeline leak detection using wireless sensor networks. Eng. Appl. Artif. Intell. 2022, 113, 104890. [Google Scholar] [CrossRef]
- Kang, J.; Park, Y.-J.; Lee, J.; Wang, S.-H.; Eom, D.-S. Novel leakage detection by ensemble CNN-SVM and graph-based localization in water distribution systems. IEEE Trans. Ind. Electron. 2018, 65, 4279–4289. [Google Scholar] [CrossRef]
- Liu, P.; Xu, C.; Xie, J.; Fu, M.; Chen, Y.; Liu, Z.; Zhang, Z. A CNN-based transfer learning method for leakage detection of pipeline under multiple working conditions with AE signals. Process Saf. Environ. Prot. 2023, 170, 1161–1172. [Google Scholar] [CrossRef]
- Ahmad, Z.; Nguyen, T.-K.; Kim, J.-M. Leak detection and size identification in fluid pipelines using a novel vulnerability index and 1-D convolutional neural network. Eng. Appl. Comput. Fluid Mech. 2023, 17, 2165159. [Google Scholar] [CrossRef]
- Xu, P.; Du, R.; Zhang, Z. Predicting pipeline leakage in petrochemical system through GAN and LSTM. Knowl.-Based Syst. 2019, 175, 50–61. [Google Scholar] [CrossRef]
- Lee, C.-W.; Yoo, D.-G. Development of leakage detection model and Its application for water distribution networks using RNN-LSTM. Sustainability 2021, 13, 9262. [Google Scholar] [CrossRef]
- Liu, J.; Pan, C.; Lei, F.; Hu, D.; Zuo, H. Fault prediction of bearings based on LSTM and statistical process analysis. Reliab. Eng. Syst. Saf. 2021, 214, 107646. [Google Scholar] [CrossRef]
- Zuo, Z.; Ma, L.; Liang, S.; Liang, J.; Zhang, H.; Liu, T. A semi-supervised leakage detection method driven by multivariate time series for natural gas gathering pipeline. Process Saf. Environ. Prot. 2022, 164, 468–478. [Google Scholar] [CrossRef]
- Yang, L.; Zhao, Q. A BiLSTM based pipeline leak detection and disturbance assisted localization method. IEEE Sens. J. 2022, 22, 611–620. [Google Scholar] [CrossRef]
- Ravikumar, K.N.; Yadav, A.; Kumar, H.; Gangadharan, K.V.; Narasimhadhan, A.V. Gearbox fault diagnosis based on multi-scale deep residual learning and stacked LSTM model. Measurement 2021, 186, 110099. [Google Scholar] [CrossRef]
- Qiao, M.; Yan, S.; Tang, X.; Xu, C. Deep convolutional and LSTM recurrent neural networks for rolling bearing fault diagnosis under strong noises and variable loads. IEEE Access 2020, 8, 66257–66269. [Google Scholar] [CrossRef]
- Li, W.; Liu, C.; Xu, Y.; Niu, C.; Li, R.; Li, M.; Hu, C.; Tian, L. An interpretableybrid deep learning model for flood forecasting based on Transformer and LSTM. J. Hydrol. Reg. Stud. 2024, 54, 101873. [Google Scholar] [CrossRef]
- Chen, J.; Liu, Y. Probabilistie physics-guided machine leariing for fatigue data analysis. Expert Syst. Appl. 2021, 168, 114316. [Google Scholar] [CrossRef]
- Roghayeh, G.; Kiyoumars, R. The potential of integrated hybrid data processing techniques for successive-station streamflow prediction. Soft Comput. A Fusion Found. Methodol. Appl. 2022, 26, 5563–5576. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Ning, X.Y. Ultra-Short-Term Photovoltaic Power Prediction Based on Cluster Analysis, CEEMD and LSTM. Master’s Thesis, Xi’an University of Technology, Xi’an, China, 2024. [Google Scholar] [CrossRef]
- Wang, Z.; Nie, W.; Xu, H.; Jian, W. Prediction of landslide displacement based on EEMD-Prophet-LSTM. J. Univ. Chin. Acad. Sci. 2023, 40, 514–522. [Google Scholar]












| Study No. | Technology Used | Dataset | Evaluation Metric | Advantages | Limitations |
|---|---|---|---|---|---|
| [24] | CNN-SVM | Gas Pipeline Concentration Time Series | Acc MSE RMSE | By combining convolutional feature extraction with SVM classification, this hybrid model achieves high leak recognition accuracy. | It does not explicitly model temporal dynamics and overlooks the influence of varying flow regimes on leak signatures. |
| [25] | CNN-TL | Mixed dataset AW-AS | Acc MSE RMSE F1-Score | CNN-TL demonstrates strong adaptability across multiple operating conditions by integrating transfer learning or temporal learning strategies into the CNN framework. | It still inherits the inherent limitation of CNNs in capturing long-range temporal dependencies in time series pipeline data. |
| [26] | 1-D CNN | Gas Pipeline Concentration Time Series | Acc MSE RMSE AUC-ROC | The one-dimensional CNN enables direct end-to-end estimation of leak size from raw sensor signals without manual feature engineering, achieving high identification accuracy. | The approach does not consider how different flow modes (e.g., laminar vs. turbulent) affect pressure dynamics, which may reduce generalization in real pipelines. |
| [27] | GAN-LSTM | Collect data in an oil Group | Acc MSE RMSE R2 | GAN-LSTM effectively captures long-term temporal dependencies in sequential pipeline data and has demonstrated stable leak detection accuracy above 90% in field applications. | It primarily focuses on temporal patterns and often underutilizes spatial or multi-sensor correlations, limiting its ability to fuse heterogeneous features. |
| [29] | LSS model | NASA’s prognostics data repository | Acc MSE RMSE Rec | The LSS model enhances predictive performance by fusing LSTM’s sequential modeling with statistical process monitoring, significantly outperforming traditional RNNs and regression methods in degradation forecasting. | It is specifically designed for aero-engine bearing health monitoring and has not been validated for pipeline leakage scenarios, raising concerns about domain transferability. |
| [31] | BiLSTM | Data acquired from industrial site | Acc MSE RMSE Rec F1-Score | BiLSTM improves leak discrimination by modeling contextual information from both past and future time steps, effectively distinguishing real leaks from common pressure transients. | It may overlook high-frequency or localized signal characteristics, potentially leading to the loss of critical diagnostic information. |
| Parameter Name | Parameter Value |
|---|---|
| LSTM Layers | 2 |
| Encoder Layers | 2 |
| Optimizer | Adam |
| Number of Heads | 4 |
| Full Connection Layer Hidden Unit | 64 |
| Learning Rate | 0.001 |
| Epoch | 100 |
| Parameter Name | Parameter Value |
|---|---|
| Activation Function | tanh |
| Time Step | 20 |
| Optimizer | Adam |
| Loss Function | Cross-Entropy Loss |
| Number of Memory Units | 50 |
| Learning Rate | 0.001 |
| Epoch | 100 |
| Discard Layer Threshold | 0.2 |
| Category | Version |
|---|---|
| Operating System | Ubuntu 20.04 LTS/Windows 10 |
| Programming Language | Python 3.8 |
| Deep Learning Framework | PyTorch 1.9.1 |
| GPU | NVIDIA GeForce RTX 4060 (8 GB VRAM) |
| CUDA Version | 10.2 |
| CPU | Intel Core i7-9700 (8 cores, 3.0 GHz) |
| System Memory | 16 GB DDR4 RAM |
| Models | Labels | Precision | Recall | F1 Score | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| BS 1 | BS 2 | BS 3 | BS 1 | BS 2 | BS 3 | BS 1 | BS 2 | BS 3 | ||
| LSTM | Leak | 95.68 | 95.72 | 95.78 | 95.60 | 95.67 | 96.74 | 95.63 | 96.73 | 97.78 |
| Non-leak | 95.73 | 95.65 | 95.68 | 95.57 | 95.74 | 96.82 | 96.61 | 95.64 | 95.83 | |
| BPNN | Leak | 96.72 | 96.81 | 97.67 | 95.73 | 96.78 | 96.83 | 96.72 | 96.75 | 97.85 |
| Non-leak | 96.81 | 96.76 | 96.83 | 96.79 | 96.83 | 96.85 | 96.83 | 96.85 | 96.88 | |
| CNN | Leak | 95.83 | 95.86 | 95.89 | 95.79 | 95.85 | 95.88 | 95.82 | 95.86 | 95.92 |
| Non-leak | 95.81 | 95.83 | 95.88 | 95.85 | 95.86 | 95.92 | 95.81 | 95.84 | 95.94 | |
| Transformer | Leak | 97.82 | 97.85 | 97.87 | 97.79 | 97.83 | 97.85 | 97.84 | 97.85 | 97.89 |
| Non-leak | 97.88 | 97.89 | 97.91 | 97.86 | 97.88 | 97.93 | 97.83 | 97.85 | 97.95 | |
| GRU | Leak | 97.83 | 97.92 | 97.88 | 97.80 | 97.83 | 97.82 | 97.89 | 97.93 | 97.96 |
| Non-leak | 97.76 | 97.83 | 97.89 | 97.82 | 97.84 | 97.89 | 97.88 | 97.95 | 97.98 | |
| Transformer-LSTM | Leak | 98.67 | 98.72 | 98.83 | 98.62 | 98.66 | 98.76 | 98.65 | 98.69 | 98.75 |
| Non-leak | 98.71 | 98.73 | 98.75 | 98.82 | 98.85 | 98.88 | 98.77 | 98.79 | 98.88 | |
| GL-TransLSTM | Leak | 99.87 | 99.89 | 99.93 | 99.60 | 99.78 | 99.83 | 99.73 | 99.75 | 99.87 |
| Non-leak | 99.82 | 99.73 | 99.85 | 99.76 | 99.83 | 99.86 | 99.78 | 99.85 | 99.89 | |
| Model | Training Set | Validation Set | Test Set |
|---|---|---|---|
| LSTM | 0.029 | 0.023 | 0.026 |
| BPNN | 0.0038 | 0.045 | 0.041 |
| CNN | 0.0051 | 0.046 | 0.048 |
| Transformer | 0.0040 | 0.051 | 0.043 |
| GRU | 0.0038 | 0.032 | 0.040 |
| Transformer-LSTM | 0.0036 | 0.0033 | 0.0035 |
| GL-TransLSTM | 0.0022 | 0.0027 | 0.0024 |
| Model | Training Set | Validation Set | Test Set |
|---|---|---|---|
| LSTM | 0.0834 | 0.0927 | 0.0715 |
| BPNN | 0.0621 | 0.0583 | 0.0946 |
| CNN | 0.0912 | 0.0746 | 0.0538 |
| Transformer | 0.0753 | 0.0991 | 0.0829 |
| GRU | 0.0547 | 0.0632 | 0.0671 |
| Transformer-LSTM | 0.0886 | 0.0728 | 0.0756 |
| GL-TransLSTM | 0.0501 | 0.0508 | 0.0493 |
| Model | Training Set | Validation Set | Test Set |
|---|---|---|---|
| LSTM | 0.1834 | 0.1275 | 0.1912 |
| BPNN | 0.1621 | 0.1836 | 0.1457 |
| CNN | 0.1158 | 0.1043 | 0.1763 |
| Transformer | 0.1947 | 0.1528 | 0.1329 |
| GRU | 0.1372 | 0.1991 | 0.1084 |
| Transformer-LSTM | 0.1203 | 0.1674 | 0.1601 |
| GL-TransLSTM | 0.1226 | 0.1107 | 0.1201 |
| Model | Training Set | Validation Set | Test Set | |||
|---|---|---|---|---|---|---|
| MAE | MSE | MAE | MSE | MAE | MSE | |
| Transformer-LSTM (base) | 0.0886 | 0.0036 | 0.0728 | 0.0033 | 0.0756 | 0.0035 |
| base+PAGA | 0.0648 | 0.0025 | 0.0648 | 0.0029 | 0.0648 | 0.0026 |
| base+PG-ASW | 0.0726 | 0.0032 | 0.0726 | 0.0030 | 0.0726 | 0.0033 |
| base+CEEMDAN | 0.0843 | 0.0035 | 0.0843 | 0.0032 | 0.0843 | 0.0034 |
| base+PAGA+PG-ASW | 0.0586 | 0.0024 | 0.0586 | 0.0029 | 0.0586 | 0.0025 |
| base+PAGA+CEEMDAN | 0.0683 | 0.0025 | 0.0683 | 0.0028 | 0.0683 | 0.0026 |
| base+PG-ASW+CEEMDAN | 0.0715 | 0.0029 | 0.0715 | 0.0029 | 0.0715 | 0.0032 |
| base+PAGA+CEEMDAN+PG-ASW | 0.0501 | 0.0022 | 0.0508 | 0.0027 | 0.0493 | 0.0024 |
| Hyper-Parameter | Default Value | Adjusted Value | Acc (Default) | Acc (Adjusted) | MSE (Default) | MSE (Adjusted) |
|---|---|---|---|---|---|---|
| LSTM Layers | 2 | 3 | 99.93 | 99.93 | 0.0024 | 0.0023 |
| Encoder Layers | 2 | 1 | 99.93 | 99.81 | 0.0024 | 0.0032 |
| Number of Heads | 4 | 8 | 99.93 | 99.92 | 0.0024 | 0.0029 |
| FC Hidden Unit | 64 | 128 | 99.93 | 99.91 | 0.0024 | 0.0022 |
| Learning Rate | 0.001 | 0.0005 | 99.93 | 98.86 | 0.0024 | 0.0035 |
| Learning Rate | 0.001 | 0.005 | 99.93 | 98.63 | 0.0024 | 0.0034 |
| Epoch | 100 | 150 | 99.93 | 99.92 | 0.0024 | 0.0025 |
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
Wu, C.; Lu, H.; Liu, D.; Wang, C.; Gan, J.; Li, Z. Research on Gas Pipeline Leakage Prediction Model Based on Physics-Aware GL-TransLSTM. Biomimetics 2025, 10, 743. https://doi.org/10.3390/biomimetics10110743
Wu C, Lu H, Liu D, Wang C, Gan J, Li Z. Research on Gas Pipeline Leakage Prediction Model Based on Physics-Aware GL-TransLSTM. Biomimetics. 2025; 10(11):743. https://doi.org/10.3390/biomimetics10110743
Chicago/Turabian StyleWu, Chunjiang, Haoyu Lu, Dianming Liu, Chen Wang, Jianhong Gan, and Zhibin Li. 2025. "Research on Gas Pipeline Leakage Prediction Model Based on Physics-Aware GL-TransLSTM" Biomimetics 10, no. 11: 743. https://doi.org/10.3390/biomimetics10110743
APA StyleWu, C., Lu, H., Liu, D., Wang, C., Gan, J., & Li, Z. (2025). Research on Gas Pipeline Leakage Prediction Model Based on Physics-Aware GL-TransLSTM. Biomimetics, 10(11), 743. https://doi.org/10.3390/biomimetics10110743


