## 2 The Proposed Method
### Bayesian Neural Network and Improved Variational Inference  
The Bayesian neural network is a powerful uncertainty framework [36]. It introduces uncertainty into a neural network by changing the constant weights (W in Figure 3) in the traditional neural network into probabilistic weights that obey a certain distribution; the structural comparison diagram is shown in Figure 3.  
The basic idea of the Bayesian framework is to obtain model update knowledge, called posterior probability, from learned knowledge, called prior probability, and observed knowledge, called likelihood. Then, the model will be used to predict unknown samples. For a given training set \(\{X,Y\}\), \(X\) represents the variable, and \(Y\) represents labels. Let \(P(Y|X,w)\) be a model likelihood function, and let \(P(w)\) be a model's prior distribution. The posterior distribution is given by  
\[P(w|X,Y)=\frac{P(Y|X,w)P(w)}{P(Y|X)} \tag{5}\]  
For a new input data \(x\), the Bayesian framework can output a probability distribution of the prediction variable \(y\) based on the new input data \(x\) and the historical data set \(\{X,Y\}\). The predictive distribution is given as follows  
\[P(y|x,X,Y)=\int P(y|x,w)P(w|X,Y)dw \tag{6}\]  
Although the integral in Equation (6)is easy to calculate in the low-dimensional case, it is difficult to obtain the accurate posterior distribution \(P(w|X,Y)\) in a deep neural network that contains high-dimensional parameters to obtain accurate integral value. To address this problem, approximation techniques are necessary. Currently, the two most popular approximation methods are the Markov chain Monte Carlo (MCMC) [37] and variational inference (VI) [38]. The MCMC, a sampling-based approach, does not require specific model assumption, but it is computationally expensive to obtain prediction results due to the need for obtaining a large number of samples of the posterior distribution. As a result, it is less suitable for problems with high-dimensional parameters. On the other hand, VI, an approximation-based method, requires the assumption of a prior model of the posterior distribution. However, it offers faster computation for generating prediction results. Considering the computational efficiency of the model, we employ VI in this study. Hypothetical prior distribution selection and distribution difference measurement are two key components in VI, which are introduced in detail as follows. Figure 3: Structure comparison diagram of traditional neural network and Bayesian neural network. (**a**) traditional neural network; (**b**) bayesian neural network. * Improved hypothetical prior distribution Initially, a prior distribution of moderate complexity is carefully chosen. An overly simplistic model, while easier to optimize, may yield considerable approximation errors when attempting to approximate relatively complex distributions, thus compromising the accuracy of the approximate solution. Conversely, an excessively complex model, although capable of approximating any distribution, may introduce significant challenges in the optimization process. Previous studies have frequently employed Gaussian distributions for VI, but single Gaussian models often exhibit limited accuracy when approximating complex distributions. In this research, we adopt a Gaussian mixture distribution as the prior distribution. The Gaussian mixture distribution comprises two individual Gaussian models with a mean value of \(\mu_{1},\mu_{2}\) and a variance value of \(\sigma_{1},\sigma_{2}\), providing a trade\(-\)off between computational complexity and prediction accuracy. The distribution is mathematically represented as follows:  
\[Q(w|\theta)=\rho N(w|\mu_{1},\sigma_{1}^{2})+(1-\rho)N(w|\mu_{2},\sigma_{2}^{ 2}) \tag{7}\]  
where \(\rho\) denotes the proportion of the mixture, and \(\theta=\{\mu_{1},\mu_{2},\sigma_{1},\sigma_{2}\}\) denotes the parameter set of the Gaussian mixture distribution.