*3.9. Attaining GS and LS*

In the process of attaining GS and LS at the initial stage, two values are determined, which are *ω<sup>x</sup>* (*X*) and *ω<sup>y</sup>* (*Y*), and the expression for this is given below:

$$\omega\_{\mathbf{x}}\left(\mathbf{X}\right) = \left\{f\_{\mathbf{x}}(\mathbf{x}\_{1}), f\_{\mathbf{x}}(\mathbf{x}\_{2})\dots f\_{\mathbf{x}}(\mathbf{x}\_{n})\right\} \tag{16}$$

$$\omega\_{\underline{y}}\left(\boldsymbol{Y}\right) = \left\{f\_{\underline{y}}(y\_1), f\_{\underline{y}}(y\_2), \dots, f\_{\underline{y}}(y\_n)\right\} \tag{17}$$

The expressions *ω<sup>x</sup>* (*X*) = { *fx*(*x*1), *fx*(*x*2)... *fx*(*xn*)} and *ω<sup>y</sup>* (*Y*) = *fy*(*y*1), *fy*(*y*2)... *fy*(*yn*) indicate the GMC accordingly; ∝*<sup>x</sup>* and ∝*<sup>y</sup>* portray the GMC's time constants, and their values remain as 0.14; *fx* and *fy* simulate the cell output actions for the GMCs. Thus, we can obtain:

$$f\_{\mathbf{x}}(X) = \begin{cases} \infty\_{\mathbf{x}} + \infty\_{\mathbf{x}} \tanh\left(\frac{x - q}{\alpha\_{\mathbf{x}}}\right) \\ \infty\_{\mathbf{x}} + \infty\_{\mathbf{x}} \tanh\left(\frac{x - q}{\alpha\_{\mathbf{x}}}\right) \end{cases} \tag{18}$$

$$f\_{\mathcal{Y}}(Y) = \begin{cases} \infty\_{\mathcal{Y}} + \infty\_{\mathcal{Y}} \tanh\left(\frac{x - \rho}{\alpha\_{\mathcal{Y}}}\right) \\ \infty\_{\mathcal{Y}} + \infty\_{\mathcal{Y}} \tanh\left(\frac{x - \rho}{\alpha\_{\mathcal{Y}}}\right) \end{cases} \tag{19}$$

In both Equations (18) and (19), the term *ϕ* represents the threshold value, and the values of ∝*<sup>x</sup>* and ∝*<sup>y</sup>* are 0.14 and 0.29, respectively. Here, the synaptic-strength connection matrices are calculated, which are represented as *H*0, *W*0, and *L*0, which indicate the association between the GMCs and the mitral cells. This is computed as:

$$H\_{0\_i^j} = \frac{\text{rand}()}{T\_{\text{h}}}, \; \mathcal{W}\_{0\_i^j} = \frac{\text{rand}()}{T\_w}, \; L\_{0\_i^j} = \frac{\text{rand}()}{T\_l} \tag{20}$$

*Th*, *Tw*, and *Tl* indicate the connection constants, rand() indicates a haphazard value, *d j <sup>i</sup>* indicates the space between the *i*th and *g*th odors based on their data, and the *g*th odor indicates the desirable odor for the bear; that is to say, this distance can be described between every odor (LS) and the intended odor (GS). This exhibits that the supervised operation centered upon the GS will be utilized while performing the optimization procedure to enhance the exploitation. As per the above-mentioned explanations, if the brain acquires all data from the neural action, the disjoining procedure is centered upon the discrepancy analysis. This procedure will be simulated while centered upon the Pearson correlation. Hence, this point assists the bear in choosing the finest manner for the subsequent location. The probability odor components (*POC*), probability odor fitness (*POF*), and odor fitness (*OF*) are described by:

$$POC\_i = \frac{F}{\max(F\_i)} \ast mid\_{scale} \tag{21}$$

$$POF\_i = \frac{OF\_i}{\max(OF)} \ast mid\_{scale} \tag{22}$$

where *midscale* denotes the lower and upper limits of the odor components. The mathematical expression for the calculation of *midscale* is described as:

$$mid\_{scale} = \frac{\left(^{OC\_{sl}}/^{OC\_{il}}\right) \* OC\_{il}}{2} \tag{23}$$

