Abstract:A prediction model for submarine pipeline corrosion leakage is proposed in order to effectively predict the leakage risk of submarine pipelines caused by corrosion. Firstly, the correlation between the influencing factors is analyzed by the Spearman correlation coefficient, and then the importance of each factor is ranked based on the data outside the random forest bag to eliminate the factors with high correlation and low importance. Using the selected data, the feedforward neural network and random forest regression prediction model are established. The neural network prediction model's weight and threshold are optimized using particle swarm optimization, and the neural network prediction model is built using particle swarm optimization. The analysis results show that the neural network prediction model's average absolute error(MAE) and mean square error (MSE) in the training of five groups of random models are 1.59 and 3.37, respectively, which are higher than the random forest regression prediction model, indicating that the model's error is large, but the determination coefficient (R2) is 0.13 higher than the random forest regression prediction model, because the closer the determination coefficient is to “1”, the better the model. As a result, the random forest regression prediction model has a lower fitting degree and a higher long-term prediction error than the neural network prediction model. Therefore, particle swarm optimization algorithm can be used to optimize the neural network. The optimized model MAE is 0.79, MSE is 0.7293 and R2 is 0.9151. It can be seen that the optimized neural network prediction model improves the stability and better prediction effect on the basis of ensuring the accuracy. Finally, a multi model pipeline corrosion prediction software integrating random forest regression, neural network and neural network under particle swarm optimization is compiled. It provides a basis for accurate prediction and efficient control of submarine pipeline leakage risk, and is of great significance in the safety of offshore oil and gas transportation.