atlas

Research map / Probabilistic and scientific modeling / Variational and generative sampling

Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlo

ICLR 2025 · Probabilistic and scientific modeling › Variational and generative sampling · approach: Sequential Monte Carlo for inference · 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.

Proposes an SMC framework for controlled LM generation that incrementally applies grammar constraints, weight corrections, expensive potentials, and resampling, letting small LMs beat larger and fine-tuned models on code, SQL, goal inference, and molecule tasks.

Problem

Controlled generation from LMs under syntactic or semantic constraints requires sampling from a posterior (global product of experts) that is intractable; locally constrained decoding is greedy and sample-rerank wastes compute because constraints are applied only after full sequences are generated.

Approach

Frame constrained generation as sampling from a global product of experts over an LM prior and potentials, and approximate it with sequential Monte Carlo: extend particles with a locally constrained proposal over cheap potentials, reweight with weight corrections and expensive potentials at each step, and resample adaptively, implemented in the LM probabilistic programming language (genlm-control)

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add a grammar constraint (ablation)Base LM · Planetarium goal inferenceaccuracy: 0.063 -> 0.086Helped
add a grammar constraint (ablation)Base LM · GDB-17 molecular synthesisQED: 0.132 -> 0.189Helped
add a grammar constraint (ablation)Base LM · Spider developmentexecution accuracy: 0.531 -> 0.559Helped
add an expensive potential (ablation)Grammar-only SMC · Planetarium goal inferenceaccuracy: 0.401 -> 0.419Helped
add an expensive potential (ablation)Grammar-only SMC · GDB-17 molecular synthesisQED: 0.205 -> 0.577Helped
add an expensive potential (ablation)Full SMC · DS-1000 data scienceaccuracyHelped
add an expensive potential (ablation)Grammar-only IS · Spider developmentexecution accuracy: 0.597 -> 0.618Helped
add weight correction (ablation)Locally constrained decoding · Spider developmentexecution accuracy: 0.559 -> 0.597Helped
add weight correction (ablation)Sample-Rerank · Planetarium goal inferenceaccuracyNo clear effect
add weight correction (ablation)Sample-Rerank · GDB-17 molecular synthesisQEDNo clear effect
add resampling (ablation)Full IS · Planetarium goal inferenceaccuracy: 0.257 -> 0.419Helped
add resampling (ablation)Full IS · GDB-17 molecular synthesisQED: 0.404 -> 0.577Helped

Surprising findings

Limitations

Experimental setup

Datasets: Planetarium Blocksworld DS-1000 Spider development split GDB-17

Benchmarks: Planetarium DS-1000 Spider GDB-17

Metrics: accuracy execution accuracy QED posterior-weighted accuracy KL divergence estimate Pearson correlation between weight and score

Baselines: Base LM Locally constrained decoding Grammar-only IS Sample-Rerank Full IS SMC Steering

Builds on: LLaMPPL sequential Monte Carlo locally constrained decoding importance sampling

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