Diff Diffusion: Predicting Edit Paths with Diffusion Models for Efficient Code Editing
Xiaolong Xu, Hao Jiang, Bo Jiang, Zhiwen Deng, Ningyuan Sun, Bingzhou Chen, Jin Chen, Chenxing Wei
ByteDance
Published October 13, 2026 · on the feed October 15, 2026 · ▲ 8 · arXiv 2610.17831
The abstract
Diffusion large language models (dLLMs) are appealing for code generation because they can update many tokens in parallel, yet many are optimized for sequence synthesis rather than edit prediction. This setting is poorly matched to modern AI-assisted IDEs, where edit prediction must infer the next code change from recent edits, the current file, and cursor-local context. Such changes are usually sparse and preserve most source tokens, so regenerating a full code segment wastes computation. We propose Diff Diffusion, a diffusion-inspired LLM framework for code editing that predicts edit paths from an original snippet to its revised form. Diff Diffusion represents denoising as structured edit operations, and combines this formulation with multi-stage training and efficient parallel decoding. By focusing computation on changed regions, Diff Diffusion supports accurate low-latency edits and multi-position parallel modification. Across public edit-completion benchmarks, edit-prediction evaluations, and online validation, Diff Diffusion matches or leads autoregressive baselines while delivering 2.78 times faster inference on public edit-completion benchmarks and a 39.0% P50 model-latency reduction in production. This work provides a new modeling perspective for AI applications that require high accuracy and low latency.
The Brief
2:14A short podcast summary of the paper. Written and voiced by AI.
Transcript
Diff Diffusion. Predicting Edit Paths with Diffusion Models for Efficient Code Editing. By Xiaolong Xu and seven others, from ByteDance. Published on the thirteenth of October. No code repository is linked to it.
Diffusion large language models are attractive for code because they can update many tokens in parallel. Yet many of them are optimized to synthesize a sequence, not to predict an edit. That is a poor match for a modern AI-assisted IDE, where the task is to infer the next change to the code from recent edits, the current file, and the context around the cursor. Those changes are usually sparse. They preserve most of the source tokens, so regenerating a whole code segment to make them wastes computation. A model that rewrites a full block to change one line is paying for every line it merely copied.
Diff Diffusion is a framework for code editing, inspired by diffusion, that predicts an edit path: the route from an original snippet to its revised form. The key reframing is that denoising is represented as structured edit operations, rather than as the regeneration of every token. The parallelism that makes diffusion models attractive is kept, but it is pointed at the change, not at the whole snippet.
That formulation is combined with multi-stage training and with efficient parallel decoding. Because computation is focused on the regions that change, the model can make accurate edits at low latency, and it can modify several positions in parallel. Those two properties are what an editor needs: a suggestion has to arrive quickly, and a single logical change often touches more than one place in a file.
Evaluation covers public edit-completion benchmarks, edit-prediction evaluations, and online validation. Across them, Diff Diffusion matches or leads autoregressive baselines. On the public edit-completion benchmarks its inference is two point seven eight times faster. In production, it reduces median model latency, the P50, by thirty-nine percent. The speed is reported alongside accuracy that holds level with the baselines, not in place of it.
The authors frame the contribution as a new modeling perspective for AI applications that need both high accuracy and low latency. Underneath that is a simple observation about the job itself. Most of a file does not change from one edit to the next, so a model that spends its effort only on the parts that do is doing less work for the same answer.
More with an account
Listen to every day’s papers
Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.
Join free