CyberGuardAI 安全情报工作区
AI 安全知识情报
LJH 管理员
返回首页 学术论文

LLM代码漏洞修复中的指标失效实证研究

Om Nepal、Sushant Aryal、Oluseyi Olukola、Nick Rahimi

摘要与解读

指出编译率等指标不可靠,提出面向改动区域的diff_F1筛查

六维情报分析

6 个维度 · 原文可溯源

影响范围

  • 来源报告针对的是把LLM用于C/C++单函数漏洞自动修复的评测与研发流程:其结论影响以compile rate作为进展代理指标的评估体系,以及依赖该指标判断模型或提示策略优劣的团队。适用前提是任务形态为单函数漏洞修复、被测对象为开源代码LLM、并以生成补丁能否编译作为主要衡量。后果是这类评测可能把实质改进与无效改动混为一谈,使修复质量判断与资源投入方向偏离真实修复效果。

    原文依据 · 2
    Large language models (LLMs) are increasingly applied to the automated repair of C/C++ security vulnerabilities, and compile rate is a commonly reported proxy for progress: whether the generated patch compiles. We argue that compile rate is a scientifically unreliable metric for single-function vulnerability repair, and we support this with five controlled experiments over 203 vulnerable functions from Big-Vul, three open-source code LLMs (350M to 6.7B parameters), and three prompting strategies. Compile rate (i) barely responds to an intervention that substantially improves the generated code
    查看原文 · v1
    s among the newly compiling outputs. The natural fallback, whole-function CodeBLEU, also fails: an unchanged copy of the vulnerable input outscores every model. We also examine diff_F1, a change-aware screen that scores only the edited region. It gives exactly zero credit to a no-op and near-zero credit to some, though not all, of the deletion-based gaming patches we observed, while still crediting genuine partial edits, so it may serve as a cheap screen before deeper, execution-based analysis. It is not a repair-quality metric, and we report where it falls short. Our findings argue for change
    查看原文 · v1

关联资产

  • 原文明确关联的资产包括:Big-Vul数据集中的203个C/C++漏洞函数、三个开源代码LLM(参数规模350M至6.7B)、三种提示策略,以及compile rate、whole-function CodeBLEU和diff_F1三类评价组件。适用前提是单函数漏洞修复任务与生成补丁的评测流程;本地资产清单未提供,尚未与任何具体模型、数据集或流水线做匹配。

    原文依据 · 2
    Large language models (LLMs) are increasingly applied to the automated repair of C/C++ security vulnerabilities, and compile rate is a commonly reported proxy for progress: whether the generated patch compiles. We argue that compile rate is a scientifically unreliable metric for single-function vulnerability repair, and we support this with five controlled experiments over 203 vulnerable functions from Big-Vul, three open-source code LLMs (350M to 6.7B parameters), and three prompting strategies. Compile rate (i) barely responds to an intervention that substantially improves the generated code
    查看原文 · v1
    s among the newly compiling outputs. The natural fallback, whole-function CodeBLEU, also fails: an unchanged copy of the vulnerable input outscores every model. We also examine diff_F1, a change-aware screen that scores only the edited region. It gives exactly zero credit to a no-op and near-zero credit to some, though not all, of the deletion-based gaming patches we observed, while still crediting genuine partial edits, so it may serve as a cheap screen before deeper, execution-based analysis. It is not a repair-quality metric, and we report where it falls short. Our findings argue for change
    查看原文 · v1

风险评估

  • 已报道的风险机制是度量失效:compile rate对一项显著改善生成代码的干预几乎没有响应,新近可编译的输出中仍存在质量问题;whole-function CodeBLEU作为自然替代同样失效,未改动的漏洞输入副本得分高于所有模型。触发条件是使用这类整体相似度或编译通过率筛选补丁,尤其在存在删除式取巧补丁时。防护优先级应先替换主评价指标,再考虑执行级深度分析。

    原文依据 · 2
    Large language models (LLMs) are increasingly applied to the automated repair of C/C++ security vulnerabilities, and compile rate is a commonly reported proxy for progress: whether the generated patch compiles. We argue that compile rate is a scientifically unreliable metric for single-function vulnerability repair, and we support this with five controlled experiments over 203 vulnerable functions from Big-Vul, three open-source code LLMs (350M to 6.7B parameters), and three prompting strategies. Compile rate (i) barely responds to an intervention that substantially improves the generated code
    查看原文 · v1
    s among the newly compiling outputs. The natural fallback, whole-function CodeBLEU, also fails: an unchanged copy of the vulnerable input outscores every model. We also examine diff_F1, a change-aware screen that scores only the edited region. It gives exactly zero credit to a no-op and near-zero credit to some, though not all, of the deletion-based gaming patches we observed, while still crediting genuine partial edits, so it may serve as a cheap screen before deeper, execution-based analysis. It is not a repair-quality metric, and we report where it falls short. Our findings argue for change
    查看原文 · v1

