CREME: Robustness Enhancement of Code LLMs via Layer-Aware Model Editing
Not on the map. Why?
Abstract (arXiv)
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 (Code 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.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). First posted on arXiv 22 Jul 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 1; 2026: 4.
5 papers.
- 2026Minimal Prompt Perturbations Lead to Code Vulnerabilities: Prompt Fragility and Hidden-State Signals in Coding LLMscited by 2
- 2025Understanding Robustness of Model Editing in Code LLMscited by 1
- 2026MAP: A Benchmark on Multimodal Accessibility Planning for Real World Placescited by 0
- 2026Prompt-Robust Language Models: Which Training Strategies Work?cited by 0
- 2026Noisy Test-Time Reinforcement Learning for Code LLMscited by 0
- 2026Noisy Test-Time Reinforcement Learning for Code LLMs26 Sep 2026
- 2026Prompt-Robust Language Models: Which Training Strategies Work?1 Sep 2026
- 2026MAP: A Benchmark on Multimodal Accessibility Planning for Real World Places28 Aug 2026
- 2026Minimal Prompt Perturbations Lead to Code Vulnerabilities: Prompt Fragility and Hidden-State Signals in Coding LLMs28 May 2026
- 2025Understanding Robustness of Model Editing in Code LLMs5 Nov 2025