Papers
Topics
Authors
Recent
Search
2000 character limit reached

Candidate-Constrained Decoding

Updated 5 July 2026
  • Candidate-Constrained Decoding is a framework that restricts generative model outputs to a predefined candidate set, ensuring compliance with hard syntactic or semantic constraints.
  • It encompasses various mechanisms—including draft-conditioned decoding, candidate-set reranking, and lookahead-constrained decoding—that tailor inference to task-specific requirements.
  • Empirical studies show that these methods enhance output validity and structured accuracy across diverse domains such as translation, robotics, and code generation, despite added computational cost.

to=arxiv_search.search 大发快三是什么query":"candidate-constrained decoding draft-conditioned constrained decoding structured generation LLMs", "max_results": 5} to=arxiv_search.search 彩神争霸 _国产? to=arxiv_search.search 彩神争霸输钱json_string {"query":"candidate-constrained decoding", "max_results": 10} to=arxiv_search ՞նչ {"query":"candidate-constrained decoding", "max_results": 10} to=arxiv_search.search 北京赛车女json {"query":"Draft-Conditioned Constrained Decoding for Structured Generation in LLMs", "max_results": 5} Candidate-constrained decoding denotes a family of inference procedures in which generation is restricted to, selected from, or conditioned on an explicit candidate set rather than left to unconstrained autoregressive decoding. In the cited literature, this idea appears in several closely related forms: selecting the highest-probability feasible labeling under a hard constraint function, choosing from a finite candidate pool by expected utility, conditioning constrained generation on an unconstrained draft, evaluating top-kk next-token candidates by speculative lookahead, and scoring candidates directly from logits without full decoding (Hemmer et al., 2023, Natsumi et al., 1 Dec 2025, Reddy et al., 8 Feb 2026, Nakshatri et al., 2024, Ma et al., 28 Jan 2025). This suggests that “candidate-constrained decoding” is best treated as a unifying perspective on constrained inference, not as a single standardized algorithm.

1. Formal scope and recurring formulations

A canonical formulation appears in structured prediction, where the decoder searches over candidate outputs but retains only those satisfying a hard global constraint function. For token classification, the objective is

y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),

with C:Xn×Yn{0,1}\mathcal{C} : \mathcal{X}^n \times \mathcal{Y}^n \to \{0,1\}, so infeasible candidates are assigned probability $0$ and excluded from selection (Hemmer et al., 2023).

A second formulation constrains decoding to a finite candidate set Y={y1,,yN}\mathcal{Y} = \{y_1,\dots,y_N\}, then ranks candidates by a decision rule rather than by token-level next-step probabilities. In minimum Bayes risk decoding, the chosen output is

yMBR=arg maxyiY1Mj=1MOij,Oij=u(yi,y^j),y_{\text{MBR}} = \argmax_{y_i \in \mathcal{Y}} \frac{1}{M} \sum_{j=1}^{M} O_{ij}, \qquad O_{ij} = u(y_i,\hat{y}_j),

so decoding is explicitly candidate-constrained because the search space is Y\mathcal{Y}, not T\mathcal{T} (Natsumi et al., 1 Dec 2025).

A third formulation preserves token-by-token constrained decoding, but changes the conditional distribution on which constraints are enforced. In Draft-Conditioned Constrained Decoding, a free-form draft yy is generated first, and the final structured output zz is then decoded under hard constraints from

y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),0

with the same valid-next-token set y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),1 as standard constrained decoding, but a draft-conditioned feasible mass y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),2 (Reddy et al., 8 Feb 2026).

A fourth formulation avoids autoregressive decoding entirely. In decoding-free generative candidate selection, the answer must belong to a candidate pool y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),3, and a function y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),4 estimates candidate probabilities from prior-decoding logits without discrete decoding: y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),5 Here the constraint is that the final prediction must be an element of y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),6, but inference occurs in candidate space rather than token space (Ma et al., 28 Jan 2025).

