# Integrating Merkle Trees with Transformer Networks for Secure Financial Computation
## 4 Results and Discussion
### Security and Performance Verification  
In this section, the security features of the Merkle-Transformer model and its performance across various hardware platforms are extensively evaluated. Additionally, in combination with the Merkle-Transformer verification method, the impact of various run  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Model** & **Precision** & **Recall** & **Accuracy** & **F1 Score** \\ \hline Merkle-Transformer & 0.95 & 0.97 & 0.96 & 0.96 \\ RoBERTa & 0.90 & 0.92 & 0.91 & 0.91 \\ BERT & 0.87 & 0.89 & 0.88 & 0.88 \\ Transformer & 0.85 & 0.87 & 0.86 & 0.86 \\ BERT-wwm & 0.83 & 0.85 & 0.84 & 0.84 \\ SpanBERT & 0.81 & 0.84 & 0.83 & 0.82 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Financial computation performance.  
time configurations on the model's performance is further explored. These experiments are designed to not only validate the efficiency and accuracy of the model in performing tasks such as financial behavior detection and stock price prediction but also to ensure the verifiability and security of the model's operations.  
As illustrated in Table 2, tests across multiple hardware platforms reveal that even on lower-end devices like Raspberry Pi and NVIDIA Jetson Nano, the Merkle-Transformer model maintains stable performance while ensuring integrity verification throughout the computation process. Its performance on the GPU and Apple M1 is particularly noteworthy, indicating the model's effective utilization of the high-performance computational resources of modern hardware platforms. The data also show that multi-threading execution significantly improves inference throughput while keeping the CPU load at a lower level, crucial for applications requiring deployment in resource-constrained environments.  
In Table 3 and Figure 5, the Merkle-Transformer shows significant advantages over other verification methods like Salom [38] in terms of communication and computation overhead, storage requirements, and potential error detection. This result confirms the efficiency of our verification method in ensuring the integrity of machine learning inferences.  
Furthermore, the impact of different runtime configurations of MatrixSplit on performance is explored. As indicated in Table 4, by optimizing communication and computation,  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Hardware** & **Concurrency** & **CPU Load** & **Latency** & **Throughput** \\ \hline RPi & Baseline & Mid & 8.3 s & 157 \\ RPi & 2\(\times\) Concurrency & High & 3.1 s & 618 \\ RTX 3070 & Baseline & Low & 3.0 s & 482 \\ RTX 3070 & 2\(\times\) Concurrency & Mid & 4.1 s & 1107 \\ Apple M1 & Baseline & Low & 3.9 s & 531 \\ Apple M1 & 2\(\times\) Concurrency & Mid & 6.2 s & 1209 \\ Jetson Nano & Baseline & Low & 21.4 s & 125 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Performance comparison between local inferences and Merkle-Transformer running hardware platforms.  
Figure 5: Latency detail of Merkle-Transformer on different hardware platforms.  
latency can be significantly reduced without sacrificing verification stringency. For example, when low partition of the network instead of the entire work, only a slight performance decrease is observed. This flexibility suggests that our model and verification method can be adjusted according to specific application needs to achieve the best balance between security and performance.