跳到正文
HuggingFace Daily Papers·· 2 天前

约束解码有害还是有益?重新审视约束解码对 LLM 性能的影响

Constrained Decoding: Harmful or Beneficial? Revisiting Its Impact on LLM Performance

AI 导读

研究通过格式、有效性、推理三类约束的分类体系,对四个模型家族、十一个开源模型做因果消融实验,发现约束解码导致的性能下降主要源于提示词与输出格式不等价,而非解码器层面的掩码。有效性约束能消除无效答案以提升可靠性与可提取性,推理约束在强制有益轨迹时可提升推理能力与准确率。

正文 · 原文

View PDF HTML (experimental)

Abstract:Constrained decoding guarantees that Large Language Models (LLMs) produce outputs conforming to predefined formats, but is often assumed to inherently degrade reasoning. We examine this assumption through a taxonomy of three constraint types: \emph{format constraints}, which enforce output structure; \emph{validity constraints}, which mask invalid answer; and \emph{reasoning constraints}, which restrict reasoning trajectories. We theoretically show that appropriate constraints can preserve or improve performance by eliminating invalid paths. Across four model families and eleven open-source models, causal ablations on diverse benchmarks using state-of-the-art constrained decoding strategies reveal that apparent performance degradation largely stems from non-equivalent prompting and output formats rather than from decoder-level masking. Meanwhile, validity constraints improve reliability and extractability by eliminating invalid answers, while reasoning constraints can improve reasoning and, consequently, accuracy when they enforce beneficial trajectories. These findings show that the impact of constrained decoding depends on the type of constraint and the output space it removes. Our code is available.
Subjects: Computation and Language (cs.CL); Artificial Intelligence (cs.AI)
Cite as: arXiv:2610.35328 [cs.CL]
  (or arXiv:2610.35328v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2610.35328

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Ngoc Trinh Hung Nguyen [view email]
[v1] Mon, 26 Oct 2026 12:26:08 UTC (134 KB)

来源:HuggingFace Daily Papers · arxiv.org