Conditional Deontics over Terminals: A Mildly Context-Sensitive Formal Grammar for Constrained Decoding
Keywords: constrained decoding; formal grammar
Abstract: With the broad adoption of large language models (LLMs), techniques to guide their generation have become increasingly important, with particularly sophisticated patterns found in constrained decoding frameworks expressed via formal grammars.
Recent frameworks such as IterGen expand beyond context-free grammars to achieve some context sensitivity but with drawbacks: expensive backtracking or speculative lookahead, permissive semantics that risk spurious constraint activation, and difficult integration with runtime optimizations like XGrammar.
To address these concerns, we propose Conditional Deontics over Terminals (CDoT), a mildly context-sensitive grammar paired with a GPU-accelerated O(n³) parser that can be employed for constrained decoding with LLMs.
We show that CDoT can express useful constraints that improve LLM performance in a traditional text-to-SQL task and a complex logic puzzle involving unit propagation.
Paper Type: Long
Research Area: Hierarchical Structure Prediction, Syntax, and Parsing
Research Area Keywords: parsing algorithms (symbolic, theoretical results);hierarchical structure prediction;
Contribution Types: NLP engineering experiment, Publicly available software and/or pre-trained models
Languages Studied: English
Submission Number: 10602
Loading