# A Deep-Learning-Based Secure Routing Protocol to Avoid Blackhole Attacks in VANETs +
## 5 Performance Evaluation
### Numerical Results
In the routing scheme, the conventional method requires 11 s to find the optimal solution dealing with 50 data, while the DL method accomplishes the same task in just one second. The reason is that DNNs are designed to efficiently handle large amounts of data. The use of multiple layers with neurons allows for complex modeling and efficient computation. Furthermore, once the DNN model is trained, the prediction phase is very fast, which reduces execution time. Figure 10: Convergence using the conventional algorithm for (**a**) clustering fitness value maximization and (**b**) routing fitness value minimization. Figure 13 shows the comparison of the average number of cluster head changes per session as a function of node speed, serving as an evaluation of cluster stability. From Figure 13, it is evident that as the node speed increases, the average number of cluster head changes also increases. This can be attributed to the frequent changes in node location due to the higher speeds, resulting in disruptions to the clustering process. Furthermore, as the number of nodes in the network increases, the average number of cluster head changes also increases. This can be attributed to the higher network density, which leads to more frequent changes in cluster heads. In addition, we are evaluating the effect of the mobility model (RPGM and RWP) on the average number of cluster head changes within the network. As we can see in Figure 13, the RPGM model exhibits a lower average number of cluster head changes compared to the RWP model. The reason is that in the RPGM model, vehicles move cohesively in groups, which means they tend to follow similar trajectories and move together as a unit. On the other hand, in the RWP model, vehicles move randomly and independently, each following its own trajectory without any coordination with other vehicles. Thus, the RPGM model performs more stable and  
Figure 11: RMSE of the DL framework with different numbers of hidden layers and hidden neurons. cohesive clusters, resulting in a lower average number of cluster head changes compared to the RWP model, where vehicle movement is independent. However, it is important to note that the average number of cluster head changes remains less than one. This indicates that, on average, there is less than one cluster head change in each session. Hence, the proposed clustering algorithm demonstrates a high level of stability as the number of cluster head changes is kept minimal. The comparison of the PDR as a function of node speed is shown in Figure 14. The PDR decreases as the node speed increases. The possible reason is that the network becomes more unstable since the node is more dynamically moved when the node speed increases, leading to the occurrence of packet loss. However, we can see that the DLSR with DLC (DLSR+DLC) protocol has a markedly higher level of PDR than other protocols. As a result, the DLSR with DLC protocol turned out to be the most reliable in terms of PDR. In addition, the DLSR+DLC protocol with the RPGM model shows a high PDR compared to the RWP model. The reason is that RPGM provides a more controlled and structured mobility pattern, leading to better communication and more stable network connectivity compared to RWP. Figure 15 compares the routing delay, which includes the consumed time for cluster construction per session as a function of node speed. As we can see in Figure 15, when node  
Figure 12: Execution time vs. variations in number of data for the clustering and routing scheme. Figure 13: Average number of the cluster head changes as a function of node speed. speed increases, the delay increases as well. The reason is that when the speed increases, frequent network topology changes lead to frequent interruptions in data transmission. Again, the protocol functioning under the RPGM model proves to be more stable than that under the RWP model. The reason is that the coordinated group movement in RPGM minimizes abrupt shifts in the network topology, consequently reducing the delay in establishing routes.