Abstract:Vulnerability detection is a critical technology in software system security. In recent years, deep learning has achieved remarkable progress in vulnerability detection due to its outstanding ability in code feature extraction. However, the existing deep learning-based methods only concentrate on the independent structural features of code instances, overlooking the structural feature similarities and correlations among different vulnerable codes, which limits the performance of vulnerability detection technology. To address this issue, this study proposes a vulnerability detection method based on correlation of structural features between functions (CSFF-VD). This method first parses functions into code property graphs and the independent structural features within functions are extracted by using gated graph neural networks. On this foundation, an association network among functions is constructed based on feature similarity, and a graph attention network is utilized to further extract the correlation information between functions, thus improving the performance of vulnerability detection. Experimental results show that CSFF-VD surpasses the current deep learning-based vulnerability detection methods on three public vulnerability detection datasets. In addition, based on the extraction of independent features within the function, this study proves the effectiveness of integrating the correlation information between functions by adding experiments on the inter-function correlation feature extraction method in CSFF-VD.