相关研究

  • 研究方法为受控实验:覆盖Big-Vul中203个漏洞函数、三个开源代码LLM(350M至6.7B参数)与三种提示策略,共五组实验,论证compile rate在单函数漏洞修复上作为科学指标不可靠。材料还提出diff_F1这一change-aware screen,仅对编辑区域计分,对no-op给零分、对部分删除式取巧补丁给接近零分,同时仍承认真实的部分编辑;作者明确它并非修复质量指标,并报告其不足之处。

    原文依据 · 2
    Large language models (LLMs) are increasingly applied to the automated repair of C/C++ security vulnerabilities, and compile rate is a commonly reported proxy for progress: whether the generated patch compiles. We argue that compile rate is a scientifically unreliable metric for single-function vulnerability repair, and we support this with five controlled experiments over 203 vulnerable functions from Big-Vul, three open-source code LLMs (350M to 6.7B parameters), and three prompting strategies. Compile rate (i) barely responds to an intervention that substantially improves the generated code
    查看原文 · v1
    s among the newly compiling outputs. The natural fallback, whole-function CodeBLEU, also fails: an unchanged copy of the vulnerable input outscores every model. We also examine diff_F1, a change-aware screen that scores only the edited region. It gives exactly zero credit to a no-op and near-zero credit to some, though not all, of the deletion-based gaming patches we observed, while still crediting genuine partial edits, so it may serve as a cheap screen before deeper, execution-based analysis. It is not a repair-quality metric, and we report where it falls short. Our findings argue for change
    查看原文 · v1

验证资料

  • 来源给出的实验数据为203个漏洞函数、三个350M至6.7B参数的开源代码LLM、三种提示策略和五组受控实验;结论适用于单函数C/C++漏洞修复场景。防御性核查可围绕指标行为展开:对比干预前后compile rate的变化幅度,检查新近可编译输出中是否存在未改动副本或删除式补丁,并观察diff_F1对no-op与部分编辑的区分情况。执行级深度分析在材料中仅作为后续方向提及。

    原文依据 · 2
    Large language models (LLMs) are increasingly applied to the automated repair of C/C++ security vulnerabilities, and compile rate is a commonly reported proxy for progress: whether the generated patch compiles. We argue that compile rate is a scientifically unreliable metric for single-function vulnerability repair, and we support this with five controlled experiments over 203 vulnerable functions from Big-Vul, three open-source code LLMs (350M to 6.7B parameters), and three prompting strategies. Compile rate (i) barely responds to an intervention that substantially improves the generated code
    查看原文 · v1
    s among the newly compiling outputs. The natural fallback, whole-function CodeBLEU, also fails: an unchanged copy of the vulnerable input outscores every model. We also examine diff_F1, a change-aware screen that scores only the edited region. It gives exactly zero credit to a no-op and near-zero credit to some, though not all, of the deletion-based gaming patches we observed, while still crediting genuine partial edits, so it may serve as a cheap screen before deeper, execution-based analysis. It is not a repair-quality metric, and we report where it falls short. Our findings argue for change
    查看原文 · v1

处置建议

  • 依据来源结论,先调整评价体系:在单函数漏洞修复评测中降低compile rate作为主指标的地位,避免仅凭编译通过率判定模型或提示策略优劣;对whole-function CodeBLEU结果保持警惕,因其会给未改动的漏洞输入副本高分。随后可引入diff_F1作为进入执行级分析前的低成本筛查,并按其作者说明限定用途,仅用于识别no-op与部分删除式取巧补丁,不作为修复质量结论。

    原文依据 · 2
    Large language models (LLMs) are increasingly applied to the automated repair of C/C++ security vulnerabilities, and compile rate is a commonly reported proxy for progress: whether the generated patch compiles. We argue that compile rate is a scientifically unreliable metric for single-function vulnerability repair, and we support this with five controlled experiments over 203 vulnerable functions from Big-Vul, three open-source code LLMs (350M to 6.7B parameters), and three prompting strategies. Compile rate (i) barely responds to an intervention that substantially improves the generated code
    查看原文 · v1
    s among the newly compiling outputs. The natural fallback, whole-function CodeBLEU, also fails: an unchanged copy of the vulnerable input outscores every model. We also examine diff_F1, a change-aware screen that scores only the edited region. It gives exactly zero credit to a no-op and near-zero credit to some, though not all, of the deletion-based gaming patches we observed, while still crediting genuine partial edits, so it may serve as a cheap screen before deeper, execution-based analysis. It is not a repair-quality metric, and we report where it falls short. Our findings argue for change
    查看原文 · v1
