## 4 SSA-ELMAN Neural Network Model
### Sparrow Search Algorithm  
The SSA is a new swarm intelligence optimization method that draws inspiration from sparrows' foraging habits. in nature [19]. The sparrow search algorithm has strong stability and quick convergence time when compared to other intelligent optimization algorithms, and it can successfully prevent slipping into a local optimum [20; 21; 22; 23]. The sparrow population is usually composed of producers, scrousgers, and guards. We assume that the variable dimension of the problem to be solved is D-dimensional and the number of sparrow population is n. Then the position of \(i\)th sparrow in the D-dimensional solution space is \(X_{i}\) = (\(x_{1}\), \(x_{2}\)..., \(x_{\text{D}}\)) and the fitness value is \(f_{i}\) = \(f\) (\(x_{1}\), \(x_{2}\)..., \(x_{\text{D}}\)). In the sparrow search algorithm, the reserve energy of an individual sparrow depends on its fitness value, the producers with greater fitness are given priority in the search procedure for food. 1. Producers;  
The producers are usually healthy and fit and are in charge of giving the foraging area and guidance for the scrouspers. Their locations are updated as follows:  
\[X_{i,j}^{t}=\left\{ \begin{array}{l}X_{i,j}^{t}\cdot\exp\Bigl{(}-\frac{i}{ \alpha\cdot iter_{\text{max}}}\Bigr{)}\text{ if }R_{2}<\text{ }ST\\ X_{i,j}^{t}+Q\cdot L\text{ if }R_{2}\text{ }\geq\text{ }ST\end{array} \right. \tag{4}\]  
Figure 3: [PERSON] neural network structure. where \(X_{ij}\) is the position of the \(i\)th sparrow in the \(j\)th dimension, \(j=1,2...\), \(d\), where \(d\) is the solution's dimension, \(t\) is the current iteration, \(iter_{max}\) is the population's maximum number of iterations, \(\alpha\) is a random number between [0, 1], \(R_{2}\in[0,1]\) and \(ST\in[0.5,1]\) indicate the alarm value and the safety threshold, respectively, \(Q\) is a random number following a normal distribution, and \(L\) is a one-dimensional matrix with all members equal to 1. 2. Scroungers;  
The scroungers always monitor the producers. They will compete for resources and become new producers once they see the producers have moved to an area with greater food. The locations are updated as follows:  
\[X_{i,j}^{t+1}=\left\{ \begin{array}{l}Q\cdot\exp\left(\frac{X_{watt}-X_{i,j}^ {t}}{t^{2}}\right)\text{ if }i>\frac{m}{2}\\ X_{p}^{t+1}+\left|X_{i,j}^{t}-X_{p}^{t+1}\right|\cdot A^{+}\cdot L\text{ if }i \leq\frac{m}{2}\end{array} \right. \tag{5}\]  
where \(X_{p}\) represents the current global best position sought by the current producer, and \(X_{wost}\) is the current global worst position sought by the current producer, \(A\) is a \(1\times d\) matrix with all its elements randomly assigned as 1 or \(-1\), and m is the sparrow population. When \(I>m/2\), the \(i\)th scrounger is starving and needs to fly to other places to find food. 3. Guards;  
The number of guards is usually 10% to 20% of the population. When they encounter a predator, the guards will issue an alarm. The producer will direct the gathering to a safe spot if the alert signal exceeds the safe threshold. The guards are randomly generated, and their locations are updated as follows:  
\[X_{i,j}^{t+1}=\left\{ \begin{array}{l}X_{i,j}^{k}+\beta\left|X_{i,j}^{k}-X_{ b,j}^{k}\right|\text{ if }f_{i}>f_{g}\\ X_{i,j}^{t}+K\cdot\left(\frac{\left|X_{i,j}^{k}-X_{watt}\right|}{\left(f_{i}-f _{g}\right)+\epsilon}\right)\text{ if }f_{i}=f_{g}\end{array} \right. \tag{6}\]  
where \(\beta\) represents the step size control parameter, which obeys a normal distribution of N (0, 1), The direction of the sparrow population's search movement is indicated by \(k\), which is a random number between [0, 1], \(f_{i}\) is the current sparrow's fitness value, and \(f_{g}\) and \(f_{w}\) are the current global best and worst fitness values, respectively. When\(f_{i}>f_{g}\), the sparrows on the periphery of the group are threatened by predators. When \(f_{i}=f_{g}\), the sparrows in the population will move closer to each other.