paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Should We Evaluate LLM Based Security Analysis Approaches on Open Source Systems?

我们应该在开源系统上评估基于 LLM 的安全分析方法吗?
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 6/10 · 论文关注 LLM 在源代码漏洞检测上的评测污染问题,属于 LLM 用于程序/安全分析的交叉方向,并与用户对重要场景 benchmark、工业落地和问题驱动研究的兴趣相关;但它不涉及静态分析/形式化验证核心方法、Agentic 程序、浮点程序分析或贝叶斯程序分析,且研究目标更偏向评测 LLM 能力而非用 LLM/Agent 改进静态分析。引用 1 inbox
Kohei Dozono, Jonas Engesser, Benjamin Hummel, Tobias Roehm, Alexander Pretschner
crossref: 2026-09-12

AI 速览

一句话:通过开源与闭源数据集的对照实验,首次实证表明基于 LLM 的漏洞检测在开源基准上的评测结果会因数据污染而被显著高估。

已有研究显示大语言模型(LLM)能有效检测源码中的安全漏洞,但这些工作几乎只在开源系统基准上评测,所用漏洞多为公开已知、很可能已进入模型训练数据,因此报告的性能可能因数据污染而虚高。本文以案例研究量化该效应:在两个精心整理的数据集——开源的 CWE-Bench-Java 与基于闭源商业代码库的 TS-Vuls——上评测五个前沿 LLM;同时按 CVE 记录日期切分开源数据,从时间污染角度考察模型知识截止的影响。结果显示,从开源数据集转到闭源数据集时,平均 F1 下降约 20 个百分点,精确率平均从 56% 降至 34%,五个模型中有四个在 p<0.05 下显著,且该下降趋势在所有模型与指标上一致;而开源数据上的时间切分结果不明确,说明依赖知识截止日期可减轻但并不足以消除污染效应。研究虽仅基于单一闭源系统、不可泛化,但为开源基准评测导致的过度乐观提供了首个实证证据,呼吁未来评测纳入闭源数据集。

问题
现有基于 LLM 的源码漏洞检测研究几乎只在开源系统基准上评估,所用漏洞多为公开已知、可能已被模型训练数据覆盖,导致性能指标因数据污染而虚高,无法反映模型的真实能力。
方法
在两个数据集上对比评测五个前沿 LLM:开源的 CWE-Bench-Java 与基于闭源商业代码库构建的 TS-Vuls;并额外按 CVE 记录日期切分开源数据,以考察相对模型知识截止日期的时间污染效应。
评估
开源到闭源数据集的迁移使平均 F1 下降约 20 个百分点,精确率平均从 56% 降至 34%(五个模型中四个在 p<0.05 下显著),下降趋势在所有模型与指标上一致;开源数据的时间切分结果不具结论性。研究受限于单一闭源系统而不可泛化,但首次实证提示开源基准评测过于乐观,未来应纳入闭源数据集。
原文摘要(Abstract)

Existing research has demonstrated promising results when applying large language models (LLMs) to detect security vulnerabilities in source code. However, these studies have been exclusively evaluated on benchmarks from open-source systems, using publicly known vulnerabilities that are likely part of the LLMs’ training data. This raises concerns that reported performance metrics may be inflated due to data contamination, providing a misleading view of the models’ actual capabilities.In this paper, we quantify this effect with a case study that evaluates five frontier LLMs on two carefully curated datasets: CWE-Bench-Java (an open-source dataset) and TS-Vuls (based on a closed-source commercial codebase). To provide a second angle, we also split CWE-Bench-Java by CVE record date to explore temporal contamination based on LLM knowledge cutoff dates.Our results reveal that the average F1 score dropped by approximately 20 percentage points when comparing the open-source to the closed-source dataset. Additionally, the precision drops from 56% to 34% on average, which is statistically significant (p < 0.05) for four of five models. This declining trend is consistent across all tested LLMs and metrics. In contrast, the results for the temporal split on the open-source data are inconclusive, suggesting that using a knowledge cutoff may reduce but does not ensure the elimination of contamination effects.Although our study is based on a single closed-source system and thus not generalizable, these findings provide the first empirical evidence that evaluating LLM-based vulnerability detection on open-source benchmarks may lead to overly optimistic results. This motivates the inclusion of closed-source datasets in future LLM evaluations.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9296,
  title = {Should We Evaluate LLM Based Security Analysis Approaches on Open Source Systems?},
  author = {Kohei Dozono and Jonas Engesser and Benjamin Hummel and Tobias Roehm and Alexander Pretschner},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00265}
}