CRANE: Reasoning with constrained LLM generation
Debangshu Banerjee, Tarun Suresh, Shubham Ugare, Sasa Misailovic, Gagandeep Singh

TL;DR
CRANE is a constrained decoding method for LLMs that maintains reasoning abilities while ensuring syntactic and semantic correctness, significantly improving performance on symbolic reasoning benchmarks.
Contribution
The paper introduces CRANE, a novel reasoning-augmented constrained decoding algorithm that balances correctness and flexibility in LLM output generation.
Findings
CRANE outperforms state-of-the-art constrained and unconstrained decoding methods.
Achieves up to 10% points accuracy improvement on symbolic reasoning benchmarks.
Theoretical analysis explains why restrictive constraints hinder reasoning.
Abstract
Code generation, symbolic math reasoning, and other tasks require LLMs to produce outputs that are both syntactically and semantically correct. Constrained LLM generation is a promising direction to enforce adherence to formal grammar, but prior works have empirically observed that strict enforcement of formal constraints often diminishes the reasoning capabilities of LLMs. In this work, we first provide a theoretical explanation for why constraining LLM outputs to very restrictive grammars that only allow syntactically valid final answers reduces the reasoning capabilities of the model. Second, we demonstrate that by augmenting the output grammar with carefully designed additional rules, it is always possible to preserve the reasoning capabilities of the LLM while ensuring syntactic and semantic correctness in its outputs. Building on these theoretical insights, we propose a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Semantic Web and Ontologies
