---
title: 'S2D2: Self-Speculative Decoding for Diffusion LLMs'
url: https://www.emergentmind.com/topics/s2d2
type: topic
---

# S2D2: Self-Speculative Decoding for Diffusion LLMs

S2D2 is a training-free self-speculative decoding framework for block-diffusion language models that improves the accuracy–speed tradeoff by reusing the same pretrained model as both drafter and verifier. The central observation is that a block-diffusion model becomes autoregressive when the block size is reduced to $1$, so diffusion proposals generated in parallel can be locally checked by the model’s own autoregressive mode before commitment. Introduced for mainstream block-diffusion families including SDAR, Fast-dLLM v2, and LLaDA2.1-Mini, S2D2 addresses the brittleness of few-step confidence-thresholded decoding and reports up to $4.7\times$ speedup over autoregressive decoding on SDAR, up to $1.57\times$ over a tuned dynamic decoding baseline while improving accuracy by up to $4.5$ points, and a conservative LLaDA2.1-Mini setting that is $4.4\times$ faster than a static baseline with slightly higher accuracy [2603.25702].

## 1. Problem setting in block-diffusion decoding

Block-diffusion language models combine block-wise autoregressive generation, to preserve KV cache reuse, with within-block parallel denoising. Given a prompt $x_{1:m}$, decoding proceeds block-by-block with block size $B$, initializing a masked block $x^b \leftarrow [MASK]^B$ and iterating few denoising steps $T$ to unmask tokens. Under masked absorbing-state diffusion with the SUBS parameterization,
$$
p_{\theta}(z_s \mid z_t) = q\bigl(z_s \mid z_t,\ x = x_{\theta}(z_t,t)\bigr),
$$
and, for a masked position $z_t = m$,
$$
p_{\theta}(z_s \mid z_t = m) = \mathrm{Cat}\!\left(z_s;\; \frac{1-\alpha_s}{1-\alpha_t} m + \frac{\alpha_s-\alpha_t}{1-\alpha_t} x_{\theta}(z_t,t)\right).
$$
Each masked position is independently unmasked with probability
$$
\rho_{t \to s} = \frac{\alpha_s - \alpha_t}{1 - \alpha_t},
$$
and, if unmasked, its token is sampled from the model prediction $x_{\theta}(z_t,t)$ [2603.25702].

In practical systems such as LLaDA and SDAR, few-step decoding replaces exact posterior sampling with confidence-thresholded acceptance. A draft forward pass yields token proposals $\hat x$ and confidences $p$ from logits $\ell$, then finalizes a subset of masked positions by a schedule or threshold $\tau$. A common dynamic baseline accepts
$$
S_t = \{ i \in M_t : p_i > \tau \} \cup \left\{ \arg\max_{i \in M_t} p_i \right\},
$$
where $M_t = \{ i : x^b_i = [MASK]\}$ at step $t$. The difficulty is that few-step regimes make confidence-thresholding brittle: aggressive thresholds cause premature commits and quality drops, while conservative thresholds commit too few tokens and waste steps. S2D2 is defined against this failure mode rather than against block-diffusion decoding in general.

## 2. Self-speculation with a single pretrained model

The core idea is to insert a speculative verification step before committing drafted tokens. The same pretrained block-diffusion model is used in two roles. As drafter, it performs standard block-diffusion decoding at block size $B$ and proposes tokens in parallel. As verifier, it is run in block-size-$1$ autoregressive mode and computes left-to-right probabilities of drafted tokens. This produces a hybrid decoding trajectory in which diffusion proposes tokens in parallel, while the autoregressive mode acts as a local sequence-level critic [2603.25702].

Verification operates on the first contiguous masked span $C_t$ in the current block. The verifier returns autoregressive probabilities $q_i$ for the drafted tokens $\hat{x}_i$ with draft probabilities $p_i$, and performs rejection sampling left-to-right with acceptance probability
$$
a_i = \min\!\left(1,\ \frac{q_i}{p_i}\right).
$$
At the first rejection, residual resampling draws a replacement token and terminates the speculative segment. S2D2 therefore does not attempt global autoregressive correction of the entire block; it verifies only a local drafted span and then returns to diffusion decoding.

The same mechanism admits an energy interpretation. Let
$$
E_i(\hat{x}_i) := -\log q_i + \log p_i.
$$
Then
$$
\min\!\left(1,\frac{q_i}{p_i}\right) = \min(1, e^{-E_i(\hat{x}_i)}).
$$
Lower residual energy proposals are more likely to be accepted, while higher-energy proposals are corrected by residual resampling. This suggests that S2D2 reframes draft confidence as a verifier-normalized local consistency test rather than a raw marginal-confidence test.

