atlas

Research map / Large language models / Agents, code and math

EditLord: Learning Code Transformation Rules for Code Editing

ICML 2025 · Large language models › Agents, code and math · approach: Neural program synthesis and transpilation · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes EditLord, which uses an LM to induce a concise meta-rule set of explicit code transformation rules and functional specifications from training code pairs, then finetunes code LMs to output rules and specs before the edited code.

Problem

Code editing is typically learned as an implicit end-to-end mapping via finetuning, which decouples poorly from modular, reusable editing steps and leads to suboptimal performance, weak robustness, and poor generalization.

Approach

An LM acts as an inductive learner that extracts natural-language "switch from X to Y" editing rules from training pairs, refines them via ADD/MERGE/PRUNE operations into a concise meta-rule set, and augments each training sample with per-sample rules and functional specifications so the model predicts specs and rules before the edited code.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use EditLord instead of finetuningDeepSeek-Coder 1.3B · Performance optimization (HQ test)OPT@8: 47.5 -> 53.1Helped
Use EditLord instead of finetuningDeepSeek-Coder 1.3B · Decompilation (HumanEval-Decompile)Readability char: 36.6 -> 44.0Helped
Use EditLord instead of finetuningDeepSeek-Coder 1.3B · Security hardening (CWEval)Correct & Security@10: 13.8 -> 18.7Helped
Add functional specification learning only (ablation)Finetuned DeepSeek-Coder 1.3B · Performance optimization (HQ test)OPT@8: 47.5 -> 49.2Helped
Add editing-rule learning only (ablation)Finetuned DeepSeek-Coder 1.3B · Performance optimization (HQ test)OPT@8: 47.5 -> 51.9Helped
Add functional specification learning only (ablation)Finetuned DeepSeek-Coder 1.3B · Performance optimization (HQ test)Correct@8: 67.5 -> 73.4Helped
Add editing-rule learning only (ablation)Finetuned DeepSeek-Coder 1.3B · Performance optimization (HQ test)Correct@8: 67.5 -> 70.0Helped
Add functional specification learning only (ablation)Finetuned DeepSeek-Coder 1.3B · Decompilation (HumanEval-Decompile)Readability char: 36.6 -> 38.9Helped
Add editing-rule learning only (ablation)Finetuned DeepSeek-Coder 1.3B · Decompilation (HumanEval-Decompile)Correctness: 38.9 -> 29.8Hurt
Add functional specification learning only (ablation)Finetuned DeepSeek-Coder 1.3B · Security hardening (CWEval)Correct & Security@10: 13.8 -> 15.8Helped
Add editing-rule learning only (ablation)Finetuned DeepSeek-Coder 1.3B · Security hardening (CWEval)Correct & Security@10: 13.8 -> 17.5Helped
Combine functional specifications and editing rules (ablation)Finetuned DeepSeek-Coder 1.3B · Decompilation (HumanEval-Decompile)Compilability: 77.1 -> 93.1Helped

Surprising findings

Limitations

Experimental setup

Datasets: HQ (performance optimization) AnghaBench HumanEval-Decompile SVEN CWEval CodeEditorBench

Benchmarks: HQ performance optimization test set HumanEval-Decompile CWEval CodeEditorBench Code Polish

Metrics: OPT@k Speedup@k Correct@k Compilability Correctness Readability (char/token/embedding) Security@k Correct & Security@k

Baselines: Prompt CoT Finetuned baseline (task-specific prior approaches)

Builds on: chain-of-thought prompting STaR-style bootstrapping of reasoning Ghidra

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy