arXiv Machine Learning By Vincenzo Collura, Karim Tit, Eleonora Giunchiglia, Mike Papadakis, Maxime Cordy

Stay Within Your Bounds: Distance-Guided Decoding for Guaranteed Context-Free Grammar Compliance

Read the original on arXiv Machine Learning →

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.

Machine-generated by The Flow from the publisher's headline and feed description — not written or checked by a human. The full article lives at arXiv Machine Learning.

arXiv AI
Oct 2

Accelerating Constrained Decoding with Token Space Compression

The paper introduces CFGzip, an offline token space compression technique that reduces the search space for context-free grammar (CFG) decoding engines. By compressing the token vocabulary, CFGzip achieves up to 75‑fold latency reductions during batched inference, bringing overhead on the hardest grammars down to roughly 1.2–2×. This enables scalable constrained decoding for complex CFGs that were previously impractical due to high computational costs.

By Michael Sullivan, Alexander Koller
arXiv AI
Nov 2

Specification-Guided Generation for Large Language Models

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