2. Principal inference patterns

Across the literature, candidate-constrained decoding is implemented through a small number of recurring mechanisms. The differences concern what counts as a “candidate,” when constraints are evaluated, and whether feasibility is enforced as hard masking, as best-first selection, or as reweighting.

Pattern Candidate object Representative mechanism
Feasible-set decoding Full output or labeling Maximize model score subject to y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),7
Candidate-set reranking Finite set y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),8 Rank by expected utility or approximate MBR score
Draft-conditioned decoding Free-form draft y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),9 Condition constrained decoding on C:Xn×Yn{0,1}\mathcal{C} : \mathcal{X}^n \times \mathcal{Y}^n \to \{0,1\}0
Lookahead-constrained decoding Top-C:Xn×Yn{0,1}\mathcal{C} : \mathcal{X}^n \times \mathcal{Y}^n \to \{0,1\}1 next tokens or short continuations Roll out lookaheads and score them with C:Xn×Yn{0,1}\mathcal{C} : \mathcal{X}^n \times \mathcal{Y}^n \to \{0,1\}2
Decoding-free selection Candidate pool C:Xn×Yn{0,1}\mathcal{C} : \mathcal{X}^n \times \mathcal{Y}^n \to \{0,1\}3 Estimate C:Xn×Yn{0,1}\mathcal{C} : \mathcal{X}^n \times \mathcal{Y}^n \to \{0,1\}4 directly from logits

In standard constrained decoding for structured generation, hard constraints are enforced token-by-token by masking and renormalization: C:Xn×Yn{0,1}\mathcal{C} : \mathcal{X}^n \times \mathcal{Y}^n \to \{0,1\}5 When C:Xn×Yn{0,1}\mathcal{C} : \mathcal{X}^n \times \mathcal{Y}^n \to \{0,1\}6 is small, renormalization strongly distorts the distribution, especially under strict schemas that require early formatting tokens such as braces, quotes, commas, or field names (Reddy et al., 8 Feb 2026).

Lazy-C:Xn×Yn{0,1}\mathcal{C} : \mathcal{X}^n \times \mathcal{Y}^n \to \{0,1\}7 represents a different pattern: it enumerates full label assignments in exact decreasing order of probability and stops when it finds a candidate satisfying C:Xn×Yn{0,1}\mathcal{C} : \mathcal{X}^n \times \mathcal{Y}^n \to \{0,1\}8, or when it reaches a limit C:Xn×Yn{0,1}\mathcal{C} : \mathcal{X}^n \times \mathcal{Y}^n \to \{0,1\}9. Its cost function is

$0$0

and the procedure maintains a min-heap over next-best neighbors at edit distance $0$1 in the paper’s ranked-label sense (Hemmer et al., 2023).

In candidate-set MBR, the expensive step is evaluating all pairwise utilities over the candidate set. Probabilistic MBR samples only a subset of matrix entries and reconstructs the remainder by low-rank factorization, while agreement-constrained PMBR adds an auxiliary distilled metric and an agreement term

$0$2

to guide completion of the target score matrix (Natsumi et al., 1 Dec 2025).

Lookahead-constrained decoding uses candidates that are only locally explicit. In constrained decoding with lookahead heuristics, the decoder takes top-$0$3 next-token candidates, greedily rolls out a length-$0$4 continuation for each, scores each sequence with a reward $0$5, and emits only the one-step candidate whose projected future score is highest. Constrained decoding with speculative lookaheads keeps that search pattern but drafts lookaheads with a smaller model and verifies them with the target model (Nakshatri et al., 2024).

3. Constraint semantics, distortion, and guarantees

A central theoretical theme is that constraints do not merely filter outputs after the fact; they reshape the effective decoding distribution. In standard structured generation, constrained decoding at each step is the reverse-KL projection of the base distribution onto the feasible simplex

$0$6

and the per-step distortion is

$0$7

