Answers are grounded in this paper and cite their sources.
With the rapid advancement of deep learning, numerous large language models (LLMs) have been developed, achieving remarkable performance across a wide range of code generation tasks. However, in the domain of vulnerability patch generation, existing approaches suffer from two critical limitations: (1) limited reasoning capability, which hampers the modeling of fine-grained fix logic; and (2) insufficient utilization of fix knowledge, with minimal consideration of vulnerability intent. To address these challenges, we propose FraMe, a novel automated approach that integrates F ine-g r ained re a soning paths with M ulti-vi e w fix knowledge to enhance LLM-based vulnerability patch generation. FraMe consists of two modules: stepwise fix-reasoning path collection and multi-view knowledge augmented patch generation. The first module extracts detailed vulnerability–fix context and constructs augmented prompt templates to generate stepwise fix-reasoning paths, enabling the model to capture fine-grained fix logic. The second module leverages multi-view fix knowledge from a vulnerability knowledge graph to model vulnerability intent and supplement code semantics, thereby facilitating the selection of effective few-shot examples and enabling the LLM to generate more accurate patches. We evaluated FraMe on a widely used real-world C/C++ vulnerability dataset. Experimental results demonstrate that FraMe consistently outperforms both existing prompting methods and non-LLM-based techniques, achieving an improvement of 9.4% in the Correct metric at a beam size of 10 compared with the best baseline. The source code and datasets are available at https://github.com/VulDet/FraMe .
No takes yet. Share an insight, caveat, or question.
Shao et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: