Detecting Source Code Vulnerabilities Using Fine-Tuned Pre-Trained LLMs

Pre-trained large language models (LLMs) have advanced capabilities in feature extraction and pattern discovery. Utilizing fine-tuning techniques effectively adapts LLMs to specific scenarios. Detecting vulnerabilities during the coding phase is crucial. In this paper, we collected the Java CWE vulnerability from the SARD dataset and then supervised fine-tuned the open-source Qwen2-7B model using the LoRA technique. We compared the results with vulnerability detection models based on Graph Neural Networks (GNN) and Long Short-Term Memory (LSTM). It is demonstrated that the approach of fine-tuning for LLMs can effectively detect source code vulnerabilities.

Authors

Publication Details

Published
2024-10-28
DOI
https://doi.org/10.1109/icsp62129.2024.10846595
Citations
1
Primary Topic
Web Application Security Vulnerabilities
Type
article
Field-Weighted Citation Impact
0.78
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Detecting Source Code Vulnerabilities Using Fine-Tuned Pre-Trained LLMs

Jin Zhu, Yunlai Zhou, Jinsheng Xiao, Rui Luo et al.
1 citations
Web Application Security Vulnerabilities
0.78
article

Detecting Source Code Vulnerabilities Using Fine-Tuned Pre-Trained LLMs

Jin Zhu, Yunlai Zhou, Jinsheng Xiao, Rui Luo, Hui Ge, Yun-Ming Sun
article en
1 citations

Abstract

Pre-trained large language models (LLMs) have advanced capabilities in feature extraction and pattern discovery. Utilizing fine-tuning techniques effectively adapts LLMs to specific scenarios. Detecting vulnerabilities during the coding phase is crucial. In this paper, we collected the Java CWE vulnerability from the SARD dataset and then supervised fine-tuned the open-source Qwen2-7B model using the LoRA technique. We compared the results with vulnerability detection models based on Graph Neural Networks (GNN) and Long Short-Term Memory (LSTM). It is demonstrated that the approach of fine-tuning for LLMs can effectively detect source code vulnerabilities.

Openalex Percentile: Top 17%
Web Application Security Vulnerabilities
0.78
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.