## 1 Introduction  
With the larger scale, deeper burial, and more complex geological conditions of underground engineering, accidents during construction occur frequently. Such as large deformations in soft rocks, rockbursts in hard rocks, etc., were related to their regional in situ stress [1; 2; 3; 4]. Hence, an accurate in situ stress field is not only the basis for the design and construction of underground engineering but also for the deformation and failure research. In situ tests provide an effective way to obtain in situ stress directly. Currently, the primary measurement methods are the hydraulic fracturing method, the stress relief method, and the acoustic emission method [5; 6; 7; 8; 9]. However, the investigation of in situ stress through boreholes is too expensive to set up sufficient boreholes to cover the entire underground cavern. To overcome the limitation of on-site test data, researchers generally adopt three-dimensional numerical simulation methods to conduct the back analysis of the in situ stress field in the engineering field [10; 11; 12; 13]. The main inversion methods are the boundary load adjustment method, the multiple regression fitting method, and the artificial neural network (ANN) algorithm. The boundary load adjustment method involves repeatedly adjusting the numerical model's boundary loads to approximate the calculated stress from the test data. This method can effectively and directly obtain a reasonable in situ stress field through iterative calculation. However, in practice, it may not always provide a unique and optimal solution, and the iterative process can be irregular and time-consuming [14]. Multiple regression is a method that takes many factors into account to ensure the uniqueness and rationality of the results. For example, [PERSON] et al. [15], [PERSON] et al. [16], and [PERSON] et al. [17] utilized the least squares regression method, the lasso regression method, and the partial least squares regression method, respectively, to conduct multiple linear regression analysis of the in situ stress field. In this method, the regression relationship between model conditions and stress state has been established to reduce the computational cost. Due to the basic assumptions of linearity and continuity, this method may be less applicable for underground engineering with complex geological conditions, where the in situ stress field is nonlinear with burial depth of rock. Hence, the application of artificial neural networks to in situ stress inversion has become a popular methodology in the 21 st century. [PERSON] et al. [18], [PERSON] et al. [19], and [PERSON] et al. [20] utilized the genetical algorithm (GA), the back propagation (BP) neural network, and the GA-BP artificial neural network, respectively, to optimally solve the model boundary loads. They inversely obtained a more accurate in situ stress field due to the effectiveness of ANN in solving nonlinear and complex problems. However, traditional neural network algorithms often have several drawbacks in practice. These include overfitting, slow convergence, and sensitivity to initial conditions, which may make them less suitable for complex underground problems. Particle Swarm Optimization (PSO), first proposed by [PERSON] and [PERSON] [21], is a widely used optimization algorithm. Due to its capability for global optimization, PSO can serve as a pretraining step to optimize the initial parameters before actual training with the BP algorithm. As a result, this approach may enhance the performance of network training and improve the accuracy of prediction. To the best knowledge of the authors, the PSO-BP algorithm was seldom applied to the back analysis of in situ stress. In this paper, an intelligent in situ stress inversion method combining the BP algorithm and the PSO algorithm is proposed. To improve the accuracy of the inversion results, this method employs the global search capability of the PSO algorithm to optimize the BP initial parameters.