where *OCul* and *OCil* are the lower and upper limits of the odor components, respectively. The discrepancy between 2 odors can be computed using the expected odor fitness (*EOF*) and distance odor component (*DOC*) formulas as:

$$DOC\_i = 1 - \frac{\sum\_{i=1}^{k} \left(POC\_j^1 - POC\_j^2\right)}{\sqrt{\sum\_{i=1}^{k} \left(POC\_j^1 - POC\_j^2\right)^2}} \* d(POC\_i) \tag{24}$$

$$EOF\_{\bar{i}} = \left(POF\_{\bar{i}} - POF^{\mathbb{X}}\right) \* d\left(POF\_{\bar{i}}\right) \tag{25}$$

where *g* denotes the GS. The values of the odor fitness (*EOF*) and distance odor components (DOCs) are measured according to Equations (19) and (20), where the distances of the probability odor components (*POC*) and probability odor fitness (*POF*) are considered. The mathematical expressions for the calculation of *d*(*POCi*) and *d*(*POFi*) are given below:

$$d(\text{POC}\_i) = \sqrt{\sum\_{k=1}^{N} (x\_i - y\_i)} \tag{26}$$

$$d(POF\_i) = \sqrt{\sum\_{k=1}^{M} (x\_j - y\_j)}\tag{27}$$

where the distances between the source and destination coordinates are used for the calculation of the distances of *POC* and *POF*; *xi*, *xj* denotes the source coordinates and *yi*, *yj* denotes the destination coordinates.

These expressions denote the feasible manner shift. Indeed, these indices describe the association between the odors that have been reached at the desirable location. It is legibly exhibited that the brain's output determines an appropriate manner for the subsequent location. In the mesh grid region, the distance between entire odors can be centered upon 2 THs.

In this phase, the HSBSOA can be employed to extract the finest features. Initially, the shark and bear's beginning locations will be located to be in the middle of the data. Next, the fitness or finesse is noted for every position surrounding the shark and bear by employing the fitness function. Then, the HSBSOA will be implemented to extract the finest features. In this study we extracted twenty-one features via the HSOSOA out of every datapoint by implementing twenty-one repetitions. Every repetition possesses just

one feature extracted with the greatest FtV. While performing each repetition, the shark and bear's positions will be updated to be frontward or rotatory-centered upon the FtV. When the position's FtV in the shark position's FM remains above the shark RM's FtV, the shark's location will be updated. The shark's trajectory will move frontward or rotatory depending upon the position's FtV; additionally, the positions that will be viewed using the HSBSOA can be reviewed.

Pseudocode: HSBSOA Algorithm

Begin: Initialize search space

Indicate the total number of populations

Compute the optimization issue

*x*1 *<sup>i</sup>* = *x*1 *<sup>i</sup>*,1, *<sup>x</sup>*<sup>1</sup> *<sup>i</sup>*,2,... *<sup>x</sup>*<sup>1</sup> *i*,*NP*

Compute decision variables numeral Compute local solution (LS) from decision variable

Update the inhale and exhale parameter Update exhalation time (ET), inhalation time (IT)

Initiate Odor absorption

*MG* = {*MG*1, *MG*2,... *MGi*,... *MGn*}

Compute non-negative array *MGi*(*Oi*) Compute granular and mitral (G-M) layers Initiate Frontward motionCompute velocity V for each shark

Update *kmax* for all location

Find shark's acceleration Initiate Rotatory motion Compute local search (LcS)

Updating the particle location

Compute probability odor components Compute probability odor fitness (*POF*) Find the fitness parameter

End

#### *3.10. Classification Employing DCAE*

Before introducing DCAE, for detailed comprehension, it remains notable that the notation 'dilated convolution' (DC) portrays a convolution procedure with a dilated filter (DlF). Generally, the DC is implemented in the wavelet decomposition discipline. As the DC operant solely employs a similar filter at disparate scales having disparate dilation factors (DtF), its application in no way encompasses the DlF's formation. In addition, the dilated convolutional network can extend the receptive field (RF) dimension, which depends upon enhancing the DtF instead of expanding the network's field map (FMp) dimensions.

