###### Abstract
Optimization algorithms including artificial neural network (ANN), genetic algorithm (GA), and particle swarm optimization (PSO) were employed to seek optimal combinations of rock mass parameters by analyzing observed data [27; 28; 29], thus resulting in reduced computational costs [30; 31; 32]. The above studies have explored inverse modeling of rock parameters to some extent, yielding valuable insights. However, they mainly focus on inverting multiple input parameters using a single output parameter. The machine learning algorithms utilized are set with default hyperparameters, without optimization, leading to less predictable results. Moreover, the use of these algorithms is limited, indicating a need for further evaluation of their fitting performance with a wider range of algorithms. Red-bed soft rock (RBSR) displays poor mechanical properties, and especially terrible deterioration when exposed to water. This susceptibility to disintegration was evaluated using drying-wetting cycles experiments conducted in accordance with ASTM D4373-14 [33]. In accordance with the Chinese standard for assessing the physical and mechanical properties of rock (DZ/T 0276.9-2015) [34], cylindrical specimens of 50 mm diameter and 100 mm (\(\pm 1\) mm) height, and weighing 0.39-0.41 kg, were used. Two representative RBSR kinds, (a) argillaceous sandstone and (b) silty mudstone, were selected for the wetting-drying cycle testing. Figure 1 shows the results of disintegration experiments. Specimens disintegrated after three cycles, and complete disintegration was observed after ten cycles. This evidence confirms the substantial degradation of the parameters of the RBSR mass in tunnels in water infiltration conditions, which is of paramount concern during tunnel operation. Therefore, the establishment of a numerical tunnel modeling framework for the purpose of obtaining parameter samples and subsequently deducing rock mechanics properties has considerable practical utility. This study investigates a red-bed soft rock (RBSR) tunnel section in the Chuxiong segment of the Central Yunnan Water Diversion Project. Geological data form the foundation for determining surrounding rock parameters. A hybrid algorithm model, PSO-XGBoost, was proposed. A finite element model for tunnel operation was established and a Mohr-Coulomb constitutive model was employed. Seven influencing factors, including environmental conditions and rock mass parameters, are selected. Numerical calculations, based on the orthogonal design method, utilize crown displacement, convergence around the tunnel, and the proportion of the plastic zone as output indicators. Global sensitivity analysis, employing the Sobol method, identifies the rock mechanics parameters of elasticity modulus (E), Poisson ratio (\(\mu\)), cohesion (c), and internal friction angle (\(\varphi\)) for parameter inversion. The Latin Hypercube Sampling (LHS) approach generates 1000 parameter samples for tunnel model simulation using FLAC3D, yielding 1000 datasets for inversion. The results show that the PSO-XGBoost model achieves over 90% accuracy in predicting critical parameters. Verification on five monitoring data cross-sections demonstrates a consistent relative error of less than 15%, affirming the accuracy of the PSO-XGBoost inversion model. This model holds promise for offering valuable insights into the engineering of soft rock tunnels and similar projects, contributing to the field of engineering geology.