Trusting the Tool: Asymmetric Deference of LLM Vulnerability Auditors to Static-Analysis Evidence

LLM HDFE Agent Tool Learning AI Systems and Hardware PVDAR
2026年10月23日
将大语言模型(LLM)与静态分析工具相结合的分析流水线,可使模型将分析器的输出作为证据加以利用;但目前尚无实证研究测量过:模型是否能够区分真实证据与虚假证据,以及其审慎程度是否取决于证据所声称的具体内容。为此,我们开发了一款面向C/C++的函数内(intraprocedural)静态分析器,用于生成形式化验证义务(proof obligations),并基于PrimeVul数据集选取了存在漏洞与已修复的函数开展审计实验;实验共设置六种证据条件,各条件之间唯一区别在于分析器所附带的注释说明——其中包括两类人为构造的错误注释:一类是虚构的“保证性陈述”(fabricated assurances),声称某处缺失必要的安全检查;另一类是虚构的“告警性陈述”(fabricated alarms),声称某处新增的安全检查实际并不存在。本研究共覆盖916对函数样本,划分为四个互不相交的数据集;涵盖来自四家厂商的11种模型配置,总计完成16,572次独立审计;所有模型均未经专门训练或微调。结果显示:真实证据仅带来极其微弱的准确率提升(+0.02);而虚假证据的影响则呈现显著的不对称性:相较于针对相同操作所给出的真实注释,虚构的“保证性陈述”会使真实漏洞的检出率最高下降19个百分点;相比之下,虚构的“告警性陈述”从未对整体准确率造成统计上显著的负面影响,且在审计过程中被质疑的频率远高于前者。一项在内部注册的重复性实验进一步验证了该不对称效应:该实验扩展至七种新模型,结果表明,虚构的“保证性陈述”比虚构的“告警性陈述”更易使模型判决结果向其声称内容偏移(平均不对称性为+0.16,95%置信区间为+0.10至+0.24)。此外,我们在审计提示词(audit prompt)中加入的各类指导性指令均未能稳定、可靠地降低模型对证据的盲目遵从倾向(deference),其中效果最佳的一条指令在复现实验中亦未成功再现。在一项预先设定的对照测试中,若对每条证据声明单独发起一次模型调用予以逐一验证,并向模型明确展示已被证伪的声明,则在面对虚构“保证性陈述”时,准确率提升了12个百分点(p = 0.002),且在真实证据条件下未出现性能损失;但对另一款模型进行同类测试时,提升幅度较小且未达统计显著性。因此,此类分析流水线应在大语言模型依赖分析工具输出之前,先行验证工具所作各项保证的真实性;相关研究也应采用具备方向敏感性(direction-aware)的方法,对模型的盲目遵从倾向进行量化评估。
Pipelines that combine large language models (LLMs) with static analysis let the model consume the analyser's output as evidence, but whether the model distinguishes true from false evidence, and whether its scrutiny depends on what the evidence claims, has not been measured. We built an intraprocedural analyser for C/C++ that produces proof obligations and audited vulnerable and patched functions from PrimeVul under six evidence conditions that differ only in the notes, including fabricated assurances that a missing check exists and fabricated alarms that an added check is missing. The study covers 916 pairs in four disjoint sets, eleven model configurations from four vendors and 16,572 audits; no model is trained or fine-tuned. True evidence barely improved accuracy (+0.02). False evidence acted asymmetrically: relative to true notes about the same operations, false assurances lowered the detection of real vulnerabilities by up to 19 points, whereas false alarms never significantly lowered accuracy and were disputed far more often. An internally registered replication on seven new models confirmed that false assurances move verdicts towards their claim more than false alarms do (mean asymmetry +0.16, 95% CI +0.10 to +0.24). Instructions in the audit prompt did not reliably reduce deference; the best one failed to replicate. Verifying each claim in a separate call and showing the refuted claims raised accuracy under false assurances by 12 points in a pre-specified test (p=0.002) without loss under true evidence; for a second model the gain was smaller and not significant. Pipelines should therefore verify a tool's guarantees before the model relies on them, and studies should measure deference in a direction-aware way.
许愿