Advanced Search
    Cao Mingsheng, Ding Qiaolong, Zhang Wenqing, Shang TianMin, Li Yanbin, Lin Di, Xu Hui. Research and Application of Source Code Vulnerability Detection Methods Based on Large Language ModelsJ. Journal of Computer Research and Development. DOI: 10.7544/issn1000-1239.202660229
    Citation: Cao Mingsheng, Ding Qiaolong, Zhang Wenqing, Shang TianMin, Li Yanbin, Lin Di, Xu Hui. Research and Application of Source Code Vulnerability Detection Methods Based on Large Language ModelsJ. Journal of Computer Research and Development. DOI: 10.7544/issn1000-1239.202660229

    Research and Application of Source Code Vulnerability Detection Methods Based on Large Language Models

    • To address the limitations of large language models (LLMs) in source code vulnerability detection—namely insufficient utilization of program structural information, unstable reasoning processes, and high fine-tuning costs—this paper proposes a vulnerability detection framework that integrates graph-based representations with LLM reasoning capabilities. The proposed method constructs data flow graphs (DFGs) from source code to model variable dependencies and semantic propagation paths, and aligns graph features with the semantic embedding space of LLMs through a cross-modal mapping module, enabling effective injection of structural knowledge into the language model. Furthermore, a progressive pretraining strategy based on code reconstruction tasks is designed to enhance the graph encoder’s ability to capture vulnerability-related structural patterns. On this basis, structured reasoning distillation and parameter-efficient fine-tuning via Low-Rank Adaptation (LoRA) are incorporated to transfer vulnerability analysis knowledge from teacher models to student models, improving detection performance while reducing training overhead. In addition, a chain-of-thought reasoning process tailored for vulnerability detection is introduced to improve interpretability and reasoning consistency. Experimental results demonstrate that the proposed method significantly improves both the accuracy and robustness of source code vulnerability detection while maintaining low fine-tuning cost.
    • loading

    Catalog

      Turn off MathJax
      Article Contents

      /

      DownLoad:  Full-Size Img  PowerPoint
      Return
      Return