An Interpretable Machine Learning Model for Fatigue Life Prediction of Long-Distance Natural Gas Pipelines with Internal Corrosion Defects
Abstract
1. Introduction
2. Materials and Methods
2.1. Material Properties
2.2. FE Modeling
2.3. Collected Data
3. Model Description
3.1. Implementation Methodology
- Step 1: Model Construction and Comparison. After data collection and preprocessing, the dataset is randomly divided into a training set (80% of samples), a validation set (10% of samples), and a test set (10% of samples). The XGBoost model is applied to learn from the training set, establishing a fatigue life prediction model for long-distance pipelines with defects. To evaluate the applicability of the XGBoost model, its prediction results and performance metrics are compared with those of other common models on the test set;
- Step 2: Model Optimization. The performance of machine learning models is influenced by various factors such as data quality and hyperparameter settings. This step focuses on optimizing the XGBoost model via the PSO algorithm, fine-tuning its hyperparameters to enhance predictive performance. The impact of key PSO parameters on model performance is analyzed, and the sensitivity of XGBoost hyperparameters to predictive performance is evaluated to determine the optimal configuration;
- Step 3: Enhancing Interpretability with SHAP. The SHAP method is employed to quantify the contribution of each feature to the model’s prediction. By calculating the SHAP value for each feature, the influence of each variable on the final prediction is assessed, determining whether it pushes or inhibits the model output. The SHAP analysis is compared with the previously mentioned Pearson correlation coefficient results to confirm the reliability of the model’s predictions.
3.2. XGBoost
3.3. PSO
3.4. K-Fold Crossover Method
3.5. Model Interpretation Method
4. Results and Discussion
4.1. Comparison with ML-Based Models
4.2. Hyperparameter Tuning and Final Prediction Result
4.3. Model Visualization and Interpretation
5. Conclusions
- The PSO-XGBoost model demonstrated superior prediction accuracy and robustness compared to traditional machine learning models. After hyperparameter optimization, the model achieved a coefficient of determination R2 of 0.9921 and a Mean Absolute Error MAE of 2.7491 on the test set, indicating strong fitting capability and generalization performance;
- The SHAP method effectively revealed the physical mechanism behind the model’s predictions and quantified feature contributions. Global feature importance analysis identified the defect width coefficient k3 and pipe diameter D as the most significant factors affecting fatigue life prediction, while operational pressure P showed the lowest contribution due to multicollinearity handling. SHAP local explanations further clarified the positive and negative relationships between various features and fatigue life, enhancing the transparency and credibility of the prediction process;
- This study presents the first application of an interpretable machine learning framework to the specific and understudied engineering problem of fatigue life prediction for internal corrosion defects in long-distance natural gas pipelines. By integrating finite element simulation, intelligent optimization, and SHAP analysis, it provides a relatively accurate predictive workflow. The approach preliminarily demonstrates a promising and interpretable analytical framework that combines predictive capability with explanatory power.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
| X70 | API 5L Grade X70 Pipe Steel |
| X80 | API 5L Grade X80 Pipe Steel |
| PSO | Particle Swarm Optimization |
| XGBoost | EXtreme Gradient Boosting |
| SHAP | SHapley Additive exPlanation |
| R2 | R-Square |
| MAE | Mean Absolute Error |
| RMSE | Root Mean Squared Error |
| FE | Finite Element |
| ML | Machine Learning |
| LIME | Local Interpretable Model-agnostic Explanations |
References
- Abdul-Salam, Y.; Abdul-Salam, F. Qatar’s LNG exports: Advancing efficiency in electricity generation and reducing carbon emissions in the global energy transition. Energy Strat. Rev. 2025, 62, 101978. [Google Scholar] [CrossRef]
- Liu, Z.; Xu, S.; Zhao, S.; Li, Y.; Zhou, M.; Li, S.; Meng, F. Clean energy supply chain optimization: Steady-state natural gas transportation. Clean. Logist. Supply Chain 2025, 15, 100214. [Google Scholar] [CrossRef]
- Kinyar, A.; Bothongo, K.; Doytch, N. Rebound in oil and natural gas emissions amid coal-phase out: Implications for the UK’s net-zero strategy. Energy 2025, 336, 138506. [Google Scholar] [CrossRef]
- Editorial Committee of the China Natural Gas Development Report (2025). China Natural Gas Development Report (2025); Petroleum Industry Press: Beijing, China, 2025; pp. 5–10. ISBN 978-7-5183-7777-0. [Google Scholar]
- Wang, Y.; Zhang, Z.; Lu, M.; Qin, J.; Qin, G. Interpretable failure prediction modeling of hydrogen-blended natural gas pipelines containing a crack-in-corrosion defect. J. Loss Prev. Process. Ind. 2025, 98, 105744. [Google Scholar] [CrossRef]
- Gao, J.; Yang, P.; Li, X.; Zhou, J.; Liu, J. Analytical prediction of failure pressure for pipeline with long corrosion defect. Ocean Eng. 2019, 191, 106497. [Google Scholar] [CrossRef]
- Mazumder, R.K.; Salman, A.M.; Li, Y.; Yu, X. Reliability Analysis of Water Distribution Systems Using Physical Probabilistic Pipe Failure Method. J. Water Resour. Plan. Manag. 2019, 145, 1034. [Google Scholar] [CrossRef]
- Jiang, F.; Dong, S. Development of an integrated deep learning-based remaining strength assessment model for pipelines with random corrosion defects subjected to internal pressures. Mar. Struct. 2024, 96, 103637. [Google Scholar] [CrossRef]
- Cai, J.; Jiang, X.; Lodewijks, G.; Pei, Z.; Wu, W. Residual ultimate strength of damaged seamless metallic pipelines with metal loss. Mar. Struct. 2018, 58, 242–253. [Google Scholar] [CrossRef]
- Cai, J.; Jiang, X.; Lodewijks, G.; Pei, Z.; Wu, W. Residual ultimate strength of damaged seamless metallic pipelines with combined dent and metal loss. Mar. Struct. 2018, 61, 188–201. [Google Scholar] [CrossRef]
- Cai, J.; Jiang, X.; Lodewijks, G.; Pei, Z.; Zhu, L. Experimental Investigation of Residual Ultimate Strength of Damaged Metallic Pipelines. J. Offshore Mech. Arct. Eng. 2019, 141, 011703. [Google Scholar] [CrossRef]
- Choi, J.; Goo, B.; Kim, J.; Kim, Y.; Kim, W. Development of limit load solutions for corroded gas pipelines. Int. J. Pres. Ves. Pip. 2003, 80, 121–128. [Google Scholar] [CrossRef]
- ASME B31G-2012; Manual for Determining the Remaining Strength of Corroded Pipelines: Supplement to B31 Code for Pressure Piping. American Society of Mechanical Engineers (ASME): New York, NY, USA, 2012.
- AGA PR-3-805; A Modified Criterion for Evaluating the Remaining Strength of Corroded Pipe. American Gas Association (AGA): Washington, DC, USA, 1999.
- DNV-RP-F101; Recommended Practice DNV-RP-F101: Corroded Pipelines. DNV (Det Norske Veritas): Høvik, Norway, 2010.
- Netto, T.; Ferraz, U.; Estefen, S. The effect of corrosion defects on the burst pressure of pipelines. J. Constr. Steel Res. 2005, 61, 1185–1204. [Google Scholar] [CrossRef]
- Shah, B.A.; Muthalif, A.G. Muthalif. A comprehensive review on corrosion management in oil and gas pipeline: Methods and technologies for corrosion prevention, inspection and monitoring. Anticorros. Methods Mater. 2025, 75, 681–701. [Google Scholar] [CrossRef]
- Miner, M.A. Cumulative Damage in Fatigue. J. Appl. Mech. 1945, 12, 159–164. [Google Scholar] [CrossRef]
- Dakhel, A.Y.; Gáspár, M.; Koncsik, Z.; Lukács, J. Fatigue and Burst Tests of Full-scale Girth Welded Pipeline Sections for Safe Operations. Weld. World 2023, 67, 1193–1208. [Google Scholar] [CrossRef]
- Pinheiro, B.d.C.; Pasqualino, I.P. Fatigue Analysis of Damaged Steel Pipelines Under Cyclic Internal Pressure. Int. J. Fatigue 2009, 31, 962–973. [Google Scholar] [CrossRef]
- Hofman, P.; van der Meer, F.; Sluys, L. A Numerical Framework for Simulating Progressive Failure in Composite Lami-nates Under High-cycle Fatigue Loading. Eng. Fract. Mech. 2024, 295, 109786. [Google Scholar] [CrossRef]
- Bagni, C.; Halfpenny, A.; Hill, M.; Tarasek, A. A Pragmatic Approach for the Fatigue Life Estimation of Hybrid Joints. Procedia Struct. Integrity 2024, 57, 859–871. [Google Scholar] [CrossRef]
- Miao, C.; Li, R.; Yu, J. Effects of Characteristic Parameters of Corrosion Pits on the Fatigue Life of the Steel Wires. J. Constr. Steel Res. 2020, 168, 105879. [Google Scholar] [CrossRef]
- Wang, G.; Ma, Y.; Wang, L.; Zhang, J. Stress Concentration Factor Induced by Multiple Adjacent Corrosion Pits. Structures 2020, 26, 938–947. [Google Scholar] [CrossRef]
- Motta, R.S.; Cabral, H.L.; Afonso, S.M.; Willmersdorf, R.B.; Bouchonneau, N.; Lyra, P.R.; de Andrade, E.Q. Comparative studies for failure pressure prediction of corroded pipelines. Eng. Fail. Anal. 2017, 81, 178–192. [Google Scholar] [CrossRef]
- Al-Sabaeei, A.M.; Alhussian, H.; Abdulkadir, S.J.; Jagadeesh, A. Prediction of oil and gas pipeline failures through machine learning approaches: A systematic review. Energy Rep. 2023, 10, 1313–1338. [Google Scholar] [CrossRef]
- Liu, W.; Chen, Z.; Hu, Y. XGBoost algorithm-based prediction of safety assessment for pipelines. Int. J. Press. Vessels Pip. 2022, 197, 104655. [Google Scholar] [CrossRef]
- Okazaki, Y.; Okazaki, S.; Asamoto, S.; Chun, P. Applicability of machine learning to a crack model in concrete bridges. Comput. Aided Civ. Infrastruct. Eng. Eng 2020, 35, 775–792. [Google Scholar] [CrossRef]
- Wang, M.; Li, Y.; Yuan, H.; Zhou, S.; Wang, Y.; Ikram, R.M.A.; Li, J. An XGBoost-SHAP approach to quantifying morphological impact on urban flooding susceptibility. Ecol. Indic. 2023, 156, 111137. [Google Scholar] [CrossRef]
- Feng, D.-C.; Wang, W.-J.; Mangalathu, S.; Hu, G.; Wu, T. Implementing ensemble learning methods to predict the shear strength of RC deep beams with/without web reinforcements. Eng. Struct. 2021, 235, 111979. [Google Scholar] [CrossRef]
- Ángel, L.; Miguel, S.; Sánchez-Domínguez, M.; Rozalén, J.; Sánchez, F.R.; de Vicente, J.; Lacasa, L.; Valero, E.; Rubio, G. A certifiable machine learning-based pipeline to predict fatigue life of aircraft structures. Eng. Fail. Anal. 2026, 184, 110334. [Google Scholar]
- Konstantinos, A.; Pantelis, N.; Pavlou, D.; Farmanbar, M. Machine learning-based fatigue lifetime prediction of structural steels. Alex. Eng. J. 2025, 125, 55–66. [Google Scholar] [CrossRef]
- Han, T.; Siddique, A.; Khayat, K.; Huang, J.; Kumar, A. An ensemble machine learning approach for prediction and optimization of modulus of elasticity of recycled aggregate concrete. Constr. Build. Mater. 2020, 244, 118271. [Google Scholar] [CrossRef]
- Zhang, L.; Wang, L.; Ji, D.; Xia, Z.; Nan, P.; Zhang, J.; Li, K.; Qi, B.; Du, R.; Sun, Y.; et al. Explainable ensemble machine learning revealing the effect of meteorology and sources on ozone formation in megacity Hangzhou, China. Sci. Total Environ 2024, 922, 171295. [Google Scholar] [CrossRef]
- Petch, J.; Di, S.; Nelson, W. Opening the black box: The promise and limitations of explainable machine learning in cardiology. Can. J. Cardiol. 2022, 38, 204–213. [Google Scholar] [CrossRef] [PubMed]
- Linardatos, P.; Papastefanopoulos, V.; Kotsiantis, S. Explainable AI: A review of machine learning inter pretability methods. Entropy 2021, 23, 18. [Google Scholar] [CrossRef]
- Lundberg, S.; Lee, S. A Unified Approach to Interpreting Model Predictions. arXiv 2017. [Google Scholar] [CrossRef]
- Khare, S.K.; Acharya, U.R. An explainable and interpretable model for attention deficit hyperactivity disorder in children using EEG signals. Comput. Biol. Med. 2023, 155, 106676. [Google Scholar] [CrossRef]
- Michael, A.K.; Helen, B. Discovery of fatigue strength models via feature engineering and automated eXplainable machine learning applied to the welded transverse stiffener. Int. J. Fatigue 2025, 203, 109324. [Google Scholar] [CrossRef]
- Liu, H.; Zhang, M.; Lv, X.; Zhou, Q. Analysis of the Influence of Corrosion on the Mechanical and Fatigue Properties of X70 Steel in Simulated Deep-Sea Environment. Wuhan Univ. Technol. J. 2023, 45, 82–88. [Google Scholar] [CrossRef]
- National Energy Administration. SY/T 6648-2016. Oil Pipeline Integrity Management Specification; National Energy Administration: Beijing, China, 2017. Available online: https://std.samr.gov.cn/hb/search/stdHBDetailed?id=8B1827F2442DBB19E05397BE0A0AB44A (accessed on 25 November 2025).












