Enhancing Source Code Vulnerability Detection Using Flattened Code Graph Structures
Source code vulnerability detection is essential for software security, but identifying subtle vulnerabilities in code is challenging. While Transformer-based pre-trained models have achieved success in this area, they typically treat code as a sequence of text, neglecting its structural characteristics. To address this, we propose a novel approach that uses a flattened code graph structure, which effectively captures both semantic and syntactic relationships in the code. By transforming the code into a structured sequence, this method allows the model to explicitly learn from both semantic and structural information. We combine the flattened code graph structure tokens with pre-trained models and fine-tune them to enhance performance in vulnerability detection. Experimental results demonstrate significant improvements in recall, particularly in detecting vulnerabilities in complex code. This approach provides an efficient and robust solution for source code vulnerability detection, advancing the field of software security.
Authors
- Zhangdong Sun
- Ke Liu (ORCID: https://orcid.org/0000-0002-3614-8133)
- Yang Yu (ORCID: https://orcid.org/0000-0003-1895-9722)
Institutions
- Northeastern University (CN)
Publication Details
- Published
- 2024-12-13
- DOI
- https://doi.org/10.1109/icftic64248.2024.10913325
- Citations
- 1
- Primary Topic
- Software Reliability and Analysis Research
- Type
- article
- Field-Weighted Citation Impact
- 0.49