The paper introduces a specification-guided decoding framework that blends large language model generation with symbolic reasoning to enforce formal specifications during output generation. It offers a forward-only variant that guarantees compliance by construction and a backtracking variant that revises earlier choices when later constraints become unsatisfiable. The approach is model-agnostic, requires no retraining, and improves compliance on configuration and constraint-solving benchmarks while reducing repeated inference compared to rejection sampling.
By Alessandro Previti, Konstantinos Vandikas, Mario Alviano, Mats Carlsson, Albin Larsson Forsberg, Alexandros Nikou, Athanasios Karapantelakis, Aneta Vulgarakis
arXiv:2603.01243v3 Announce Type: replace
Abstract: Large language models (LLMs) are powerful tools that have found applications beyond human-machine interfaces and chatbots. Beside free-form generat...
By Ayoub Hammal, Pierre Zweigenbaum, Caio Corro
arXiv:2602.00612v3 Announce Type: replace
Abstract: Diffusion Large Language Models (dLLMs) have demonstrated promising generative capabilities and are increasingly used to produce formal languages d...
By Yitong Zhang, Yongmin Li, Yuetong Liu, Jia Li, Xiaoran Jia, Zherui Li, Ge Li
arXiv:2608. 05493v1 Announce Type: cross Abstract: Language models (LMs) are increasingly used to interact with external services via programs written in domain-specific languages (DSLs).
By Kevin Cheang, Geoff Hulette, Rahul Kumar, Felipe R. Monteiro, Federico Mora, Robin Salkeld, Lin Tan, Serdar Tasiran
The paper introduces Grammar‑Aligned Decoding (GAD), addressing the issue that conventional grammar‑constrained decoding (GCD) can distort a large language model’s probability distribution, yielding grammatical but low‑likelihood outputs. GAD proposes an adaptive sampling method, Approximate Expected Futures (ASAp), which uses prior samples to over‑approximate future grammaticality, ensuring outputs remain both grammatical and faithful to the model’s conditional probabilities. Experiments on code generation and structured NLP tasks demonstrate that ASAp often produces higher‑likelihood outputs than existing GCD techniques while still enforcing the required grammatical constraints.
By Kanghee Park, Jiayu Wang, Taylor Berg-Kirkpatrick, Nadia Polikarpova, Loris D'Antoni
arXiv:2607. 18961v1 Announce Type: new Abstract: Large language models (LLMs) generate fluent text by incrementally predicting the next token from a prefix.
By Remo Pareschi
arXiv:2610.26819v2 Announce Type: replace
Abstract: Real-world decision problems combine two qualitatively different kinds of constraints: requirements that must be satisfied, called hard constraints...
By Amer Goel, Yeganeh Alimohammadi, Andrew Daw
arXiv:2606. 15577v1 Announce Type: new Abstract: Large Language Models (LLMs) are increasingly involved in complex mathematical optimization, even if the pragmatic user who triggers them is unaware of it.
By Roko Peran, Luka Hobor, Mihael Kovac, Mario Brcic
The paper introduces a distance‑guided decoding framework that guarantees context‑free grammar compliance for large language models. By precomputing bounded pushdown summaries with reachability labels and upper‑bound distances to acceptance, the decoder performs horizon‑aware pruning and beam search during generation. Experiments on JSON, SQL, and Linear Temporal Logic demonstrate consistent syntactic validity and improved completion quality compared to existing baselines.
By Vincenzo Collura, Karim Tit, Eleonora Giunchiglia, Mike Papadakis, Maxime Cordy
arXiv:2603. 03305v2 Announce Type: replace-cross Abstract: Large language models (LLMs) are increasingly used to generate executable outputs, JSON objects, and API calls, where a single syntax error can make the output unusable.
By Avinash Reddy, Thayne T. Walker, James S. Ide, Amrit Singh Bedi
arXiv:2606. 00722v1 Announce Type: cross Abstract: Controlling language model outputs is essential for ensuring structural validity, reliability, and downstream usability, and diffusion language models are no exception.
By Hyundong Jin, Yo-Sub Han
The paper investigates whether constrained decoding harms or helps large language model (LLM) performance. It introduces a taxonomy of three constraint types—format, validity, and reasoning—and shows that suitable constraints can preserve or even improve performance by eliminating invalid paths. Experiments across multiple model families reveal that perceived performance drops are mainly due to non-equivalent prompting and output formats, while validity constraints boost reliability and reasoning constraints can enhance accuracy when they guide beneficial reasoning trajectories.
By Ngoc Trinh Hung Nguyen, Alonso Silva, Armen Aghasaryan, Mehwish Alam