Sign inGet started
Paper · arXiv

Provably Tractable NFA-Constrained Language Generation via HMMs

Constrained generation aims to sample from language models (LMs) conditioned on hard constraints. Existing constrained-generation techniques for nondeterministic finite automaton (NFA) constraints either distort the distribution or sacrifice efficiency. Theoretically, this task reduces to counting the length-$n$ sequences accepted by an NFA (#NFA), and the exact #NFA problem is #P-complete. Recent work has shown that #NFA admits a fully polynomial randomized approximation scheme (FPRAS). Inspired by this result, we propose NFA-LM, a polynomial-time engine for NFA-constrained generation with theoretical guarantees under mild assumptions. Experiments show that NFA-LM efficiently generates h...

AuthorsJialiang Sun, Kuldeep Meel
Primary categorycs.CL
Published30 September 2026
Last updated at source6 October 2026
cs.CLcs.FL
Embed this entry
<iframe src="https://silytics.si/embed/item/c21f9cb9-e77a-470d-8f92-9877caabb785" width="420" height="190" style="border:0" loading="lazy" title="Silytics entry"></iframe>

Free, no tracking. More about feeds and embeds.

Silytics shows public metadata from arXiv and links to the original. Information may be incomplete or out of date. Last refreshed 17 October 2026. Licenses and terms of the original apply to the work itself. Not financial, legal or professional advice.