How Should Diffusion Language Models Edit Code?
Read the original on arXiv AI →The Flow has not summarised this story yet — read it at arXiv AI.
The Flow has not summarised this story yet — read it at arXiv AI.
DELA introduces a plug‑in framework for diffusion language models that enables explicit draft‑level editing using four actions: Insert, Delete, Remask, and Stop. The system separates high‑level edit control from token‑level generation by employing a frozen diffusion language model and a two‑phase decoding process that first drafts append‑only content and then refines the full draft. Training the controller through a staged curriculum and rollout‑based preferences yields up to 5.5 percentage‑point improvements on mathematical reasoning and code generation tasks compared to direct diffusion decoding.
The paper investigates whether the locate‑then‑edit approach for knowledge editing, previously applied only to autoregressive language models, can be transferred to masked diffusion models (MDMs). It finds that the optimal edit location—an early‑to‑mid‑layer MLP at the last subject token—remains the same for both model types, but that MDMs suffer a sharper decline in performance when editing longer, multi‑token facts. By incorporating intermediate partially‑unmasked states into the edit optimization, the authors restore multi‑token editing performance in MDMs.
The paper investigates weight‑space programming (WSP) for diffusion concept editing, where a language model generates executable weight updates that define training contexts, preservation constraints, and update directions. Experiments on 24 TIMED test edits for Stable Diffusion 1.4 show that the preregistered rewrite pipeline offers no advantage over a strong shared‑panel baseline, but exploratory one‑shot Astra programs improve fresh‑scene VLM joint success by +10.0 points, while CLIP relative match remains unchanged. Further probing and rewriting of Astra programs raises CLIP by +6.2 points but reduces joint success by -9.7, indicating that program construction and score‑guided revision should be treated as distinct stages in a WSP pipeline.
Diff Diffusion is a diffusion-inspired large language model framework designed for efficient code editing. It predicts edit paths from an original snippet to its revised form by representing denoising as structured edit operations, and uses multi-stage training and efficient parallel decoding to focus computation on changed regions. The approach matches or outperforms autoregressive baselines while achieving up to 2.78× faster inference and a 39.0% reduction in median model latency in production.
Weight-space programming (WSP) lets a language model construct executable weight updates for another network. We study diffusion concept editing through an interface in which programs define training...
arXiv:2407. 00740v2 Announce Type: replace-cross Abstract: As large language models (LLMs) are widely adopted in real-world applications, it has become critical to ensure LLMs satisfy safety constraints, such as non-toxicity and logical consistency, as well as task- and situation-specific constraints.