The layers involved in the process of the ACAE framework are the input layer, convolutional layer, DC layer, flatten and reshape layer, recurrent layer, and then finally the output layer as shown in Figure 2. The dilated convolutional layer is incorporated with a filter size of (3, 3) and with a dilation size of (1, 2, 4). In order to process the dilation in the mathematical order, the discrete function is given as *Dc* = ◦F → *S*, while the size of the discrete filter is mentioned as (2*r*+1)×(2*r*+1) (2*r*−1) . The math expression for the calculation of the DC operator © is given below:

$$(F \circledast k)\_{(x,y)} = \sum\_{\mathcal{g}=1}^{r} \sum\_{h=1}^{r} F(X,Y) \ast (v\_{ci}^{i}(X,Y)) \ast (L\_{cc}(X,Y)) \ast (k(\mathcal{g}-h)) \tag{28}$$

**Figure 2.** ACAE framework.

In Equation (28), the term *X* represents (*x* − *g*), *Y* represents (*y* − *h*), and *k* : *ρ<sup>r</sup>* → *R*, which is the discrete filter with a size of (2*r*+1)×(2*r*+1) (2*r*−1) . Here, *<sup>v</sup><sup>i</sup> ci*(*X*,*Y*) denotes the corresponding integer index value, which lies between (0 to 5) and *Lce*(*X*,*Y*), denoted as the entropy loss calculation, which lies between 0 and 10.

Secondly, an improved dilation convolution is developed with the variants *XI* and *YI*. The math expression for the calculation of the improved DC operator ©*<sup>I</sup>* is given below.

$$(F \oplus\_I k)\_{(\mathbf{x}, \mathbf{y})} = \sum\_{\mathbf{g} = 1}^r \sum\_{h=1}^r F(X\_I, Y\_I) \ast (v\_{c\bar{\mathbf{z}}}^i (X\_I, Y\_I)) \ast (L\_{c\bar{\mathbf{z}}} (X\_I, Y\_I)) \ast (k(\mathbf{g} - h)) \tag{29}$$

Thus, the convolutions © and ©*<sup>I</sup>* are called one-DC. Here, we presume that *<sup>F</sup>*0, *<sup>F</sup>*1,... *Fn*−<sup>1</sup> : ◦F<sup>2</sup> <sup>→</sup> *<sup>S</sup>* for the remaining DFs and *<sup>k</sup>*0, *<sup>k</sup>*1,... *kn*−<sup>2</sup> : *<sup>ρ</sup>*<sup>1</sup> <sup>→</sup> *<sup>R</sup>* for the remaining 3 × 3 DsFs. Furthermore, the filters are implemented by aggressively enhancing DtFs such as 20, 21,...2*<sup>n</sup>*−2. Next, the DF ◦F*i*+<sup>1</sup> could be conveyed as:

$$\mathbf{^\circ F}\_{i+1} = \mathbf{a^\circ F}\_i \times \mathbf{j} k\_i \text{ for } i = 0, 1, 2, \dots, \mathbf{g} - 2 \tag{30}$$

Similarly:

$$\rm{^\circ F}\_{j+1} = \rm{a^\circ F}\_{j} \times \beta k\_j \text{ for } j = 0, 1, 2, \dots \\ h - 2 \tag{31}$$

As per the RF description, two sections are present for every component, which are ◦F*i*+<sup>1</sup> and ◦F*j*<sup>+</sup>1. The terms *α* and *β* are the constant values that are used for experimental purposes and which satisfy the condition (*α* + *β* = 1). The math expression for the combined detection methodology is given below:

$$\mathbf{M}^{\diamond}\mathbf{F} = \left(^{\diamond}\mathbf{F}\_{i+1}\right) \times \left(^{\diamond}\mathbf{F}\_{j+1}\right) = \left(\left(2^{i+2} - 1\right) \ast \left(2^{i+2} - 1\right)\right) \times \left(\left(2^{j+2} - 1\right) \ast \left(2^{j+2} - 1\right)\right) \tag{32}$$

Thus, RF remains a square of aggressively enhanced dimensions. In the convolutional layers (CvLs), the former layer's FMs will be convolved with multiple convolutional kernels (CKs), especially FMp. Next, the independent layer's outcomes added with a bias will be supplied to an activation function (AF) to create an FM. Presuming that *vx*,*<sup>d</sup> <sup>i</sup>*,*<sup>j</sup>* remains a value at the *x*th row for channel *d* within the *j*th FM of the *i*th layer, the value of *vx*,*<sup>d</sup> <sup>i</sup>*,*<sup>j</sup>* could be acquired as:

