## 2 Theory and Method
### Theory of the PSO-GD Algorithm  
In this section, the original PSO code developed by [PERSON] (2017) in Python is improved and turned into an HPSO-TVAC [40]. Then, a new model-updating equation is developed based on the correction terms in the PSO and GA models. The PSO and GA algorithms are integrated through a cosine probability function. In addition, the \(\alpha\)-trimmed filter is selected as a regularization constraint to smooth the model. Inspired by the search behavior of bird and fish swarms in nature, [PERSON] and [PERSON] proposed the PSO algorithm in 1995 [43]. The basic PSO algorithm calculates velocity and location using Equations (10) and (11), respectively. \[v_{i}^{t+1}=v_{i}^{t}+\alpha_{1}\gamma_{1}\big{(}P_{i}-x_{i}^{t}\big{)}+\alpha _{2}\gamma_{2}\big{(}G-x_{i}^{t}\big{)} \tag{10}\]  
\[x_{i}^{t+1}=x_{i}^{t}+v_{i}^{t+1} \tag{11}\]  
where \(\gamma_{1}\) and \(\gamma_{2}\) are random numbers in the range of (0, 1) \(\alpha_{1}\) and \(\alpha_{2}\) are the individual and social acceleration coefficients, respectively, \(i\) is the particle number, \(k\) is the current number of iterations, and \(P_{i}\) are the individual optimum solutions, and \(G\) is the global optimum solution. Each particle of the particle swarm may be a possible solution (i.e., an electrical resistivity model) to a short-offset transient electromagnetic (SOTEM) inverse problem. The ability of PSO to escape from local optimum solutions is ascribed to the use of a swarm information sharing system and an individual fitness evaluation system as guidance to correct the model. A continuous search for a better-fitting model for the observation data in the solution space ultimately allows the particles to converge on the optimum solution, which is independent of the selected initial model [45]. When used to solve a 3D inverse problem, the convergence of the PSO algorithm requires many particles and multiple iterations. Therefore, the standard PSO version must be revised. Several variants of the PSO algorithm have been developed to improve the convergence rate [49; 50; 51; 52; 53]. The HPSO-TVAC algorithm considerably outperforms the standard PSO algorithm in terms of convergence and stability. The equation of the HPSO-TVAC algorithm is shown as follows:  
\[v_{i}^{k+1}=\omega v_{i}^{k}+\alpha_{1}^{k}\gamma_{1}\big{(}P_{i}-x_{i}^{k} \big{)}+\alpha_{2}^{k}\gamma_{2}\big{(}G-x_{i}^{k}\big{)} \tag{12}\]  
\[x_{i}^{k+1}=x_{i}^{k}+v_{i}^{k+1} \tag{13}\]  
In the HPSO-TVAC algorithm, the initial value of \(\alpha_{1}\) is greater than that of \(\alpha_{2}\). As the iterative process proceeds, \(\alpha_{1}\) and \(\alpha_{2}\) are linearly inverted. The high value of \(\alpha_{1}\) at the initial stage ensures a global optimization capability, while the high value of \(\alpha_{2}\) at the final stage ensures the convergence of the swarm towards the optimum solution. \(\alpha_{1}\) and \(\alpha_{2}\) are expressed using the following equations:  
\[\alpha_{1}^{k}=\alpha_{1}^{\max}-\Big{(}\alpha_{1}^{\max}-\alpha_{1}^{\min} \Big{)}\bigg{(}\frac{k-1}{\max(k)-1}\bigg{)} \tag{14}\]  
\[\alpha_{2}^{k}=\alpha_{2}^{\min}+\Big{(}\alpha_{2}^{\max}-\alpha_{2}^{\min} \Big{)}\bigg{(}\frac{k-1}{\max(k)-1}\bigg{)} \tag{15}\]  
where \(\alpha^{k}\) is the acceleration in the current (i.e., \(k\)th) iteration, \(\alpha_{1}^{\min}\) and \(\alpha_{2}^{\min}\) are the minimum values of the individual and social acceleration parameters, respectively, \(\alpha_{1}^{\max}\) and \(\alpha_{2}^{\max}\) are the maximum values of the individual and social acceleration parameters, respectively, and \(\max(k)\) is the maximum value in the current iteration.