Aggregated over a trajectory, this yields the cumulative “projection tax,”

$0$8

which biases decoding toward prefixes that are easier to keep valid, not necessarily semantically correct (Reddy et al., 8 Feb 2026).

Draft-conditioned constrained decoding attacks exactly this mechanism. Because the valid set $0$9 is unchanged but the context becomes Y={y1,,yN}\mathcal{Y} = \{y_1,\dots,y_N\}0, feasible mass can increase from Y={y1,,yN}\mathcal{Y} = \{y_1,\dots,y_N\}1 to Y={y1,,yN}\mathcal{Y} = \{y_1,\dots,y_N\}2. The paper’s KL-projection view therefore interprets draft selection as choosing a context that lowers projection tax and preserves semantics under hard structural constraints. With multiple drafts, the selected candidate is

Y={y1,,yN}\mathcal{Y} = \{y_1,\dots,y_N\}3

so the chosen draft is the one whose constrained realization is most “projection-friendly” (Reddy et al., 8 Feb 2026).

Other lines of work emphasize exactness or formal safety rather than distributional distortion. Lazy-Y={y1,,yN}\mathcal{Y} = \{y_1,\dots,y_N\}4 guarantees optimality within the explored candidate ordering under the independence assumption

Y={y1,,yN}\mathcal{Y} = \{y_1,\dots,y_N\}5

because it enumerates complete labelings in exact probability order; the paper gives space complexity Y={y1,,yN}\mathcal{Y} = \{y_1,\dots,y_N\}6 and time complexity Y={y1,,yN}\mathcal{Y} = \{y_1,\dots,y_N\}7 (Hemmer et al., 2023).

Speculative decoding introduces a different constraint variable: the number of in-flight candidate tokens before verification. SpecDec++ formulates the choice of candidate length as an MDP and proves that the optimal policy takes the form of a threshold policy: speculation should stop when the probability that at least one token gets rejected exceeds a threshold. Its operational signal is

Y={y1,,yN}\mathcal{Y} = \{y_1,\dots,y_N\}8

which estimates the probability that at least one candidate token in the current segment will be rejected (Huang et al., 2024).

In robotics, candidate-constrained decoding is defined over action sequences rather than text strings. The ideal constrained distribution is

Y={y1,,yN}\mathcal{Y} = \{y_1,\dots,y_N\}9

where feasibility is determined by signal temporal logic and a dynamics model. Hard Constrained Decoding masks actions whose predicted next states violate yMBR=arg maxyiY1Mj=1MOij,Oij=u(yi,y^j),y_{\text{MBR}} = \argmax_{y_i \in \mathcal{Y}} \frac{1}{M} \sum_{j=1}^{M} O_{ij}, \qquad O_{ij} = u(y_i,\hat{y}_j),0, while Robustness Constrained Decoding reweights logits using STL robustness. The hard variant comes with a theorem: if the dynamics model yMBR=arg maxyiY1Mj=1MOij,Oij=u(yi,y^j),y_{\text{MBR}} = \argmax_{y_i \in \mathcal{Y}} \frac{1}{M} \sum_{j=1}^{M} O_{ij}, \qquad O_{ij} = u(y_i,\hat{y}_j),1 is deterministic and exact, then the generated trajectory satisfies the specification (Kapoor et al., 1 Sep 2025).

Correctness-guaranteed code generation pushes constraint semantics further still. There the decoder is constrained by a context-sensitive parser whose next_regex() must satisfy a non-extensible property: if a string matches the regex, then no strict extension of that string may also match it. This allows each segment to be decoded under a DFA whose final states correspond to maximal semantically valid next segments. The resulting guarantees are syntactic correctness, semantic correctness with respect to typing and scoping, and—under the paper’s sLua and API restrictions—termination and runtime error freedom for completed scripts (Li et al., 20 Aug 2025).

4. Domains and representative constraint classes