$$\boldsymbol{\upsilon}\_{i}^{\boldsymbol{x},d} = \tan^{\circ} \mathbf{B}\_{1} (b\_{i} + \sum\_{\mathcal{R}} \sum\_{p=1}^{p\_{i-1}} \omega\_{ig}^{p} \* (\boldsymbol{\upsilon}\_{(i-1)g}^{\boldsymbol{x}+p,d}) \* (\boldsymbol{\upsilon}\_{(i-1)g}^{\boldsymbol{x}+p,d})) \; d = 1,2,3 \dots D \tag{33}$$

$$\boldsymbol{w}\_{j}^{\boldsymbol{x},\boldsymbol{d}} = \tan^{\circ}\mathrm{B}\_{2}(\boldsymbol{b}\_{j} + \sum\_{p=1}^{p\_{\parallel}} \omega\_{jh}^{p} \* (\boldsymbol{v}\_{(j-1)h}^{\boldsymbol{x}+p,\boldsymbol{d}}) \* (\boldsymbol{of}\_{(j-1)h}^{\boldsymbol{x}+p,\boldsymbol{d}})) \; \; \; \; \; \mathcal{D} = 1,2,3\dots D \tag{34}$$

where tanh(·) refers to a hyperbolic tangent function for *<sup>v</sup>x*,*<sup>d</sup> <sup>i</sup>* and *<sup>v</sup>x*,*<sup>d</sup> <sup>j</sup>* ; specifically, *bi* and *bj* are the biases for the FM (*i*, *<sup>j</sup>*), *<sup>g</sup>* refers to the present FM linked to the (*<sup>i</sup>* <sup>−</sup> <sup>1</sup>)th layer, and *<sup>ω</sup><sup>p</sup> ig* and *<sup>ω</sup><sup>p</sup> jh* refer to a value at location *<sup>p</sup>* within CK to which the dimensions are *pi* and *pj*, while the terms *o f <sup>x</sup>*,*<sup>d</sup> <sup>i</sup>* and *o f <sup>x</sup>*,*<sup>d</sup> j* are the objective functions.

For the initial block, every CvL layer will be incorporated by (1) a CL that convolves its inputs with an array of kernels to be learnt in the training stage, (2) a rectified linear unit (ReLU) layer that maps convolved outcomes by the function *relu*(*v*) = *max*(*v*, 0);, and (3) a normalization layer that normalizes values of disparate FMs in the former layer. The math expression for *vi* and *vj* is given below.

$$\upsilon\_{i} = \upsilon\_{(i-1)}(k+a) \sum\_{t \in G(i)} \upsilon^{2}(i-1)t \tag{35}$$

$$
\upsilon\_{j} = \upsilon\_{(j-1)}(k+\beta) \sum\_{t \in G(j)} \upsilon^2(j-1)t \tag{36}
$$

In Equations (35) and (36), the terms *k*, *α*, and *β* remain the hyper-criteria, and G(*i*) and G(*j*) remain the FMs' array-incorporated terms during normalization. The ensuing 3 layers remain DC layers, having disparate dilated factors. For example, in this study we consecutively selected one, two, and four.

For the next block, centered upon the former exposure, the depth of a minimum of 2 recurrent layers remains advantageous for processing the concatenative data. This study utilizes a 2-layer stacked LSTM. Moreover, a ReLU will be used as the AF. The dropout layer is implemented in the LSTM layer's input for regularization. Furthermore, recurrent batch normalization is employed to lessen the internal covariance shift amidst the time phases.

The next block remains a completely linked network layer. This remains akin to a conventional multilayer perceptron neural network (NN), which maps the latent features into the output classes (*OC*). In this layer, the softmax function is described below:

$$w\_{i,j} = \frac{\exp(v\_{(i-1)j})}{\sum\_{j=1}^{\overline{c}} \exp(v\_{(i-1)j})} \tag{37}$$

