Constrained decoding masks+renormalizes each step; when the base model puts little mass on schema tokens, this is a reverse-KL projection with a large "projection tax" that steers toward valid-but-wrong outputs. DCCD first generates an unconstrained draft, then constrains conditioned on it — raising feasible mass, cutting distortion, keeping exact validity. +24pp on GSM8K (1B: 15.2%→39.0%).
Q1 — 痛点. Hard structural constraints (JSON schema, CFG, tool-call signatures) are non-negotiable in agentic/tool pipelines: one bad brace breaks downstream execution. Standard constrained decoding (CD) guarantees validity by masking invalid tokens and renormalizing at each step — but this is not a passive filter. When the base model assigns low probability to the schema-forced token (e.g. {, ", a field name), renormalization is a large perturbation. Repeated across many low-entropy formatting steps, this induces a trajectory bias toward prefixes that are easy to keep valid, even when they correspond to a wrong solution. Prior work documents 10–30% degradation vs unconstrained generation.
Q2 — 方法. DCCD = training-free two-step inference that decouples semantic planning from structural enforcement. Step 1: draft $y \sim p_{\mathrm{draft}}(\cdot\mid x)$ — free-form reasoning/plan, not required to be valid. Step 2: constrained-decode the final structured output conditioned on $(x,y)$, masking on the same valid-next-token set $A(h_t)$ but scoring with the draft-conditioned distribution $p_2(\cdot\mid x,y,z_{
Q3 — 结果. Across GSM8K, GSM-Symbolic, MATH500, FOLIO and 1B–14B models, DCCD gives the best aggregated strict accuracy at every scale, largest relative gains for small models (Qwen2.5-1.5B 22.8→36.8 avg). Test-time compute converts to accuracy better than CD (GSM8K 78→83 vs CD 64→73 as $n$: 1→13). ~78–80.5% win rate on non-verifiable summarization. +39% response confidence (0.527 vs 0.393).

Paper's Figure 2, verbatim (caption: "Draft-Conditioned Constrained Decoding (DCCD) reduces distortion from structural constraints... DCCD instead first samples an unconstrained draft $y\sim\rho_\theta(\cdot\mid x)$ and conditions the next-token distribution on the draft... before applying the grammar mask.").
Top row (CD): the base policy's next-token probs (e.g. mass on natural-language Ok, Th) get the grammar mask applied directly — the schema token { has only 0.3 mass, so masking+renormalization heavily distorts. Bottom row (DCCD): after conditioning on draft $y$, the same { token now carries 0.9 mass, so applying the identical mask barely perturbs the distribution. The inset bar shows the net effect: +10.6 avg accuracy (32.9→43.5) across 6 models × 4 datasets. Notice the mask is identical in both rows — DCCD changes only the distribution being projected, never the constraint.
The two-stage control flow (draft model → projector with masking) is a sequence, not a per-block architecture:
The draft never enters the validity check: the mask keys on $A(h_t)$ where $h_t=(x,z_{
Notation table.
| Symbol | Meaning |
|---|---|
| $x,\ z_{1:T},\ V$ | prompt, output token seq (len $T$), vocabulary |
| $\pi_\theta,\ \rho_\theta$ | base LM per-step / induced sequence distribution |
$h_t \triangleq (x,z_{| decoding state (constraint keys on this) | |
| $L(x)\subseteq V^*$ | set of structurally valid sequences |
| $A(h_t)$ | valid-next-token set (tokens with ≥1 valid completion) |
| $\alpha(h_t)=\sum_{a\in A(h_t)}\pi_\theta(a\mid h_t)$ | feasible mass |
| $q,\ \rho_q$ | constrained per-step / sequence distribution |
| $d,\ y$ | auxiliary draft context / instantiated draft |
| $\alpha(\tilde h_t)=\sum_{a\in A(h_t)}p_2(a\mid \tilde h_t)$ | draft-conditioned feasible mass, $\tilde h_t=(x,y,z_{ |
| $\bar U$ | validity-gated utility $U\cdot\mathbb{I}[z\in L(x)]$ |
方程物理意义. Base factorization $\rho_\theta(z_{1:T}\mid x)=\prod_t \pi_\theta(z_t\mid h_t)$ (Eq.1). CD reweights: $q(z_t\mid h_t)=\pi_\theta(z_t\mid h_t)\mathbb{I}[z_t\in A(h_t)]/\alpha(h_t)$ (Eq.4). The per-step distortion is exactly $\mathrm{KL}(q\|\pi_\theta)=\log\frac1{\alpha(h_t)}$ (Eq.5) — small feasible mass ⇒ large distortion. Summed over the trajectory this is an additive projection tax $\mathrm{KL}(\rho_q\|\rho_\theta)=\mathbb{E}_{z\sim\rho_q}\big[\sum_t\log\frac1{\alpha(h_t)}\big]$. Geometrically, $q(\cdot\mid h_t)=\arg\min_{p\in\Delta_{A(h_t)}}\mathrm{KL}(p\|\pi_\theta)$ (Eq.7): CD = repeated reverse-KL projection onto the valid simplex. Even among valid strings, $\rho_q(z\mid x)=\rho_\theta(z\mid x)/\prod_t\alpha(h_t)$ (Eq.8) — a prefix-dependent reweighting that favors "easy-to-project" prefixes. DCCD keeps the mask on $A(h_t)$ but swaps $\pi_\theta$ for the draft-conditioned $p_2$ (Eq.14), raising $\alpha(\tilde h_t)$ (Eq.15). Appendix A closes the loop: for validity-gated utility, the utility gap between any $P,Q$ is bounded $\le \mathrm{TV}(P,Q)\le\sqrt{\tfrac12\mathrm{KL}(P\|Q)}$ (Eq.17, Pinsker). With $P=\rho_q,\ Q=\rho_\theta$ and the projection-tax identity (Eq.18), raising $\alpha(h_t)$ shrinks the KL and tightens the worst-case accuracy loss.
6 minimum checks.

Paper's Figure 5 (caption: "Average performance comparison across all evaluation datasets... DCCD achieves the best aggregated performance, with the largest relative gains for smaller models... 1B: 10.2%→20.9%").
DCCD (green) is highest at every scale vs Constrained Prompt (CP), Constrained Few-Shot (CF), and grammar CD. Reading the bars: Qwen2.5-1.5B jumps 22.8→36.8, 7B 42.7→54.2, 14B 47.4→58.1. The clearest signal supporting the theory is the shape: the smaller the model (lower feasible mass, worst projection tax), the larger the DCCD lift — exactly what §4's mechanism predicts. (Note the Llama-3.2-1B green bar reads 20.9 here, matching the caption's "→20.9%"; an L1-extracted table had a transcription ambiguity, resolved in favor of the figure.)

Paper's Figure 6 (caption: "Parameter efficiency (accuracy per billion parameters)... DCCD consistently achieves higher accuracy per parameter, with the largest gains in low-capacity regimes").
Each cluster compares a single-model CD (purple, e.g. 14B) against a parameter-matched DCCD composition (green, e.g. 7B+1.5B). DCCD accuracy-per-B roughly triples on GSM8K (6.1→18.8) and MATH500 (3.4→12.7). This is the load-bearing efficiency claim: splitting a fixed parameter budget into drafter+projector beats spending it all on one constrained model.

Paper's Figure 7 (caption: "Test-time scaling comparison across GSM8K and MATH500... DCCD (blue) shows superior scaling versus Constrained Decoding (red), with widening performance gaps as n increases from 1 to 13").
Best-of-$K$ draft selection lets DCCD absorb test-time compute more productively than repeated constrained sampling: on GSM8K DCCD 78→83 vs CD 64→73; on MATH500 42→47 vs 29→37. Gains saturate around $n\approx7$ (best drafts already sampled), and the gap never closes — allocating compute to diverse drafts beats resampling under the constraint.

Paper's Figure 3 (feasible-mass toy example: for the answer to $3(2x-1)=81$, CD emits valid-but-wrong "27", DCCD emits correct "14"; per-token $\alpha$ bars).
This is the empirical anchor for the projection-tax story: on the forced formatting/answer tokens CD's feasible mass is often ≤0.53 and near-zero for early tokens (~1% of vocab feasible), while DCCD lifts each to 0.85–0.97. Low $\alpha$ at many steps is precisely what accumulates into distortion and the valid-but-wrong "27".

Paper's Figure 4 (caption: "Constrained decoding spreads probability mass across multiple plausible answer tokens... incorrect answer '27' receiving moderate confidence (0.46). DCCD shows a sharp, concentrated distribution with near-perfect confidence (1.0) on the correct token '14'").
Where CD smears mass across 27/28/6/84/9, DCCD collapses onto the correct 14. The reasoning content was already in the draft; conditioning makes the answer slot near-deterministic once the schema is satisfied.

Paper's Figure 7 in source text / response-confidence histogram (Llama-3.2-3B, GSM8K): DCCD mean 0.527 vs CD 0.393, a +39% rightward shift.
Notably DCCD's confidence is the joint $p_{\mathrm{draft}}(d\mid x)\cdot p_2(y\mid x,d)$ — a product of two stages — yet still exceeds single-stage CD. Separating reasoning from formatting raises confidence even though naively multiplying two probabilities should lower it.

Paper's Figure 8 (caption: "Win rate comparison between DCCD and CD on non-verifiable summarization tasks... approximately 78–80.5% win rate across all evaluation dimensions").
LLM-as-judge on 256-token TL;DR summaries: DCCD wins ~78% (quality), 78% (faithfulness), 80.5% (coverage), showing the staged recipe generalizes beyond verifiable math to open-ended generation.
| # | Step | Paper-internal support |
|---|---|---|
| 1 | CD masks+renormalizes ⇒ per-step reverse-KL distortion $=\log\frac1{\alpha(h_t)}$ | Eq.4–5 derivation |
| 2 | Distortions add over the trajectory ⇒ cumulative "projection tax" $\sum_t\log\frac1{\alpha}$; reweights even valid strings by $\prod_t\alpha^{-1}$, biasing toward easy-to-project (locally valid) prefixes | Eq.7–8, toy example, Fig.3 |
| 3 | Feasible mass $\alpha$ depends on conditioning context, which is free at inference ⇒ appending a draft $d$ gives $\alpha(h_t;d)\gg\alpha(h_t)$ | Eq.10–11 |
| 4 | Instantiate $d$ as an unconstrained draft $y$; constrain conditioned on $(x,y)$ ⇒ same exact validity ($A(h_t)$ unchanged), smaller distortion | Eq.12–15, Alg.1 |
| 5 | Smaller distortion (KL) ⇒ tighter worst-case utility-loss bound via Pinsker on validity-gated utility | Eq.16–18 (Appendix A) |
| 6 | Best-of-$K$ by cumulative $\log\alpha$ picks the least-distorted trajectory ⇒ test-time compute converts to accuracy | Alg.1 selector, Fig.7 |
| 7 | Empirically: best strict accuracy at all 1B–14B scales, largest lift for small models, better param-efficiency and scaling | Fig.1, Fig.5, Fig.6, Fig.7 |
关键实现细节 (easy-to-miss tricks).
核心技术壁垒 (deep-dive). The single hardest-to-replicate insight is not the two-step procedure (obvious in hindsight) but the reframing: proving that the quality-validity tradeoff is a KL-projection artifact whose magnitude is $\log\frac1{\alpha(h_t)}$, then observing $\alpha$ is a free variable at inference because it depends on conditioning context (Eq.10). This turns "constraints hurt accuracy" from an accepted cost into a reducible distortion, and it is what justifies keeping the constraint set fully intact (no relaxation, exact guarantees) while recovering unconstrained-level accuracy. Everything else (best-of-$K$, param-efficient drafter/projector split) follows mechanically from this identity.
Implementation stack. CD baseline uses XGrammar integrated with vLLM; JSON tasks via Pydantic schemas (class MATHSchema(BaseModel): steps: List[str]; answer: str), symbolic/logical tasks via Lark-style CFGs (GSM-Symbolic < grammar; FOLIO first-order-logic grammar verified by Prover9). DCCD's own decoding code is [实现未公开] — no repository link in the source; the method is described only as pseudocode (Algorithm 1) plus the XGrammar/vLLM masking backend.
This is an inference-time method, not a model release — several deep-model rows are therefore N/A:
| Stage | Goal | Data (tokens + mix) | LR schedule | Context | Techniques |
|---|---|---|---|---|---|
| (any) | — | — | — | — | N/A — DCCD is training-free; no pre-training, mid-training, SFT, or post-training is performed. Uses off-the-shelf Llama-3.x / Qwen2.5 Instruct checkpoints. |
N/A — this paper is an inference-time decoding procedure, not a model release. There is no released model architecture, no official modeling_*.py, and no config.json to reverse-engineer (Table 1 uses stock Llama-3.x / Qwen2.5 checkpoints whose architectures are documented elsewhere). The only "architecture" is the two-stage decoding control flow, drawn as a Mermaid sequence in §3. No per-block attention/FFN diagrams apply because the method leaves the underlying transformer untouched.