CRoCoDiL: Continuous and Robust Conditioned Diffusion for Language

Roy Uziel, Omer Belhasin, Itay Levy, Akhiad Bercovich, Ran El-Yaniv, Ran Zilberstein, Michael EladarXiv 2026

TL;DR

CRoCoDiL introduces a hybrid text generation framework that bridges continuous sentence-level latent diffusion with discrete Masked Diffusion Models (MDMs). By offloading global semantic structuring to a continuous space and using it to guide token demasking, it overcomes the coherence issues of parallel token sampling, delivering superior text quality alongside a 10x+ generation speedup.

What Problem Does This Paper Address?

Autoregressive large language models generate text sequentially—one token at a time—which is computationally slow. Masked Diffusion Models (MDMs) offer a non-causal alternative by predicting multiple tokens in parallel. However, standard MDMs suffer from a major flaw: they estimate independent marginal distributions for missing tokens, failing to capture statistical cross-dependencies.

When you sample many tokens simultaneously from these independent distributions, the model often produces semantically incoherent text (a phenomenon known as "marginal drift"). To maintain text quality, existing MDMs are forced to limit parallel sampling, sacrificing their primary speed advantage. CRoCoDiL tackles this efficiency-quality tradeoff by introducing global semantic guidance to the discrete generation process.

Methods

The authors propose CRoCoDiL (Continuous and Robust Conditioned Diffusion for Language), which shifts the core generative process into a continuous sentence-level semantic space while using an MDM as a guided decoder.

Figure 1. The CRoCoDiL framework: Building on a learned en- coder of text sequences and a demasker guided by this continuous representation, we introduce (a) an autoencoder and (b,c) two text generation algorithms, ConThenDisc and ConWithinDisc. A regu- lar MDM serves in all cases as a decoder that converts the latent z0 into a sequence ˆx0. The text generation algorithms rely on learned diffusion models that operate in the representation domain.

The framework consists of three core components:

  1. Unified Encoder-Demasker Training: Jointly trains an encoder to map discrete text into continuous latent vectors ($z_0$) and a conditional demasker. Crucially, the authors inject Gaussian noise into the latents during training to make the demasker robust to imperfectly generated continuous representations.
  2. ConThenDisc (Continuous-Then-Discrete): An unconditional text synthesis algorithm where a lightweight continuous diffusion model first generates a global semantic latent vector ($z_0$), which the MDM then decodes into discrete tokens.
  3. ConWithinDisc (Continuous-Within-Discrete): An advanced multi-diffusion strategy that dynamically updates and sharpens the latent guidance vector midway through the discrete sampling process, conditioning it on the partially generated text.
Figure 3. The ConThenDisc and ConWithinDisc text generation algorithms. In both, a continuous diffusion model generates a starting latent z0, which is decoded to tokens by a regular MDM. ConWithinDisc includes a refinement of the latent (the purple part) based on the partially synthesized text.

Datasets

The framework was trained and evaluated on code generation using the Python subset of the StarCoder Dataset.

  • Pre-training: 12 million Python programs of varying lengths (up to 4,096 tokens).
  • Continuous Diffusion Training: 2 million text sequences converted into latent matrices.
  • Evaluation: A validation set of 1,000 Python programs, assessed using metrics like MAUVE, Generative Perplexity (Gen-PPL), CodeBERTScore, and Character Error Rate (CER).

Key Insights and Ideas

  • Shifting the Burden: Instead of forcing a discrete model to handle both global semantic coherence and local token dependencies simultaneously, CRoCoDiL offloads long-range structure to a lightweight classical diffusion process in latent space.
  • The Power of a "Sketch Guide": Unlike prior continuous diffusion approaches where the latent vector must perfectly capture every token detail, CRoCoDiL treats the latent space as a flexible sketch. Because the MDM decoder retains its own generative capabilities, it can complement and refine an incomplete or partially informative latent representation.
  • The Midpoint Advantage: Through ablation studies, the authors discovered that refreshing the continuous latent guidance exactly at the midpoint ($\alpha = 0.50$) of the discrete generation process yields the best results. Refreshing too early provides no new context, while refreshing too late leaves too few uncommitted tokens to influence the outcome.

Key Results

  • Massive Speedups: In unconditional text generation benchmarks, CRoCoDiL achieved massive speedups over the base LLaDA model without sacrificing quality. For sequences of length 512, ConWithinDisc achieved a 13x speedup (requiring only 40 Neural Function Evaluations vs. 512 for the baseline). For sequences of length 1,024, it demonstrated a 14x speedup.
  • High-Fidelity Autoencoding: When evaluated purely as an autoencoder, the framework achieved near-perfect text reconstruction even under low NFE constraints, reaching a CodeBERTScore F1 between 0.96 and 0.97.

Limitations and Future Work

  • Unconditional Focus: The current implementation and evaluation focus strictly on unconditional text generation. Extending the framework to conditional tasks (such as prompt-based instruction following or question answering) is left for future work, though the authors outline a theoretical roadmap for it.
  • Register Diminishing Returns: The authors noted that scaling up the number of latent representation registers ($K$) beyond a certain threshold can actually degrade performance, as higher-index registers become weakly constrained and introduce instability.
  • Future Directions: The authors plan to explore optimizing the continuous diffusion process via distillation and testing the framework against a wider variety of baseline language models.

Summary updated

BibTeX
@misc{uziel2026crocodil,
  author = {Roy Uziel and Omer Belhasin and Itay Levy and Akhiad Bercovich and Ran El-Yaniv and Ran Zilberstein and Michael Elad},
  title = {{CRoCoDiL: Continuous and Robust Conditioned Diffusion for Language}},
  year = {2026},
  eprint = {2603.20210},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.20210},
}
Figure