Abstract:Vulnerability detection is a critical technology in software system security. In recent years, deep learning has made significant advances in vulnerability detection due to its exceptionals capability in code feature extraction. However, current deep learning-based approaches focus solely on the independent structural features of code instances, neglecting the structural feature similarities and associations among different vulnerable codes, which limits the performance of vulnerability detection technology. To address this issue, this paper proposes a vulnerability detection method based on the correlation of structural features between functions (CSFF-VD). This method first parses functions into code property graphs and extracts independent structural features within functions using gated graph neural networks. On this basis, it constructs an association network among functions using feature similarity and employs a graph attention network to further extract structural similarity information between functions, thereby enhancing vulnerability detection performance. Experimental results show that CSFF-VD outperforms 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 paper proves the effectiveness of integrating the correlation information between functions by adding experiments on the inter-function correlation feature extraction method in CSFF-VD.