| Material | Density (t/mm3) | Young’s Modulus (MPa) | Poisson’s Ratio | Yield Strength (MPa) | Tensile Strength (MPa) |
|---|---|---|---|---|---|
| X70 | 7.80 × 10−9 | 207,000 | 0.3 | 492 | 565 |
| X80 | 7.85 × 10−9 | 210,000 | 0.3 | 638 | 739 |
| Diameter (mm) | Wall Thickness (mm) | Design Pressure (MPa) | Material | Typical Applications |
|---|---|---|---|---|
| 1422 | 21.4 | 12 | X80 | China-Russia East-Route Natural Gas Pipeline |
| 1219 | 18.4 | 12 | X80 | West–East China Gas Pipeline |
| 26.4 | 12 | X70 | Shanxi-Beijing Gas Pipeline | |
| 1016 | 21 | 10 | X70 | West–East China Gas Pipeline Sichuan-East Gas Pipeline |
| 18.2 | 10 | X80 | China-Myanmar Natural Gas Pipeline |
| Parameter Type | Parameter | Mean | Std | Min | 25% | 50% | 75% | Max | |
|---|---|---|---|---|---|---|---|---|---|
| Pipeline parameters | pipe diameter | D | 1148.3 | 150.9 | 1016.0 | 1016.0 | 1016.0 | 1219.0 | 1422.0 |
| wall thickness | δ | 21.0 | 2.9 | 17.5 | 18.4 | 21.0 | 21.4 | 26.4 | |
| operational pressure | P | 11.0 | 1.0 | 10.0 | 10.0 | 10.0 | 12.0 | 12.0 | |
| Material parameters | yield strength | σy | 562.9 | 73.0 | 492.0 | 492.0 | 492.0 | 638.0 | 638.0 |
| ultimate tensile strength | σu | 649.4 | 87.0 | 565.0 | 565.0 | 565.0 | 739.0 | 739.0 | |
| Defect size parameters | defect depth coefficient | k1 | 0.119 | 0.118 | 0.02 | 0.0488 | 0.0911 | 0.12 | 0.9 |
| defect length coefficient | k2 | 0.432 | 0.389 | 0.1 | 0.1549 | 0.38 | 0.52 | 2 | |
| defect width coefficient | k3 | 0.038 | 0.039 | 0.0035 | 0.0052 | 0.0169 | 0.05 | 0.1253 | |
| defect aspect ratio | k2/k3 | 1.93 | 3.12 | 0.05 | 0.31 | 0.92 | 2.25 | 23.43 | |
| Target value | fatigue life | Tyear | 42.7 | 69.2 | 0.0 | 0.0 | 9.7 | 61.4 | 388.2 |
| Parameter | Range | Default Value | Optimized Parameter Values |
|---|---|---|---|
| Learning_rate | 0.1–0.5 | 0.3 | 0.1 |
| n_estimators | <300 | 50 | 63 |
| Max_depth | 3–10 | 6 | 8 |
| Colsample_bytree | 0.3–1.0 | 1 | 0.43 |
| Subsample | 0.5–1.0 | 1 | 0.81 |
| Min_child_weight | 1.0–5.0 | 1 | 1 |
| Reg_alpha | 0–10 | 0 | 0.8 |
| Reg_lambda | 0–10 | 1 | 6.63 |
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
Nan, Z.; Chen, L.; Cheng, C.; Zhou, X. An Interpretable Machine Learning Model for Fatigue Life Prediction of Long-Distance Natural Gas Pipelines with Internal Corrosion Defects. Processes 2025, 13, 3963. https://doi.org/10.3390/pr13123963
Nan Z, Chen L, Cheng C, Zhou X. An Interpretable Machine Learning Model for Fatigue Life Prediction of Long-Distance Natural Gas Pipelines with Internal Corrosion Defects. Processes. 2025; 13(12):3963. https://doi.org/10.3390/pr13123963
Chicago/Turabian StyleNan, Zilong, Liqiong Chen, Chuan Cheng, and Xingyu Zhou. 2025. "An Interpretable Machine Learning Model for Fatigue Life Prediction of Long-Distance Natural Gas Pipelines with Internal Corrosion Defects" Processes 13, no. 12: 3963. https://doi.org/10.3390/pr13123963
APA StyleNan, Z., Chen, L., Cheng, C., & Zhou, X. (2025). An Interpretable Machine Learning Model for Fatigue Life Prediction of Long-Distance Natural Gas Pipelines with Internal Corrosion Defects. Processes, 13(12), 3963. https://doi.org/10.3390/pr13123963