Next, an entropy cost function will be incorporated, centered upon the probabilistic outcomes and the training instances' actual labels. In the course of the training stage, all the criteria will be modified to search for the minimal cost. Additionally, a sliding window (SW) scheme will be utilized to segment the time sequence signal into signals' small pieces. In particular, an instance employed by the CNN remains a 2D matrix comprising r unprocessed samples (with every sample having D features). In this way, r will be selected to remain as the sampling rate or the finite duration, and the SW's phase dimension will be selected to retain a fifty percent overlap between the nearby windows. Hence, the shorter phase dimension remains the instances' bigger quantity that experiences greater calculative workloads. Furthermore, the signals' small portion will be generally very frequently labelled.

Pseudocode: Proposed Approach Begin

five classes = CC categorical feature (CF) = Rm, e *e*(*xi*) = (0, . . . 1, . . . , 0) *if xi* = *j* Compute average *π*

```
Compute standard deviation β
```

$$\text{Find } n(\text{x}i) = \frac{\text{x}1 - \text{x}i}{\text{B}}$$

Check the shark's capability

Capture the prey

EmploySoS Initiate the smelling process Achieve global solution Find the fitness value

Indicate the total number of population Compute the optimization issue

$$\mathbf{x}^1\_i = \left[ \mathbf{x}^1\_{i,1'} \mathbf{x}^1\_{i,2'} \dots \mathbf{x}^1\_{i,NP} \right],$$

Compute decision variable numeral Compute local solution (LS) from decision variable

Update the inhale and exhale parameter Update exhalation time (ET), inhalation time (IT) Initiate Odor absorption

