arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.24171cs.LGcs.AI
收藏

PromptAudit: 审计基于LLM的漏洞检测中的提示敏感性

PromptAudit: Auditing Prompt Sensitivity in LLM-Based Vulnerability Detection

University of Central Florida(佛罗里达大学)

Steffen J. Camarato, Yahya Hmaiti, Mandana Ghadamian, David Mohaisen

AI总结:

提出PromptAudit框架,通过固定数据集、解码和解析仅变化提示策略,评估五种提示策略在五个开源模型上对1000个CVE(6074个代码样本,16种编程语言)的漏洞检测性能,发现标准思维链提示整体性能最佳,而提示敏感性是系统的一级属性。

摘要:

大型语言模型越来越多地用于漏洞检测,但它们在各种提示表述下的可靠性仍未得到表征。我们提出了PromptAudit,一个受控评估框架,通过固定数据集、解码和解析,仅变化提示策略来隔离提示效应。我们在1000个CVE(涵盖16种编程语言的6074个代码样本)上,使用五种提示策略对五个开源模型进行评估,计算准确率、召回率、弃权率、覆盖率和有效F1。我们发现,标准思维链提示实现了最强的整体操作性能,而少样本提示提供了模型相关的益处,对于提示敏感的模型最为显著。相比之下,自适应思维链经常抑制召回率,而自一致性导致过度弃权,急剧降低了有效性能。这些结果表明,漏洞检测行为由模型和提示共同决定,并且提示敏感性是一个一级系统属性,必须在评估和部署中明确表征。

英文摘要:

Large language models are increasingly used for vulnerability detection, yet their reliability under different prompt formulations remains uncharacterized. We present PromptAudit, a controlled evaluation framework that isolates prompt effects by fixing the dataset, decoding, and parsing while varying only the prompting strategy. Using five prompting strategies across five open-weight models on 1,000 CVEs (6,074 code samples spanning 16 programming languages), we evaluate accuracy, recall, abstention, coverage, and effective F1. We find that standard chain-of-thought prompting achieves the strongest overall operational performance, while few-shot prompting provides model-dependent benefits that are most pronounced for prompt-sensitive models. In contrast, adaptive chain-of-thought frequently suppresses recall and self-consistency induces excessive abstention, sharply reducing effective performance. These results show that vulnerability detection behavior is jointly determined by the model and the prompt, and that prompt sensitivity is a first-class system property that must be explicitly characterized in evaluation and deployment.

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

↑