## 3 Bo-Pso
### Algorithm Framework  
The effectiveness of BO depends on the acquisition function to some extent. The acquisition function generally has the characteristics of non-convex and multi-peak, which needs to solve the non-convex optimization problem in the search space \(X\). PSO has the advantages of simplicity, few parameters need to be adjusted, fast convergence and so on. It is not necessary to calculate the derivative of the objective function. Therefore, this paper chooses PSO to optimize the acquisition function to obtain new sample points. First, we need to select a surrogate model. The approximation characteristics of potential functions and the ability to measure uncertainty of Gaussian process (GP) make it a popular choice of surrogate model. Gaussian process is a nonparametric model determined by mean function and covariance function (positive definite kernel function). In general, every finite subset of the Gaussian process model follows the multi variable normal distribution. Assuming that the output expectation of the model is 0, the joint distribution of the existing data \(D\) and the new sample point \((x_{t+1},y_{t+1})\) can be expressed as follows:  
\[[y_{1:t+1}]\sim N\bigg{(}0,\bigg{[} \begin{array}{cc}K+\sigma_{ \varepsilon}^{2}I&\mathbf{k}\\ \mathbf{k}^{T}&k(x_{t+1},x_{t+1})\end{array} \bigg{]}\bigg{)}\]  
where \(k:x*x\rightarrow\mathbb{R}\) is the covariance function, \(\mathbf{k}=[k(x_{1},x_{t+1}),\cdots,k(x_{t},x_{t+1})]^{T}\) The Gram matrix matrix is as follows:  
\[K=\left[ \begin{array}{ccc}k(x_{1},x_{1})&\cdots&k(x_{1},x_{t}) \\ \vdots&\ddots&\vdots\\ k(x_{t},x_{1})&\cdots&k(x_{t},x_{t})\end{array} \right]\]  
the \(I\) is identity matrix and \(\sigma_{\varepsilon}^{2}\) is the noise variance. The prediction can be made by considering the original observation data as well as the new \(x\). Since the posterior distribution of \(y_{t+1}\) is:  
\[p(y_{t+1}\mid y_{1:t},x_{1:t+1})=N(\mu_{t}(x_{t+1}),\sigma_{t}^{2 }(x_{t+1})) \tag{16}\]  
The mathematical expectation and variance of \(y_{t+1}\) are as follows:  
\[\mu_{t}(x_{t+1})=k^{T}(K+\sigma_{\varepsilon}^{2}I)^{-1}y_{1:t} \tag{17}\] \[\sigma_{t+1}=k(x_{t+1},x_{t+1})-k^{T}(K+\sigma_{\varepsilon}^{2} I)^{-1}k \tag{18}\]  
The ability of GP to express the distribution of functions only depends on the covariance function. Matern-52 covariance function is one of them and as follows:  
\[K_{M52}(x,x^{\prime})=\theta_{0}\bigg{(}1+\sqrt{5r^{2}(x,x^{ \prime})}+\frac{5}{3}r^{2}(x,x^{\prime})\bigg{)}exp\{-\sqrt{5r^{2}(x,x^{\prime })}\} \tag{19}\]  
The second choice we need to make is acquisition function. Although our method is applicable to most acquisition functions, we choose to use UCB which is more popular in our experiment. GP-UCB proposed by [PERSON] in 2009 [PERSON] (2009). The UCB strategy considers to increase the value of the confidence boundary on the surrogate model as much as possible, and its acquisition functions is as follows:  
\[\alpha_{UCB}(x)=\mu(x)+\gamma\sigma(x) \tag{20}\]  
the \(\gamma\) is a parameter that controls the trade-off between exploration (visiting unexplored areas in \(X\)) and exploitation (refining our belief by querying close to previous samples). This parameter can be fixed to a constant value. ### Algorithm Framework  
BO-PSO consists of the following steps: (i) assume a surrogate model for the black box function \(f\), (ii) define an acquisition function \(\alpha\) based on the surrogate model of \(f\), and maximize \(\alpha\) by the PSO to decide the next evaluation point, (iii) observe the objective function at the point specified by \(\alpha\) maximization, and update the GP model using the observed data. BO-PSO algorithm repeats (ii) and (iii) above until it meets the stopping conditions. The Algorithm 1 framework is as follows:  
```
0: surrogate model for \(f\), acquisition function \(\alpha\)
0: hyper-parameters vector optimal \(x^{*}\)
0: Step 1. Initialize hyper-parameters vector \(x_{0}\);
0: Step 2. For \(t=1,2,\ldots,T\) do: Step 3.