Papers
Topics
Authors
Recent
Search
2000 character limit reached

Neural Indicator Sampling (NI Sampling)

Updated 5 July 2026
  • Neural Indicator Sampling is a framework that optimizes token unmasking in discrete diffusion language models using a learned neural indicator to decide which tokens can be revealed in parallel.
  • The method computes feature-based confidence scores, enabling multi-token unmasking that reduces diffusion steps up to 14.3× with minimal impact on generation quality.
  • It employs a trajectory-preserving training objective with binary cross-entropy, ensuring that early token revelations do not alter the final generation outcome.

Neural Indicator Sampling (NI Sampling) is a sampling order optimization framework for discrete diffusion LLMs (dLLMs). In the formulation introduced in "NI Sampling: Accelerating Discrete Diffusion Sampling by Token Order Optimization" (Liu et al., 20 Apr 2026), the method addresses the inefficiency of heuristic reverse-process samplers by learning which masked positions can be safely unmasked in parallel at each diffusion step. It does so with a neural indicator that estimates whether the current greedy prediction at a position can be revealed without altering the final trajectory, and it is trained with a trajectory-preserving objective. The reported result is acceleration of dLLM sampling by up to 14.3×14.3\times over full-step sampling with negligible performance drop, with further gains when combined with KV caching (Liu et al., 20 Apr 2026).

1. Problem formulation in discrete diffusion decoding

In autoregressive LLMs, tokens are generated strictly left-to-right: at step tt the model conditions on (y1,…,yt−1)(y_1,\ldots,y_{t-1}) to predict yty_t. Discrete diffusion LLMs instead define a forward process that gradually masks out tokens until the entire sequence is masked, and learn a reverse denoising process to recover the original sequence. At each reverse step, the model may unmask any subset of positions, allowing flexible, even parallel, decoding orders. In principle, dLLMs are therefore not restricted to sequential dependency; in practice, naïve multi-token sampling breaks correlations between positions whose latent states are simultaneously masked, so most dLLM samplers reveal only one token per step (Liu et al., 20 Apr 2026).

The work formalizes token sampling order as an ordered partition

