Finetuning Large Language Models for Vulnerability Detection

要約

本稿では、ソースコード中の脆弱性を検出するタスクのために大規模言語モデル(LLM)を微調整した結果を示す。我々は、最先端のLLMであるStarCoderを最近改良したWizardCoderを活用し、さらなるファインチューニングによって脆弱性検出に適応させる。学習を高速化するために、WizardCoderの学習手順を変更し、最適な学習レジームを調査する。肯定的な例よりも否定的な例の方が多い不均衡なデータセットについては、分類性能を向上させるための様々な手法も検討する。微調整されたWizardCoderモデルは、CodeBERTのようなモデルよりも、バランスの取れた脆弱性データセットおよび不均衡な脆弱性データセットにおいて、ROC AUCおよびF1指標の改善を達成し、ソースコードにおける脆弱性検出のために事前に訓練されたLLMを適合させることの有効性を実証した。主な貢献は、最先端のコードLLMであるWizardCoderを微調整し、性能を損なうことなく学習速度を向上させ、学習手順とレジームを最適化し、クラスの不均衡を処理し、困難な脆弱性検出データセットでの性能を向上させたことである。これは、特化されたソースコード解析タスクのために、事前に訓練された大規模な言語モデルを微調整することによる転移学習の可能性を示している。

要約(オリジナル)

This paper presents the results of finetuning large language models (LLMs) for the task of detecting vulnerabilities in 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.

arxiv情報

著者 Alexey Shestov,Rodion Levichev,Ravil Mussabayev,Evgeny Maslov,Anton Cheshkov,Pavel Zadorozhny
発行日 2024-03-01 09:53:48+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.AI, cs.CR, cs.LG パーマリンク