# Improving Deep Learning-Based Recommendation Attack Detection Using Harris Hawks Optimization
## 2 Related Work and Background
### Background
#### 2.2.3 Exploitation Phase  
In the phase of exploitation, the [PERSON] hawks attack the prey found in the phase of exploration. However, the prey often attempts to escape from danger. Therefore, the hawks will perform different attack strategies according to the escaping behaviors of the prey for each attack.  
Let \(r\) denote the probability of successful escape (\(r<0.5\)) or not successful escape (\(r\geq 0.5\)) before the prey is attacked. According to the value of \(E\), the hawks execute different attack strategies. When \(E\geq 0.5\), the hawks perform soft besiege. When \(E<0.5\), the hawks perform hard besiege. Four different attack strategies proposed in HHO algorithm are shown as follows.  
1. Soft besiege When \(E\geq 0.5\) and \(r\geq 0.5\), although the prey has enough energy to escape, it fails to escape. As the prey attempts to escape, the hawks slowly surround the prey to make the prey exhausted. Then, the hawks launch an attack. The following rules are used to model the above behaviors [34]: \[X(t+1)=\Delta X(t)-E|JX_{rabbit}(t)-X(t)|,\] (4) \[\Delta X(t)=X_{rabbit}(t)-X(t),\] (5) where, \(\Delta X(t)\) denotes the difference between the position vector of the prey and the current location in the \(t\)th iteration, \(J=2(1-r_{5})\) denotes the random jump strength of the prey when the prey escapes, and \(r_{5}\) denotes a random number in the open interval from 0 to 1. The value of \(J\) changes randomly at each iteration to simulate the randomness of the prey motion.
2. Hard besiege When \(E<0.5\) and \(r\geq 0.5\), the prey is exhausted and lack of escaping energy. The hawks perform the surprise bounce. In this situation, the positions are updated using the following equation [34]: \[X(t+1)=X_{rabbit}(t)-E|\Delta X(t)|\] (6)
3. Soft besiege with progressive rapid dives When \(E\geq 0.5\) and \(r<0.5\), the prey has enough energy to escape successfully. The [PERSON] hawks will construct a soft besiege before the surprise bounce. In this process, the hawks have two methods to update the positions as shown in Equations (7) and (8) [34], respectively: \[Y=X_{rabbit}(t)-E|JX_{rabbit}(t)-X(t)|,\] (7) \[Z=Y+S\times LF(D),\] (8) where, \(D\) denotes the dimension of problem, \(S\) denotes a random vector of \(1\times D\) size, and \(LF\) denotes the Levy flight function which is used to simulate the irregular movement of the hawks. In the process of chasing, this movement can deceive the prey. The \(LF\) function can be calculated as follows [34]: \[LF(x)=0.01\times\frac{\mu\times\sigma}{|\vartheta|^{\frac{1}{\beta}}},\;\sigma= \left(\frac{\Gamma(1+\beta)\times sin\big{(}\frac{\pi\beta}{2}\big{)}}{\Gamma \big{(}\frac{1+\beta}{2}\big{)}\times\beta\times 2^{(\frac{\beta-1}{2})}} \right)^{\frac{1}{\beta}},\] (9) where, \(\mu\) and \(\vartheta\) denote random numbers in the open interval from 0 to 1, and \(\beta\) is a constant which default value is 1.5.  
Based on above discussions, the positions of hawks are updated as follows [34]:  
\[X(t+1)=\begin{cases}Y,&if\quad F(Y)<F(X(t))\\ Z,&if\quad F(Z)<F(X(t)),\end{cases} \tag{10}\]  
where, \(F\) denotes the fitness function.  
(4) Hard besiege with progressive rapid dives  
When \(E<0.5\) and \(r<0.5\), the prey has insufficient energy, but still successfully escapes through random movement. In this situation, the [PERSON] hawks will construct a hard besiege before the surprise bounce to reduce the average distance between them and their prey. The following rules are used to update the positions [34] :  
\[X(t+1)=\begin{cases}W,&if\quad F(W)<F(X(t))\\ V,&if\quad F(V)<F(X(t)),\end{cases} \tag{11}\]  
\[W=X_{rabbit}(t)-E|X_{rabbit}(t)-X_{m}(t)|, \tag{12}\]  
\[V=W+S\times LF(D). \tag{13}\]