cs.LGSep 28, 2026

Uniform Race: Parameter-Free Approximate Rejection Sampling

Authors: Seiyun Shin, Juhyeong Pang, Kwang-Sung Jun

Organizations: Graduate School of Artificial Intelligence Pohang University of Science and Technology Pohang, 37673, South Korea · Department of Computer Science University of Wisconsin–Madison Madison, WI 53706, USA · Graduate School of Artificial Intelligence Department of Computer Science and Engineering Pohang University of Science and Technology Pohang, 37673, South Korea

Abstract

We study approximate sampling: given NN independent samples from a proposal distribution μμ, the goal is to select one whose distribution is close to a target ππ specified only up to a normalizing constant. Block and Polyanskiy (2023) provide finite budget error bounds for approximate rejection sampling (RS) as a function of the acceptance threshold MM. The threshold MM giving the smallest bound, however, depends on properties of (π,μ)(π,μ) that are typically unavailable from the observed sample. This raises a natural question: Can one attain the best RS guarantee without taking MM as input? We answer affirmatively by proposing a parameter-free sampling algorithm called uniform race (UR), based on importance weights, which are ratios of target to proposal probabilities (or densities). It divides each observed weight by an independent uniform random variable to form a score and returns the candidate with the largest score. For every budget NN, its total variation error satisfies the RS upper bound for every fixed threshold MM simultaneously, thereby achieving the best such bound in hindsight. We also characterize its output distribution conditional on the largest score, identifying when it is exactly the target ππ. Uniform race has no larger total variation error than a natural budget-calibrated RS derived from Rohatgi et al. (2025) and sampling importance resampling (SIR). In particular, we exhibit instances where UR's error is exponentially smaller in NN than that of either baseline. Furthermore, we establish conditions under which attaining this RS guarantee for every (π,μ)(π,μ) uniquely determines the selection probabilities as those of UR. Finally, test-time scaling experiments on LLM math-reasoning tasks corroborate the theoretical comparisons and demonstrate that UR remains competitive in ground-truth accuracy without requiring threshold selection.

Figures & tables

Appendix figures & tables1 asset

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Apr 24, 2026stat.ML

Pliable rejection sampling

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 distributions or without performance guarantees. In this paper, we present pliable rejection sampling (PRS), a new approach to rejection sampling, where we learn the sampling proposal using a kernel estimator. Since our method builds on rejection sampling, the samples obtained are with high probability i.i.d. and distributed according to f. Moreover, PRS comes with a guarantee on the number of accepted samples.
Jun 9, 2026cs.DS

The Power of Test-Time Training for Approximate Sampling

Efficiently sampling from a complex probability distribution is a fundamental problem which has become increasingly pertinent in recent years with the rise of generative AI, as sophisticated sampling procedures from LLMs have been proposed to solve challenging reasoning problems. The efficacy of such sampling algorithms is limited, however, by the relationship between the LLM and the particular sampling task at hand, which has motivated the framework of test-time training (TTT). TTT works by updating a model's weights in response to partial generations and reward feedback received at inference time, thus adapting to the particular problem. In this work, we propose a formalization for TTT as the problem of producing a sample from a given probability measure μ⋆μ^\star belonging to a known class F{F} of distributions, given an oracle μ^\hat μ which yields approximate density estimates for μ⋆μ^\star. This is closely related to the problem of reducing sampling to approximate counting studied in seminal works of Jerrum, Valiant & Vazirani (1986) and Jerrum & Sinclair (1989): namely, when F{F} is the class of all distributions, it coincides exactly with the aforementioned counting-to-sampling reduction. In this paper, we first show a quadratic lower bound on the query complexity of sampling from μ⋆μ^\star given query access to μ^\hat μ (for sufficiently large classes F{F}), thus showing that the random walk approach proposed by Jerrum & Sinclair (1989) and refined by Hayes & Sinclair (2010), is optimal. This answers an open question posed by Hayes & Sinclair. We then show that this lower bound can be circumvented if the size of F{F} is bounded appropriately. As we discuss, this latter result can be viewed as an abstraction of TTT, and thus represents a starting point for the development of a principled theoretical framework for TTT.
Jul 21, 2026stat.ML

The Tractability Landscape of Sampling with Inexact Scores

We provide a simple and tight characterization of the types of inexact score oracle access that permit sampling with vanishing total variation bias, for a standard, well-behaved target family. Our main result shows that any weaker error than the sub-Gaussian assumption used by [YW26] rules out the tractability of unbiased sampling. This strengthens the conclusion of [CCSW26] to be algorithm-agnostic, and to hold for a wider range of error assumptions.