Can Diffusion Model Achieve Better Performance in Text Generation ? Bridging the Gap between Training and Inference !

Zecheng Tang, Pinzheng Wang, Keyan Zhou, Juntao Li, Ziqiang Cao, Min Zhang

TL;DR

While diffusion models have revolutionized image generation, applying them to text reveals a significant "training-inference gap" caused by exposure bias and trajectory mismatches during accelerated sampling. This paper introduces two elegant solutions—Distance Penalty and Adaptive Decay Sampling—which bridge these gaps to achieve a staggering 100x to 200x speedup in text generation while actually improving quality and fluency over standard diffusion baselines.

Introduction: The Training-Inference Gap

Diffusion models work by gradually turning data into noise (the forward process) and then learning to reverse that process to generate new data (the reverse process). While successful in continuous domains like images, text is discrete. To make it work, researchers map text into a continuous embedding space.

Overview of the text diffusion process, mapping discrete text to a continuous embedding space for forward and reverse diffusion.

However, two major hurdles remain:

  1. Exposure Bias: During training, the model learns to denoise "perfect" noise generated by the mathematical forward process. But during inference, the forward process doesn't exist; the model must denoise its own previous (and potentially imperfect) outputs. This leads to error accumulation.
  2. Trajectory Mismatch: Generating text step-by-step is slow (often requiring 2,000 steps). To speed this up, we usually "downsample" or skip steps. The problem is that the model was never trained to handle these large "jumps" in the noise trajectory, leading to a drop in performance.

Methods: Bridging the Gap

The authors propose a two-pronged strategy to address these discrepancies:

Distance Penalty (DP)

This is a post-training strategy. Instead of only training on ground-truth noise, the authors inject the model’s own predicted noise back into the training loop. They add a penalty term to the loss function that minimizes the distance between the model's predictions and the target data across a range of noise levels. This acts as a form of regularization that prepares the model for its own mistakes, making it more robust to the "noisy" inputs it will encounter during real-world inference.

Adaptive Decay Sampling (ADS)

Standard acceleration methods (like "Respace") sample steps uniformly. However, the authors observed that the discrepancy between predicted and actual noise is much larger in the early stages of generation (high noise) than in the later stages (low noise). ADS adaptively allocates more sampling steps to the early, high-noise stages where the "global structure" of the text is formed, and fewer steps to the later refinement stages. By using a noise scheduler to guide sampling density, they proved that focusing computational effort on the early "high-noise" phase yields much better results for the same time budget.

Experimental Results

The researchers evaluated their methods across six generation tasks representing directed (Text Simplification, Paraphrasing), open-ended (Story Generation, Question Generation), and controllable scenarios (Semantic Content and Syntax Spans).

Performance metrics (B-2, LR-2, and PPL scores) across different sampling configurations, showing the benefits of the proposed adaptive approach.
  • Massive Speedup: The proposed methods achieve competitive or superior results with only 10–20 steps compared to the vanilla 2,000-step process—a 100x to 200x acceleration.
  • Better Fluency: On the ROC Stories task, their method achieved a significantly lower Perplexity (PPL) and higher BLEU scores than the standard "Respace" acceleration method.
  • Controllability: In controllable generation (E2E), the model achieved higher success rates (Ctrl score) and better fluency than Diffusion-LM, though it showed slightly lower lexical diversity.
  • Human Validation: Human evaluators consistently rated the outputs of the new method as more fluent, coherent, and relevant than the vanilla diffusion baselines, especially in the high-speed (20-step) setting.

Limitations and Future Work

While fluency and quality improved, the diversity of generated text was sometimes lower than autoregressive language models. This is partly due to the "clamping" strategy used to map continuous vectors back to discrete words. Furthermore, diffusion still occasionally struggles with long-term coherence in very long open-ended generation. The authors plan to address these challenges by relaxing conditional independence assumptions in future work.

Summary updated

BibTeX
@inproceedings{tang2023can,
  author = {Zecheng Tang and Pinzheng Wang and Keyan Zhou and Juntao Li and Ziqiang Cao and Min Zhang},
  title = {{Can Diffusion Model Achieve Better Performance in Text Generation ? Bridging the Gap between Training and Inference !}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.721},
}
Figure