arXiv AI

Grammar-Aligned Decoding

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.

arXiv AI
Jun 4

Constrained Adaptive Rejection Sampling

arXiv:2510. 01902v2 Announce Type: replace Abstract: Language Models (LMs) are increasingly used in applications where generated outputs must satisfy strict semantic or syntactic constraints.

By Pawe{\l} Parys, Sairam Vaidya, Taylor Berg-Kirkpatrick, Loris D'Antoni
arXiv Computation and Language
Oct 12

Probabilistic Calibration Is a Trainable Capability in Language Models

The paper investigates whether language models can be fine‑tuned to produce outputs that better match intended probability distributions, even when the valid outputs cannot be enumerated in advance. Two calibration fine‑tuning methods—soft‑target and hard‑target—are evaluated across 12 models from four families, showing substantial improvements in structured‑sampling fidelity on unseen distribution families and parameter settings. The gains also transfer to broader stochastic generation tasks, expanding first‑token support and improving NoveltyBench scores, though some downstream capabilities such as arithmetic reasoning may be slightly affected.

By Davide Baldelli, Sruthi Kuriakose, Maryam Hashemzadeh, Amal Zouaq, Sarath Chandar
arXiv Machine Learning
Sep 25

Enabling Approximate Joint Sampling in Diffusion LMs

The paper introduces a lightweight single‑layer sampler that allows masked diffusion language models to approximate joint sampling of multiple tokens in a single full‑model forward pass. By training the sampler to mimic exact joint sampling from a frozen diffusion model, the authors enable parallel unmasking of tokens while maintaining a close match to the true joint distribution. Experiments on Dream‑7B and Llada‑7B models show that unmasking four tokens per denoising step yields a MAUVE score of 0.87, a substantial improvement over the marginal baseline of 0.31.

By Parikshit Bansal, Sujay Sanghavi
arXiv AI
Aug 3

AI4BayesCode: From Natural Language Descriptions to Validated Modular Stateful Bayesian Samplers

arXiv:2605. 18476v2 Announce Type: replace-cross Abstract: Coding and computation remain major bottlenecks in Markov chain Monte Carlo (MCMC) workflows, especially as modern sampling algorithms have become increasingly complex and existing probabilistic programming systems remain limited in model support, extensibility, and composability.

By Jungang Zou, Alex Ziyu Jiang, Qixuan Chen
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