Abstract:
Objective Internal corrosion in natural gas gathering pipelines is governed by multiple interacting factors, including temperature, pressure, flow velocity, H2S concentration, CO2 concentration, liquid holdup, salinity, and pH. It exhibits pronounced time-varying behavior, hysteresis, and localized abrupt changes. Nevertheless, most existing studies concentrate excessively on single-model accuracy. They cannot jointly characterize the local nonlinearity of variables and cross-time-step dependencies, leaving a research gap.
Methods A Kolmogorov-Arnold Networks-Transformer-Bidirectional Long Short-Term Memory (KAN-Transformer-BiLSTM) model is developed for internal corrosion rate prediction. This study adopts 90-day continuous monitoring data from an L360N seamless steel natural gas gathering pipeline. Eight variables, including temperature, pressure and medium flow velocity, from the preceding seven consecutive days are used as inputs to predict the corrosion rate at the next time step. The 90-day dataset is split chronologically into training, validation, and independent test sets, with Z-score standardization applied to all eight variables using training-set statistics. Within the model, learnable cubic B-splines capture the local nonlinearity of variables at each time step. A Transformer encoder extracts cross-time-step dependencies across the lookback window, and a BiLSTM layer models local temporal dynamics. The model is trained using the Adam optimizer, with early stopping triggered by the Root Mean Square Error (RMSE) on the validation set. Four baselines—BiLSTM, self-attentive BiLSTM, Random Forest, and Gradient Boosting Decision Tree—are included for comparison. Model stability and variable importance are evaluated using rolling starting points and the time-lag permutation test.
Results The proposed KAN-Transformer-BiLSTM model is applied to a natural gas gathering pipeline in the South China Sea. It achieves an RMSE of 0.082 1 mm/a, a mean absolute percentage error (MAPE) of 10.12%, and a coefficient of determination R2 of 0.9798. Compared with the four baseline models, it reduces RMSE by 81.9%, 82.0%, 78.6%, and 54.8%, while improving R2 by 0.5961, 0.6037, 0.4220, and 0.0785, respectively. The proposed model accurately captures both peak values and post-peak declines in the test set. Rolling-origin validation demonstrates tightly concentrated error distributions across varying starting points, with validation RMSE stabilizing once the maximum iteration count reaches 40. Time-lag permutation test reveals that inputs from day 6 contribute most markedly to model predictions, followed by days 3 and 5. Inputs from day 7 still exert a measurable impact.
Conclusion The proposed model jointly captures the local nonlinearity of pipeline environmental variables, cross-time-step dependencies within the lookback window, and dynamic corrosion rate variations. Under a strict chronological and leakage-free evaluation protocol, it achieves high prediction accuracy and stability, offering a methodological reference for online early warning of natural gas gathering pipelines.