## 3. Routing policies and decoding procedure

Because verification incurs an extra forward pass, S2D2 uses lightweight routing policies to invoke verification only when it is expected to accept multiple tokens and amortize the cost. Otherwise, it falls back to confidence-thresholded diffusion decoding. The formal decoding state uses blocks $x^b$ of size $B$; within a block and step $t$, masked positions are $M_t = \{ i : x^b_i = [MASK]\}$, and $C_t$ denotes the first contiguous mask span [2603.25702].

The expected accepted prefix length estimator is
$$
\hat K = \sum_{k=1}^{L} \prod_{i=1}^{k} \alpha_i,
$$
where acceptance proxies $\alpha_i \in [0,1]$ include a margin-based proxy,
$$
\alpha_i = \mathbf{1}[m_i \ge \tau_{\mathrm{margin}}],
$$
with $m_i$ equal to the top-1 minus top-2 draft probability, and an entropy-based proxy,
$$
\alpha_i = \exp(-\beta \tilde H_i),
$$
with normalized entropy $\tilde H_i = H_i / \log V$. The static score mapping is
$$
s = \hat K - c.
$$
Routing then applies one of several decision rules: minimum-span, score-threshold, hysteresis, or a contextual bandit with UCB. The minimum-span rule verifies if $|C_t| \ge \tau_{\mathrm{span}}$; the score-threshold rule verifies if $s \ge \tau_{\mathrm{score}}$; hysteresis maintains a state $h \in \{\mathrm{on}, \mathrm{off}\}$ and switches according to $\tau_{\mathrm{on}}$ and $\tau_{\mathrm{off}}$; the contextual bandit buckets contexts by span length, progress, and entropy, and uses reward
$$
r = \frac{\text{decoded\_this\_step}}{\text{time\_cost}},
$$
where $\text{time\_cost} = 2$ with verification and $1$ otherwise.

Algorithmically, S2D2 is inserted into an existing block-wise autoregressive decoding framework. The outer loop initializes the KV cache from the prompt, starts a new masked block, calls `SampleBlock`, appends the decoded block, and updates the cache. Within `SampleBlock`, each denoising step drafts token proposals, identifies $M_t$ and $C_t$, and either performs verifier-based speculative acceptance or reverts to the baseline confidence rule. For position-aligned models such as SDAR and LLaDA, S2D2 uses a single forward with a 2L mask to parallelize verifier scores for all positions in the drafted span; for right-shifted models such as Fast-dLLM v2, the standard causal mask suffices. An optional partially causal drafting and caching mask can make the trajectory more autoregressive-like.

## 4. Complexity and empirical performance

If the per-forward cost is $C_{\mathrm{fwd}}$ and verifier cost is comparable, then with diffusion running $T$ denoising steps and verification invoked in a fraction $\pi$ of steps, expected wall-clock cost per block is
$$
C_{\mathrm{S2D2}} \approx T \cdot C_{\mathrm{fwd}} + \pi T \cdot C_{\mathrm{ver}} \approx T \cdot C_{\mathrm{fwd}}(1+\pi).
$$
If $\bar{K}_{\mathrm{S2D2}}$ is the expected number of tokens accepted per verified step and $\bar{K}_{\mathrm{BD3}}$ is the corresponding baseline quantity, then expected steps to finish a block are approximately $T_{\mathrm{eff}} \approx \frac{B}{\bar K}$. Relative speedup to autoregressive decoding can be expressed as
$$
S = \frac{C_{\mathrm{AR}}}{C_{\mathrm{S2D2}}},
$$
and the reported SDAR-1.7B config-B value reaches $S \approx 4.7\times$ [2603.25702].

Five models from three mainstream block-diffusion families—SDAR (1.7B/4B/8B), Fast-dLLM v2, and LLaDA2.1-Mini—were evaluated on GSM8K, MBPP, HumanEval, and IFEval. Representative reported results are summarized below.

