arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.08060cs.CRcs.SE

从大语言模型到智能体:大语言模型与基于大语言模型的智能体在安全补丁检测中的比较评估

From LLMs to Agents: A Comparative Evaluation of LLMs and LLM-based Agents in Security Patch Detection

Junxiao Han, Zheng Yu, Lingfeng Bao, Jiakun Liu, Yao Wan, Jianwei Yin, Shuiguang Deng, Song Han

AI总结:

针对开源软件安全补丁检测中LLMs与LLM智能体评估不足的问题,本文通过评估三种方法(Plain LLM、Data-Aug LLM、ReAct Agent)及商业/开源LLMs,发现Data-Aug LLM性能最优、ReAct Agent假阳性率最低,为其实际应用提供参考。

摘要:

开源软件(OSS)的广泛采用加速了软件创新,但也因漏洞的快速传播和静默补丁发布增加了安全风险。近年来,大语言模型(LLMs)和基于LLM的智能体在各种软件工程(SE)任务中展现出卓越能力,使其能有效应对漏洞检测等软件安全挑战。然而,对LLMs和基于LLM的智能体在安全补丁检测能力的系统性评估仍很有限。为填补这一空白,我们对LLMs和基于LLM的智能体在安全补丁检测中的性能进行了全面评估。具体而言,我们研究了三种方法:Plain LLM(带系统提示的单个LLM)、Data-Aug LLM(基于Plain LLM的数据增强方法)和ReAct Agent(利用思考-行动-观察机制)。我们还评估了这些方法下商业和开源LLMs的性能,并将结果与现有基线进行比较。此外,我们分析了这些方法在不同漏洞类型中的检测性能,以及不同提示策略和上下文窗口大小对结果的影响。我们的研究结果显示,Data-Aug LLM取得了最佳整体性能,而ReAct Agent的假阳性率(FPR)最低。尽管基线方法准确率较高,但其假阳性率显著更高;相比之下,我们评估的方法在保持相当准确率的同时大幅降低了假阳性率。这些发现为LLMs和基于LLM的智能体在安全补丁检测中的实际应用提供了宝贵见解,突显了它们在维持稳健性能的同时最小化假阳性率的优势。

英文摘要:

The widespread adoption of open-source software (OSS) has accelerated software innovation but also increased security risks due to the rapid propagation of vulnerabilities and silent patch releases. In recent years, large language models (LLMs) and LLM-based agents have demonstrated remarkable capabilities in various software engineering (SE) tasks, enabling them to effectively address software security challenges such as vulnerability detection. However, systematic evaluation of the capabilities of LLMs and LLM-based agents in security patch detection remains limited. To bridge this gap, we conduct a comprehensive evaluation of the performance of LLMs and LLM-based agents for security patch detection. Specifically, we investigate three methods: Plain LLM (a single LLM with a system prompt), Data-Aug LLM (data augmentation based on the Plain LLM), and the ReAct Agent (leveraging the thought-action-observation mechanism). We also evaluate the performance of both commercial and open-source LLMs under these methods and compare these results with those of existing baselines. Furthermore, we analyze the detection performance of these methods across various vulnerability types, and examine the impact of different prompting strategies and context window sizes on the results. Our findings reveal that the Data-Aug LLM achieves the best overall performance, whereas the ReAct Agent demonstrates the lowest false positive rate (FPR). Although baseline methods exhibit strong accuracy, their false positive rates are significantly higher. In contrast, our evaluated methods achieve comparable accuracy while substantially reducing the FPR. These findings provide valuable insights into the practical applications of LLMs and LLM-based agents in security patch detection, highlighting their advantage in maintaining robust performance while minimizing false positive rates.

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

↑