Real-time pipeline leak detection and localization using an attention-based LSTM approach

Xinqi Zhang, Jihao Shi*, Ming Yang, Xinyan Huang, Asif Sohail Usmani, Guoming Chen, Jianmin Fu, Jiawei Huang, Junjie Li

*Corresponding author for this work

Research output: Contribution to journalArticleScientificpeer-review

18 Citations (Scopus)
30 Downloads (Pure)


Long short-term memory (LSTM) has been widely applied to real-time automated natural gas leak detection and localization. However, LSTM approach could not provide the interpretation that this leak position is localized instead of other positions. This study proposes a leakage detection and localization approach by integrating the attention mechanism (AM) with the LSTM network. In this hybrid network, a fully-connected neural network behaving as AM is first applied to assign initial weights to time-series data. LSTM is then used to discover the complex correlation between the weighted data and leakage positions. A labor-scale pipeline leakage experiment of an urban natural gas distribution network is conducted to construct the benchmark dataset. A comparison between the proposed approach and the state-of-the-arts is also performed. The results demonstrate our proposed approach exhibits higher accuracy with AUC = 0.99. Our proposed approach assigns a higher attention weight to the sensor close to the leakage position, indicating the variation of data from the sensor has a significant influence on leakage localization. It corresponds that the closer to the leakage position, the larger variation of monitoring pressure after leakage, which enhances the detection results’ trustiness. This study provides a transparent and robust alternative for real-time automatic pipeline leak detection and localization, which contributes to constructing a digital twin of emergency management of urban pipeline leakage.
Original languageEnglish
Pages (from-to)460-472
Number of pages13
JournalProcess Safety and Environmental Protection
Publication statusPublished - 2023

Bibliographical note

Green Open Access added to TU Delft Institutional Repository ‘You share, we take care!’ – Taverne project Otherwise as indicated in the copyright section: the publisher is the copyright holder of this work and the author uses the Dutch legislation to make this work public.


  • Attention mechanism
  • Leakage localization
  • Long short-term memory
  • Pipeline fault diagnosis


Dive into the research topics of 'Real-time pipeline leak detection and localization using an attention-based LSTM approach'. Together they form a unique fingerprint.

Cite this