mlsanityData to 14 Oct 2026

Model Editing for LLMs4Code: How Far are We?

arXiv 2411.06638 ↗First posted 11 Nov 2024cs.SE cs.CLcited by 10

Not on the map. Why?

Abstract (arXiv)

Large Language Models for Code (LLMs4Code) have been found to exhibit outstanding performance in the software engineering domain, especially the remarkable performance in coding tasks. However, even the most advanced LLMs4Code can inevitably contain incorrect or outdated code knowledge. Due to the high cost of training LLMs4Code, it is impractical to re-train the models for fixing these problematic code knowledge. Model editing is a new technical field for effectively and efficiently correcting erroneous knowledge in LLMs, where various model editing techniques and benchmarks have been proposed recently. Despite that, a comprehensive study that thoroughly compares and analyzes the performance of the state-of-the-art model editing techniques for adapting the knowledge within LLMs4Code across various code-related tasks is notably absent. To bridge this gap, we perform the first systematic study on applying state-of-the-art model editing approaches to repair the inaccuracy of LLMs4Code. To that end, we introduce a benchmark named CLMEEval, which consists of two datasets, i.e., CoNaLa-Edit (CNLE) with 21K+ code generation samples and CodeSearchNet-Edit (CSNE) with 16K+ code summarization samples. With the help of CLMEEval, we evaluate six advanced model editing techniques on three LLMs4Code: CodeLlama (7B), CodeQwen1.5 (7B), and Stable-Code (3B). Our findings include that the external memorization-based GRACE approach achieves the best knowledge editing effectiveness and specificity (the editing does not influence untargeted knowledge), while generalization (whether the editing can generalize to other semantically-identical inputs) is a universal challenge for existing techniques. Furthermore, building on in-depth case analysis, we introduce an enhanced version of GRACE called A-GRACE, which incorporates contrastive learning to better capture the semantics of the inputs.

Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Builds on 50 of its 72 references that are in the map. First posted on arXiv 11 Nov 2024.

Builds on

50 of 72 references.

References · 50

  1. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
  4. 2023Qwen Technical Reportcited by 3,344
  5. 2020Supervised Contrastive Learningcited by 2,829
  6. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  7. 2023A Survey of Large Language Modelscited by 2,576
  8. 2022Emergent Abilities of Large Language Modelscited by 2,512
  9. 2023A Survey on Large Language Model based Autonomous Agentscited by 2,242
  10. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  11. 2022Survey of Hallucination in Natural Language Generationcited by 2,075
  12. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
38 more
  1. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  2. 2023A Survey on Evaluation of Large Language Modelscited by 1,242
  3. 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,135
  4. 2022Mass-Editing Memory in a Transformercited by 1,001
  5. 2024A Survey on Large Language Models for Code Generationcited by 658
  6. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  7. 2021Fast Model Editing at Scalecited by 498
  8. 2023Editing Large Language Models: Problems, Methods, and Opportunitiescited by 372
  9. 2022A Systematic Evaluation of Large Language Models of Codecited by 363
  10. 2023MQuAKE: Assessing Knowledge Editing in Language Models via Multi-Hop Questionscited by 300
  11. 2022Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptorscited by 271
  12. 2023Evaluating the Ripple Effects of Knowledge Editing in Language Modelscited by 242
  13. 2020Modifying Memories in Transformer Modelscited by 224
  14. 2023Knowledge Editing for Large Language Models: A Surveycited by 194
  15. 2023PMET: Precise Model Editing in a Transformercited by 173
  16. 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
  17. 2024A Comprehensive Study of Knowledge Editing for Large Language Modelscited by 163
  18. 2023CodeBERTScore: Evaluating Code Generation with Pretrained Models of Codecited by 102
  19. 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 100
  20. 2023EasyEdit: An Easy-to-use Knowledge Editing Framework for Large Language Modelscited by 98
  21. 2022Natural Attack for Pre-trained Models of Codecited by 75
  22. 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 72
  23. 2023Massive Editing for Large Language Models via Meta Learningcited by 63
  24. 2024Arctic-Embed: Scalable, Efficient, and Accurate Text Embedding Modelscited by 61
  25. 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 60
  26. 2024What's Wrong with Your Code Generated by Large Language Models? An Extensive Studycited by 53
  27. 2023Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Studycited by 44
  28. 2023Unveiling the Pitfalls of Knowledge Editing for Large Language Modelscited by 43
  29. 2023How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent Advancescited by 33
  30. 2022On the Importance of Building High-quality Training Datasets for Neural Code Searchcited by 30
  31. 2024MIKE: A New Benchmark for Fine-grained Multimodal Entity Knowledge Editingcited by 25
  32. 2021Project-Level Encoding for Neural Source Code Summarization of Subroutinescited by 24
  33. 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 22
  34. 2023DUnE: Dataset for Unified Editingcited by 19
  35. 2024CodeUpdateArena: Benchmarking Knowledge Editing on API Updatescited by 19
  36. 2023CCT5: A Code-Change-Oriented Pre-Trained Modelcited by 18
  37. 2024Compositional API Recommendation for Library-Oriented Code Generationcited by 10
  38. 2024SWEA: Updating Factual Knowledge in Large Language Models via Subject Word Embedding Alteringcited by 7

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 1; 2025: 6; 2026: 3.

10 papers.