arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.17110cs.SEcs.CRcs.LG
收藏

低资源语言中的软件漏洞预测:CodeBERT与ChatGPT的实证研究

Software Vulnerability Prediction in Low-Resource Languages: An Empirical Study of CodeBERT and ChatGPT

The University of Adelaide(阿德莱德大学);Cyber Security Cooperative Research Centre(网络安全合作研究中心)

Triet H. M. Le, M. Ali Babar, Tung Hoang Thai

AI总结:

针对新兴语言软件漏洞数据稀缺问题,本研究实证评估了CodeBERT在Kotlin、Swift和Rust上的预测性能下降现象,发现数据采样无效而ChatGPT能显著提升预测效果。

摘要:

背景:新兴语言中的软件漏洞(SV)预测对于确保现代系统的软件安全日益重要。然而,这些语言通常缺乏足够的SV数据来开发高性能的预测模型。目的:我们进行了一项实证研究,以评估新兴语言中SV数据稀缺对最先进SV预测模型的影响,并探索提升性能的潜在解决方案。方法:我们在三种低资源语言——Kotlin、Swift和Rust中,针对函数级和行级SV预测,分别训练并测试了基于CodeBERT的最先进模型(包含和不包含数据采样技术)。鉴于ChatGPT近期在其他领域的成功,我们还评估了其在低资源SV预测中的有效性。结果:与使用大量数据的C/C++原始研究相比,CodeBERT在低资源语言中的函数级和行级SV预测性能显著下降,表明了数据稀缺的负面影响。在补救措施方面,数据采样技术未能改善CodeBERT;然而,ChatGPT展现出令人鼓舞的结果,将函数级预测性能大幅提升高达34.4%,行级提升高达53.5%。结论:我们突出了这一挑战,并为低资源SV预测迈出了有前景的第一步,为未来该方向的研究铺平了道路。

英文摘要:

Background: Software Vulnerability (SV) prediction in emerging languages is increasingly important to ensure software security in modern systems. However, these languages usually have limited SV data for developing high-performing prediction models. Aims: We conduct an empirical study to evaluate the impact of SV data scarcity in emerging languages on the state-of-the-art SV prediction model and investigate potential solutions to enhance the performance. Method: We train and test the state-of-the-art model based on CodeBERT with and without data sampling techniques for function-level and line-level SV prediction in three low-resource languages - Kotlin, Swift, and Rust. We also assess the effectiveness of ChatGPT for low-resource SV prediction given its recent success in other domains. Results: Compared to the original work in C/C++ with large data, CodeBERT's performance of function-level and line-level SV prediction significantly declines in low-resource languages, signifying the negative impact of data scarcity. Regarding remediation, data sampling techniques fail to improve CodeBERT; whereas, ChatGPT showcases promising results, substantially enhancing predictive performance by up to 34.4% for the function level and up to 53.5% for the line level. Conclusion: We have highlighted the challenge and made the first promising step for low-resource SV prediction, paving the way for future research in this direction.

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

↑