arrow
Return

Finetuning Large Language Models for Vulnerability Detection

delete2025-01-01
delete0
delete
OA
AI
A
Aleksei Shestov
R
Rodion Levichev
R
Ravil Mussabayev *
E
Evgeny Maslov
P
P. Zadorozhny
A
Anton Cheshkov
R
Rustam Mussabayev *
A
Alymzhan Toleu
G
Gulmira Tolegen
A
Alexander Krassovitskiy
DOI:10.1109/ACCESS.2025.3546700delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
This paper presents the results of finetuning large language models (LLMs) for the task of detecting vulnerabilities in Java source code. We leverage WizardCoder, a recent improvement of the state-of-the-art LLM StarCoder, and adapt it for vulnerability detection through further finetuning. To accelerate training, we modify WizardCoder's training procedure, also we investigate optimal training regimes. For the imbalanced dataset with many more negative examples than positive, we also explore different techniques to improve classification performance. The finetuned WizardCoder model achieves improvement in ROC AUC and F1 measures on balanced and imbalanced vulnerability datasets over CodeBERT-like model, demonstrating the effectiveness of adapting pretrained LLMs for vulnerability detection in source code. The key contributions are finetuning the state-of-the-art code LLM, WizardCoder, increasing its training speed without the performance harm, optimizing the training procedure and regimes, handling class imbalance, and improving performance on difficult vulnerability detection datasets. This demonstrates the potential for transfer learning by finetuning large pretrained language models for specialized source code analysis tasks.
Keywords:
Training
Codes
Standards
Large language models
Predictive models
Limiting
Java
Entropy
Adaptation models
Reviews
vulnerability detection
cybersecurity
finetuning
StarCoder
WizardCoder
PEFT
LoRA

Journal

IEEE Access cover
IEEE Access
IF:
3.6
Papers:
9.8W
Citations:
29.4W

Organization

Satbayev University cover
Satbayev University
Scholars:
1.5K
Papers: 669
Citations: 399