arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.06387cs.SEcs.CR
收藏

R+R:安全漏洞数据集质量至关重要

R+R: Security Vulnerability Dataset Quality Is Critical

Anurag Swarnim Yadav, Joseph N. Wilson

AI总结:

本文揭示了漏洞检测与修复研究中数据集质量问题的严重性,通过去重实验和标签评估证明数据缺陷导致模型性能被高估,并利用大规模高质量预训练数据展示性能仍有提升空间。

摘要:

大语言模型(LLMs)在漏洞检测与修复领域备受关注。这些模型的有效性取决于用于训练和评估的数据集质量。我们的调查揭示,发表在知名软件工程会议上的多项研究使用了存在高重复率、标签准确性存疑以及样本不完整等问题的数据集。使用这些数据集进行实验将产生错误结果,且与实际的预期行为存在显著差异。例如,据报道最先进的 VulRepair 模型准确率为 44%,但当从其训练集中移除测试集重复项后,平均准确率降至 9%;当从其测试集中移除训练集重复项后,平均准确率为 13%。为解决这些数据质量问题,我们对多篇论文中的模型进行了无重复训练,并对前十大最危险的通用弱点枚举(CWEs)进行了标签准确性评估。我们的研究结果表明,56% 的样本标签不正确,44% 的样本不完整——只有 31% 的样本既准确又完整。最后,我们利用大规模去重缺陷修复语料库进行迁移学习,证明如果提供更大量高质量预训练数据,这些模型可以表现出更好的性能。由此我们得出结论:尽管先前研究因数据集质量差而高估了性能,但这并不表明更好的性能无法实现。

英文摘要:

Large Language Models (LLMs) are of great interest in vulnerability detection and repair. The effectiveness of these models hinges on the quality of the datasets used for both training and evaluation. Our investigation reveals that a number of studies featured in prominent software engineering conferences have employed datasets that are plagued by high duplication rates, questionable label accuracy, and incomplete samples. Using these datasets for experimentation will yield incorrect results that are significantly different from actual expected behavior. For example, the state-of-the-art VulRepair Model, which is reported to have 44% accuracy, on average yielded 9% accuracy when test-set duplicates were removed from its training set and 13% accuracy when training-set duplicates were removed from its test set. In an effort to tackle these data quality concerns, we have retrained models from several papers without duplicates and conducted an accuracy assessment of labels for the top ten most hazardous Common Weakness Enumerations (CWEs). Our findings indicate that 56% of the samples had incorrect labels and 44% comprised incomplete samples--only 31% were both accurate and complete. Finally, we employ transfer learning using a large deduplicated bugfix corpus to show that these models can exhibit better performance if given larger amounts of high-quality pre-training data, leading us to conclude that while previous studies have over-estimated performance due to poor dataset quality, this does not demonstrate that better performance is not possible.

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

↑