Candidate-constrained decoding spans a wide range of tasks because the candidate object can be a label sequence, a structured string, a translation hypothesis, a speculative token segment, a robot action trajectory, or a program. The constraint language changes accordingly.

Domain Candidates Constraint class
Structured reasoning JSON objects, symbolic expressions, FOL strings JSON schemas, expression grammars, FOL grammars
Information extraction Token labelings BIO legality, numeric parsing, invoice arithmetic
Machine translation Sampled translation set Utility-defined candidate-set selection
Robotics Action sequences STL satisfaction or robustness
Code generation Next code segments / programs CFG, typing, scoping, API, runtime-safety restrictions

In structured reasoning, Draft-Conditioned Constrained Decoding enforces several classes of hard constraints: JSON schemas for GSM8K and MATH500; an arithmetic expression grammar enclosed in << and >> for GSM-Symbolic; and a first-order logic grammar with Predicates:, Premises:, and Conclusion: sections for FOLIO, verified by a Prover9 theorem prover. These constraints are implemented via XGrammar as finite-state or CFG-like objects exposing the valid-next-token set yMBR=arg maxyiY1Mj=1MOij,Oij=u(yi,y^j),y_{\text{MBR}} = \argmax_{y_i \in \mathcal{Y}} \frac{1}{M} \sum_{j=1}^{M} O_{ij}, \qquad O_{ij} = u(y_i,\hat{y}_j),2 (Reddy et al., 8 Feb 2026).

In invoice information extraction, the constraint function can combine BIO legality with domain arithmetic. The paper lists concrete invoice semantics such as

yMBR=arg maxyiY1Mj=1MOij,Oij=u(yi,y^j),y_{\text{MBR}} = \argmax_{y_i \in \mathcal{Y}} \frac{1}{M} \sum_{j=1}^{M} O_{ij}, \qquad O_{ij} = u(y_i,\hat{y}_j),3

for WildReceipt and

yMBR=arg maxyiY1Mj=1MOij,Oij=u(yi,y^j),y_{\text{MBR}} = \argmax_{y_i \in \mathcal{Y}} \frac{1}{M} \sum_{j=1}^{M} O_{ij}, \qquad O_{ij} = u(y_i,\hat{y}_j),4

for DocILE, alongside float-parsing constraints for numeric spans (Hemmer et al., 2023).

In translation, candidate-constrained decoding is utility-driven rather than grammar-driven. The candidate set consists of yMBR=arg maxyiY1Mj=1MOij,Oij=u(yi,y^j),y_{\text{MBR}} = \argmax_{y_i \in \mathcal{Y}} \frac{1}{M} \sum_{j=1}^{M} O_{ij}, \qquad O_{ij} = u(y_i,\hat{y}_j),5 sampled translations, reused as both candidates and pseudo-references, and utilities are computed by BLEURT-20. The constraint is therefore not syntactic validity, but restriction to a fixed candidate pool whose members are selected by expected utility over the score matrix (Natsumi et al., 1 Dec 2025).

In robotics, the candidates are actions in a discrete vocabulary yMBR=arg maxyiY1Mj=1MOij,Oij=u(yi,y^j),y_{\text{MBR}} = \argmax_{y_i \in \mathcal{Y}} \frac{1}{M} \sum_{j=1}^{M} O_{ij}, \qquad O_{ij} = u(y_i,\hat{y}_j),6, but constraint checking is state-based. For each candidate action, the decoder predicts a next state yMBR=arg maxyiY1Mj=1MOij,Oij=u(yi,y^j),y_{\text{MBR}} = \argmax_{y_i \in \mathcal{Y}} \frac{1}{M} \sum_{j=1}^{M} O_{ij}, \qquad O_{ij} = u(y_i,\hat{y}_j),7 and then either masks the action if it violates yMBR=arg maxyiY1Mj=1MOij,Oij=u(yi,y^j),y_{\text{MBR}} = \argmax_{y_i \in \mathcal{Y}} \frac{1}{M} \sum_{j=1}^{M} O_{ij}, \qquad O_{ij} = u(y_i,\hat{y}_j),8, or computes robustness

