paper-with-me

Papers

Constrained Adaptive Rejection Sampling

2025-10-02 · Paweł Parys, Sairam Vaidya, Taylor Berg-Kirkpatrick, Loris D'Antoni arxiv

Language Models (LMs) are increasingly used in applications where generated outputs must satisfy strict semantic or syntactic constraints. Existing approaches to constrained generation fall along a spectrum: greedy constrained decoding methods enforce validity during decoding but distort the LM's distribution, while rejection sampling (RS) preserves fidelity but wastes computation by discarding invalid outputs. Both extremes are problematic in domains such as program fuzzing, where both validity and diversity of samples are essential. We present Constrained Adaptive Rejection Sampling (CARS), an approach that strictly improves the sample-efficiency of RS without distributional distortion. CARS begins with unconstrained LM sampling and adaptively rules out constraint-violating continuations by recording them in a trie and subtracting their probability mass from future draws. This adaptive pruning ensures that prefixes proven invalid are never revisited, acceptance rates improve monotonically, and the resulting samples exactly follow the constrained distribution. In experiments on a variety of domains -- e.g., program fuzzing and molecular generation -- CARS consistently achieves higher efficiency -- measured in the number of LM forward passes per valid sample -- while also producing stronger sample diversity than both GCD and methods that approximate the LM's distribution.

📄 PDF Abstract BibTeX arXiv:2510.01902

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Pliable rejection sampling

2026-04-24 · Akram Erraqabi, Michal Valko, Alexandra Carpentier, Odalric-Ambrym Maillard arxiv

Rejection sampling is a technique for sampling from difficult distributions. However, its use is limited due to a high rejection rate. Common adaptive rejection sampling methods either work only for very specific distrib…

A minimax near-optimal algorithm for adaptive rejection sampling

2018-10-22 · Juliette Achdou, Joseph C. Lam, Alexandra Carpentier, Gilles Blanchard

Rejection Sampling is a fundamental Monte-Carlo method. It is used to sample from distributions admitting a probability density function which can be evaluated exactly at any given point, albeit at a high computational c…

Rejection sampling from shape-constrained distributions in sublinear time

2021-05-29 · Sinho Chewi, Patrik Gerber, Chen Lu, Thibaut Le Gouic 외

We consider the task of generating exact samples from a target distribution, known up to normalization, over a finite alphabet. The classical algorithm for this task is rejection sampling, and although it has been used i…

On the Query Complexity of Verifier-Assisted Language Generation

2025-02-17 · Edoardo Botta, Yuchen Li, Aashay Mehta, Jordan T. Ash 외

Recently, a plethora of works have proposed inference-time algorithms (e.g. best-of-n), which incorporate verifiers to assist the generation process. Their quality-efficiency trade-offs have been empirically benchmarked …

Computational EfficiencyText Generation

Ada-RS: Adaptive Rejection Sampling for Selective Thinking

2026-02-23 · Yirou Ge, Yixi Li, Alec Chiu, Shivani Shekhar 외 arxiv

Large language models (LLMs) are increasingly being deployed in cost and latency-sensitive settings. While chain-of-thought improves reasoning, it can waste tokens on simple requests. We study selective thinking for tool…