## 5 Simulation Results and Analysis
### Comparison of the DRFTM Performance in Different Attack Modes
#### 5.3.1 Detection Accuracy under Hybrid Attack  
This paper evaluates the detection accuracy of four models with respect to time, different percentages of malicious nodes, and different numbers of nodes and calculates the detection accuracy of several models over a period of 20 cycles. Among them, the DRFTM model proposed in this paper fuses deep reinforcement learning with a random forest algorithm and is compared with the weighted fusion computation method of the ARTMM, the SVM classification algorithm of the STMS model, and the reinforcement learning method of the TUMRL model.  
First, the detection accuracy of different models is tested with time variation. The malicious nodes initiate hybrid attacks right from the start of network operation, with the malicious node percentage set at 30%. As illustrated in Figure 6(a), the detection accuracy of the DRFTM exhibits a swift initial increase, eventually stabilizing at a level exceeding 98% after several iteration cycles. At the beginning of the simulation, the detection accuracies of the ARTMM, STMS, and TUMRL are relatively low, and as more and more trust evidence is obtained from the neighboring nodes, the detection accuracies are continuously improved. The STMS requires the training of a trust evidence set for predicting sensor node trust. Initially, during the simulation's outset, there is a shortage of trust evidence, resulting in low detection accuracies. However, by the 10 th training cycle, the STMS achieves higher detection accuracies compared to the ARTMM. The detection accuracy of the TUMRL is better than the ARTMM and STMS but always lower than the detection accuracy of the DRFTM. The DRFTM relies on the random forest algorithm to assess the trust status of nodes. It employs a voting mechanism based on decision tree classifications to derive optimal classification results. Additionally, it integrates deep reinforcement learning for adaptive strategy selection during updates. This synergy results in an accelerated increase in the accuracy of the DRFTM. It can be seen that the DRFTM model outperforms the ARTMM, STMS, and TUMRL in terms of detection accuracy.  
At a fixed network size, the fluctuation in node count indicates the level of node deployment sparsity (the communication range is appropriately adjusted with the sparsity). As shown in Figure 6(b), the impact of node count variation on detection accuracy is observed at the 10 th cycle of simulation, with a 30% proportion of malicious nodes. The  
Figure 7: Detection accuracy: (**a**) detection accuracy over time; (**b**) number of nodes vs. detection accuracy; (**c**) the ratio of malicious nodes vs. accuracy.  
experiments demonstrate that the DRFTM exhibits strong performance even in underwater environments characterized by sparse sensor node deployment.  
As depicted in Figure 7c, it illustrates the detection accuracy of malicious nodes at the 10 th simulation cycle for various proportions of malicious nodes. With an increase in the proportion of malicious nodes, all four models experience a decline in detection accuracy. The ARTMM exhibits the most rapid decrease, followed by the STMS. In contrast, the DRFTM demonstrates the smallest decrease and maintains a robust detection accuracy of 90% even when the proportion of malicious nodes reaches 30%. This resilience can be credited to the robustness of the random forest algorithm, which adeptly manages noise while integrating environmental trust factors to ensure steady detection of normal nodes. In contrast, other algorithms overlook the dynamics of the underwater environment. The DRFTM, through learning from historical interactions and trust evidence, discerns the characteristics of malicious nodes, thus sustaining high detection accuracy even in scenarios with limited trust evidence.