paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Repairing LLM Executions for Secure Automatic Programming

修复 LLM 执行以实现安全的自动编程
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 3/10 · 该论文聚焦于LLM自身机制可解释性与生成代码安全性修复,属于以LLM为研究目标的AI安全/可解释性工作;与用户核心关注的静态分析、形式化验证、浮点程序分析或贝叶斯程序分析均无直接交叉。虽涉及程序生成与安全,但方法不建立在程序分析或LLM辅助分析工具之上,因此匹配度较低。引用 1 inbox
Ali El Husseini, Yacine Izza, Blaise Genest, Abhik Roychoudhury
crossref: 2026-09-12

AI 速览

一句话:提出基于机制可解释性的方法,在推理时拦截并修改 LLM 中诱发漏洞的知识表示,提升生成代码安全性。

大型语言模型(LLM)在自动代码生成上进展显著,但常生成含安全漏洞的代码。现有微调与提示工程等改进手段效果有限,且难以揭示漏洞产生的内部机制。本文提出一种基于机制可解释性的方法:先分析 LLM 内部知识,识别并解耦与生成漏洞代码相关的知识表示;再在推理阶段实时修复模型执行——当模型试图访问这些诱发漏洞的表示时,拦截并修改该访问。作者称该方法能提升生成代码的安全性,但摘要未报告具体数据集、指标或对比结果。

问题
LLM 自动生成的代码常包含安全漏洞,而现有微调或提示工程方法提升安全性效果有限,且缺乏对漏洞生成内部机制的洞察。
方法
基于机制可解释性分析 LLM 内部知识,识别并解耦导致漏洞代码生成的知识表示;在推理时检测模型对漏洞诱发表示的访问并进行拦截和修改,从而实时修复模型执行。
评估
摘要未给出具体评估设置与结果;仅说明该实时干预可提升生成代码的安全性。
原文摘要(Abstract)

While automatic code generation using Large Language Models (LLMs) has advanced significantly, these models frequently produce code containing security vulnerabilities. Existing approaches to improve the security of automatically generated code, such as fine-tuning or prompt engineering, have shown limited success and provide minimal insight into the underlying mechanisms causing these vulnerabilities. We propose an approach grounded in mechanistic interpretability to analyze and mitigate vulnerable code generation in LLMs. We begin by examining the knowledge stored inside LLMs, identifying and disentangling knowledge representations that contribute to generating vulnerable code. Next, we leverage these insights to repair model execution in real time: when the model attempts to access vulnerability-inducing representations during inference, our method intercepts and modifies this access, improving the security of the generated code.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot11859,
  title = {Repairing LLM Executions for Secure Automatic Programming},
  author = {Ali El Husseini and Yacine Izza and Blaise Genest and Abhik Roychoudhury},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3773210}
}