yMBR=arg maxyiY1Mj=1MOij,Oij=u(yi,y^j),y_{\text{MBR}} = \argmax_{y_i \in \mathcal{Y}} \frac{1}{M} \sum_{j=1}^{M} O_{ij}, \qquad O_{ij} = u(y_i,\hat{y}_j),9

and uses it to reweight the logits. The paper’s experiments emphasize geofencing and obstacle avoidance (Kapoor et al., 1 Sep 2025).

In code generation, the constraints are simultaneously syntactic and semantic. The parser tracks modular CFG state, variable scopes, types, available fields, effect IDs, talent IDs, and API signatures. The generated language, sLua, excludes nil, dynamic arrays, recursive functions, and unrestricted while loops; these design choices are part of the decoding-time guarantee that completed scripts terminate and execute without runtime errors in the game engine (Li et al., 20 Aug 2025).

5. Empirical behavior and computational trade-offs

Empirical work consistently reports that candidate-constrained decoding can improve strict validity or task performance, but usually by paying extra search, verification, or candidate-scoring cost. The shape of that trade-off depends on whether the method changes the conditional distribution, enumerates more candidates, or amortizes verification with a smaller auxiliary model.

Draft-Conditioned Constrained Decoding reports large gains in strict structured accuracy. On GSM8K with a 1B model, strict structured accuracy rises from Y\mathcal{Y}0 under standard constrained decoding to Y\mathcal{Y}1 under DCCD; with a 1.5B model it rises from Y\mathcal{Y}2 to Y\mathcal{Y}3; and with a 14B model from Y\mathcal{Y}4 to Y\mathcal{Y}5. The paper also reports that on MATH500 a Y\mathcal{Y}6 DCCD composition achieves Y\mathcal{Y}7 accuracy per billion parameters, versus Y\mathcal{Y}8 for an 8B constrained-decoding baseline (Reddy et al., 8 Feb 2026).

Lazy-Y\mathcal{Y}9 shows the classical search-depth trade-off. On CORD, T\mathcal{T}0 rises from T\mathcal{T}1 for Argmax to T\mathcal{T}2 at T\mathcal{T}3, T\mathcal{T}4 at T\mathcal{T}5, and T\mathcal{T}6 at T\mathcal{T}7, while decoding time rises from approximately T\mathcal{T}8 s to T\mathcal{T}9 s, yy0 s, and yy1 s. The paper states that, for the same yy2 as Lazy-ILP (yy3), Lazy-yy4 is about yy5 faster on CORD, about yy6 faster on WildReceipt, and about yy7 faster on DocILE (Hemmer et al., 2023).

Agreement-Constrained PMBR addresses a different bottleneck: pairwise candidate scoring cost. In the high-reduction setting, PMBR degrades sharply, whereas AC-PMBR “improved approximation errors of matrix completion by up to 3 times” and remained ahead on every metric. The paper gives an En→De example with D6 distilled where BLEU is approximately yy8 versus approximately yy9 for PMBR, chrF approximately zz0 versus approximately zz1, and MSE approximately zz2 versus zz3 (Natsumi et al., 1 Dec 2025).

For reward-guided lookahead methods, the main variable is inference speed. Constrained decoding with speculative lookaheads achieves zz4 to zz5 speedup over constrained decoding with lookahead heuristics without significant performance reduction. On CommonGen with OPT-13B, greedy decoding has hard constraint satisfaction zz6, CDLH zz7, and CDSL zz8, while CDSL obtains a zz9 speedup over CDLH. On harmless text generation with OPT-13B, harmlessness improves from y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),00 under greedy decoding to y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),01 under CDSL, with a y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),02 speedup over CDLH (Nakshatri et al., 2024).

