Grammar-constrained decoding (GCD) is a common way to force language models to produce syntactically valid outputs: at each step, the model masks out any token that would violate the grammar so far. But the paper notes a subtle flaw: the mask only checks whether the token is valid given the current prefix, not whether the full sequence could still lead to a valid parse. This can push the model toward outputs that look fine early on but later become dead ends, introducing a bias that standard GCD does not address.
The authors propose a lightweight correction that uses the parser's own state to adjust token probabilities. Because the parser already tracks which continuations are possible, that information can be used to re-weight candidates without expensive lookahead or additional model calls. The result is a method that reduces bias while keeping the decoding process nearly as fast as plain GCD.
The paper is a single source, so there are no conflicting findings to compare. Its contribution is practical: a small change to how GCD masks tokens, informed by the parser's knowledge, that can improve output quality without sacrificing efficiency. The abstract does not include experimental numbers, so the claimed benefits are qualitative at this stage.