arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.01202cs.SEcs.CR
收藏

DLAP:一种用于软件漏洞检测的深度学习增强大语言模型提示框架

DLAP: A Deep Learning Augmented Large Language Model Prompting Framework for Software Vulnerability Detection

Yanjing Yang, Xin Zhou, Runfeng Mao, Jinwei Xu, Lanxin Yang, Yu Zhangm, Haifeng Shen, He Zhang

AI总结:

针对深度学习模型泛化性差、缺乏可解释性以及大语言模型漏洞检测性能不足的问题,本文提出DLAP框架,融合两者优势,实验证明其在多个指标上优于现有提示与微调方法。

摘要:

软件漏洞检测通常由自动化静态分析工具支持,近年来这些工具又得到了深度学习(DL)模型的强化。然而,尽管基于深度学习的方法在研究中的表现优于基于规则的方法,但在实践中将深度学习方法应用于软件漏洞检测仍然面临挑战,原因包括源代码结构复杂、深度学习的黑箱特性,以及理解和验证黑箱结果以处理检测后任务所需的领域知识。传统深度学习模型由特定项目训练而成,因此擅长识别这些项目中的漏洞,但在其他项目中表现不佳。这些在漏洞检测中性能不佳的模型会影响下游任务,如漏洞定位和修复。更重要的是,这些模型无法为开发人员提供解释以理解检测结果。相比之下,大语言模型(LLMs)通过利用提示技术在解决这些问题方面取得了很大进展。遗憾的是,它们在识别漏洞方面的表现并不令人满意。本文提出了 \textbf{\DLAP},一个 \underline{\textbf{D}}eep \underline{\textbf{L}}earning \underline{\textbf{A}}ugmented LLMs \underline{\textbf{P}}rompting 框架,该框架结合了深度学习模型和大语言模型两者的优势,以实现卓越的漏洞检测性能。实验评估结果证实,\DLAP 在多个指标上优于最先进的提示框架,包括基于角色的提示、辅助信息提示、思维链提示和上下文学习提示,以及微调方法。

英文摘要:

Software vulnerability detection is generally supported by automated static analysis tools, which have recently been reinforced by deep learning (DL) models. However, despite the superior performance of DL-based approaches over rule-based ones in research, applying DL approaches to software vulnerability detection in practice remains a challenge due to the complex structure of source code, the black-box nature of DL, and the domain knowledge required to understand and validate the black-box results for addressing tasks after detection. Conventional DL models are trained by specific projects and, hence, excel in identifying vulnerabilities in these projects but not in others. These models with poor performance in vulnerability detection would impact the downstream tasks such as location and repair. More importantly, these models do not provide explanations for developers to comprehend detection results. In contrast, Large Language Models (LLMs) have made lots of progress in addressing these issues by leveraging prompting techniques. Unfortunately, their performance in identifying vulnerabilities is unsatisfactory. This paper contributes \textbf{\DLAP}, a \underline{\textbf{D}}eep \underline{\textbf{L}}earning \underline{\textbf{A}}ugmented LLMs \underline{\textbf{P}}rompting framework that combines the best of both DL models and LLMs to achieve exceptional vulnerability detection performance. Experimental evaluation results confirm that \DLAP outperforms state-of-the-art prompting frameworks, including role-based prompts, auxiliary information prompts, chain-of-thought prompts, and in-context learning prompts, as well as fine-turning on multiple metrics.

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

↑