## 3 Algorithm Optimization BPNN  
### BP Neural Network  
The BP neural network is a multilayer feed-forward supervised artificial neural network that identifies the nonlinear connection between input and output information by simulating a real brain's processing mechanism. The weights and thresholds between each neuron are constantly adjusted during the training process, and the reverse transmission of the input signal and the error signal is carried out [44], as shown in Figure 1[45]. Suppose the input of the neuron from one to n in the BP neural network is \(x_{1}\), \(x_{2}\), \(\cdots\), \(x_{n}\), while the j-th neuron after being stimulated is expressed as as \(w_{j1}\), \(w_{j2}\), \(\cdots\), \(w_{jn}\)[46]. Then, the input value of the j-th neuron is shown in Formula (21):  
\[S_{j}=\sum_{i=1}^{n}w_{ji}\cdot x_{i}+b_{j}=w_{j}X+b_{j} \tag{21}\]  
where \(X=[x_{1},x_{2},\cdots,x_{i},\cdots,x_{n}]^{T}\) and \(W_{j}=\big{[}w_{j1},w_{j2},\cdots,w_{ji},\cdots,w_{jn}\big{]}\). If \(x_{0}=1\) and \(w_{j0}=b_{j}\), whereby the input signal and the input offset \(b_{j}\) are contained as weight elements; then, \(X=[x_{0},x_{1},x_{2},\cdots,x_{i},\cdots,x_{n}]^{T}\) and \(W_{j}=\big{[}w_{j0},w_{j1},w_{j2},\cdots,w_{ji},\cdots,w_{jn}\big{]}\). The following expression is the result of the activation function's action:  
\[y_{i}=f\big{(}s_{j}\big{)}=f\bigg{(}\sum_{i=1}^{n}w_{ji}\cdot x_{i}\bigg{)}=F \big{(}W_{j}X\big{)} \tag{22}\]  
\[Net_{i}=\sum_{j=1}^{M}w_{ji}x_{j}+\theta_{i} \tag{23}\]  
where (23) \(\theta_{i}\) is the buried layer's bias vector; thus, \(\theta=\big{(}\theta_{1},\theta  
where \(Y_{k}\) is the ideal input value. The BP neural network is tuned with the weights \(w_{jk},w_{ij}\) and thresholds a and b, as shown in Equations (28)-(31):  
\[w_{ij}=w_{ij}+\eta y_{j}(1-y_{j})x(i){\sum w_{jk}e_{k}} \tag{28}\]  
\[w_{jk}=w_{jk}+\eta y_{i}e_{k} \tag{29}\]  
\[a_{j}=a_{j}+\eta y_{i}(1-y_{j}){\sum w_{jk}e_{k}} \tag{30}\]  
\[b_{k}=b_{k}+e_{k} \tag{31}\]  
the training process of the BPNN algorithm is shown in Figure 2.  
The weight size has a significant impact on the BPNN training outcome and is optimized using the additional momentum method, as follows:  
\[\Delta W^{\prime}(t+1)=\Delta W(t+1)+\partial^{*}\Delta W(t) \tag{32}\]  
where (32) \(t\) denotes the number of generations, and \(\partial\) is the influence factor, which is the additional momentum. In this paper, we used a constant adaptive learning rate. Taking too large a value, the BP neural network will be turbulent; taking too small a value, the expression effect is poor. Thus, the adaptive learning rate can be expressed as:  
\[\eta(t+1)= \begin{cases}1.05\eta(t)E(t+1)>E(t)\\ 0.7\eta(t)E(t+1)<E(t)\\ \eta(t)\text{ other}\end{cases}  \tag{33}\]  
for the trained BP neural network, it can be thought of as a nonlinear function with input information \(x\) and output information \(y\). \[y=f\{x,w,b\} \tag{34}\]  
where (34) the set of weights is represented by \(w\), and the set of biased items is represented by \(b\). According to the topology of the neural network, \(x_{1},x_{2},\cdots,x_{6}\) is the network's input value and \(y_{1}\) is the network's output value. In this paper, to avoid introducing additional constraints and to guarantee the numerical accuracy of forward propagation in the neural network, the input information, x, of the network is each geological parameter (e.g., soil weight (\(\gamma\)), angle of internal friction (\(\varphi\)), height (\(H\)), cohesion (\(c\)), slope angle (\(\alpha\)), and pore water pressure (\(ru\))), and the output information, y, is the slope safety factor, the structure of which is shown in Figure 3.  
Figure 2: Flowchart of the BP neural network algorithm. To guarantee numerical accuracy, the hidden layer was configured via two layers. After numerous training sessions, the training impact was the greatest when the number of nodes in the hidden layer was 10.