Adaptive candidate-length control in speculative decoding yields another speed-quality profile. SpecDec++ reports a y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),03 speedup on Alpaca, a y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),04 speedup on GSM8K, and a y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),05 speedup on HumanEval, corresponding to additional improvements over baseline speculative decoding of y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),06, y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),07, and y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),08, respectively (Huang et al., 2024).

Decoding-free candidate selection behaves differently because it avoids generation entirely. On massive candidate pools it can be much faster than full decoding: for Diagnoses with y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),09 candidates, decoding takes y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),10 s per instance, while “First” takes y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),11 s and “Last” y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),12 s; for Prescriptions with y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),13 candidates, decoding takes y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),14 s while “First” takes y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),15 s. The paper states that logits-based estimation can outperform full decoding when full decoding is weak, particularly for non-instruction-tuned models or very large candidate pools (Ma et al., 28 Jan 2025).

6. Limitations, failure modes, and directions

A recurring limitation is that candidate-constrained decoding often shifts complexity from training to inference. Draft-conditioned decoding is training-free, but depends heavily on draft quality; if drafts are wrong or misleading, conditioning may amplify incorrect reasoning, and for extremely strict schemas the draft-conditioned feasible mass may still remain low (Reddy et al., 8 Feb 2026).

Search-based methods inherit assumptions from their search space. Lazy-y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),16 relies on the independence of token labels to justify its neighbor-ordering property, is tailored to fixed-length token classification, and maintains all visited full sequences in memory, so very long sequences or very large y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),17 can be problematic (Hemmer et al., 2023).

Candidate-set MBR methods inherit the weaknesses of their auxiliary structure. AC-PMBR assumes access to a good distilled version of the target metric, uses BLEURT-20 as the target metric, and is evaluated only on WMT’23 En↔De. The paper identifies dependence on distilled-metric quality and limited task and language coverage as explicit limitations (Natsumi et al., 1 Dec 2025).

Safety-guaranteed decoding in robotics is only as strong as its world model. The HCD theorem is explicitly “modulo dynamics”: guarantees hold when the dynamics model is deterministic and exact. Robustness Constrained Decoding has no absolute guarantee because unsafe actions retain nonzero probability, even though STL satisfaction rates improve substantially (Kapoor et al., 1 Sep 2025).

Correctness-guaranteed code generation achieves its strongest results by restricting the language. The guarantees rely on sLua design choices such as no nil, no dynamic data structures, bounded while loops, and no recursive functions. The paper also reports failure modes from distribution distortion, including non-termination via repetition under tight constraints (Li et al., 20 Aug 2025).

Decoding-free candidate scoring is fast, but the estimators are deliberately crude. The paper emphasizes that current methods use only initial logits and simple aggregations such as “First,” “Last,” “Average,” and “Sum,” so they ignore token dependencies, multi-step reasoning, and context-specific token importance (Ma et al., 28 Jan 2025).

Speculative candidate methods require alignment between auxiliary and target models. CDSL assumes draft and target models from the same family with shared tokenizers, while SpecDec++ introduces an acceptance-prediction head and still tunes a stopping threshold y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),18 empirically because the theoretical threshold involves a hard-to-compute constant y^=argmaxyYnp(yx)C(x,y),\hat{\mathbf{y}} = \arg\max_{\mathbf{y} \in \mathcal{Y}^n} p(\mathbf{y} \mid \mathbf{x}) \cdot \mathcal{C}(\mathbf{x}, \mathbf{y}),19 (Nakshatri et al., 2024, Huang et al., 2024).

This suggests a broad research direction: candidate-constrained decoding becomes most powerful when the candidate structure, the verifier or constraint oracle, and the scoring rule are matched to the semantics of the task. The existing literature already spans structured outputs, information extraction, translation, robotics, and code, but it does so through different notions of what a candidate is and what it means for that candidate to be feasible.

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 Candidate-Constrained Decoding.