Tractable Hierarchical Control of Autoregressive Language Models
Not on the map. Why?
Abstract (arXiv)
Constraining the generation of autoregressive large language models (LLMs) is an important component of integrating language models into formal systems. In the generation of code and data for tasks like program synthesis, ensuring that language models produce syntactically valid output is a prerequisite for processing such output. These languages (such as SQL or JSON) are often designed as LR(k) context-free grammars. By distilling the LLM to a tractable probabilistic model, its autoregressive generation can be steered and masked to incorporate the probability of satisfying logical constraints, ensuring high quality output that is guaranteed to be valid. This paper demonstrates that the satisfaction of any LR(k) grammar of finite duration can be calculated in polynomial time, an improvement over the exponential time of applying previous methods to such grammars. This result enables efficient constraint and steering of LLM generation towards output that better satisfies formal syntactic constraints.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 13 of its 23 references that are in the map. First posted on arXiv 1 Jun 2026.
Builds on
13 of 23 references.
References · 13
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2023Grammar-Constrained Decoding for Structured NLP Tasks without Finetuningcited by 197
- 2022Semantic Probabilistic Layers for Neuro-Symbolic Learningcited by 103
- 2013A Differential Approach to Inference in Bayesian Networkscited by 93
- 2024XGrammar: Flexible and Efficient Structured Generation Engine for Large Language Modelscited by 75
- 2023Tractable Control for Autoregressive Language Generationcited by 65
- 2020How Can Self-Attention Networks Recognize Dyck-n Languages?cited by 51
- 2025Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlocited by 46
- 2022Validating Large Language Models with ReLMcited by 33
- 2024Adaptable Logical Control for Large Language Modelscited by 30
- 2025Fast and Expressive Multi-Byte Prediction with Probabilistic Circuitscited by 9
- 2016Taming Context-Sensitive Languages with Principled Stateful Parsingcited by 1
Built on by
Not cited yet.