CoSEFA: An LLM-Based Programming Assistant for Secure Code Generation via Supervised Co-Decoding
Programming assistants based on Large Language Models (LLMs) assist developers in code generation and improve efficiency. These LLM-based programming assistants are prone to generate code with vulnerabilities. To mitigate security risk, existing approaches retrain an LLM with crafted data without vulnerabilities. However, retraining requires enormous computational costs and the accessible LLMs' internal representation, often unavailable for LLMs deployed as distributed online services. Our previous work, CoSec, proposed a supervised co-decoding approach using base LLMs alongside a small-scale security-focused LLM fine-tuned with code changes before and after vulnerability fixing.
Authors
- Meng Ling Yan (ORCID: https://orcid.org/0000-0002-9538-9121)
- Dong Li (ORCID: https://orcid.org/0009-0003-2032-2015)
- Hongyu Zhang (ORCID: https://orcid.org/0000-0002-3063-9425)
- Hao Wen
- Chao Liu (ORCID: https://orcid.org/0000-0002-8283-9146)
- Xuan He (ORCID: https://orcid.org/0000-0003-1318-6441)
- Yueheng Zhu
Institutions
- Chongqing University (CN)
- Cloud Computing Center (CN)
Publication Details
- Published
- 2025-06-23
- DOI
- https://doi.org/10.1145/3696630.3728609
- Citations
- 1
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- article
- Field-Weighted Citation Impact
- 2.31
Funders
- National Natural Science Foundation of China
- Centre Scientifique et Technique du Bâtiment