arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.09212cs.SE
收藏

利用自步学习进行软件漏洞检测

Leveraging Self-Paced Learning for Software Vulnerability Detection

Nanjing University(南京大学);Southern Cross University(南十字星大学)

Zeru Cheng, Yanjing Yang, He Zhang, Lanxin Yang, Jinghao Hu, Jinwei Xu, Bohan Liu, Haifeng Shen

AI总结:

针对深度学习检测软件漏洞因训练数据质量低导致准确率有限的问题,提出SPLVD方法,通过动态选择从易到难的源代码训练,在三个基准数据集F1值优于最优方法,在OpenHarmony项目精确率达90.9%。

摘要:

软件漏洞是软件系统的主要风险。近年来,研究人员提出了许多深度学习方法来检测软件漏洞,但它们的实际准确率有限。主要原因之一是训练数据(即源代码)质量低。为此,我们提出一种新方法:SPLVD(自步学习软件漏洞检测)。SPLVD根据训练阶段动态选择用于模型训练的源代码,模拟人类从易到难的学习过程。SPLVD拥有专为漏洞检测任务设计的数据选择器,能优先学习简单源代码。每个训练轮次前,SPLVD用数据选择器重新计算源代码难度、选择新训练源代码并更新数据选择器。评估SPLVD时,我们首先使用三个基准数据集(含超23.9万段源代码,其中2.5万段存在漏洞)进行标准评估,结果显示SPLVD的F1值分别达89.2%、68.7%和43.5%,优于现有最优方法。随后,我们从OpenHarmony(通用大语言模型未学习过的新生态系统)收集项目进一步评估,SPLVD的精确率达90.9%,证明其实际有效性。

英文摘要:

Software vulnerabilities are major risks to software systems. Recently, researchers have proposed many deep learning approaches to detect software vulnerabilities. However, their accuracy is limited in practice. One of the main causes is low-quality training data (i.e., source code). To this end, we propose a new approach: SPLVD (Self-Paced Learning for Software Vulnerability Detection). SPLVD dynamically selects source code for model training based on the stage of training, which simulates the human learning process progressing from easy to hard. SPLVD has a data selector that is specifically designed for the vulnerability detection task, which enables it to prioritize the learning of easy source code. Before each training epoch, SPLVD uses the data selector to recalculate the difficulty of the source code, select new training source code, and update the data selector. When evaluating SPLVD, we first use three benchmark datasets with over 239K source code in which 25K are vulnerable for standard evaluations. Experimental results demonstrate that SPLVD achieves the highest F1 of 89.2%, 68.7%, and 43.5%, respectively, outperforming the state-of-the-art approaches. Then we collect projects from OpenHarmony, a new ecosystem that has not been learned by general LLMs, to evaluate SPLVD further. SPLVD achieves the highest precision of 90.9%, demonstrating its practical effectiveness.

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

↑