模型与引文记录
模型
deepseek-flash
生成时间
记录编号
REQ-488ea8a140364c54bbbeea20ec2adf45
分析原文
查看原文 · v1

资料档案

文献来源与参考链接

当前保存的来源版本 · v1

作者
Om Nepal、Sushant Aryal、Oluseyi Olukola、Nick Rahimi
文献与标准标识
arxiv:2609.26749
主题分类
cs.SE、cs.AI、cs.CR
来源版本
v1
来源更新时间
2026-09-22T17:32:05+00:00
日期依据
来源明确给出发表日期
原始标题与分类记录

Metrics Failure in LLM-Based Code Vulnerability Repair: An Empirical Study and a Change-Aware Screen

研究方向
评测治理
影响维度
待人工确认
风险类型
供应链风险
相关技术
LLM

当前为离线关键词规则模式。

分类规则与原始字段
评测治理 · evaluation
ally improves the generated code; (ii) is dominated by evaluation-harness and dataset artifacts rather than model quality, with about 64% of compile failures not att
供应链风险 · vulnerability
Metrics Failure in LLM-Based Code Vulnerability Repair: An Empirical Study and a Change-Aware Screen Large language models (LLMs) are increasingly
LLM · llm
Metrics Failure in LLM-Based Code Vulnerability Repair: An Empirical Study and a Change-Aware Screen Large language models
{
  "ai_relevance": {
    "evidence": [
      {
        "end_offset": 22,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 19
      },
      {
        "end_offset": 122,
        "location": "title_and_content",
        "quote": "Large language models",
        "rule": "ai_term",
        "start_offset": 101
      },
      {
        "end_offset": 128,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 124
      },
      {
        "end_offset": 543,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 539
      },
      {
        "end_offset": 1979,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 1976
      }
    ],
    "matches": [
      {
        "end_offset": 22,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 19
      },
      {
        "end_offset": 122,
        "location": "title_and_content",
        "quote": "Large language models",
        "rule": "ai_term",
        "start_offset": 101
      },
      {
        "end_offset": 128,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 124
      },
      {
        "end_offset": 543,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 539
      },
      {
        "end_offset": 1979,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 1976
      }
    ],
    "method": "explainable_keyword_rules",
    "reason": "Matched AI topic or component evidence",
    "relevant": true
  },
  "entity_ids": [],
  "facts": [],
  "method": "source_grounded_extraction",
  "unknown_fields": [
    "affected_products",
    "affected_versions",
    "fixed_versions",
    "cvss",
    "mitigations",
    "references",
    "papers",
    "poc"
  ]
}
原始采集文本
Large language models (LLMs) are increasingly applied to the automated repair of C/C++ security vulnerabilities, and compile rate is a commonly reported proxy for progress: whether the generated patch compiles. We argue that compile rate is a scientifically unreliable metric for single-function vulnerability repair, and we support this with five controlled experiments over 203 vulnerable functions from Big-Vul, three open-source code LLMs (350M to 6.7B parameters), and three prompting strategies. Compile rate (i) barely responds to an intervention that substantially improves the generated code; (ii) is dominated by evaluation-harness and dataset artifacts rather than model quality, with about 64% of compile failures not attributable to the model, a share that is nearly invariant across models; (iii) shifts by 1.8 to 2.7 times on identical patches under a single compiler-standard flag, with zero regressions; (iv) ranks the three models in the opposite order to reference-similarity metrics; and (v) rewards non-repairs when used as an optimization target, since a compiler-feedback loop raises compile rate while similarity to the human fix falls, with manual inspection finding deletion- and placeholder-style non-repairs among the newly compiling outputs. The natural fallback, whole-function CodeBLEU, also fails: an unchanged copy of the vulnerable input outscores every model. We also examine diff_F1, a change-aware screen that scores only the edited region. It gives exactly zero credit to a no-op and near-zero credit to some, though not all, of the deletion-based gaming patches we observed, while still crediting genuine partial edits, so it may serve as a cheap screen before deeper, execution-based analysis. It is not a repair-quality metric, and we report where it falls short. Our findings argue for change-aware, execution-grounded evaluation of LLM-based vulnerability repair.
采集信息与校验
完整来源元数据
{
  "authors": [
    "Om Nepal",
    "Sushant Aryal",
    "Oluseyi Olukola",
    "Nick Rahimi"
  ],
  "content_level": "abstract",
  "date_basis": "explicit_published",
  "date_evidence": {
    "published": "2026-09-22T17:32:05Z",
    "updated": "2026-09-22T17:32:05Z"
  },
  "identifiers": [
    "arxiv:2609.26749"
  ],
  "source_updated_at": "2026-09-22T17:32:05+00:00",
  "subjects": [
    "cs.SE",
    "cs.AI",
    "cs.CR"
  ],
  "version_label": "v1"
}
原文版本历史与校验
版本入库更新时间来源发布日期校验标识
v1 · 正在查看2026-10-12 06:07 UTC2026-09-22 17:32 UTC075f21a5817a1bf2d5a3882155dc30508d38ffddc179efb45dd1f3babc5a5318
可引用分片 · 2 段

