Systematic Hazard Sampling: Minimal-Variance Inference for Discrete Diffusion and Flow Models

Seunghwan Jang, Wonje Jeung, SooJean HanNeurIPS 2026

TL;DR

Generating text in parallel using discrete diffusion and flow models suffers from an invisible tax: "sampler luck." Because standard samplers flip independent coins at every step to decide whether to update a token, some words get stuck as noise while others are overwritten too many times. Systematic Hazard Sampling (SHS) replaces those erratic coin flips with a smooth, deterministic accumulator offset by a single random starting phase per token—slashing edit-count variance to its theoretical minimum and boosting text quality for free at inference time, with zero retraining or extra compute.

What Problem Does This Paper Address?

Autoregressive language models generate text one token at a time. Discrete diffusion and flow models offer a tantalizing alternative: start with a sequence of random vocabulary tokens ("uniform noise") and iteratively refine all positions in parallel. Unlike masked models (which fill in a [MASK] blank once and lock it in), uniform-noise models allow each position to undergo multiple context-dependent edits, giving the model genuine self-correction capability.

However, standard samplers simulate this process by making independent Bernoulli (coin-flip) decisions at every time step for every token: stay or replace? Across many steps, the total number of edits a token receives follows a Poisson-binomial distribution whose variance grows linearly with the total expected edits.

This "sampler luck" creates two failure modes at the tails:

  • Under-editing: Too few jumps leave behind residual noise or local inconsistencies.
  • Over-editing: Too many jumps trigger cascading substitutions that wreck coherent phrases.

Worse yet, taking smaller, finer steps—increasing the number of function evaluations (NFE)—doesn't fix this. As step sizes shrink, the variance doesn't vanish; it approaches a Poisson limit equal to the total expected jump mass.

Methods

The authors observe that any discrete Markov sampler (continuous- or discrete-time) can be decomposed into two distinct questions: when to edit (a binary stay-vs.-replace event) and what to write (sampling a replacement token from a destination distribution).

Standard samplers use independent random draws at each step to decide when to edit. Systematic Hazard Sampling (SHS) leaves the model and its destination distribution untouched, modifying only how edit timings are triggered:

  1. Single Random Phase: Before generation begins, each token position $i$ draws a single random offset $\theta_i \sim \text{Uniform}(0, 1)$.
  2. Accumulate Mass: At each step, instead of flipping a coin with the model's predicted change probability $p_{ik}$, SHS adds $p_{ik}$ to a running cumulative "jump mass" (or hazard) $S_i$.
  3. Threshold Crossing: Whenever $S_i$ crosses a unit-spaced boundary ($\theta_i, \theta_i + 1, \theta_i + 2, \dots$), an edit is triggered, and the new token is sampled normally from the model's destination distribution.
Figure 1: Standard step-based sampling (left) makes independent per-step Bernoulli edit decisions, leading to under-edit (position 1) and over-edit (position 4) failure modes. SHS (right) accumulates jump mass across steps and triggers edits at unit-spaced thresholds with a single random phase per position, producing stable, low-variance edit trajectories.

Think of it like bus arrivals: instead of buses arriving at completely random Poisson intervals (causing frustrating gaps and bunching), SHS puts them on a strict unit-spaced timetable shifted by one random starting minute. It requires no retraining, no hyperparameters, and zero extra neural network evaluations.

Datasets

Not discussed in the main text of the paper. The experiments evaluate unconditional text generation across four pre-trained uniform-noise discrete diffusion and flow language models ranging from $\sim$110M to $\sim$3B parameters (UDLM, GIDD, DFM, and a 3B uniform diffusion model), measuring quality via a GPT2-large evaluator and referencing an unnamed training corpus in the appendices for lexical comparisons.

