Abstract:
Objective Buried pipelines are subjected to complex soil conditions, with corrosion processes characterized by pronounced nonlinearity and dynamic temporal variation. This study introduces a high-precision hybrid prediction model, leveraging a segmentation mechanism for dynamic and accurate corrosion rate prediction.
Methods A segmented dynamic prediction model, RF-IGOA-ITransformer, was developed by integrating Random Forest (RF), an Improved Goat Optimization Algorithm (IGOA), and an improved Transformer (ITransformer). Initially, the original multi-dimensional environmental features were ranked and screened using the RF algorithm to eliminate redundant variables and construct a high-quality input feature set. Then, considering the non-stationarity of corrosion rate fluctuations, an adaptive segmentation mechanism based on a global standard deviation threshold was introduced to automatically divide the corrosion process into slowly-varying and abrupt-change segments. The core prediction module employed the ITransformer, which separately modeled the evolutionary characteristics of different stages through adaptive segmentation coding and a multi-scale attention mechanism. To address the challenge of determining the segmentation threshold, the IGOA was applied to globally optimize the model’s key parameters via its dual-population cooperative search mechanism, ensuring adaptive capacity across various corrosion scenarios.
Results The RF-IGOA-ITransformer model was evaluated using 100 datasets representing typical corrosion environments, demonstrating excellent overall performance. For the test sets, the model achieved a Mean Absolute Error (MAE) of 0.012, a Mean Squared Error (MSE) of 0.000 3, a Root Mean Squared Error (RMSE) of 0.016 9, a Mean Absolute Percentage Error (MAPE) of 17.13%, and a coefficient of determination (R2) of 0.821 1. Compared to the baseline Transformer model, the proposed model’s R2 increased by 90.16%, while the MAE and MSE decreased by 41.18% and 66.67%, respectively. When compared to the unoptimized ITransformer model, the R2 improved by 62.52%, with reductions in MAE and MSE of 38.14% and 62.50%, respectively. The model effectively captured low-speed fluctuations in slowly-varying segments and significantly enhanced the detection of rate jumps and key inflection points in abrupt-change segments.
Conclusion The RF-IGOA-ITransformer model significantly enhances prediction accuracy and robustness for buried pipeline corrosion rates, supporting effective safety management.