Few-shot Temporal Pruning Accelerates Diffusion Models for Text Generation

Bocheng Li, Zhujin Gao, Yongxin Zhu, Kun Yin, Haoyu Cao, Deqiang Jiang, Linli Xu

Introduction

Diffusion models have emerged as a powerful alternative to autoregressive models for various generative tasks, most notably in image synthesis. However, their application in Natural Language Processing (NLP) has been limited by a significant drawback: inference speed. While models like GPT generate text token-by-token, diffusion models iteratively refine noise into coherent text, often requiring hundreds or thousands of sampling steps. This paper introduces Few-shot Temporal Pruning (FTP), a training-free method designed to drastically accelerate diffusion-based text generation without sacrificing quality.

The Bottleneck of Iterative Sampling

The primary challenge in deploying diffusion models for real-time text generation is the "sampling process." High-quality output typically demands between 50 and 2,000 iterations. Existing acceleration techniques often involve expensive retraining or complex distillation processes, which are computationally prohibitive for many practitioners. Furthermore, standard sampling methods often assume that every step in the diffusion process is equally important—an assumption that the authors demonstrate is fundamentally flawed.

Methodology: Few-shot Temporal Pruning (FTP)

The authors propose FTP as a "black-box" optimization strategy. Instead of modifying the model's weights, FTP identifies the most "significant" sampling steps and removes "redundant" ones where the text state remains largely unchanged.

The Temporal Pruning Optimization Loop using Bayesian Optimization.

As illustrated in the optimization loop above, the process begins with a uniform distribution of sampling steps. FTP then uses Bayesian Optimization to search for the optimal subset of steps. Specifically:

  1. Gaussian Process (GP): A GP models the relationship between different sampling step distributions and the resulting performance metric (e.g., BLEU score).
  2. Few-shot Efficiency: The optimization requires only a tiny fraction of the data—as few as 10 to 20 validation examples. This allows the algorithm to find an optimized schedule in under a minute.
  3. GP-Hedge: To navigate the exponential search space of possible step combinations, the authors employ a portfolio of acquisition functions (GP-Hedge) to adaptively select the most promising step distributions to evaluate next.

Key Insights: Why Pruning Works

The research reveals several counter-intuitive properties of text diffusion:

  • Redundancy Can Degrade Performance: In certain architectures like Multinomial Diffusion, running more steps can actually hurt performance. For instance, on the WMT16 EN-RO task, performance dropped from a BLEU score of 27.80 at 4 steps to just 4.50 at 50 steps. Redundant steps can effectively "block" the model from reaching a high-quality state.
  • Early Noise Priority: Optimized schedules consistently prioritize steps at the noisier end of the process. This suggests that the initial transition from pure noise to a structured representation is the most critical phase for final output quality.
  • Architectural Agnostic: Because it treats the model as a black box, FTP works seamlessly across discrete (Absorbing, Multinomial) and continuous (DiffuSeq) diffusion models.

Key Results

The empirical evaluation across five benchmarks—including machine translation (IWSLT14, WMT16, WMT14), question generation (QG), and paraphrasing (QQP)—demonstrates the effectiveness of FTP.

Performance comparison of FTP against vanilla diffusion models across multiple NLP benchmarks.

As shown in the results table, FTP achieves remarkable efficiency gains:

  • Massive Acceleration: For the DiffuSeq model, FTP enabled a 400x speedup, increasing throughput from 0.226 to over 92 sentences per second.
  • Quality Preservation: On the IWSLT14 German-English task, FTP using only 4 steps achieved a BLEU score of 28.61, nearly matching the 50-step vanilla model (28.95) while being over 12 times faster.
  • Rapid Deployment: The optimization process itself is nearly instantaneous, typically taking less than 60 seconds to calibrate for a new task or dataset.

Limitations and Future Directions

While FTP offers a significant leap in efficiency, it is not without limitations. It is designed to reach the original model's peak performance faster, rather than increasing the absolute maximum quality the model can produce. Furthermore, while it performs well on standard benchmarks, more complex linguistic structures or extremely long sequences may require more sophisticated pruning logic.

Conclusion

Few-shot Temporal Pruning provides a practical, training-free solution to the inference speed bottleneck in text diffusion models. By leveraging Bayesian Optimization on minimal data, FTP makes these powerful generative models viable for real-time applications, offering a path toward more efficient and accessible NLP systems.

Summary updated

BibTeX
@inproceedings{li2024few,
  author = {Bocheng Li and Zhujin Gao and Yongxin Zhu and Kun Yin and Haoyu Cao and Deqiang Jiang and Linli Xu},
  title = {{Few-shot Temporal Pruning Accelerates Diffusion Models for Text Generation}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
}
Figure