# Detecting Phishing URLs Based on a Deep Learning Approach to Prevent Cyber-Attacks
## 5 Performance Evaluation and Comparison with Existing Approaches  
To measure the accuracy of the results of the proposed model, we used four types of evaluation measures: true positive, true negative, false positive, and false negative values. We used the accuracy, recall, precision, and F1-score as evaluation measures to obtain the results, which we compared with those of traditional models. The reason for using these traditional evaluation measures is defined briefly below, where TP indicates a true positive, TN is a true negative, FP is a false positive, and FN is a false negative:  
* _Accuracy:_ This represents the number of correctly classified data instances over the total number of data instances and is defined as follows: \[Accuracy=\frac{TP+TN}{FP+FN+TP+TN}\] (1)
* _Recall:_ This helped us identify true positive values by giving true positives divided by actual positives:  
Figure 6: Workflow of 1D CNN model. \[Recall=\frac{TP}{TP+FN} \tag{2}\]
* _Precision_: It gives you the proportion of true positives to the number of total positives that the model predicts and is defined as follows: \[Precision=\frac{TP}{TP+FP}\] (3)
* _F1 Score_: It takes into account both precision and recall and is defined as follows: \[F1 Score=\frac{2\left(Recall\times Precision\right)}{Recall+Precision}\] (4)  
All the generated results for the testing and the training of the models are given in Table 1, below, which presents the Accuracy, Recall, Precision, and F1 score values. Figures 7 and 8 illustrate the proposed model's accuracy and loss during the validation and the training, achieved using epochs of up to 100. In this section, we discuss the experimental work involving our proposed architecture. Due to the widespread use of the internet and social media, there is a great risk of cyber-attacks, and the proposed model is intended to detect one of the most common cyber-attacks, phishing, which can cause massive losses to clients in many ways when criminals steal sensitive information such as credentials and bank details. In this study, we mainly focused on the URL-based detection of phishing attacks via the 1D CNN approach, one of the popular deep learning algorithms. In the proposed model, URLs were taken as inputs and preprocessed using the embedding layer. In the next step, seven convolutional blocks were used to detect the features of the URLs. Max pooling was performed in the next \begin{table}
\begin{tabular}{l l l} \hline \hline
**Metrics** & **Training** & **Testing** \\ \hline Accuracy & 99.7\% & 99.3\% \\ Recall & 99.8\% & 99.5\% \\ Precision & 99.6\% & 99.2\% \\ F1 score & 99.76\% & 99.34\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Training and testing. Figure 7: Training and validation accuracy. layer to fetch the matching height and reduce the size and dimensions of the URL, and the dropout and the sigmoid functions were then used to prevent the model from overfitting and to evaluate the results, determining whether the URL was phishing or legitimate. The proposed deep learning-based system was trained on various numbers of hyperparameters and under different settings. The optimal parameters after fine-tuning are listed in Table 2.  
As shown in Figure 6, the training and the validation accuracies of the model were relatively close to each other, meaning that the model's training did not result in overfitting. The general loss was noted during the experimental work, where the validation and the training loss were relatively close. Some studies on phishing URL detection that we have mentioned are listed in Table 3. In [45] proposed a hybrid deep learning technique that detects public image frames and uses textual information for URL detection via both the CNN and LSTM methods; however, the proposed technique focused more on URL image detection, and the model attained an accuracy of only 93.28% [43].