Uniform Race: Parameter-Free Approximate Rejection Sampling
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 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 . The threshold 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 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 , its total variation error satisfies the RS upper bound for every fixed threshold 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 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
| Sampling rule | Sharp RS guarantee | Extra input | TV error as grows |
|---|---|---|---|
| SIR | — | ||
| RS with | ✓ | Exact envelope | |
| Budget-calibrated RS | Calibration parameter | ||
| UR | ✓ | — |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Component | Setting | Value |
|---|---|---|
| Response generation | Model | meta-llama/Llama-3.2-3B-Instruct |
| Max tokens | 500 (GSM8K); 1,024 (MATH500) | |
| Generation temperature | 0.3 | |
| Pre-generated responses/prompt | 4,096 | |
| Reward model | Model | OpenAssistant/reward-model-deberta-v3-large-v2 |