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

利用多任务学习改进SATD与漏洞的检测

Leveraging multi-task learning to improve the detection of SATD and vulnerability

Barbara Russo, Jorge Melegati, Moritz Mock

AI总结:

本文研究多任务学习能否利用SATD与漏洞间的共享信息改进自动检测,提出基于CodeBERT的VulSATD并在MADE-WIC上评估,发现单任务与多任务方法无显著差异,提示需进一步探索技术债务与漏洞的关系。

摘要:

多任务学习是一种利用相关任务的信息来提升机器学习性能的范式。自承认技术债务(Self-Admitted Technical Debt,SATD)是代码中表明为满足短期需求而引入了不够完善的代码,即技术债务(technical debt,TD)的注释。先前的研究已经提供了证据,表明SATD与代码中漏洞的存在之间可能存在关联。在本工作中,我们研究多任务学习是否能够利用SATD与漏洞之间共享的信息来改进对这些问题的自动检测。为此,我们实现了VulSATD,这是一个基于预训练Transformer模型CodeBERT的深度学习器,用于检测易受攻击的代码和SATD代码。我们在MADE-WIC上评估了VulSATD,MADE-WIC是一个融合了针对TD(通过SATD)和漏洞进行标注的函数的数据集。我们比较了使用单任务和多任务方法的结果,即使采用了加权损失,也未获得显著差异。我们的发现表明,需要进一步研究低质量代码这两个方面之间的关系。具体而言,可能只有一部分技术债务与安全问题直接相关。因此,不同类型的技术债务与软件漏洞之间的关系值得未来探索和更深入的理解。

英文摘要:

Multi-task learning is a paradigm that leverages information from related tasks to improve the performance of machine learning. Self-Admitted Technical Debt (SATD) are comments in the code that indicate not-quite-right code introduced for short-term needs, i.e., technical debt (TD). Previous research has provided evidence of a possible relationship between SATD and the existence of vulnerabilities in the code. In this work, we investigate if multi-task learning could leverage the information shared between SATD and vulnerabilities to improve the automatic detection of these issues. To this aim, we implemented VulSATD, a deep learner that detects vulnerable and SATD code based on CodeBERT, a pre-trained transformers model. We evaluated VulSATD on MADE-WIC, a fused dataset of functions annotated for TD (through SATD) and vulnerability. We compared the results using single and multi-task approaches, obtaining no significant differences even after employing a weighted loss. Our findings indicate the need for further investigation into the relationship between these two aspects of low-quality code. Specifically, it is possible that only a subset of technical debt is directly associated with security concerns. Therefore, the relationship between different types of technical debt and software vulnerabilities deserves future exploration and a deeper understanding.

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

↑