Manuscript Offprint

arXiv:2610.34310

Birth, Death and Diff: Insertion-Based Sequence Generation with Corrections

Durga Prasad Maram, Dhruvesh Patel, Tahira Naseem, Benjamin Rozonoyer, Gaurav Pandey, Ramón Fernandez Astudillo, Andrew McCallum

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Insertion-based masked diffusion models enable flexible-length, parallel generation by interleaving mask insertion with token unmasking. However, because their generation decisions are irreversible, aggressive parallel decoding can introduce errors that subsequent steps cannot correct, necessitating conservative decoding with more forward passes (NFEs). Moreover, they exhibit higher entropy than standard MDMs because they marginalize over multiple alignments during training and therefore require even more conservative decoding in the absence of a correction mechanism. To address this limitation, we introduce δMDM, which makes intermediate generations revisable by equipping an insertion-based model with substitution and deletion operations. During training, we expose the model to errors caused by aggressive unmasking and insertion, teaching it to correct its own mistakes. At inference time, we interleave insertion and unmasking with correction steps that can revise previously unmasked tokens and remove unnecessary masks. This mechanism makes aggressive decoding practical, improving both generation speed and quality. δMDM Pareto-dominates FlexMDM, a vanilla insertion-based MDM, on the speed–quality trade-off. On high-diversity unconditional text generation on OpenWebText, it halves the generative perplexity relative to FlexMDM at the highest inference budget. It also achieves lower generative perplexity at all inference budgets compared to MDM trained from scratch with variable-length padded sequences. On low-diversity conditional text generation on TinyGSM, it matches FlexMDM accuracy with half as many NFEs.

1 INTRODUCTION

Non-autoregressive language models such as Masked Diffusion Models (MDMs) (Sahoo et al., 2024; Shi et al., 2024; Nie et al., 2025) provide speedups over autoregressive models (ARMs) by producing more tokens per forward pass. However, because they use absolute positions, the masked positions far from the context have high positional uncertainty, i.e., the model may know what to say but not where to place it (Patel et al., 2025b; Kim et al., 2026b). This forces MDMs to generate in a block-wise left-to-right manner, thereby limiting their parallelism (Nie et al., 2025). Insertion-based Masked Diffusion Models such as FlexMDM (Kim et al., 2025a) grow the sequence incrementally by inserting new [MASK] tokens and unmasking any existing [MASK] tokens simultaneously. This allows the model to draft by placing important tokens at their approximate positions, since later insertions can fill intermediate positions. However, insertion-based models are also prone to dependency errors under parallel decoding, and they have no mechanism to update positions that have already been unmasked, i.e., they have the irreversible generation problem. Furthermore, when trained with simple denoising objectives, insertion-based models average over possible alignments. This converts positional uncertainty into token uncertainty, i.e., each insertion location may correspond to several possible target tokens, producing a diffuse predictive distribution over the vocabulary. For instance, in the sentence “Your lazy dog jumped over the black box.”, an intermediate state “Your [MASK] black.” forces the [MASK] to distribute probability over all eligible target tokens, such as lazy, dog, and jumped, thereby inflating the predictive entropy. We call this the multiple alignments problem. As

∗^{*}Equal contribution.

Figure

Figure 1: Overview of the δMDM generation process. The plots on the right show GSM8K code-execution accuracy and OpenWebText generative perplexity versus the sampling budget. Numeric annotations on the OpenWebText plot are token-entropy values.

a result, confidence-based decoding must stay conservative to avoid errors, sacrificing the speedup of parallel decoding. One way to combat this is to use a non-uniform distribution over alignments during training or, equivalently, learn the unmasking order of the target positions using variational learning, which tightens the ELBO (Patel et al., 2026b; Zhang et al., 2026). However, this requires an additional model and can be slow to train as the models get larger.

We take an alternative approach and introduce δ\deltaMDM (Delta MDM), a time-blind insertion-based masked diffusion model that learns to revise its own generations. The name δ\deltaMDM emphasizes that the model can change both the length (increase or decrease) and the content of a partially generated sequence. Its generation process combines insertion (birth), deletion (death), and token substitution (diff). Deletion removes excess mask tokens, while substitutions are performed using token-to-token transitions. The supervision for these operations is derived by forcing the model to predict aggressively to form a state with potential mistakes and then feeding it back to the model to correct the wrong predictions (Figure 1). At inference time, we interleave the prediction (insertion and unmasking) and correction (deletion and substitution) steps. The knowledge that corrections can fix mistakes in subsequent steps and the model's time-blindness allow aggressive drafting in the prediction step, thereby improving both the speed and the quality of generation.

We perform a comprehensive evaluation comparing δ\deltaMDM with FlexMDM, which does not have a correction mechanism. On the synthetic planning task with controlled complexity, δ\deltaMDM achieves a 10×10\times improvement over FlexMDM in the hardest setting (Appendix C.1). On high-diversity unconditional text generation on OpenWebText, with matched training and inference compute δ\deltaMDM Pareto-dominates FlexMDM in terms of both speed and quality. Moreover, δ\deltaMDM keeps improving as the inference budget grows: at 1024 steps it halves the generative perplexity of FlexMDM and reduces that of MDM by 47%, and with only 128 steps it already outperforms both baselines at 1024 steps. At the other extreme, on low-diversity code-based reasoning on TinyGSM, δ\deltaMDM matches FlexMDM's accuracy with half as many NFEs.

We summarize the key contributions of this work below:

• We introduce a novel self-correction framework for insertion-based masked diffusion models, which is simple and fast to train and requires no auxiliary model.

• We conduct a comprehensive evaluation of δ\deltaMDM across three types of tasks: controlled-complexity synthetic planning, high-diversity unconditional text generation, and low-diversity reasoning via code generation, and find that δ\deltaMDM Pareto-dominates FlexMDM on the speed-quality trade-off, while also demonstrating superior inference-time scaling for unconditional generation.

• We present ablations demonstrating the importance of our design choices and provide qualitative insights into the behavior of δ\deltaMDM during generation.

References (30)