atlas

Research map / Large language models / Agents, code and math

CRANE: Reasoning with constrained LLM generation

ICML 2025 · Large language models › Agents, code and math · approach: Code generation benchmarks · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proves that strict grammar-constrained decoding can limit LLM reasoning expressivity and proposes CRANE, which alternates unconstrained reasoning with grammar-constrained answer generation via delimiters, improving accuracy on GSM-Symbolic and FOLIO.

Problem

Constrained decoding enforces syntactic validity of LLM outputs but can reduce functional correctness, as restrictive grammars leave no room for intermediate reasoning steps.

Approach

Augment the output grammar as G_a -> R G so that a free-form reasoning segment R precedes the constrained final answer; CRANE switches between unconstrained generation and constrained decoding using start/end delimiters (<< and >>) detected during generation.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add reasoning-augmented constrained decoding (CRANE, unconstrained reasoning then constrained answer) over IterGen constrained decodingQwen2.5-1.5B-Instruct and other models on GSM-Symbolic · GSM-Symbolic 8-shotAccuracy (%): +9 pts vs constrained, +5 vs unconstrained CoT (1.5B)Helped
add CRANE reasoning-augmented constrained decoding over unconstrained CoTQwen2.5-Math-7B-Instruct · GSM-Symbolic 8-shotAccuracy (%): 38 vs 29Helped
add CRANE reasoning-augmented constrained decoding over unconstrained CoT and constrained decodingQwen2.5-Coder-14B-Instruct, QwQ-32B and other models on GSM-Symbolic · GSM-Symbolic 8-shotAccuracy (%): up to +9 pts (DeepSeek-R1-Distill-Llama-8B 21->31 vs CoT)Helped
add CRANE reasoning-augmented constrained decoding over SynCode constrained decodingQwen2.5-Math-7B-Instruct, Qwen2.5-7B-Instruct, Llama-3.1-8B-Instruct · FOLIO validationAccuracy (%): +2.95, +4.92, +6.90 ptsHelped
constrained decoding (IterGen) without reasoning vs unconstrained CoT on GSM-SymbolicQwen2.5-Coder-7B-Instruct, Qwen2.5-1.5B-Instruct · GSM-Symbolic 8-shotAccuracy (%): 22 vs 26 (1.5B); 35 vs 37 (Coder-7B)No clear effect
reasoning augmentation with CRANE on GSM-Symbolic across shot counts (ablation)Qwen2.5-Math-7B-Instruct · GSM-Symbolic 2/4/8 shotsAccuracy (%): 32 vs 26 (2-shot constrained); 37 vs 29 (4-shot)Helped
CRANE reasoning-augmented decoding on FOLIO yields lower compile rate than pure constrained decodingQwen2.5-Math-7B-Instruct · FOLIO validationCompiles (%): 75.86 vs 76.85 (constrained)Hurt
CRANE reasoning-augmented decoding on GSM-Symbolic yields slightly more syntax errors than pure constrained decodingQwen models on GSM-Symbolic · GSM-Symbolic 8-shotParse (%): e.g., 95 vs 99 (Coder-7B), 88 vs 99 (Math-7B)Hurt

Surprising findings

Limitations

Experimental setup

Datasets: GSM-Symbolic FOLIO

Benchmarks: GSM-Symbolic FOLIO

Metrics: accuracy parse rate compiles rate average tokens

Baselines: Unconstrained w/o CoT Unconstrained CoT Constrained generation (IterGen) SynCode

Builds on: IterGen SynCode chain-of-thought prompting

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy