Research map / Large language models / Instruction and fine-tuning
NextCoder: Robust Adaptation of Code LMs to Diverse Code Edits
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.
Builds a multi-stage synthetic code-edit data pipeline (127K examples) and SeleKT, a sparse-projection adaptation method, to produce NextCoder code-editing models that retain code generation ability.
Problem
Code LMs struggle with diverse natural-language-driven code edits, and naive fine-tuning on code-edit data causes catastrophic forgetting of code generation and general abilities.
Approach
Periodically select the top-k parameters by magnitude of the task vector (relative to the fixed base model) after dense full fine-tuning, projecting back to a sparse update, instead of fixing the trainable parameters a priori as in PEFT methods.
Key results
- NextCoder-7B (QwenCoder-2.5-7B + SeleKT) reaches 46.1 on CanItEdit and 65.3 on Aider vs 39.3 and 58.7 for the base QwenCoder-2.5-7B, and outperforms DeepSeekCoder-V2-16B on all listed tasks.
- NextCoder-32B scores 74.7% on Aider and 23.6% on Aider Polyglot, versus 18.2% for GPT-4o on Aider Polyglot.
- On HumanEval+/MBPP+, SeleKT keeps QwenCoder-2.5-7B at 84.8/72.0 vs SFT 79.3/67.2 and LoRA 81.7/70.9.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Apply SeleKT fine-tuning | QwenCoder-2.5-7B · CanItEdit | accuracy (%): 39.3 -> 50.5 | Helped |
| Apply SeleKT fine-tuning | DeepSeekCoder-6.7B · CanItEdit | accuracy (%): 35.3 -> 40.0 | Helped |
| Fine-tune on synthetic code-editing data instead of CommitPackFT | DeepSeekCoder-6.7B · Aider | accuracy (%): 21.1 -> 33.8 | Helped |
| Use SeleKT instead of SFT | QwenCoder-2.5-7B · HumanEval+ | accuracy (%): 79.3 -> 84.8 | Helped |
| Use SeleKT instead of SFT | QwenCoder-2.5-7B · CanItEdit | accuracy (%): 30.6 -> 50.5 | Helped |
| Fine-tune using SeleKT | QwenCoder-2.5-32B · HumanEvalFix | accuracy (%): 90.2 -> 88.9 | Hurt |
| Fine-tune using SeleKT | QwenCoder-2.5-32B · GSM8K | accuracy (%): 93.71 -> 92.65 | Hurt |
| Fine-tune using SeleKT | QwenCoder-2.5-32B · MMLU | accuracy (%): 71.9 -> 72.7 | Helped |
| Use sparsity α=0.05 instead of α=0.2 (ablation) | SeleKT on QwenCoder-2.5-7B · CanItEdit | accuracy (%): 45.7 -> 50.5 | Helped |
| Use sparsity α=0.05 instead of α=0.5 (ablation) | SeleKT on QwenCoder-2.5-7B · Aider | accuracy (%): 54.9 -> 65.7 | Helped |
| Periodically update the base model after projection (ablation) | SeleKT on QwenCoder-2.5-7B · Aider | accuracy (%): 65.7 -> 55.6 | Hurt |
Surprising findings
- Periodically updating the base model during SeleKT (Update θbase variant) performs worse than fixing the base model, contrary to a plausible incremental scheme.
- Standard SFT on code-edit data frequently underperforms the original instruct model on code-editing benchmarks, indicating overfitting.
Limitations
- Dense gradient computation during SeleKT is more costly than parameter-efficient methods.
- Evaluation restricted to code-editing tasks; generality to math or natural language tasks is untested beyond GSM8K/MMLU checks.
- Lower scores on Aider Polyglot show multi-language editing remains difficult.
Experimental setup
Datasets: CommitPackFT StarCoder seed code synthetic code-edit data (GPT-4o and Llama-3.3-70B generated) HumanEvalFix CanItEdit NoFunEval Aider Aider Polyglot HumanEval+ MBPP+ GSM8K MMLU
Benchmarks: CanItEdit HumanEvalFix NoFunEval Aider Aider Polyglot HumanEval+ MBPP+ GSM8K MMLU
Metrics: execution accuracy accuracy NoFunEval score (static analysis, runtime, DiffBLEU)
Baselines: GPT-4o Llama-3-70B-Instruct DeepSeekCoder-33B DeepSeekCoder-V2-16B QwenCoder-2.5-32B LoRA TIES SFT DeepSeek-R1-Qwen-7B Llama-3-8B-Instruct
Builds on: LoRA TIES merging OSS-Instruct CommitPackFT robust fine-tuning (WiSE-FT)
Closest papers by meaning
- Training Language Models on Synthetic Edit Sequences Improves Code Synthesis (ICLR 2025 · similarity 0.91)
- InverseCoder: Self-improving Instruction-Tuned Code LLMs with Inverse-Instruct (AAAI 2025 · similarity 0.88)
- EditLord: Learning Code Transformation Rules for Code Editing (ICML 2025 · similarity 0.88)
- Uncovering LLM-Generated Code: A Zero-Shot Synthetic Code Detector via Code Rewriting (AAAI 2025 · similarity 0.88)
- LLM-Assisted Code Cleaning For Training Accurate Code Generators (ICLR 2024 · similarity 0.87)
- CodeSync: Synchronizing Large Language Models with Dynamic Code Evolution at Scale (ICML 2025 · similarity 0.87)
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.
