ResearchTrend.AI
  • Papers
  • Communities
  • Events
  • Blog
  • Pricing
Papers
Communities
Social Events
Terms and Conditions
Pricing
Parameter LabParameter LabTwitterGitHubLinkedInBlueskyYoutube

© 2025 ResearchTrend.AI, All rights reserved.

  1. Home
  2. Papers
  3. 2504.15284
37
1
v1v2v3 (latest)

EditLord: Learning Code Transformation Rules for Code Editing

10 March 2025
Weichen Li
Albert Jan
Baishakhi Ray
Junfeng Yang
Chengzhi Mao
Kexin Pei
    KELM
ArXiv (abs)PDFHTML
Main:8 Pages
13 Figures
Bibliography:4 Pages
10 Tables
Appendix:16 Pages
Abstract

Code editing is a foundational task in software development, where its effectiveness depends on whether it introduces desired code property changes without changing the original code's intended functionality. Existing approaches often formulate code editing as an implicit end-to-end task, omitting the fact that code-editing procedures inherently consist of discrete and explicit steps. Thus, they suffer from suboptimal performance and lack of robustness and generalization. We introduce EditLord, a code editing framework that makes the code transformation steps explicit. Our key insight is to employ a language model (LM) as an inductive learner to extract code editing rules from the training code pairs as concise meta-rule sets. Such rule sets will be manifested for each training sample to augment them for finetuning or assist in prompting- and iterative-based code editing. EditLordoutperforms the state-of-the-art by an average of 22.7% in editing performance and 58.1% in robustness while achieving 20.2% higher functional correctness across critical software engineering and security applications, LM models, and editing modes.

View on arXiv
@article{li2025_2504.15284,
  title={ EditLord: Learning Code Transformation Rules for Code Editing },
  author={ Weichen Li and Albert Jan and Baishakhi Ray and Junfeng Yang and Chengzhi Mao and Kexin Pei },
  journal={arXiv preprint arXiv:2504.15284},
  year={ 2025 }
}
Comments on this paper