ActiveClean:通过主动学习生成行级漏洞数据
ActiveClean: Generating Line-Level Vulnerability Data via Active Learning
AI总结:
本文提出 ActiveClean,利用主动学习从代码提交中自动生成大规模行级漏洞数据,并在 Java 和 C 数据集上验证其有效性,清洗后的数据显著提升了 LineVul 的漏洞检测性能。
摘要:
深度学习漏洞检测工具日益流行,并已被证明是有效的。这些工具依赖大量高质量的训练数据,而这些数据极难获取。目前大多数可用数据集只提供函数级标签,报告一个函数是否存在漏洞。然而,要使漏洞检测真正有用,我们还需要知道与漏洞相关的代码行。本文致力于开发系统化工具,并提出 ActiveClean,从提交(commits)中生成大规模行级漏洞数据。也就是说,除了函数级标签之外,它还报告函数中哪些行可能对漏洞检测负责。过去,静态分析已被应用于清洗提交以生成行级数据。我们基于主动学习的方法易于使用且可扩展,为静态分析提供了一种互补方法。我们从提交行中设计了语义和语法属性,并用它们来训练模型。我们在 Java 和 C 数据集上评估了我们的方法,处理了超过 4.3K 个提交和 119K 行提交行。ActiveClean 取得了 70-74 之间的 F1 分数。此外,我们还表明主动学习是有效的,仅使用 400 条训练数据就达到了 70.23 的 F1 分数。利用 ActiveClean,我们为 Devign 数据集中的整个 FFMpeg 项目生成了行级标签,涵盖 5K 个函数,并且还检测到了错误的函数级标签。我们证明,使用我们清洗后的数据,SOTA 行级漏洞检测工具 LineVul 多检测出 70 行漏洞代码和 18 个漏洞函数,并将 Top 10 准确率从 66% 提高到 73%。
英文摘要:
Deep learning vulnerability detection tools are increasing in popularity and have been shown to be effective. These tools rely on large volume of high quality training data, which are very hard to get. Most of the currently available datasets provide function-level labels, reporting whether a function is vulnerable or not vulnerable. However, for a vulnerability detection to be useful, we need to also know the lines that are relevant to the vulnerability. This paper makes efforts towards developing systematic tools and proposes. ActiveClean to generate the large volume of line-level vulnerability data from commits. That is, in addition to function-level labels, it also reports which lines in the function are likely responsible for vulnerability detection. In the past, static analysis has been applied to clean commits to generate line-level data. Our approach based on active learning, which is easy to use and scalable, provide a complementary approach to static analysis. We designed semantic and syntactic properties from commit lines and use them to train the model. We evaluated our approach on both Java and C datasets processing more than 4.3K commits and 119K commit lines. AcitveClean achieved an F1 score between 70-74. Further, we also show that active learning is effective by using just 400 training data to reach F1 score of 70.23. Using ActiveClean, we generate the line-level labels for the entire FFMpeg project in the Devign dataset, including 5K functions, and also detected incorrect function-level labels. We demonstrated that using our cleaned data, LineVul, a SOTA line-level vulnerability detection tool, detected 70 more vulnerable lines and 18 more vulnerable functions, and improved Top 10 accuracy from 66% to 73%.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。