mlsanityData to 7 Oct 2026

To Diff or Not to Diff? Structure-Aware and Adaptive Output Formats for Efficient LLM-based Code Editing

arXiv 2604.27296 ↗First posted 30 Apr 2026cs.SE cs.CLcited by 2

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) are increasingly used for code editing, yet the prevalent full-code generation paradigm suffers from severe efficiency bottlenecks, posing challenges for interactive coding assistants that demand low latency and cost. Despite the predominant focus on scaling model capabilities, the edit format itself has been largely overlooked in model training. In this paper, we begin with a systematic study of conventional diff formats and reveal that fragile offsets and fragmented hunks make generation highly unnatural for LLMs. To address it, we introduce BlockDiff and FuncDiff, two structure-aware diff formats that represent changes as block-level rewrites of syntactically coherent units such as control structures and functions. Furthermore, we propose AdaEdit, a general adaptive edit strategy that trains LLMs to dynamically choose the most token-efficient format between a given diff format and full code. Extensive experiments demonstrate that AdaEdit paired with structure-aware diff formats consistently matches the accuracy of full-code generation, while reducing both latency and cost by over 30% on long-code editing tasks.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 28 of its 57 references that are in the map. First posted on arXiv 30 Apr 2026.

Builds on

28 of 57 references.

References · 28

  1. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  4. 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 3,655
  5. 2021Program Synthesis with Large Language Modelscited by 3,509
  6. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  7. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
  8. 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,278
  9. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  10. 2023Teaching Large Language Models to Self-Debugcited by 963
  11. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  12. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
16 more
  1. 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 216
  2. 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 150
  3. 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 139
  4. 2021Sequence Parallelism: Long Sequence Training from System Perspectivecited by 125
  5. 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
  6. 2023Studying the effect of AI Code Generators on Supporting Novice Learners in Introductory Programmingcited by 87
  7. 2022Repair Is Nearly Generation: Multilingual Program Repair with LLMscited by 68
  8. 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvementcited by 57
  9. 2022CodeFill: Multi-token Code Completion by Jointly Learning from Structure and Naming Sequencescited by 49
  10. 2023Can It Edit? Evaluating the Ability of Large Language Models to Follow Code Editing Instructionscited by 46
  11. 2022CoditT5: Pretraining for Source Code and Natural Language Editingcited by 45
  12. 2023InstructCoder: Instruction Tuning Large Language Models for Code Editingcited by 28
  13. 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctnesscited by 23
  14. 2024A Pair Programming Framework for Code Generation via Multi-Plan Exploration and Feedback-Driven Refinementcited by 21
  15. 2024Exploring the Capabilities of LLMs for Code Change Related Taskscited by 18
  16. 2025Generating High-Quality Datasets for Code Editing via Open-Source Language Modelscited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 2.

2 papers.