## 3 Results
### Comparison of the Model with Other Models
#### 3.3.2 Comparison with Other Deep Learning Models  
In this study, we compared SpectraViT with AlexNet, DeepSpectra, and SpectraTr deep learning models. The comparison was based on the number of parameters, FLOPs (floating-point operations per second), and performance metrics on the test set, including accuracy, recall, precision, and F1 score. Table 5 details the performance of each model:  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{4}{c}{**Test Datasets**} \\ \cline{2-5}  & **Acc (\%)** & **Recall (\%)** & **Precision (\%)** & **F1 (\%)** \\ \hline SpectraViT & 99.24 & 99.25 & 99.06 & 99.23 \\ SVM & 98.43 & 98.43 & 98.46 & 98.44 \\ PLS\_DA & 98.36 & 98.36 & 98.48 & 98.39 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Performance comparison of SpectraViT, SVM, and PLS_DA.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multirow{2}{*}{**True Label**} & \multicolumn{4}{c}{**Predicted Label**} \\ \cline{3-5}  & & **D** & **CVD** & **HPHT** & **MS** \\ \hline \multirow{3}{*}{SpectraViT} & D & 838 & 2 & 0 & 0 \\  & CVD & 0 & 361 & 3 & 0 \\ \cline{1-1}  & HPHT & 1 & 5 & 102 & 0 \\ \cline{1-1}  & MS & 0 & 0 & 0 & 154 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Confusion Matrix.  
In terms of the number of parameters, SpectraViT has the fewest, with only 0.852 M, significantly lower than the other models. AlexNet has 8.291 M parameters, DeepSpectra has as many as 207.398 M, and SpectraTr has 16.030 M. Fewer parameters indicate that our model is more efficient in terms of storage and computation, making it suitable for deployment in resource-constrained environments. SpectraViT also has the lowest FLOPs, at just 0.009 G, indicating the lowest computational complexity. In contrast, AlexNet's FLOPs are 0.022 G, DeepSpectra's are 0.213 G, and SpectraTr's are as high as 2.101 G. Lower FLOPs give SpectraViT a significant advantage in inference speed and energy consumption.  
Regarding performance on the validation set, SpectraViT achieved an accuracy of 99.31%, outperforming all other models. AlexNet and DeepSpectra achieved validation accuracies of 98.77% and 98.43%, respectively, while SpectraTr achieved 97.82%. On the test set, SpectraViT also outperformed the other models, with an accuracy of 99.24%, recall of 99.25%, precision of 99.06%, and F1 score of 99.23%. AlexNet's accuracy was 98.02%, recall was 98.02%, precision was 98.09%, and F1 score was 98.05%. DeepSpectra's metrics were slightly lower than AlexNet's but close, around 98.36%. SpectraTr performed relatively worse.  
Overall, SpectraViT excels in all aspects, particularly in terms of parameter count and computational complexity, while also achieving better accuracy, recall, precision, and F1 score on both the validation and test sets compared to other models. This indicates that SpectraViT is not only more efficient in terms of resource consumption but also superior in performance, with better generalization capability. Thus, SpectraViT demonstrates better performance than other deep convolutional neural network models and pure Transformer networks for jade UV spectrum recognition.