Fine-Tuning Pre-trained Model with Optimizable Prompt Learning for Code Vulnerability Detection
The increasing software vulnerabilities underscore the urgency of effective vulnerability detection for safeguarding security and socio-economic stability. Existing pre-trained model-based methods for vulnerability detection often suffer from limitations such as the compression of high-dimensional features and the omission of valuable semantic label information, which collectively compromise performance metrics and fine-tuning efficacy. To address these issues, we propose a novel methodology for fine-tuning pre-trained models using prompt learning. By projecting classification labels as prompts into a high-dimensional feature space, our model preserves essential spatial structures and optimizes the fine-tuning process more effectively. To further enhance classification performance, we design a specialized prompt network for learning adaptable prompts, along with a code encoder network that synergistically captures the semantic and structural nuances of code. Extensive empirical evaluation on two publicly available datasets, SARD and CodeXGLUE demonstrates significant improvements in classification performance and prompt optimization compared to existing state-of-the-art models. Specifically, our method achieves an accuracy of 87.98% on the SARD dataset and 70.97% on the CodeXGLUE dataset, marking a remarkable improvement over state-of-the-art solutions.
Authors
- Chunyang Ye (ORCID: https://orcid.org/0000-0002-2177-8255)
- Hui Zhou (ORCID: https://orcid.org/0000-0001-6702-2384)
- Wei Chang (ORCID: https://orcid.org/0000-0001-6286-5462)
Institutions
- Hainan University (CN)
Publication Details
- Published
- 2024-10-28
- DOI
- https://doi.org/10.1109/issre62328.2024.00021
- Citations
- 1
- Primary Topic
- Software Reliability and Analysis Research
- Type
- article
- Field-Weighted Citation Impact
- 0.49