$$MG = \{MG\_1, MG\_{2'} \dots MG\_{l'} \dots MG\_{n'}\}$$

Compute Compute non-negative array *MGi*(*Oi*) Compute granular and mitral (G-M) layers

Calculate velocity V

Update the position of target prey

Velocity of each shark (*v<sup>k</sup> i*,1)

$$v\_{l\_r1}^k = \mu k.R1. \frac{\delta(OF)}{\delta x/}$$

Find maximal quantity for forwarding motion Release the odor and find its intensity Update the shark's novel location

Initiate Frontward motion

Compute velocity V for each shark Update *kmax* for all locations Find shark's acceleration

Initiate Rotatory motion Compute local search (LcS)

Update the particle location

Compute probability odor components Compute probability odor fitness (*POF*) Find the fitness parameter

Stop

#### **4. Performance Analysis**

The dilated convolutional classifier-based botnet detection method (HSBSOpt\_DCA) is implemented in Python 3.7 using the Ubuntu 16.04 operating system with 8 GB of RAM. The database chosen for the feature selection is the N-BaIoT database, which includes the traffic data for nine industrial IoTD. Seven databases are the gadgets' gathered instances for eleven classes, and two are the gadgets' gathered data for six classes (Ennio\_doorbell and Samsung\_SNH\_1011\_N\_Webcam). The experimental outcome will be assessed by measuring the performance matrices, such as the accuracy, precision, recall, and F1-score. Such criteria will be correlated with four advanced methodologies: CNN-related SS for DD and its identification (CNN-SSDI), the bidirectional LSTM model (BI\_LSTM), ODNN, and RPCO\_BCNN with the proffered HSBSOpt\_DCA.

#### *4.1. Performance Matrices*

• Accuracy: This provides the capability for comprehensive anticipation generated by the paradigm. The true positive (*TP*) and true negative (*TN*) give the ability to anticipate the intrusion's existence or non-existence. The false positive (*FP*) and false negative (FN) provide the false anticipation given by the employed paradigm. The mathematical expression for the calculation of the accuracy is described as [15]:

$$\text{Accuracy} = \frac{TP + TN}{TP + TN + FP + FN} \tag{38}$$

• Precision: Precision is defined as the positive output achieved by the algorithm used in the proposed model, which lies in the range of (0 to 1). It computes the intrusion classification paradigm's victory. It defines the classifier's probability for anticipating the outcome as positive if the intrusion exists. It is as called the *TP* rate. It can be measured as:

$$\text{Precision}(P) = \frac{TP}{TP + FP} \tag{39}$$

• Recall: This is the classifier's probability of anticipating the outcome as negative if the intrusion does not exist. It is also known as the *TN* rate, as mentioned below:

$$\text{Recall}(R) = \frac{TP}{TP + FN} \tag{40}$$

• F1-Score: This is used to measure the anticipation execution. It is defined as the weighted mean calculation of the precision and recall. The F1-score lies between 0 and 1. If the score is 1, it is considered the most acceptable value; if it is 0, it is regarded as weak. The mathematical expression for the calculation of the F1-score [15] is given below:

$$F1\text{-Score} = \frac{2 \ast P \ast R}{P+R} \tag{41}$$

#### *4.2. Results and Discussion*

In this section, the metrics such as the accuracy, precision, recall, and F1-score are measured with respect to 50 and 100 epochs. Each metric calculation on the various epochs is evaluated. The accuracy calculations with variable epochs numbering 50 and 100 are demonstrated in Figures 3 and 4.

**Figure 3.** Accuracy calculation with 50 epochs.

**Figure 4.** Accuracy calculation with 100 epochs.

Figure 3 shows the accuracy calculation for methods such as the CNN-SSDI, BI\_LSTM, ODNN, RPCO\_BCNN, and HSBSOpt\_DCA. It can be understood from Figure 3 that the proposed HS-BSOpt\_DCA produces better accuracy when compared with other methods with respect to the 50 epochs. Various levels of accuracy are achieved by the CNN-SSDI (73%), BI\_LSTM (75%), ODNN (81%), RPCO\_BCNN (90%), and HSBSOpt\_DCA (98%) methods. The accuracy achieved by the proffered HSBSOpt\_DCA method is high and is achieved by using the hybrid optimization and dilated convolution process.

Figure 4 shows the accuracy calculation for methods such as CNN-SSDI, BI\_LSTM, ODNN, RPCO\_BCNN, and HSBSOpt\_DCA. The figure proves that the proffered HSBSOpt\_DCA method produces better accuracy than the other methods for 100 epochs. The accuracy scores achieved by the methods vary for CNN-SSDI (78%), BI\_LSTM (82%), ODNN (89%), RPCO\_BCNN (95%), and HSBSOpt\_DCA (99%). The accuracy achieved by the proffered HSBSOpt\_DCA method is high using the hybrid shark and bear smell optimization algorithm.

The precision calculations with 50 and 100 epochs are demonstrated in Figures 5 and 6. Figure 5 shows the precision calculation for methods such as CNN-SSDI, BI\_LSTM, ODNN, RPCO\_BCNN, and HSBSOpt\_DCA. The figure proves that the proffered HSBSOpt\_DCA method produces better precision when compared with the other methods for 50 epochs. The precision scores achieved by the methods vary for CNN-SSDI (58%), BI\_LSTM (69%), ODNN (75%), RPCO\_BCNN (93%), and HSBSOpt\_DCA (99%). The precision achieved by the proffered HSBSOpt\_DCA method is high using the hybrid shark and bear smell optimization algorithm.

**Figure 5.** Precision calculation with 50 epochs.

**Figure 6.** Precision calculation with 100 epochs.

Figure 6 shows the precision calculation for methods such as CNN-SSDI, BI\_LSTM, ODNN, RPCO\_BCNN, and HSBSOpt\_DCA. The figure proves that the proffered HSBSOpt\_DCA method produces better precision when compared with the other methods for 100 epochs. The precision scores achieved by the methods vary for CNN-SSDI (68%), BI\_LSTM (75%), ODNN (81%), RPCO\_BCNN (95%), and HSBSOpt\_DCA (99.9%). The precision achieved by the proffered HSBSOpt\_DCA method is high using the hybrid shark and bear smell optimization algorithm.

The recall calculations with 50 and 100 epochs are demonstrated in Figures 7 and 8. Figure 7 shows the recall calculation for methods such as CNN-SSDI, BI\_LSTM, ODNN, RPCO\_BCNN, and HSBSOpt\_DCA. The figure proves that the proffered HSBSOpt\_DCA method produces better recall than the other methods for 50 epochs. The recall scores achieved by the methods vary for CNN-SSDI (85%), BI\_LSTM (81%), ODNN (85%), RPCO\_BCNN (85%), and HSBSOpt\_DCA (91%). The recall achieved by the proffered HSBSOpt\_DCA method is high and is achieved by using the hybrid optimization and dilated convolution process.

**Figure 7.** Recall calculation with 50 epochs.

**Figure 8.** Recall calculation with 100 epochs.

Figure 8 shows the recall calculation for methods such as CNN-SSDI, BI\_LSTM, ODNN, RPCO\_BCNN, and HSBSOpt\_DCA. The figure proves that the proffered HSBSOpt\_DCA method produces better recall than the other methods for 100 epochs. The recall scores achieved by the methods vary for CNN-SSDI (75%), BI\_LSTM (78%), ODNN (81%), RPCO\_BCNN (85%), and HSBSOpt\_DCA (88%). The recall achieved by the proffered HSBSOpt\_DCA method is high and is achieved by using the improved dilated convolution process.

The F1-score evaluations for 50 and 100 epochs are demonstrated in Figures 9 and 10. Figure 9 shows the calculation of the F1-scores for the proposed and existing methods. The figure proves that the proffered HSBSOpt\_DCA method produces a better F1-score than the other methods for 50 epochs. The F1-scores achieved by the methods vary for CNN-SSDI (73%), BI\_LSTM (75%), ODNN (81%), RPCO\_BCNN (94%), and HSBSOpt\_DCA (98%). The F1-score achieved by the proffered HSBSOpt\_DCA method is high and is achieved by using the improved dilated convolution process.

**Figure 9.** F1-score calculation with 50 epochs.

**Figure 10.** F1-score calculation with 100 epochs.

Figure 10 shows the calculation of the F1-scores for the proposed and existing methods. The figure proves that the proffered HSBSOpt\_DCA method produces a better F1-score compared with other methods for 100 epochs. The F1-scores achieved by the methods vary for CNN-SSDI (79%), BI\_LSTM (82%), ODNN (85%), RPCO\_BCNN (95%), and HSBSOpt\_DCA (99%). The F1-score achieved by the proffered HSBSOpt\_DCA method is high and is achieved by using the improved dilated convolution process. Therefore, it is evident from the experiments that the proposed approach outperforms other existing methods, and it can be concluded that the feature extraction using the optimization algorithms definitely increases the performance of the classification model; therefore, the model can be used to detect and classify security threats in FANET.

#### **5. Conclusions**

In this study, we proposed an effective model combining hybrid shark and bear smell optimization (HSBSOA) to secure the FANET from security threats. It provides a solution to investigate the FANET botnet detection threat and to solve the combinational optimization problem. Then, a dilated convolution autoencoder classifier is employed to detect and classify the security threats in the network. The parameters considered for the performance analysis of the proffered HSBOpt\_DCA are the accuracy, precision, recall, and F1-score. Moreover, the performance of the proposed approach was compared with CNN-SSDI, bi\_LSTM, ODNN, and RPCO-BCNN. The performance of the proposed HSBOpt\_DCA network was evaluated with different epochs. The proposed model with 50 epochs

achieved 98% accuracy, 99% precision, 91% recall, and a 98% F1-score. For 100 epochs, it achieved 99% accuracy, 99.9% precision, 88% recall, and a 99% F1-score. The comparison showed that the proposed HSBOpt\_DCA achieved 33% better accuracy, 30% better precision, 13% better recall, and a 20% better F1-score than the existing methods. The proposed method provides a global security solution to the security issues in the UAV-FANET framework. The proposed hybrid-optimization-based feature selection process reduced the computational time. It achieved higher accuracy, precision, recall, and F1-scores than the existing approaches. However, the classification tasks still require improvement, which can be considered in the future.

**Author Contributions:** Conceptualization, N.F.A., F.A., H.M.A.G., S.K. and A.A.; methodology, N.F.A. and A.A.; software, N.F.A. and A.H.A.; validation, A.H.A., A.S.A. and A.A.; formal analysis, N.F.A.; investigation, A.S.A.; resources, A.H.A.; data curation, M.H.H. and F.H.A.; writing—original draft preparation, A.A. and A.H.A.; writing—review and editing, S.K.; supervision, A.H.A. and S.K. All authors have read and agreed to the published version of the manuscript.

**Funding:** The research received no external funding.

**Data Availability Statement:** Not Applicable.

**Acknowledgments:** This work was supported by the Ministry of Science and Higher Education of the Russian Federation (Government Order FENU-2020-0022).

**Conflicts of Interest:** The authors declare no conflict of interest.