(A1,A2,…,An),⋃t=1nAt={1,…,N},At∩At′=∅ for t≠t′.(A_1, A_2, \ldots, A_n), \qquad \bigcup_{t=1}^n A_t = \{1,\ldots,N\}, \qquad A_t \cap A_{t'} = \varnothing \ \text{for } t \ne t'.

At reverse step tt, all positions in AtA_t are unmasked. The optimization target is to minimize nn, the total number of diffusion steps, while maintaining the same final generation quality. With a pre-trained dLLM θ\theta and prompt cc, the objective is written as

tt0

with the constraint that tt1 remains within an acceptable tolerance of the full-step baseline.

This formulation is motivated by the limitations of two existing heuristics. Full-step sampling, also called one token per step, selects the single most confident mask position at each step and therefore requires tt2 steps to generate tt3 tokens. Confidence-threshold sampling, described as Fast-dLLM, unmasks all positions whose top-1 probability exceeds a fixed threshold tt4 such as tt5, but in practice still leaves many positions masked for hundreds of steps. The central observation is that if one could identify and unmask all positions whose current argmax prediction already matches the final output, the number of reverse steps could drop by an order of magnitude.

2. Neural indicator architecture and inference procedure

At each sampling step, the dLLM first computes the token distribution tt6 over the current masked sequence tt7. If there are tt8 masked positions, NI Sampling extracts three feature groups for each masked position tt9: the Top-(y1,…,yt−1)(y_1,\ldots,y_{t-1})0 predicted tokens and their embeddings, the last-layer hidden state (y1,…,yt−1)(y_1,\ldots,y_{t-1})1 from the dLLM, and the Top-(y1,…,yt−1)(y_1,\ldots,y_{t-1})2 logits (y1,…,yt−1)(y_1,\ldots,y_{t-1})3, from which confidence scores can be computed. A small feed-forward network (y1,…,yt−1)(y_1,\ldots,y_{t-1})4, called the neural indicator, maps these features to a scalar score (y1,…,yt−1)(y_1,\ldots,y_{t-1})5 that estimates whether the current greedy prediction

(y1,…,yt−1)(y_1,\ldots,y_{t-1})6

can safely be unmasked now without altering the final trajectory (Liu et al., 20 Apr 2026).

The reverse-process inference loop is specified in five pseudo-steps:

  1. Compute (y1,…,yt−1)(y_1,\ldots,y_{t-1})7 for all positions with one forward pass of the dLLM.
  2. Guarantee that at least one token is revealed by applying a fallback sampler, such as highest-confidence threshold or top-1 probability, to select a seed set (y1,…,yt−1)(y_1,\ldots,y_{t-1})8.
  3. For each remaining masked position (y1,…,yt−1)(y_1,\ldots,y_{t-1})9, gather features and compute yty_t0.
  4. Reveal all positions yty_t1 with yty_t2. If none qualifies, reveal the single highest-scoring yty_t3.
  5. Update yty_t4 by unmasking those positions with their greedy predictions, and repeat until all positions are unmasked.

The computational comparison is explicit. Full-step sampling requires yty_t5 steps and therefore yty_t6 model evaluations. Confidence-threshold sampling also uses one forward pass per step, but multi-token unmasking reduces the number of steps to yty_t7, with an empirical speedup of yty_t8–yty_t9. NI Sampling adds one forward pass per step plus one small (A1,A2,…,An),⋃t=1nAt={1,…,N},At∩At′=∅ for t≠t′.(A_1, A_2, \ldots, A_n), \qquad \bigcup_{t=1}^n A_t = \{1,\ldots,N\}, \qquad A_t \cap A_{t'} = \varnothing \ \text{for } t \ne t'.0-evaluation per masked position, with negligible GPU cost, so the total becomes (A1,A2,…,An),⋃t=1nAt={1,…,N},At∩At′=∅ for t≠t′.(A_1, A_2, \ldots, A_n), \qquad \bigcup_{t=1}^n A_t = \{1,\ldots,N\}, \qquad A_t \cap A_{t'} = \varnothing \ \text{for } t \ne t'.1 dLLM evaluations. For (A1,A2,…,An),⋃t=1nAt={1,…,N},At∩At′=∅ for t≠t′.(A_1, A_2, \ldots, A_n), \qquad \bigcup_{t=1}^n A_t = \{1,\ldots,N\}, \qquad A_t \cap A_{t'} = \varnothing \ \text{for } t \ne t'.2, the reported value is (A1,A2,…,An),⋃t=1nAt={1,…,N},At∩At′=∅ for t≠t′.(A_1, A_2, \ldots, A_n), \qquad \bigcup_{t=1}^n A_t = \{1,\ldots,N\}, \qquad A_t \cap A_{t'} = \varnothing \ \text{for } t \ne t'.3, which is about (A1,A2,…,An),⋃t=1nAt={1,…,N},At∩At′=∅ for t≠t′.(A_1, A_2, \ldots, A_n), \qquad \bigcup_{t=1}^n A_t = \{1,\ldots,N\}, \qquad A_t \cap A_{t'} = \varnothing \ \text{for } t \ne t'.4 fewer than full-step sampling, and the (A1,A2,…,An),⋃t=1nAt={1,…,N},At∩At′=∅ for t≠t′.(A_1, A_2, \ldots, A_n), \qquad \bigcup_{t=1}^n A_t = \{1,\ldots,N\}, \qquad A_t \cap A_{t'} = \varnothing \ \text{for } t \ne t'.5-evaluation cost is reported as less than (A1,A2,…,An),⋃t=1nAt={1,…,N},At∩At′=∅ for t≠t′.(A_1, A_2, \ldots, A_n), \qquad \bigcup_{t=1}^n A_t = \{1,\ldots,N\}, \qquad A_t \cap A_{t'} = \varnothing \ \text{for } t \ne t'.6 of a single dLLM forward.

3. Trajectory-preserving training objective

The training signal for the neural indicator is derived from a reference trajectory generated by full-step sampling. The trajectory is defined as

(A1,A2,…,An),⋃t=1nAt={1,…,N},At∩At′=∅ for t≠t′.(A_1, A_2, \ldots, A_n), \qquad \bigcup_{t=1}^n A_t = \{1,\ldots,N\}, \qquad A_t \cap A_{t'} = \varnothing \ \text{for } t \ne t'.7

where at step (A1,A2,…,An),⋃t=1nAt={1,…,N},At∩At′=∅ for t≠t′.(A_1, A_2, \ldots, A_n), \qquad \bigcup_{t=1}^n A_t = \{1,\ldots,N\}, \qquad A_t \cap A_{t'} = \varnothing \ \text{for } t \ne t'.8 the sampler unmasks positions (A1,A2,…,An),⋃t=1nAt={1,…,N},At∩At′=∅ for t≠t′.(A_1, A_2, \ldots, A_n), \qquad \bigcup_{t=1}^n A_t = \{1,\ldots,N\}, \qquad A_t \cap A_{t'} = \varnothing \ \text{for } t \ne t'.9 and obtains tokens tt0 for tt1. At step tt2, let tt3 be the partially unmasked sequence. The paper states that the next tt4 steps can be merged into one if, for every

tt5

the condition

tt6

holds. This trajectory-preserving criterion guarantees that unmasking those positions earlier does not change the subsequent trajectory (Liu et al., 20 Apr 2026).

Supervision labels are constructed from a large corpus of trajectories. The procedure is: generate trajectories using an existing sampler, either full-step or threshold, over prompts from ShareGPT with generation lengths tt7; randomly pick tt8; compute the maximum mergeable index tt9 by testing the criterion iteratively; label all positions in AtA_t0 as AtA_t1 and all other masked positions as AtA_t2. The reported training set size is approximately AtA_t3 trajectories.

The optimization objective is binary cross-entropy:

AtA_t4

Training uses AdamW with AtA_t5, AtA_t6, AtA_t7, batch size AtA_t8, for AtA_t9 epochs. The procedure additionally discards positive labels whose nn0 to simplify learning.

The significance of this construction is methodological rather than purely heuristic. The indicator is not trained to imitate confidence scores; it is trained to predict whether earlier revelation preserves the full-step trajectory. This suggests that the acceleration mechanism is tied to trajectory equivalence, not merely to high local certainty.

4. Empirical performance and accuracy-step trade-off

The evaluation covers LLaDA-8B-Instruct, LLaDA-1.5, and Dream-7B-Base across GSM8K, MATH, HumanEval, and MBPP, using task accuracy or pass@1, average number of diffusion steps nn1, and tokens/sec including nn2 overhead (Liu et al., 20 Apr 2026).

On LLaDA-8B-Instruct with nn3, the reported figures are:

  • Full-step: nn4 steps, nn5 tokens/s.
  • Confidence-threshold: nn6, nn7 tokens/s, approximately nn8 speedup, accuracy drop nn9.
  • NI Sampling: θ\theta0, θ\theta1 tokens/s, approximately θ\theta2 speedup, with the reported accuracy changing from θ\theta3 to θ\theta4.

On MBPP-512, the reported figures are:

  • Full-step: θ\theta5 steps, θ\theta6 tokens/s.
  • Confidence-threshold: θ\theta7 steps, θ\theta8 tokens/s, θ\theta9.
  • NI Sampling: cc0 steps, cc1 tokens/s, cc2, with accuracy changing from cc3 to cc4.

The paper states that NI Sampling Pareto-dominates confidence-threshold sampling over all accuracy-versus-step curves. It also reports that combining NI with KV caching, as in Fast-dLLM, yields up to cc5 end-to-end acceleration. In the reported experiments, the main empirical claim is therefore not only that NI Sampling reduces the number of reverse iterations, but that it does so more efficiently than threshold-based heuristics at comparable quality levels.

5. Ablations, implementation properties, and projected extensions

The ablation results refine the role of model family, training distribution, input features, and indicator size. On Dream-7B-Base, NI still outperforms threshold sampling, with the example on GSM8K-256 reported as cc6 versus cc7. An indicator trained solely on GSM8K plus MATH yields better performance on math tasks but worse on code, suggesting that one may train domain-specific indicators for further gains. Removing last-layer hidden states or predicted logits each degrades the trade-off curve noticeably, while Top-cc8 token embeddings provide a smaller but still visible benefit. Doubling MLP depth from cc9 layers, from tt00 parameters, gives no significant gain, so the smaller tt01 model is retained (Liu et al., 20 Apr 2026).

The practical deployment characteristics are also quantified. The indicator adds only tt02–tt03 ms per inference step versus tt04–tt05 ms for the dLLM itself, corresponding to tt06–tt07 overhead, and it occupies approximately tt08 of the dLLM’s parameters. The method is described as a drop-in wrapper: only the sampling loop must be modified to include tt09 and thresholding, while existing dLLM checkpoints and caching optimizations remain compatible.

Several future directions are explicitly identified. A final-results-preserving criterion, in which tt10 is trained to match the final generation rather than the full trajectory, can achieve up to tt11 speedup with negligible performance drop, at the cost of theoretical trajectory divergence. Other proposed directions are reinforcement learning, treating tt12 as an RL agent that chooses action masks to directly maximize final reward; replacing the position-wise MLP with a cross-position Transformer; retraining tt13 on trajectories produced by NI Sampling itself to mitigate drift and further reduce steps; and scaling the indicator or the trajectory dataset, for example to tt14 samples, to close the gap to the theoretical upper bound of approximately tt15 from trajectory analysis.

One terminological point warrants care. The summary characterizes NI Sampling as a general, training-free inference wrapper, while the method also introduces a trajectory-preserving objective to train the indicator. A plausible implication is that "training-free" refers to the underlying dLLM checkpoints rather than to the indicator tt16, because the reported implementation modifies inference for existing checkpoints rather than retraining the base model.

6. Terminological ambiguity and distinct usage in PINNs

The abbreviation "NI-Sampling" is also used in a different context in "Failure-informed adaptive sampling for PINNs, Part II: combining with re-sampling and subset simulation" (Gao et al., 2023). There, the methodology is not a discrete diffusion decoding method. Instead, it is an adaptive sampling framework for physics-informed neural networks in which failure probability is used as the posterior error indicator, with a truncated-Gaussian posterior model or subset simulation, cosine-annealing re-sampling, a fixed total collocation size tt17, and early stopping when tt18 (Gao et al., 2023).

This naming overlap can create confusion because both lines of work involve a form of learned or model-based indication of where computation should be focused next, yet the objects being sampled are different. In the dLLM setting, NI Sampling selects token positions to unmask during reverse diffusion. In the PINN setting, NI-Sampling selects collocation points in the domain according to an error or failure-probability criterion. The shared abbreviation therefore does not imply a shared algorithmic framework.

Within the discrete diffusion literature, Neural Indicator Sampling refers specifically to the token order optimization framework built around the neural indicator tt19, trajectory-preserving supervision, and accelerated reverse-process decoding.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Neural Indicator Sampling (NI Sampling).