paperbot · PL 论文追踪

全部论文 待读 收藏

P2 CREME: Robustness Enhancement of Code LLMs via Layer-Aware Model Editing

CREME:通过层感知模型编辑增强代码大语言模型的鲁棒性
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 1/10 · 论文目标是提升代码 LLM 对提示扰动的鲁棒性,属于以 LLM 本身为研究目标,而非将静态分析应用于 ML/Agent 程序、用 LLM 改进静态分析/形式化验证,或浮点/贝叶斯程序分析与 LLM 的交叉,与画像核心方向不符。引用 6 inbox
Shuhan Liu, Xing Hu, Kerui Huang, Xiaohu Yang, David Lo, Xin Xia
crossref: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 CREME,定位鲁棒性敏感层并做轻量参数编辑,显著提升代码 LLM 对提示扰动的鲁棒性。

论文关注代码大语言模型对提示扰动高度敏感的问题:措辞、语法或格式的微小改动即可显著降低生成代码的功能正确性。为提升实际场景下的可靠性,作者提出 CREME(CodeLLM Robustness Enhancement via Model Editing),通过对比原始提示与扰动提示的隐藏状态来识别对鲁棒性敏感的层,随后在定位到的层上进行轻量级参数编辑,以缓解性能退化。实验在 HumanEval 与 MBPP 及其扰动版本上评估,结果显示 CREME 在扰动提示上将 Pass@1 准确率提升 63%,同时在干净输入上保持稳定,准确率偏差在 ±1% 以内。进一步分析表明,鲁棒性敏感层主要集中于网络的中层与深层,且其位置随模型架构不同而变化,为后续面向鲁棒性的编辑策略提供了依据。

问题
代码大语言模型对提示扰动高度敏感,措辞、语法或格式的微小改动会显著降低生成代码的功能正确性,影响实际部署的可靠性。
方法
CREME 通过比较原始提示与扰动变体的隐藏状态来定位鲁棒性敏感层,并在这些层上执行轻量级参数编辑,以减少扰动带来的性能退化。
评估
在 HumanEval 和 MBPP 及其扰动版本上评估 Pass@1 准确率,并分析鲁棒性敏感层在网络中的分布。
原文摘要(Abstract)

Large language models (LLMs) have demonstrated impressive capabilities in code generation, where the natural language prompt plays a crucial role in conveying user intent to the model. However, prior studies have shown that LLMs are highly sensitive to prompt perturbations. Minor modifications in wording, syntax, or formatting can significantly reduce the functional correctness of generated code. As perturbations frequently occur in real-world scenarios, improving the robustness of LLMs to prompt perturbations is essential for ensuring reliable performance in practical code generation. In this paper, we introduce CREME (CodeLLM Robustness Enhancement via Model Editing), a novel approach that enhances LLM robustness through targeted parameter updates. CREME first identifies robustness-sensitive layers by comparing hidden states between an original prompt and its perturbed variant. Then, it performs lightweight parameter editing at the identified layer to reduce performance degradation. We evaluate CREME on two widely used code generation benchmarks (HumanEval and MBPP) along with their perturbed counterparts. Experimental results show that CREME improves Pass@1 accuracy by 63% on perturbed prompts while maintaining stable performance on clean inputs, with accuracy deviations within ± 1%. Further analysis reveals that robustness-sensitive layers are primarily concentrated in the middle and deeper layers of the network, and their locations vary across different model architectures. These insights provide a valuable foundation for developing future robustness-oriented editing strategies.

链接与引用

DOI 原文 · arXiv ·

BibTeX
@inproceedings{paperbot11651,
  title = {CREME: Robustness Enhancement of Code LLMs via Layer-Aware Model Editing},
  author = {Shuhan Liu and Xing Hu and Kerui Huang and Xiaohu Yang and David Lo and Xin Xia},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3773111}
}