Abstract:[Purposes]Underground pipeline settlement is a key parameter during the construction of rectangular tunnel segments. Traditional prediction methods often rely on empirical models and statistical analysis, which struggle to accurately forecast settlement in complex tunnel structures. To address this challenge, this paper proposes a prediction method for underground pipeline settlement induced by rectangular tunnel construction, which integrates the Self-Attention Mechanism with Particle Swarm Optimization (PSO) and Long Short-Term Memory (LSTM) neural networks (PSO-LSTM-SAM). [Methods]:The method first optimizes the hyperparameters of the LSTM network using the PSO algorithm to ensure that the LSTM can process the input data with optimal configuration. The LSTM network is then used to extract temporal features from the input data and capture long- and short-term dependencies. Next, the Self-Attention mechanism is introduced to adaptively assign different weights to different time steps, enhancing the model’s focus on critical time points and effectively capturing important information from the time series. Finally, the model outputs the predicted surface settlement through a fully connected layer. [Findings] To verify the superiority and robustness of the proposed algorithm, a dataset of underground pipeline settlement was constructed using measured data from the Changsha Metro Line 6 project. The prediction performance of settlement at different tunnel locations was compared using the LSTM, LSTM-SAM, and PSO-SVR models. The results show that the PSO-LSTM-SAM model, which incorporates the Self-Attention mechanism, outperforms the others in terms of Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and the coefficient of determination (R2). [Conclusions] This study validates that the PSO-LSTM-SAM model exhibits superior performance in predicting underground pipeline settlement.