NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Cheaper and Better Diffusion Language Model with Soft-Masked Noise

Jiaao Chen, Aston Zhang, Mu Li, Alex Smola, Diyi Yang

Abstract

Diffusion models that are based on iterative denoising have been recently proposed and leveraged in various generation tasks like image generation. Whereas, as a way inherently built for continuous data, existing diffusion models still have some limitations in modeling discrete data, e.g., languages. For example, the generally used Gaussian noise can not handle the discrete corruption well, and the objectives in continuous spaces fail to be stable for textual data in the diffusion process especially when the dimension is high. To alleviate these issues, we introduce a novel diffusion model for language modeling, Masked-Diffuse LM, with lower training cost and better performances, inspired by linguistic features in languages. Specifically, we design a linguistic-informed forward process which adds corruptions to the text through strategically soft-masking to better noise the textual data. Also, we directly predict the categorical distribution with cross-entropy loss function in every diffusion step to connect the continuous space and discrete space in a more efficient and straightforward way. Through experiments on 5 controlled generation tasks, we demonstrate that our Masked-Diffuse LM can achieve better generation quality than the state-of-the-art diffusion models with better efficiency.

Introduction

Diffusion models have revolutionized generative AI in continuous domains like image and audio synthesis. However, adapting these models to the discrete nature of language remains a significant challenge. Current state-of-the-art approaches, such as Diffusion-LM, typically map text into a continuous embedding space and apply uniform Gaussian noise. This approach suffers from two primary flaws:

  1. Linguistic Blindness: Uniform Gaussian noise ignores the structural hierarchy of language, treating functional words (e.g., "is") and content-heavy words (e.g., "Beefeater") identically.
  2. Decoding Instability: Converting continuous latent variables back to discrete tokens often requires computationally expensive $k$-nearest-neighbor ($k$-NN) rounding, which is unstable in high-dimensional spaces.

Methodology: Masked-Diffusion LM

To address these limitations, we propose Masked-Diffusion LM, which introduces a linguistically-informed noise schedule and a more stable training objective.

Linguistic-Informed Soft-Masking

Instead of applying uniform noise, we utilize a "strategic soft-masking" forward process. This process calculates word importance using TF-IDF (relevancy) and Entropy (information density). More informative or "difficult" words are masked earlier in the forward process.

The forward and reverse diffusion process using soft-masking to transition between discrete text and continuous noise.

This strategy encourages an "easy-first" generation pattern during the reverse process. The model learns to establish the basic sentence structure and common "anchor" words before filling in complex, high-information details, mimicking how humans often plan sentences.

Direct Categorical Prediction

We replace the unstable $k$-NN rounding method with a direct categorical prediction layer. A learnable linear layer maps hidden representations directly to a distribution over the vocabulary, optimized via a weighted cross-entropy (CE) loss. This approach stabilizes training and provides clearer gradients compared to standard L2 loss in continuous space.

Experimental Results

We evaluated Masked-Diffusion LM on the E2E dataset (50,000 restaurant reviews) across five controllable generation tasks: Semantic Content, Parts-of-Speech (POS), Syntax Tree, Syntax Spans, and Length.

Performance and Fluency

As shown in the table below, Masked-Diffusion LM consistently outperforms previous diffusion-based models and strong baselines like PPLM and FUDGE across all metrics.

Performance comparison of Masked-Diffusion LM against baselines across five controlled generation tasks.

Notably, our model shows superior integration with pre-trained models like BERT. While the original Diffusion-LM often degrades when paired with high-dimensional BERT embeddings due to rounding instability, Masked-Diffusion LM leverages these embeddings to achieve state-of-the-art accuracy and fluency.

Efficiency Gains

Beyond performance, the model is significantly more efficient. Training was approximately 2.3x faster than Diffusion-LM (3.4 hours vs. 8.0 hours). Inference speed also improved, reducing the time required for batch generation from 80 seconds to 68 seconds for 50 samples.

Conclusion

Masked-Diffusion LM demonstrates that incorporating linguistic priors into the diffusion process leads to both better performance and lower computational costs. By adopting an "easy-first" generation strategy and a direct categorical objective, we bridge the gap between continuous diffusion and discrete language more effectively than previous methods. Future work will explore scaling this architecture to larger datasets and more complex linguistic structures.

Summary updated

BibTeX
@inproceedings{chen2023cheaper,
  author = {Jiaao Chen and Aston Zhang and Mu Li and Alex Smola and Diyi Yang},
  title = {{A Cheaper and Better Diffusion Language Model with Soft-Masked Noise}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=iBv0M8WrFi},
}
Figure