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

SAFE:提升大型语言模型利用语义与句法关系进行软件漏洞检测的能力

SAFE: Advancing Large Language Models in Leveraging Semantic and Syntactic Relationships for Software Vulnerability Detection

Monash University(莫纳什大学);CSIRO's Data61(澳大利亚联邦科学与工业研究组织数据61);Melbourne University(墨尔本大学)

Van Nguyen, Surya Nepal, Tingmin Wu, Xingliang Yuan, Carsten Rudolph

AI总结:

本文提出SAFE框架,通过增强大型语言模型对源代码语义与句法关系的学习利用,提升真实复杂数据集上的软件漏洞检测性能。

摘要:

软件漏洞(SV)已成为安全关键型安全系统中普遍且关键的问题。这推动了利用基于AI的方法(包括机器学习和深度学习)进行软件漏洞检测(SVD)的重大进展。尽管基于AI的方法在SVD中展现出良好性能,但在实际应用中,它们在真实、复杂且多样的源代码数据集上的有效性仍然有限。为应对这一挑战,本文提出一种新颖框架,用于增强大型语言模型从源代码数据中学习并利用语义和句法关系以完成SVD的能力。因此,我们的方法能够从源代码数据中获取基础知识,同时熟练利用关键关系,即语义和句法关联,从而有效解决软件漏洞检测(SVD)问题。在三个具有挑战性的真实数据集(即ReVeal、D2A和Devign)上进行的严格且广泛的实验结果表明,我们的方法优于有效的最新基线方法。总之,在所有使用的数据集上,与基线相比,我们的SAFE方法平均实现了更高性能:F1-measure提升4.79%至9.15%,Recall提升16.93%至21.70%。

英文摘要:

Software vulnerabilities (SVs) have emerged as a prevalent and critical concern for safety-critical security systems. This has spurred significant advancements in utilizing AI-based methods, including machine learning and deep learning, for software vulnerability detection (SVD). While AI-based methods have shown promising performance in SVD, their effectiveness on real-world, complex, and diverse source code datasets remains limited in practice. To tackle this challenge, in this paper, we propose a novel framework that enhances the capability of large language models to learn and utilize semantic and syntactic relationships from source code data for SVD. As a result, our approach can enable the acquisition of fundamental knowledge from source code data while adeptly utilizing crucial relationships, i.e., semantic and syntactic associations, to effectively address the software vulnerability detection (SVD) problem. The rigorous and extensive experimental results on three real-world challenging datasets (i.e., ReVeal, D2A, and Devign) demonstrate the superiority of our approach over the effective and state-of-the-art baselines. In summary, on average, our SAFE approach achieves higher performances from 4.79% to 9.15% for F1-measure and from 16.93% to 21.70% for Recall compared to the baselines across all datasets used.

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

↑