CHK-ff496990b2be958ae8401e24

Large language models (LLMs) are increasingly applied to the automated repair of C/C++ security vulnerabilities, and compile rate is a commonly reported proxy for progress: whether the generated patch compiles. We argue that compile rate is a scientifically unreliable metric for single-function vulnerability repair, and we support this with five controlled experiments over 203 vulnerable functions from Big-Vul, three open-source code LLMs (350M to 6.7B parameters), and three prompting strategies. Compile rate (i) barely responds to an intervention that substantially improves the generated code; (ii) is dominated by evaluation-harness and dataset artifacts rather than model quality, with about 64% of compile failures not attributable to the model, a share that is nearly invariant across models; (iii) shifts by 1.8 to 2.7 times on identical patches under a single compiler-standard flag, with zero regressions; (iv) ranks the three models in the opposite order to reference-similarity metrics; and (v) rewards non-repairs when used as an optimization target, since a compiler-feedback loop raises compile rate while similarity to the human fix falls, with manual inspection finding deletion- and placeholder-style non-repairs among the newly compiling outputs. The natural fallback, whole-function CodeBLEU, also fails: an unchanged copy of the vulnerable input outscores every model.

CHK-8a0b9f80e9c2691078f6de04

s among the newly compiling outputs. The natural fallback, whole-function CodeBLEU, also fails: an unchanged copy of the vulnerable input outscores every model. We also examine diff_F1, a change-aware screen that scores only the edited region. It gives exactly zero credit to a no-op and near-zero credit to some, though not all, of the deletion-based gaming patches we observed, while still crediting genuine partial edits, so it may serve as a cheap screen before deeper, execution-based analysis. It is not a repair-quality metric, and we report where it falls short. Our findings argue for change-aware, execution-grounded evaluation of LLM-based vulnerability repair.
处理记录
补充资料

中文译文

正文译文暂缺,以下仅为中文摘要。

中文摘要

指出编译率等指标不可靠,提出面向改动区域的diff_F1筛查

已采集原文

访问来源网页

Large language models (LLMs) are increasingly applied to the automated repair of C/C++ security vulnerabilities, and compile rate is a commonly reported proxy for progress: whether the generated patch compiles. We argue that compile rate is a scientifically unreliable metric for single-function vulnerability repair, and we support this with five controlled experiments over 203 vulnerable functions from Big-Vul, three open-source code LLMs (350M to 6.7B parameters), and three prompting strategies. Compile rate (i) barely responds to an intervention that substantially improves the generated code; (ii) is dominated by evaluation-harness and dataset artifacts rather than model quality, with about 64% of compile failures not attributable to the model, a share that is nearly invariant across models; (iii) shifts by 1.8 to 2.7 times on identical patches under a single compiler-standard flag, with zero regressions; (iv) ranks the three models in the opposite order to reference-similarity metrics; and (v) rewards non-repairs when used as an optimization target, since a compiler-feedback loop raises compile rate while similarity to the human fix falls, with manual inspection finding deletion- and placeholder-style non-repairs among the newly compiling outputs. The natural fallback, whole-function CodeBLEU, also fails: an unchanged copy of the vulnerable input outscores every model. We also examine diff_F1, a change-aware screen that scores only the edited region. It gives exactly zero credit to a no-op and near-zero credit to some, though not all, of the deletion-based gaming patches we observed, while still crediting genuine partial edits, so it may serve as a cheap screen before deeper, execution-based analysis. It is not a repair-quality metric, and we report where it falls short. Our findings argue for change-aware, execution-grounded evaluation of LLM-based vulnerability repair.

原文依据