TL;DR
This paper introduces Deletion-Insertion Diffusion (DID) language models, a new paradigm that replaces the traditional "masking" process in diffusion models with a rigorous deletion-insertion framework. By eliminating the need for non-informative <MASK> and <PAD> tokens, DID achieves up to a 3.4x training speedup and 3.8x inference speedup while natively supporting variable-length generation and dynamic self-correction.
What Problem Does This Paper Address?
Most current Diffusion Language Models (DLMs) rely on a Masked Diffusion (MDLM) paradigm. In this setup, a forward process gradually turns text into a sequence of <MASK> tokens, and a backward process learns to "unmask" them.
However, this approach introduces two major inefficiencies:
- Computational Waste: Models spend roughly half their FLOPs processing
<MASK>tokens that carry no information. Furthermore, to handle variable-length text, they must use<PAD>tokens, meaning generating a short sentence costs as much compute as a long one. - Rigid Structure: Once a token is unmasked in an MDLM, its position is fixed. If the model makes an early mistake, it cannot easily shift tokens to fix the sentence structure, leading to error accumulation similar to autoregressive models.
The authors propose DID to move "beyond masks," creating a model that is both more efficient and more flexible by treating text generation as a process of iterative insertion.
Methods
The core of DID is a reformulation of the diffusion process:
- Forward Process (Deletion): Instead of masking, tokens are progressively deleted from the sequence until it is empty. This is modeled as a Continuous-Time Markov Chain (CTMC) where each token has an independent probability of being removed.
- Backward Process (Insertion): The model learns to reverse the deletion by starting from an empty sequence (or a
<BOS>token) and iteratively inserting tokens at specific positions until the full sequence is reconstructed.
Technical Innovations
- Insertion Score: The authors define a score-based approach that assigns a probability to every possible insertion action (which token to put at which position).
- DISE & DICE Objectives: They derive the Denoising Insertion Score Entropy (DISE) objective, a likelihood-bounded training target. For fixed-length settings, this simplifies into DICE, a weighted cross-entropy loss.
- Parallelized Dynamic Programming: To calculate the training targets, the model must solve a "subsequence counting" problem (how many ways can sequence $A$ be a subsequence of $B$?). The authors developed a parallelized DP algorithm that reduces the complexity from $O(mn^2V)$ to a manageable $O(mn)$, making training practical.
Key Insights and Ideas
- Efficiency through Absence: By simply not having
<MASK>or<PAD>tokens in the input, the model naturally focuses its computation only on the actual content. This "FLOPs-alignment" allows DID to outperform MDLMs even when trained for the same amount of wall-clock time. - Relative vs. Absolute Position: Because DID inserts tokens between existing ones, it learns relative order rather than absolute positions. This allows for an intrinsic self-correction mechanism: if the model generates an imperfect sentence structure early on, it can "push" tokens aside by inserting new ones in the middle.
- Content-Aware Decoding: Unlike standard masked models that unmask positions based on a random noise schedule, DID learns where it is most confident to insert based on the existing context.
- Length Consistency: DID is significantly better at matching the true length distribution of the training data. Masked models often struggle with this because they are forced into a fixed-length "canvas."
Key Results
DID was evaluated across several settings, including fixed-length modeling (OpenWebText), variable-length modeling (Stories), and scalability tests (a 1.1B parameter model trained on SlimPajama).
- Speed: DID accelerated training by up to 1.99x in fixed-length settings and 3.42x in variable-length settings. Inference speed saw similar gains, reaching up to 3.79x faster than MDLM baselines.
- Performance: When matched for computational budget (FLOPs-aligned), DID consistently achieved lower perplexity than state-of-the-art MDLMs like RADD across all evaluated datasets.
- Reasoning: The 1.1B DID model outperformed the padding-based SMDM approach on the GSM8K math benchmark, demonstrating that the insertion paradigm scales well to complex reasoning tasks.
- Sampling Quality: Qualitative examples show that DID produces more coherent and diverse text with fewer denoising steps compared to previous insertion-based or masked models.
Limitations and Future Work
- Scale: While the authors scaled to 1.1B parameters, this is still small compared to modern LLMs. Future work is needed to see if these advantages hold at the 10B+ or 100B+ scale.
- Optimization Integration: The current framework hasn't yet integrated advanced inference techniques common in other fields, such as KV caching or hybrid autoregressive-diffusion architectures.
- DP Overhead: Although the parallelized DP is efficient, it still introduces a constant computational overhead that could be further optimized at the system level.
Summary updated