Key Insights and Ideas

  • Theoretical Minimal Variance: For any fixed cumulative jump mass $S$, SHS acts as an unbiased randomized rounding mechanism. A token's jump count is guaranteed to land on either $\lfloor S \rfloor$ or $\lceil S \rceil$, capping conditional jump-count variance at $1/4$ regardless of how fine the step grid becomes—the mathematical minimum for any unbiased integer estimator.
  • Decoupling Path Noise from Diversity: A natural worry is that reducing variance might cause mode collapse, making outputs repetitive. Because SHS preserves both the per-step marginal edit probabilities and the categorical destination kernel, it doesn't flatten multimodal token choices. In fact, against real text, standard sampling produces excess lexical diversity—88–90% of which consists of stray token types absent from the training corpus. SHS trims away trajectory noise, not meaningful diversity.
  • Under-editing is the Real Culprit: By mapping token-level negative log-likelihood against how far a token's edit count deviated from its expected mass, the authors show a sharp asymmetry: missing expected edits (under-editing) degrades token quality far more severely than over-editing.
  • Independence Across Positions Matters: Each token needs its own random phase $\theta_i$. Sharing a single global $\theta$ across all tokens synchronizes edits unnaturally and degrades UDLM perplexity from 174.2 to 213.5.

Key Results

SHS improves generative perplexity (Gen. PPL, lower is better) across every tested model and NFE budget:

Table 1: Generative perplexity under NFE budgets (Gen. PPL, lower is better; bold = better between Standard and SHS). ∆shows SHS improvement over Standard. ±: standard deviation over seeds (5 for UDLM and GIDD, 3 for DFM; single seed for 3B).
  • Consistent Quality Gains: SHS lowers Gen. PPL by up to 25.6% on GIDD (from 107.7 to 80.2 at NFE=256), 17.3% on DFM (5.8 to 4.8 at NFE=128), 7.9% on UDLM, and 7.1% on the 3B uniform diffusion model.
  • Better Distributional Fidelity: On GIDD (NFE=128), MAUVE—which measures how closely generated text matches real text distributions—jumps from 0.381 to 0.536.
  • Theory Matches Reality: Empirical diagnostics on UDLM confirm that as NFE increases from 4 to 128, standard sampler jump-count variance balloons from 0.344 to 3.087, whereas SHS stays tightly bounded between 0.086 and 0.134 (well under the 0.25 ceiling).
  • Composable: Adding SHS on top of temperature scaling or nucleus (top-$p$) sampling yields further perplexity improvements at every setting tested.

Limitations and Future Work

  • State-Dependent Feedback: SHS is a variance-reducing integrator, not an exact simulator of the underlying Markov chain. Because changing when a token updates alters the context seen by other tokens at the next step, the realized cumulative mass $S_i^{\text{tot}}$ is state-dependent and its distribution can shift between standard sampling and SHS.
  • Unexplored Count Biasing: SHS is strictly unbiased with respect to expected jump counts. However, because under-editing hurts quality much more than over-editing, intentionally biasing the jump count upward is a promising—and currently unexplored—design direction.
  • Evaluation Scope: Experiments focus on unconditional text generation with uniform-noise models (using a single random seed for the 3B model); extending SHS to larger structured tasks like code generation benchmarks remains future work.

Summary updated

Abstract

Uniform-noise discrete diffusion and flow models generate sequences non-autoregressively through iterative, context-dependent token replacements. However, these models are typically formulated as time-inhomogeneous continuous- or discrete-time Markov chains (CTMC/DTMC), sampled using independent Bernoulli change decisions per discretization step. This induces Poisson-binomial variance in per-position jump counts that grows with the number of required edits, leading to the common under-editing (residual noise) and over-editing (cascading substitutions) failure modes that degrade sample quality. We identify this sampler-induced variance as an orthogonal source of degradation, distinct from model-side errors and addressable purely at inference time. We propose Systematic Hazard Sampling (SHS), a training-free, drop-in, and hyperparameter-free inference principle for any sampler that admits a stay-vs.-replace decomposition. SHS models per-token edits as events driven by cumulative hazard (CTMC) or jump mass (DTMC) and triggers an edit whenever this quantity exceeds unit-spaced thresholds with a single random phase per position. For any fixed cumulative mass, this preserves the expected jump count while achieving the minimum conditional variance possible among unbiased integer estimators (at most \(1/4\)), without altering per-jump destination sampling. Experiments on four uniform-noise discrete diffusion and flow language models spanning $\sim$110M to $\sim$3B parameters show that SHS consistently improves sample quality across numbers of function evaluations (NFE).
BibTeX
@inproceedings{jang2026systematic,
  author = {Seunghwan Jang and Wonje Jeung and SooJean Han},
  title = {{Systematic Hazard Sampling: Minimal-Variance Inference for Discrete Diffusion and Flow Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=al6oaoCR5A},
}
Figure