Snopy: Bridging Sample Denoising with Causal Graph Learning for Effective Vulnerability Detection
Deep Learning (DL) has emerged as a promising means for vulnerability detection due to its ability to automatically derive features from vulnerable code. Unfortunately, current solutions struggle to focus on vulnerability-related parts of vulnerable functions, and tend to exploit spurious correlations for prediction, thus undermining their effectiveness in practice. In this paper, we propose Snopy, a novel DL-based approach, which bridges sample denoising with causal graph learning to capture real vulnerability patterns from vulnerable samples with numerous noise for effective detection. Specifically, Snopy adopts a change-based sample denoising approach to automatically weed out vulnerability-irrelevant code elements in the vulnerable functions without sacrificing the label accuracy. Then, Snopy constructs a novel Causality-Aware Graph Attention Network (CA-GAT) with Feature Caching Scheme (FCS) to learn causal vulnerability features while maintaining efficiency. Experiments on the three public benchmark datasets show that Snopy outperforms the state-of-the-art baselines by an average of 27.22%, 85.89%, and 75.50% in terms of F1-score, respectively.
Authors
- Xingwei Lin (ORCID: https://orcid.org/0009-0005-5048-2516)
- Xiaobing Sun (ORCID: https://orcid.org/0000-0001-5165-5080)
- Sicong Cao (ORCID: https://orcid.org/0000-0003-3688-4437)
- Lili Bo (ORCID: https://orcid.org/0000-0002-7267-4923)
- David Lo (ORCID: https://orcid.org/0000-0002-4367-7201)
- Wei Liu (ORCID: https://orcid.org/0000-0001-8503-4063)
- Bin Li (ORCID: https://orcid.org/0000-0001-8500-9917)
- Xiaolei Liu (ORCID: https://orcid.org/0000-0001-8510-4025)
- Xiaoxue Wu (ORCID: https://orcid.org/0009-0009-5432-651X)
Institutions
- China Academy of Engineering Physics (CN)
- Zhejiang University (CN)
- Yangzhou University (CN)
- Singapore Management University (SG)
Publication Details
- Published
- 2024-10-18
- DOI
- https://doi.org/10.1145/3691620.3695057
- Citations
- 1
- Primary Topic
- Adversarial Robustness in Machine Learning
- Type
- article
- Field-Weighted Citation Impact
- 0.35
Funders
- National Natural Science Foundation of China