arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.07770cs.LGcs.AIcs.CRcs.SE
收藏

评估 LLaMA 3.2 在软件漏洞检测中的表现

Evaluating LLaMA 3.2 for Software Vulnerability Detection

Research Group on Intelligent Engineering and Computing for Advanced Innovation and Development (GECAD), School of Engineering of the Polytechnic of Porto(波尔图理工学院工程学院);INESC TEC/Polytechnic of Porto - School of Engineering(INESC TEC/波尔图理工学院工程学院)

José Gonçalves, Miguel Silva, Bernardo Cabral, Tiago Dias, Eva Maia, Isabel Praça, Ricardo Severino, Luís Lino Ferreira

AI总结:

本文针对 DiverseVul 数据集中的不一致问题提出精炼版本,并用其微调 LLaMA 3.2 进行漏洞检测,使 F1-Score 从基线 47% 提升至 66%。

摘要:

深度学习(DL)已成为漏洞检测的强大工具,其表现往往优于传统解决方案。然而,开发有效的深度学习模型需要大量真实世界数据,而获取足够数量的此类数据可能十分困难。为应对这一挑战,DiverseVul 数据集被整理为规模最大的漏洞与非漏洞 C/C++ 函数数据集,且完全提取自真实世界项目。其目标是为训练深度学习模型提供高质量、大规模样本。然而,在我们的研究过程中,应用预处理技术时发现原始数据集中存在若干不一致之处,这凸显了需要一个精炼版本的必要性。在本工作中,我们提出了 DiverseVul 数据集的精炼版本,并用其微调大型语言模型 LLaMA 3.2 以进行漏洞检测。实验结果表明,预处理技术的使用带来了性能提升,模型取得了 66% 的 F1-Score,与我们的基线相比具有竞争力,基线在软件漏洞检测中取得了 47% 的 F1-Score。

英文摘要:

Deep Learning (DL) has emerged as a powerful tool for vulnerability detection, often outperforming traditional solutions. However, developing effective DL models requires large amounts of real-world data, which can be difficult to obtain in sufficient quantities. To address this challenge, DiverseVul dataset has been curated as the largest dataset of vulnerable and non-vulnerable C/C++ functions extracted exclusively from real-world projects. Its goal is to provide high-quality, large-scale samples for training DL models. However, during our study several inconsistencies were identified in the raw dataset while applying pre-processing techniques, highlighting the need for a refined version. In this work, we present a refined version of DiverseVul dataset, which is used to fine-tune a large language model, LLaMA 3.2, for vulnerability detection. Experimental results show that the use of pre-processing techniques led to an improvement in performance, with the model achieving an F1-Score of 66%, a competitive result when compared to our baseline, which achieved a 47% F1-Score in software vulnerability detection.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