2024/12/13 by Xin Peng, Peng, Xin, Shangwen Wang +9
Computer Science · #Software Reliability and Analysis Research #Software Testing and Debugging Techniques #Software Engineering Research
paper · pdf · doi:10.48550/arxiv.2412.10164
Software vulnerability detection is crucial for high-quality software\ndevelopment. Recently, some studies utilizing Graph Neural Networks (GNNs) to\nlearn the graph representation of code in vulnerability detection tasks have\nachieved remarkable success. However, existing graph-based approaches mainly\nface two limitations that prevent them from generalizing well to large code\ngraphs: (1) the interference of noise information in the code graph; (2) the\ndifficulty in capturing long-distance dependencies within the graph. To\nmitigate these problems, we propose a novel vulnerability detection method,\nANGLE, whose novelty mainly embodies the hierarchical graph refinement and\ncontext-aware graph representation learning. The former hierarchically filters\nredundant information in the code graph, thereby reducing the size of the\ngraph, while the latter collaboratively employs the Graph Transformer and GNN\nto learn code graph representations from both the global and local\nperspectives, thus capturing long-distance dependencies. Extensive experiments\ndemonstrate promising results on three widely used benchmark datasets: our\nmethod significantly outperforms several other baselines in terms of the\naccuracy and F1 score. Particularly, in large code graphs, ANGLE achieves an\nimprovement in accuracy of 34.27%-161.93% compared to the state-of-the-art\nmethod, AMPLE. Such results demonstrate the effectiveness of ANGLE in\nvulnerability detection tasks.\n