# Structure-Enhanced Prompt Learning for Graph-Based Code Vulnerability Detection
## 4 Experiments
### Result Analysis
#### 4.3.4 RQ4: Comparison with State of the Art  
To evaluate the effectiveness of our proposed method, we conducted a series of comparative experiments using state-of-the-art (SOTA) techniques on the FFmpeg\(+\)Qemu, SVuID and Reveal datasets. First, we compared our method with two vulnerability detection approaches that do not utilize pretrained models [12; 14], while the remaining methods were based on pretrained models [23; 26; 51; 52; 53; 54]. The detailed results of these comparisons are presented in Table 5.  
This table shows the performance of several vulnerability detection models on three datasets. The models are evaluated using four metrics: accuracy (Acc), precision (Pre), recall (Rec) and F1 score (F1). Our method achieves the best or near-best results in most cases, showing a clear advantage overall. \begin{table}
\begin{tabular}{l l l l l l} \hline \hline
**Model** & **Dataset** & **Accuracy (p/e)** & **Precision (p/e)** & **Recall (p/e)** & **F1 Score (p/e)** \\ \hline \multirow{3}{*}{GCN} & FFmpeg\(+\)Qemu & 5.79 \(\times\)\(10^{-8}/1.00\) & 6.75 \(\times\)\(10^{-8}/1.00\) & 6.75 \(\times\)\(10^{-8}/1.00\) & 6.57 \(\times\)\(10^{-8}/1.00\) \\  & SVuID & 1.37 \(\times\)\(10^{-7}/1.00\) & 6.78 \(\times\)\(10^{-8}/1.00\) & 6.78 \(\times\)\(10^{-8}/1.00\) & 6.73 \(\times\)\(10^{-8}/1.00\) \\  & Reveal & 5.60 \(\times\)\(10^{-8}/1.00\) & 5.65 \(\times\)\(10^{-8}/1.00\) & 3.42 \(\times\)\(10^{-1}/1.00\) & 5.65 \(\times\)\(10^{-8}/1.00\) \\ \hline \multirow{3}{*}{CNN-GCN} & FFmpeg\(+\)Qemu & 6.27 \(\times\)\(10^{-8}/1.00\) & 6.78 \(\times\)\(10^{-8}/1.00\) & 6.66 \(\times\)\(10^{-8}/1.00\) & 6.75 \(\times\)\(10^{-8}/1.00\) \\  & SVuID & 1.16 \(\times\)\(10^{-7}/1.00\) & 1.60 \(\times\)\(10^{-5}/1.00\) & 6.77 \(\times\)\(10^{-8}/1.00\) & 6.72 \(\times\)\(10^{-8}/1.00\) \\  & Reveal & 5.42 \(\times\)\(10^{-5}/1.00\) & 7.72 \(\times\)\(10^{-5}/1.00\) & 3.42 \(\times\)\(10^{-5}/1.00\) & 7.72 \(\times\)\(10^{-5}/1.00\) \\ \hline \multirow{3}{*}{Text Prompt} & FFmpeg\(+\)Qemu & 6.32 \(\times\)\(10^{-8}/1.00\) & 6.79 \(\times\)\(10^{-8}/1.00\) & 6.79 \(\times\)\(10^{-8}/1.00\) & 6.76 \(\times\)\(10^{-8}/1.00\) \\  & SVuID & 6.96 \(\times\)\(10^{-8}/1.00\) & 2.21 \(\times\)\(10^{-7}/1.00\) & 6.79 \(\times\)\(10^{-8}/1.00\) & 6.79 \(\times\)\(10^{-8}/1.00\) \\ \cline{1-1}  & Reveal & 4.32 \(\times\)\(10^{-5}/1.00\) & 6.20 \(\times\)\(10^{-5}/1.00\) & 3.42 \(\times\)\(10^{-5}/1.00\) & 6.20 \(\times\)\(10^{-5}/1.00\) \\ \hline \end{tabular}
\end{table} 
Table 4: Statistical analysis: \(p\)-value and effect size (SE Prompt vs. baselines). Figure 11: Comparison of ROC curves across datasets (SE Prompt vs. baselines). On the FFmpeg+Qemu dataset, our method achieved an accuracy of 64.40%, slightly lower than UnixCoder's 65.19%. However, it recorded the highest precision (63.59%) and F1 score (63.41%) among all models. These results reflect a well-balanced trade-off between precision and recall, enhancing detection accuracy without compromising coverage. The improvement on the SVuID dataset is particularly notable. While maintaining a high accuracy of 83.44%, our method achieved a breakthrough in precision with 75.89%, nearly four times higher than the second-best model LineVul (15.95%). This demonstrates stronger discriminative capability in handling complex vulnerability patterns. Furthermore, on the Reveal dataset, our method retained a competitive advantage, achieving an F1 score of 56.11% and an accuracy of 90.69%, thereby surpassing previous benchmarks. Although its recall (55.14%) was slightly lower than that of UnixCoder, the overall performance was strengthened by a more effective balance between precision and recall. Our method achieves the highest F1 scores across all three cross-domain datasets, demonstrating strong generalization and robustness. This stability largely stems from its deep understanding of code semantics, which enables the model to effectively capture vulnerability patterns across different contexts.