A New Paradigm for Diffusion Language Models: LED Teaches Models to Insert and Delete

LED extends diffusion language model editing from replacement to insertion and deletion, enabling annotation-free self-correction.
The LED framework addresses ROE's difficulty with sequence-level misalignment by extending edit operations from replacement to insertion and deletion, forming Levenshtein-style refinement that allows dynamic sequence length changes. It uses LCS alignment to reconstruct insertion/deletion labels in real time without human annotation, and employs multi-stage training so the model learns to correct its own errors. On the 16B LLaDA2.1-Mini Base, the twelve-benchmark average rises from 54.86 to 57.10 with confidence-guided decoding and from 27.52 to 47.19 without it; pass@k at large k and robustness at block size 128 also improve.
Diffusion Language Models (DLMs) offer a flexible path for generation tasks that differs from autoregressive models, thanks to their ability to fill in text in arbitrary order. However, most existing decoding methods treat already-generated tokens as fixed—and even when modification is allowed, it is limited to substitution operations. A recent paper proposes the LED framework, which extends editing capabilities from "replacement" to "insertion" and "deletion," enabling the model to perform Levenshtein-style refinement during generation that more closely resembles how humans revise text.

The Limitations of Replacement-Only Editing and LED's Breakthrough
The paper refers to the current mainstream approach as "Replacement-Only Editing" (ROE). Although ROE can correct errors in individual tokens, it struggles with sequence-level misalignment—such as a missing word or an extra word. When errors are scattered across multiple positions, pure replacement is also inefficient.
The core idea of LED is to introduce insertion and deletion operations, allowing the model to adjust generation results much like editing a string. This Levenshtein-style editing permits sequence length to change, thereby repairing missing or redundant content more naturally.
Levenshtein distance (edit distance) is the standard metric for measuring the difference between two strings, defined as the minimum number of single-character edit operations required to transform one string into another, where the permitted operations include insertion, deletion, and substitution. It is a classic measure in the fields of string editing and spelling correction. The LED framework invokes this concept to illustrate that its set of edit operations (insertion, deletion, substitution) is isomorphic to the operation set of Levenshtein distance: the model is no longer constrained to equal-length replacement but can change sequence length through insertions and deletions, thereby repairing sequence-level misalignment with fewer editing steps.
Edit Supervision Without Human Annotation
Training a model to learn insertion and deletion is no easy task, since such edits lack ready-made annotated data. LED adopts a clever self-supervised strategy: during the supervised fine-tuning stage, it uses Longest Common Subsequence (LCS) alignment to reconstruct edit supervision signals in real time.
Specifically, after the model-generated sequence and the target sequence are aligned via LCS, the differing portions naturally correspond to insertion or deletion operations. In this way, without human annotation, the model can learn from the alignment results when to add and when to delete.
Longest Common Subsequence (LCS) refers to the longest subsequence that appears in both sequences while preserving relative order, but is not required to be contiguous. After performing LCS alignment on two pieces of text, the unmatched segments can be divided into three categories: tokens that appear only in the generated sequence correspond to deletion, tokens that appear only in the target sequence correspond to insertion, and different tokens at the same position correspond to substitution. Since LCS alignment is computed entirely by an algorithm at runtime, LED can generate dynamic, precise edit supervision signals for each step without pre-constructing insertion/deletion labels—this is precisely the key to making its self-supervised training viable.
Multi-Stage Training: Letting the Model Face Its Own Mistakes
LED also introduces a multi-stage training design. The model state at each stage becomes the input for the next stage, meaning the model is exposed to errors it previously produced and learns how to correct them. This "self-correction" training approach bears some resemblance to how humans improve their writing quality through repeated revision.
The paper validates LED on the 16B-parameter LLaDA2.1-Mini Base model. Under confidence-guided decoding, LED raises the average score across twelve benchmarks from 54.86 to 57.10, while increasing the number of tokens per forward pass from 6.14 to 7.05; under confidence-free decoding, the average score jumps substantially from 27.52 to 47.19.
LLaDA is an open-source series of work on diffusion language models, adopting a denoising-based generation paradigm different from text autoregressive models: starting from a masked or noisy sequence, it iteratively restores tokens at multiple positions in parallel rather than generating word by word strictly from left to right. LLaDA2.1-Mini Base is a base model with approximately 16B parameters in this series. LED chooses to conduct post-training validation on it, which means the method targets diffusion language models that possess strong foundational generation capabilities but are still constrained by ROE decoding strategies.
The Dual Benefits of Diversity and Robustness
Beyond the average score improvements, LED also exhibits two noteworthy characteristics. First, at larger values of k, LED's pass@k is higher than that of threshold decoding without editing, indicating improved generation diversity. This reveals the potential diversity advantage of DLMs when confidence guidance is absent.
Second, LED exhibits stronger robustness to larger block sizes. At a block size of 128, the average score rises from 36.97 to 51.34. Larger block sizes typically increase generation difficulty, but LED's editing capability helps the model maintain quality within larger blocks.
These results indicate that LED provides a more robust self-correction mechanism for diffusion language models. Extending edit operations from replacement to insertion and deletion not only compensates for ROE's shortcomings in sequence misalignment but also opens up a new design space for DLM decoding strategies.
pass@k measures the probability that at least one result among k samples is correct; the larger k is, the better it reflects the breadth of coverage of the model's generation distribution. The related confidence-guided decoding refers to determining the order of filling or retaining based on the model's confidence in the token at each position during diffusion decoding, which typically improves single-generation quality but may compress sampling diversity. That LED's pass@k surpasses threshold decoding without editing at larger k values shows that, after introducing insertion/deletion, the model does not converge to a few high-confidence solutions but retains a broader candidate space.
Significance for the Development of Diffusion Language Models
Diffusion language models have long been regarded as a strong complement to autoregressive models, especially in scenarios requiring arbitrary-order filling. The value of LED lies in the fact that it does not change the model architecture but instead endows the model with richer editing capabilities through a post-training framework. This approach has reference significance for plug-and-play improvements to existing DLMs.
Of course, LED has so far been validated only on specific models and benchmarks, and its generalization ability, training cost, and compatibility with different decoding strategies still require further exploration. But what is certain is that teaching the model to "insert, delete, and modify" rather than merely "modify" is a step toward more natural and more efficient text generation.
One-line Summary
LED extends diffusion language model editing from replacement to insertion and deletion, enabling annotation-free self-correction.
Paragraph Summary
The LED framework addresses the difficulty that "Replacement-Only Editing" (ROE) in diffusion language models has in handling sequence-level misalignment by extending edit operations from replacement to insertion and deletion, forming Levenshtein-style refinement that allows the generated sequence length to change dynamically. To obtain training supervision, LED uses longest common subsequence alignment between the generated sequence and the target sequence to reconstruct insertion/deletion labels in real time without human annotation; through multi-stage training, it also exposes the model to its own early errors and teaches it to correct them. On the 16B-parameter LLaDA2.1-Mini Base, under confidence-guided decoding the average score across twelve benchmarks rises from 54.86 to 57.10, and under confidence-free decoding it jumps substantially from 27.52 to 47.19; meanwhile, pass@k at large k values and robustness at block size 128 both improve.
Related articles

Michael Nielsen Takes Down His Classic Neural Network Textbook, Sparking Community Discussion
Michael Nielsen's classic free textbook Neural Networks and Deep Learning has been taken offline, sparking discussion on Hacker News about the reasons and impact.

Inside the AI Training Data Market: The Trade-off Between Exclusivity and Discounts
G2i founder Gabe Greenberg reveals the dual-track pricing of the AI training data market: labs pay a premium for exclusive data or accept discounts that allow others to buy it.

SessionGraph: Unifying All Coding Agent Sessions in One Interactive Graph
SessionGraph aggregates coding agent sessions into an interactive graph, helping developers review, debug, and manage AI coding workflows across sessions. This article examines its positioning, value, and open questions.