A Continuous Time Markov Chain Framework for Insertion Language Models

Dhruvesh Patel, Benjamin Rozonoyer, Soumitra Das, Tahira Naseem, Tim G. J. Rudner, Andrew McCallum

TL;DR

This paper introduces a principled, diffusion-based framework for Insertion Language Models (ILMs) by formulating sequence generation as a continuous-time Markov chain. This approach unifies existing ILM methods and offers greater flexibility in sampling, achieving competitive results on planning and language modeling tasks.

What Problem Does This Paper Address?

Traditional autoregressive language models generate text token by token from left to right. While effective, they can struggle with tasks requiring more flexible generation, such as planning or in-filling, where the order of token generation is not strictly sequential. Masked diffusion models offer more flexibility by allowing arbitrary order generation and multi-token predictions, but they often treat sequence length implicitly and can be ad-hoc. Existing Insertion Language Models (ILMs) aim to bridge this gap by allowing tokens to be inserted at arbitrary positions, but their training objectives and sampling procedures have historically been less principled. This paper addresses the need for a theoretically grounded and flexible framework for insertion-based language generation.

Methods

The core contribution is a novel framework that models the noising process (token deletion) as a continuous-time Markov chain (CTMC) on the space of variable-length sequences. The generative process (token insertion) is then derived as the time reversal of this CTMC. This principled approach leads to a diffusion-style denoising objective.

The authors propose two parameterizations for the generative process:

  1. Joint Insertion (DILM-S): This model predicts the length-to-go and a joint probability over insertion locations and vocabulary items.
  2. Independent Insertion (DILM-M): This model uses per-position insertion rates, allowing for more flexible multi-token insertions across different gaps simultaneously.

Both parameterizations are trained using an evidence lower bound (ELBO) objective derived from the CTMC framework. The sampling procedures are also derived from the CTMC, offering a principled way to generate sequences.

Datasets

  • Synthetic Planning Task (Star Graphs): Used to evaluate the benefits of insertion-based generation over left-to-right and masked diffusion models on tasks requiring flexible sequence generation.
  • LM1B (One Billion Word Benchmark): A corpus of short sequences used for language modeling evaluation.
  • OpenWebText: A larger corpus of longer sequences used for language modeling evaluation.

Key Insights and Ideas

  • Principled Framework for ILMs: By grounding ILMs in a CTMC, the authors provide a theoretically sound foundation, moving beyond ad-hoc methods. This allows for a unified view of existing ILM approaches.
  • Diffusion-Style Objective: The CTMC framework naturally leads to a diffusion-style denoising objective, which has proven successful in other generative modeling domains.
  • Flexibility in Sampling: The proposed framework offers greater flexibility in sampling compared to previous ILMs, particularly with the DILM-M variant that allows for multi-token insertions across gaps. This flexibility can lead to better trade-offs between sample quality and computational cost.
  • Separation of Concerns: The CTMC approach allows for a clearer separation between predicting tokens and deciding when to stop generation, which is a known challenge in insertion-based models.

Key Results

  • Planning Task: Both DILM-S and DILM-M achieved near-perfect accuracy on the synthetic star graph tasks, demonstrating their ability to handle variable-length planning problems effectively, matching the performance of existing ILMs.
  • Language Modeling (LM1B): DILM-S and DILM-M were competitive with existing ILMs and masked diffusion models, showing slightly better performance in some cases.
  • Language Modeling (OpenWebText): DILM-S and DILM-M achieved better NLL than ILM and MDM.
  • Sampling Flexibility: Figures 3 show that DILM-S and DILM-M offer a smoother trade-off between generative perplexity and the number of sampling steps, allowing for better control over generation quality.
  • Joint vs. Independent Noising: Figure 6 illustrates that joint Poisson noising leads to additive shrinkage and can generate shorter sequences, while independent noising results in multiplicative shrinkage, keeping noised lengths closer to original lengths.

Limitations and Future Work

  • Multi-token Insertion Constraint: While DILM-M can insert multiple tokens per step, it is still constrained to inserting one token per gap. The authors suggest that a model capable of inserting contiguous spans of tokens would be a promising direction.
  • Scaling: Further exploration of scaling insertion-based generation to larger models and longer sequences is identified as future work.
  • Rao-Blackwellization: The paper mentions that a more efficient implementation of Rao-Blackwellization for the ELBO estimator could lead to lower variance but requires solving a dynamic programming instance, which is left for future work.

Summary updated

BibTeX
@inproceedings{patel2026continuous,
  author = {Dhruvesh Patel and Benjamin Rozonoyer and Soumitra Das and Tahira Naseem and Tim G. J. Rudner and Andrew McCallum},
  title = {{A Continuous Time Markov Chain Framework for Insertion Language Models}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2026},
  url = {https://openreview.net/forum?id=nCyV21FmUI},
}
Figure