NI Sampling: Accelerating Discrete Diffusion Sampling by Token Order Optimization

Enshu Liu, Xuefei Ning, Yu Wang, Zinan Lin

Overview

Neural Indicator Sampling (NI Sampling) introduces a lightweight "Neural Indicator" to drastically speed up discrete diffusion language models (dLLMs). By learning exactly which tokens can be safely predicted in parallel at any given step, the method achieves up to 14.3× acceleration (and up to 25× with caching) over standard sampling while maintaining nearly identical generation quality.

The Sampling Efficiency Bottleneck in dLLMs

Traditional Autoregressive (AR) language models generate text strictly one token at a time, from left to right. Discrete Diffusion Language Models (dLLMs), such as LLaDA or Dream, offer a more flexible alternative: they start with a sequence of "mask" tokens and iteratively fill them in, potentially in any order and even in parallel.

However, dLLMs face a significant "sampling efficiency" problem. To maintain high generation quality, current methods are often too conservative. They either unmask only one token at a time (which is slow) or rely on simple heuristics like "confidence thresholding" (unmasking tokens where the model's probability score exceeds a rigid threshold, e.g., 90%).

The authors observed that these models are actually capable of correctly predicting many more tokens at each step than these heuristics allow. The core challenge is identifying which of the model's current guesses are actually correct without knowing the final answer in advance.

Methods: Neural Indicator Sampling

To overcome the limitations of heuristic sampling, the authors propose Neural Indicator Sampling (NI Sampling), which replaces manual heuristics with a trained, lightweight helper model.

Comparison of sampling strategies
  1. The Neural Indicator: A small Multi-Layer Perceptron (MLP) acts as an evaluator. It looks at a masked position and decides: "Is the dLLM's current prediction for this spot correct and safe to reveal now?" It uses the dLLM’s hidden states, top-K predicted tokens, and logits as inputs to make this determination.
  2. Trajectory-Preserving Principle: This is the core training strategy. The authors first generate high-quality "reference trajectories" using the slow, one-token-at-a-time method. They then train the indicator to identify "mergeable steps"—points where the model, if given a partially masked sequence, correctly predicts tokens that weren't supposed to appear until much later in the reference path.
  3. Inference: During generation, the dLLM makes its predictions, the Neural Indicator scores every masked position, and all positions exceeding a score threshold are unmasked simultaneously. This allows the model to safely "jump" through the generation process.

Key Insights

  • The "Jump-Step" Potential: The authors discovered a massive gap between current performance and theoretical limits. They showed that if you had a "perfect" indicator, you could achieve a 24× speedup while perfectly preserving the model's output.
  • Confidence is a Poor Proxy: High probability doesn't always mean a token is ready to be sampled. Conversely, a model might be correct even with lower confidence. A learned indicator captures the nuances of "correctness" far better than a flat probability threshold.
  • Trajectory Preservation over Result Preservation: Instead of just trying to match the final text, the method focuses on following the path of the diffusion process. This makes training more stable and ensures the model doesn't "hallucinate" by jumping to conclusions too early.
  • Minimal Overhead: The indicator is tiny—roughly 1/80th to 1/100th the size of the main 8B parameter model. The time it takes to run the indicator is negligible compared to the time saved by skipping diffusion steps.

Key Results

The researchers evaluated NI Sampling across several demanding benchmarks, including Mathematical Reasoning (GSM8K, MATH) and Code Generation (MBPP).

Accuracy and step reduction results
  • Massive Speedups: On the LLaDA-8B model, NI Sampling achieved up to 14.3× speedup in terms of steps compared to full-step sampling.
  • Pareto Dominance: In every test, NI Sampling provided a better trade-off between accuracy and speed than the standard "confidence threshold" method. It consistently reached higher accuracy with fewer steps.
  • Synergy with Caching: When combined with "Dual Caching" (a technique to reuse previous computations), the speedup reached a staggering 25.0×.
  • Generalization: An indicator trained primarily on general conversation data (ShareGPT) performed remarkably well on specialized math and code tasks, proving the "logic" of sampling order is somewhat universal across domains.

Limitations and Future Work

While a 14× acceleration is impressive, it is still short of the theoretical 24×–36× limit identified in the paper, suggesting the indicator can still be improved. Currently, the indicator makes decisions for each token position independently. Future work could explore a Transformer-based indicator to make better "joint" decisions by analyzing how unmasking one token might affect its neighbors. Additionally, addressing error accumulation—where early mistakes by the indicator lead to "drift" in the final output—using Reinforcement Learning (RL) could make the indicator more robust.

Summary updated

BibTeX
@inproceedings{liu2026ni,
  author = {Enshu Liu and Xuefei Ning and Yu Wang and Zinan Lin},
  title = {{NI Sampling: Accelerating Discrete Diffusion Sampling by Token Order Optimization}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=rrD1U0Izt5},
}
Figure