SAVED: Sensitive Operation-Aware Vulnerability Detection model Enhanced with Distance-Weighted Sparse Attention
Preprint
- 10 July 2025
- preprint
- Published by Springer Nature in Research Square
Abstract
Software security has received increasing attention due to the rapid growth in software vulnerabilities and the significant damage they cause. Although var- ious deep learning-based vulnerability detection models have been developed, these models typically operate at the function or code slice level, introducing numerous irrelevant statements into predictions. Moreover, current techniques lack reliable mechanisms to explain the detected vulnerabilities. To address these limitations, we propose SAVED (Sensitive operation-Aware Vulnerability detec- tion model Enhanced with Distance-weighted sparse attention) inspired by a common cognition: vulnerabilities always arise from insuffcient validation before or after sensitive operations. SAVED is an end-to-end Graph Neural Network (GNN) model that detects vulnerabilities in source code and provides inter- pretable explanations. Specially, SAVED automatically constructs a subgraph for each sensitive operation using our noval Distance-Weighted Sparse Atten- tion (DWSA) mechanism, which mitigates the noise from irrelevant statements. It then computes a vulnerability score for each node by integrating semantic features, operation-specific information, and the generated sensitive subgraphs, thereby providing direct insight into the model’s decision-making process and facilitating the localization of vulnerability-related statements. Extensive exper- iments demonstrate that SAVED outperforms current state-of-the-art methods and provides reliable explanations that enable accurate root-cause localization.Keywords
All Related Versions
This publication has 12 references indexed in Scilit:
- VulTR: Software vulnerability detection model based on multi-layer key feature enhancementComputers & Security, 2024
- Graph Confident Learning for Software Vulnerability DetectionEngineering Applications of Artificial Intelligence, 2024
- Detect software vulnerabilities with weight biases via graph neural networksExpert Systems with Applications, 2023
- mVulPreter: A Multi-Granularity Vulnerability Detection System With InterpretationsIEEE Transactions on Dependable and Secure Computing, 2022
- Deep Learning Based Vulnerability Detection: Are We There Yet?IEEE Transactions on Software Engineering, 2021
- VulDeeLocator: A Deep Learning-Based Fine-Grained Vulnerability DetectorIEEE Transactions on Dependable and Secure Computing, 2021
- SySeVR: A Framework for Using Deep Learning to Detect Software VulnerabilitiesIEEE Transactions on Dependable and Secure Computing, 2021
- CodeBERT: A Pre-Trained Model for Programming and Natural Languages2020
- μVulDeePecker: A Deep Learning-Based System for Multiclass Vulnerability DetectionIEEE Transactions on Dependable and Secure Computing, 2019
- The program dependence graph and its use in optimizationACM Transactions on Programming Languages and Systems, 1987