跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 软件工程

arXiv:2606.31159 (cs)
[提交于 2026年6月30日]

标题:An Empirical Study of Security Calibration in Large Language Models for Code

作者:Mohammed Latif Siddiq, Md. Nafiu Rahman, Joanna C. S. Santos
查看论文《An Empirical Study of Security Calibration in Large Language Models for Code》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Large Language Models (LLMs) are rapidly transforming software development, yet their use in security-critical contexts raises a key question: do models know when their generated code is insecure? This property, known as calibration, measures whether a model's confidence aligns with the true correctness of its outputs. We present the first large-scale empirical study of security calibration in LLM-generated code. We evaluate GPT-4o-mini, Gemini-2.0-Flash, and Qwen3-Coder-Next across multiple temperature settings on two complementary benchmarks: self-contained security tasks and multi-language repository-level contexts. Our results suggest that overconfidence is prevalent across the evaluated LLMs. Functional calibration is consistently worse than security calibration, suggesting that models estimate security outcomes more reliably than functional correctness, potentially because functional correctness depends on complex execution behavior. We also examine whether calibration-guided automated repair can help remediate vulnerabilities in LLM-generated code, finding only limited improvements while frequently introducing functional regressions. Moreover, we study different mitigation strategies for reducing False Trust, where models assign high confidence to vulnerable code. The results show that although architectural gating improves calibration on controlled benchmarks, calibration deteriorates in realistic repository-level settings, increasing the risk of high-confidence vulnerable outputs.
评论: Accepted at the 42nd International Conference on Software Maintenance and Evolution (ICSME 2026) Research Track
主题: 软件工程 (cs.SE); 密码学与安全 (cs.CR); 机器学习 (cs.LG)
引用方式: arXiv:2606.31159 [cs.SE]
  (或者 arXiv:2606.31159v1 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2606.31159

提交历史

来自:Mohammed Latif Siddiq
[v1] 2026年6月30日 星期二 05:37:39 UTC (3,942 KB)
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.SE
< 上一篇   |   下一篇 >
最新 | 近期 | 2026-07
切换浏览方式为:
cs
cs.CR
cs.LG

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站