atlas

Research map / Large language models / Language, safety and interpretability

IterGen: Iterative Semantic-aware Structured LLM Generation with Backtracking

ICLR 2025 · Large language models › Language, safety and interpretability · approach: Parallel and early-exit decoding · 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.

Introduces IterGen, a grammar-symbol-based framework with forward/backward/view operations for iterative, backtracking LLM generation, evaluated on SQL, privacy leakage, and Vega-Lite tasks.

Problem

Grammar-guided LLM decoding is left-to-right with no backtracking and cannot enforce semantic constraints or correct outputs mid-generation, and token-level abstractions are misaligned with grammar syntax.

Approach

Uses grammar symbols (terminals and non-terminals) as navigation abstractions via a symbol-to-position map maintained by an incremental LR parser, exposing forward (generate until a symbol count), backward (backtrack by symbol count), and view operations, with a decoding trace and KV-cache cropping for efficiency.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use iterative semantic schema checks and backtracking instead of grammar-only generationSQL generation · Spideroverall execution accuracy (%): 35.22 -> 41.63Helped
Use iterative semantic constraints and backtracking instead of SynCodeVega-Lite generation with Qwen2.5-1.5B · NLV Corpusaccuracy (%): 13.14 -> 15.48Helped
Use iterative semantic constraints and backtracking instead of SynCodeVega-Lite generation with Llama-3.2-3B · NLV Corpusaccuracy (%): 31.70 -> 36.01Helped
Use iterative semantic constraints and backtracking instead of SynCodeVega-Lite generation with Llama-3-8B · NLV Corpusaccuracy (%): 24.69 -> 30.47Helped
Backtrack and resample outputs matching private email addressesQwen2.5-0.5B on DecodingTrust Enron extraction · DecodingTrust Enron email extractionleaked emails: 45 -> 0Helped
Add recurrence penalty with γ=0.3 instead of no penalty (ablation)IterGen on Qwen2.5-0.5B · Spider (first 400 problems)execution accuracy (%): 27.8 -> 34.3Helped
Increase recurrence penalty from γ=0.3 to γ=0.7 (ablation)IterGen on Qwen2.5-0.5B · Spider (first 400 problems)execution accuracy (%): 34.3 -> 34.3No clear effect
Add execution-error feedback to Standard generation (ablation)Qwen2.5-0.5B · Spider (first 400 problems)execution accuracy (%): 26.8 -> 32.0Helped
Add execution-error feedback to SynCode (ablation)Qwen2.5-0.5B · Spider (first 400 problems)execution accuracy (%): 27.8 -> 33.3Helped
Increase max new tokens from 100 to 200 and max_iter from 20 to 30 (ablation)IterGen on Qwen2.5-0.5B · Spiderexecution accuracy (%): 30.9 -> 31Helped
Increase max new tokens and max_iter (ablation)IterGen on Qwen2.5-0.5B · Spidertime (s): 0.544 -> 1.016Hurt

Surprising findings

Limitations

Experimental setup

Datasets: Spider NLV Corpus DecodingTrust privacy (Enron)

Benchmarks: Spider NLV Corpus DecodingTrust

Metrics: execution accuracy execution success rate leaks perplexity generation time tokens

Baselines: Standard unconstrained generation SynCode

Builds on: SynCode Lark EBNF Hugging Face transformers

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