DefectHunter:一种新型的由 LLM 驱动、基于 Boosted-Conformer 的代码漏洞检测机制
DefectHunter: A Novel LLM-Driven Boosted-Conformer-based Code Vulnerability Detection Mechanism
AI总结:
本文提出 DefectHunter,利用融合自注意力与卷积的 Conformer 并优化注意力分母,在多个工业及复杂数据集上显著提升代码漏洞检测准确率。
摘要:
计算系统面临的最紧迫威胁之一是软件漏洞,这类漏洞可能同时危及硬件和软件组件。现有的漏洞检测方法仍不够理想:传统技术既耗时又耗费人力,而基于机器学习的方法在应用于复杂数据集时往往表现不佳,原因是它们无法捕捉高维关系。以往的深度学习策略也难以捕捉足够的特征信息。尽管自注意力机制能够处理长距离信息,却无法捕捉结构信息。本文提出 DefectHunter,这是一种采用 Conformer 机制的创新漏洞识别模型。该机制将自注意力与卷积网络融合,以同时捕捉局部、按位置的特征以及全局、基于内容的交互。此外,我们通过调整分母来优化自注意力机制,以缓解过多注意力头引入无关噪声的问题。我们使用六个工业数据集和两个高度复杂的数据集,将 DefectHunter 与十种基线方法进行了评估。在 QEMU 数据集上,DefectHunter 的准确率较 Pongo-70B 提升了 20.62%;在 CWE-754 数据集上,其准确率高出 14.64%。为研究 DefectHunter 如何理解漏洞,我们开展了案例研究,结果表明该模型能够有效理解漏洞背后的机制。
英文摘要:
One of the most pressing threats to computing systems is software vulnerabilities, which can compromise both hardware and software components. Existing methods for vulnerability detection remain suboptimal. Traditional techniques are both time-consuming and labor-intensive, while machine-learning-based approaches often underperform when applied to complex datasets, due to their inability to capture high-dimensional relationships. Previous deep-learning strategies also fall short in capturing sufficient feature information. Although self-attention mechanisms can process information over long distances, they fail to capture structural information. In this paper, we introduce DefectHunter, an innovative model for vulnerability identification that employs the Conformer mechanism. This mechanism fuses self-attention with convolutional networks to capture both local, position-wise features and global, content-based interactions. Furthermore, we optimize the self-attention mechanisms to mitigate the issue of excessive attention heads introducing extraneous noise by adjusting the denominator. We evaluated DefectHunter against ten baseline methods using six industrial and two highly complex datasets. On the QEMU dataset, DefectHunter exhibited a 20.62\% improvement in accuracy over Pongo-70B, and for the CWE-754 dataset, its accuracy was 14.64\% higher. To investigate how DefectHunter comprehends vulnerabilities, we conducted a case study, which revealed that our model effectively understands the mechanisms underlying vulnerabilities.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。