paper-with-me

홈 › Papers

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

2026-04-30 · Wei Cheng, Yongchang Cao, Chen Shen, Binhua Li, Jue Chen, Yongbin Li, Wei Hu 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.

📄 PDF Abstract BibTeX arXiv:2604.27296

Code (0)

등록된 구현이 없습니다.

Tasks

Code Generation

Similar Papers 제목 키워드 기반

A Structure-aware and Motion-adaptive Framework for 3D Human Pose Estimation with Mamba

2025-07-26 · Ye Lu, Jie Wang, Jianjun Gao, Rui Gong 외 arxiv

Recent Mamba-based methods for the pose-lifting task tend to model joint dependencies by 2D-to-1D mapping with diverse scanning strategies. Though effective, they struggle to model intricate joint connections and uniform…

3D Human Pose Estimation

Layer Decomposition Learning Based on Gaussian Convolution Model and Residual Deblurring for Inverse Halftoning

2020-12-27 · Chang-Hwan Son

Layer decomposition to separate an input image into base and detail layers has been steadily used for image restoration. Existing residual networks based on an additive model require residual layers with a small output r…

DeblurringImage Restoration

Unveiling the Potential of Diffusion Large Language Model in Controllable Generation

2025-07-06 · Zhen Xiong, Yujun Cai, Zhecheng Li, Yiwei Wang arxiv

Controllable generation is a fundamental task in NLP with many applications, providing a basis for function calling to agentic communication. However, even state-of-the-art autoregressive Large Language Models (LLMs) tod…

ASTormer: An AST Structure-aware Transformer Decoder for Text-to-SQL

2023-10-28 · Ruisheng Cao, Hanchong Zhang, Hongshen Xu, Jieyu Li 외

Text-to-SQL aims to generate an executable SQL program given the user utterance and the corresponding database schema. To ensure the well-formedness of output SQLs, one prominent approach adopts a grammar-based recurrent…

DecoderText to SQLText-To-SQL

Degradation-Aware Adaptive Context Gating for Unified Image Restoration

2026-05-02 · Lei He, Jielei Chu, Fengmao Lv, Weide Liu 외 arxiv

Unified image restoration using a single model often faces task interference due to diverse degradations. To address this, we propose DACG-IR (Degradation-Aware Adaptive Context Gating), which enables explicit perception…

Unified Image Restoration