| Family | Setting | Reported outcome |
|---|---|---|
| SDAR-1.7B | config-B | $4.7\times$ over AR; about $1.57\times$ faster than tuned dynamic baseline; $52.9$ vs. $48.4$ average accuracy |
| SDAR-8B | config-A / config-B | $72.6\%$ at $2.1\times$ speed; config-B reached $3.7\times$ speed with modest accuracy tradeoff |
| Fast-dLLM v2 | $B=32$, $SB=32$ | $\sim 3.1\times$ vs. baseline $\sim 2.9\times$ and $+4.5$ points average accuracy |
| LLaDA2.1-Mini | quality mode | $77.4\%$ vs. $73.7\%$ average accuracy with moderate speed loss |
| LLaDA2.1-Mini | conservative mode | $79.3\%$ vs. $78.7\%$ and $2.2\times$ vs. $1.7\times$; relative to static baseline, $4.4\times$ faster with slightly higher accuracy |

The ablations refine the operational picture. AR-ness diagnostics and confidence trajectories show task-dependent behavior and match where S2D2 gains most, especially at larger blocks where diffusion degrades. Entropy-based $\hat K$ estimation often yields higher downstream accuracy than margin-based estimation, despite the margin proxy being more accurate for $\hat K$ prediction. Minimum-span and score-threshold policies are effective, hysteresis reduces oscillations, contextual bandits are viable but more involved and not best-performing here, and ratio tempering $(q_i/p_i)^\gamma$ yields only minor accuracy–speed tradeoff adjustments, with default $\gamma=1$ sufficient.

## 5. Relation to prior decoding strategies, trade-offs, and limits

Confidence-threshold baselines commit tokens using draft-only confidence, which is brittle in few-step regimes: overly aggressive thresholds harm accuracy, and overly conservative thresholds waste steps. S2D2 replaces draft-only confidence with verifier-normalized acceptance via $q_i/p_i$, providing a local sequence-level test that corrects high-energy mismatches through residual resampling. In this sense, it is closely related to autoregressive speculative decoding, since it mirrors the same rejection-sampling rule $\min(1,q_i/p_i)$, but it remains hybrid: drafting and caching follow block-diffusion attention, verification is optional and local, and decoding returns to diffusion after the first rejection [2603.25702].

The framework is also positioned against prior sequence-level correction approaches. EDLM is cited as introducing additional training and/or multi-sample test-time overhead, whereas S2D2 is training-free and single-pass, using the same model in autoregressive mode as a local verifier. It is likewise complementary to built-in self-correction. LLaDA2.1’s token editing, described as “unmask early, correct later,” modifies previously committed tokens when confidence exceeds $\tau_{\mathrm{edit}}$ but does not perform verifier-based acceptance. S2D2 complements this mechanism with verifier-normalized commits and improves the accuracy–speed tradeoff under conservative settings.

The limitations are explicit. Verification overhead can outweigh benefits on very short spans or when draft confidence is uniformly high and well-calibrated. Miscalibrated confidences or poorly chosen routing thresholds can cause under-verification, with lost quality, or over-verification, with lost speed. S2D2 verifies only the first contiguous masked span per step; it is not equivalent to global autoregressive decoding and remains a hybrid trajectory. These constraints explain why the method is presented as a routing problem as much as a verification problem.

## 6. Acronym ambiguity across fields

The acronym “S2D2” is not unique to diffusion-language-model decoding. In other literatures it denotes unrelated concepts, including “sd2 graphene” in condensed-matter physics [1411.0786], the SIDDHARTA-2 Silicon Drift Detector system and apparatus for kaonic-atom spectroscopy at DA$\Phi$NE [2111.01572; 2311.16144], “Sequential Stackelberg Drone Defense” in security games [2508.11380], “Two Determinant Distinguishable Cluster” in electronic-structure theory [2401.11935], and “Small-scale Significant substructure DBSCAN Detection” in star-formation studies [2011.10574; 2603.19009].

| Usage of “S2D2” | Domain | Representative paper |
|---|---|---|
| Training-free self-speculative decoding for block-diffusion LLMs | Machine learning | [2603.25702] |
| sd2 graphene | Condensed matter | [1411.0786] |
| SIDDHARTA-2 SDD system / apparatus | Experimental hadronic physics | [2111.01572], [2311.16144] |
| Sequential Stackelberg Drone Defense | Security games | [2508.11380] |
| Two Determinant Distinguishable Cluster | Quantum chemistry | [2401.11935] |
| Small-scale Significant substructure DBSCAN Detection | Astrophysics | [2011.10574], [2603.19009] |

A plausible implication is that acronym-only retrieval is unreliable without disciplinary context. Within large-language-model research, however, S2D2 specifically denotes the verifier-routed, training-free self-speculative decoding method for block-diffusion models, whose defining contribution is the reuse of the same pretrained model as both block-diffusion drafter and block-size-$1$ autoregressive verifier.

Source: https://www.emergentmind.com/topics/s2d2