# Go Source Code Vulnerability Detection Method Based on Graph Neural Network
## 5 Experiments and Results
### Results and Analysis
This is because RATS relies solely on expert-defined vulnerability patterns, which leads to high false negatives due to the lack of adaptability to novel vulnerabilities. **(2) CSGVD**, a code semantic graph-based vulnerability detection model, outperforms RATS, but its performance remains the lowest among the four learning-based models. This is because CSGVD primarily captures shallow sequential local semantic features, limiting its effectiveness. **(3) VDoTR** introduces circular gated graph neural networks (CircleGGNNs) to embed node feature vectors and \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model/Tool** & **Architecture** & **Target Language** &
\begin{tabular}{c} **Supported** \\ **Vulnerabilities** \\ \end{tabular} \\ \hline \multirow{2}{*}{RATS} & Rule-based static & C, C++, Perl, PHP, & Buffer overflow, \\  & analysis & Python & TOCTOU, etc. \\ \hline \multirow{2}{*}{CSGVD} & PE-BL + Residual & \multirow{2}{*}{C/C++} & / \\  & GCN + M-BFA + MLP & & \\ \hline \multirow{3}{*}{VDoTR} & Third-order tensor & \multirow{3}{*}{C/C++} & CWE-120, CWE-119, \\  & representation + & & CWE-469, CWE-476 \\ \cline{1-1}  & CircleGGNN + 1-D & & \\ \cline{1-1}  & convolution & & \\ \hline \multirow{3}{*}{AMPLE} & Graph simplification + & \multirow{3}{*}{C/C++} & \multirow{3}{*}{/} \\  & Edge-aware GCN + & & \\ \cline{1-1}  & Kernel-scaled & & \\ \cline{1-1}  & representation & & \\ \hline \multirow{3}{*}{GoVulDect} & SpanBERT + & \multirow{3}{*}{Go} & Concurrency \\ \cline{1-1}  & GraphSAGE + & & vulnerabilities, SQL \\ \cline{1-1}  & Transformer + & & injection, XSS, etc. \\ \cline{1-1}  & XGBost & & \\ \hline \hline \end{tabular} \({}^{\pi}\)/\({}^{\pi}\) indicates that the original paper did not provide detailed information.  
\end{table} 
Table 7: Comparison of existing methods and tools. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model/Tool** & **Dataset Size** & **Precision \({}^{*}\)** & **Recall \({}^{*}\)** & **F1-Score \({}^{*}\)** \\ \hline RATS & — & 0.5291 & 0.5400 & 0.5288 \\ CSGVD & 27,318 & 0.7205 & 0.7442 & 0.6733 \\ VDoTR & 93,539 & 0.7947 & 0.7800 & 0.7762 \\ AMPLE & 219,829 & 0.8872 & 0.8860 & 0.8859 \\
**GoVulDect** & 129,978 & **0.9164** & **0.9137** & **0.9135** \\ \hline \hline \end{tabular} \({}^{*}\) indicates that Precision, Recall, and F1-Score are evaluated on the dataset used in this study.  
\end{table} 
Table 8: Comparison of existing methods and tools. employs 1D convolutional layers for vulnerability classification. By capturing richer structural information, VDoTR outperforms CSGVD across all evaluation metrics. **(4) AMPLE** incorporates edge-aware graph convolutional networks to aggregate heterogeneous edge information into node representations. To handle long-range dependencies among distant nodes, AMPLE employs kernel-scaled representation techniques, significantly enhancing its ability to analyze complex code structures. As a result, AMPLE outperforms VDoTR in all aspects. **(5) GoVulDect** achieves over 91% in all detection metrics, surpassing all existing methods and tools. This demonstrates the effectiveness of our model in Go vulnerability detection and highlights the significance of our contributions. To provide a more comprehensive evaluation, we also compare the training and detection time of GoVulDect with the models listed above. The results are summarized in Table 9.  
The key observations are as follows : **(1) GoVulDect** achieves the shortest training and detection times among all learning-based models. This performance gain is mainly attributed to three key aspects. First, during preprocessing, we effectively eliminate redundant and non-essential code. Second, we apply program slicing techniques to accurately extract code segments that are highly relevant to vulnerability detection. Together, these two steps significantly reduce the volume of code that needs to be processed, thereby lowering computational overhead.