FORS: First-Order Rejection Sampling
- FORS is a variant of classical rejection sampling that employs first-order information to adapt proposals and tighten empirical envelope bounds.
- It uses gradient-refined techniques by optimizing a smooth surrogate loss to directly minimize the envelope ratio, resulting in improved acceptance rates.
- FORS also incorporates structural conditional methods that reduce rejection costs and offer integration with advanced MCMC and divide-and-conquer approaches.
Searching arXiv for the cited papers and the phrase “First-Order Rejection Sampling” to ground the article in the relevant literature. First-Order Rejection Sampling (FORS) is not a standardized label in the cited papers. In the interpretation suggested by gradient-refined rejection sampling and by probabilistic divide-and-conquer, it denotes rejection-sampling procedures that preserve the classical accept/reject mechanism while using first-order information to improve proposal construction or to relocate rejection to a more favorable stage of sampling (Raff et al., 2023, Arratia et al., 2011). In one formulation, “first order” refers to gradients with respect to proposal parameters , with the proposal learned by minimizing a smooth surrogate of the envelope ratio . In another, more structural formulation, it refers to a first-stage conditional correction based on , after which the remaining coordinates are completed exactly. This suggests that FORS is best understood as an umbrella concept spanning both parameter-gradient and structural conditional refinements of classical rejection sampling.
1. Classical rejection sampling and the FORS viewpoint
Classical rejection sampling assumes a target density on a domain , a proposal density that is easy to sample from, and a finite constant such that
The algorithm draws and , then accepts 0 if
1
Its acceptance rate is 2, and accepted samples are i.i.d. from 3.
The difficulty is not the accept/reject rule itself but the construction of a good 4 and a near-minimal valid 5. The gradient-refined approach of “An Easy Rejection Sampling Baseline via Gradient Refined Proposals” is explicitly motivated by the observation that rejection sampling is a common tool for low dimensional problems 6, yet is often non-trivial to apply because devising 7 and selecting 8 requires considerable mathematical effort; more advanced samplers may require additional mathematical derivations, limitations on 9, or even cross-validation (Raff et al., 2023).
Within a FORS interpretation, the essential point is that the classical rejection-sampling law is retained, but the envelope is no longer treated as a purely analytic object fixed in advance. Instead, either the proposal is adapted by first-order optimization, or the rejection event is reorganized through conditional factorization so that the effective acceptance probability becomes substantially larger.
2. Gradient-refined proposals as parameter-first-order rejection sampling
The most explicit FORS-like construction in the supplied literature is ERS, which keeps the rejection-sampling structure but makes both 0 and 1 learned objects. ERS chooses a parametric proposal family
2
with 3, where 4 denotes a Gaussian truncated to 5. The key design choice is that the loss is derived directly from the acceptance threshold rather than from an 6-, KL-, or MSE-style approximation criterion.
For a set of points 7 from the current accept/reject history, ERS defines
8
and the sample-induced envelope constant
9
Direct minimization of 0 is undesirable because the gradient passes only through the argmax. ERS therefore uses the smooth surrogate
1
which spreads gradient mass across multiple high-ratio regions. Its gradient takes the form
2
since 3 is independent of 4.
A common misconception is that “first order” here means the method explicitly uses 5. It does not. ERS requires only the ability to evaluate a differentiable target density 6 or 7, but it does not explicitly use 8. The first-order information is with respect to proposal parameters, obtained by automatic differentiation of 9 and of the cached log-ratio 0. The implementation described in the paper uses JAX and the first-order optimizer AdaBelief, and it does not differentiate through the stochastic accept/reject step itself; it optimizes the underlying envelope bound (Raff et al., 2023).
3. Empirical supremum, refinement loops, and asymptotic correctness
ERS alternates between proposal sampling, empirical envelope tracking, mixture re-fitting, and gradient refinement. The high-level loop samples from the current proposal 1, updates an empirical bound 2 on 3, periodically fits a new GMM to accumulated data, and refines 4 by gradient descent on the log-ratio loss. After training, rejection sampling is run with the final 5 and 6.
Its correctness mechanism is adapted from the empirical supremum method of Caffo et al. For a fixed proposal 7, the estimator is updated by
8
and the acceptance rule becomes
9
ERS uses this idea in batches. For a batch 0,
1
The concrete algorithm initializes accepted and rejected sets 2 and 3, sets 4, maintains a lower estimate 5, and draws candidate batches of size 6 with 7. If 8 or 9, the refinement flag is triggered. The algorithm also updates
0
so that degradation in batch supremum can trigger later refinements. Accepted and rejected points are then reused in two ways: an occasional EM re-fit of the GMM, and the refinement step
1
optimized for up to 800 steps. After refinement, the empirical envelope
2
is recomputed; the new parameters are accepted only if 3, otherwise the method reverts to the previous 4.
The theoretical guarantee is asymptotic rather than exact. For fixed 5, the paper states that Algorithm 1 converges to the same or better solution, in terms of fewer false samples, as Caffo et al. (2002), and thus retains the 6 convergence rate of correctness. When 7 changes after refinement, the argument is conceptually restarted using a new initial 8 computed from existing samples under the new proposal. ERS is therefore “correct with high probability,” not strictly exact, because 9 is optimized on a finite sample set and 0 is only empirically approximated (Raff et al., 2023).
4. Proposal geometry and relation to adjacent samplers
ERS uses a Gaussian mixture model with diagonal covariances, nonnegative mixture weights summing to one, and an increasing number of components 1 as more data arrive. In the re-fit stage, the number of components is
2
the covariances are diagonal, and both accepted and rejected samples are used with weights proportional to 3, with accepted samples inflated further by a constant factor. The proposal family is therefore adaptive, but still deliberately simple.
The diagonal covariance choice is computational rather than theoretical. It enables efficient truncated sampling 4; full covariance would require heavier truncated-Gaussian machinery and was reported as empirically 5 slower in edge cases. The method does not enforce a global analytic inequality 6 for all 7; instead it uses empirical maxima and minimizes the empirical maximum of the log-ratio. Violations outside the observed region remain possible.
Relative to adjacent rejection samplers, ERS changes what is optimized. OS* and A* require a user-supplied decomposition
8
together with problem-specific bounds and proposal design. PRS and NNARS use kernel density estimators, optimize an 9-type discrepancy
0
and require bounded-support assumptions, hyper-parameters such as bandwidths or Hölder constants, and sometimes cross-validation or transformations to bounded domains. ERS instead optimizes the acceptance ratio 1 directly, requires no log-concavity assumptions, no analytic envelope derivation, no special factorization of 2, and no cross-validation. Relative to HMC and related gradient-based MCMC, the distinction is equally sharp: HMC uses 3 to evolve a Markov chain, whereas ERS is a pseudo-i.i.d. rejection sampler using gradients with respect to proposal parameters rather than the state (Raff et al., 2023).
5. Empirical behavior in low-dimensional regimes
The empirical scope of ERS is the regime where rejection sampling is still viable. The paper emphasizes the classical low-dimensional setting 4, while also reporting some experiments up to 5 for a synthetic multi-modal benchmark. Three benchmark families structure the evaluation: a one-dimensional peakiness problem on 6, a bounded multi-modal scaling problem on 7, and Minka’s clutter problem in one and two dimensions (Raff et al., 2023).
In the peakiness problem,
8
increasing 9 makes the target increasingly peaked. For 0, NNARS and PRS slightly beat ERS, but all methods have high acceptance. As 1 increases to 2, ERS’s acceptance rate drops only about 1 percentage point per step, whereas NNARS and PRS deteriorate dramatically, down to approximately 3 and 4. In the multi-modal scaling problem,
5
ERS has significantly higher acceptance rates than NNARS, PRS, and other baselines for 6. As 7 grows to 8, however, it suffers from the curse of dimensionality and becomes statistically indistinguishable from NNARS and PRS in acceptance rate.
The strongest numerical gains are reported on the clutter problem. In one dimension, ERS achieves approximately 9 acceptance with 00, compared with 01 for PRS, 02 for A*, and 03 for a simple rejection-sampling baseline. In two dimensions, ERS reaches approximately 04 with 05, while PRS achieves 06, A* 07, and simple rejection sampling is essentially zero. The reported gain is up to approximately 08 in acceptance rate relative to some baselines.
Distributional checks are used to support the approximate-correctness claim. For 09, the paper reports two-sample Kolmogorov–Smirnov tests between ERS samples and either A* samples or direct draws from the known ground-truth density, with no significant difference detected. For 10, a two-sample Cramér-type test is used, again with no significant discrepancies. Runtime is also favorable on the clutter problem with 100k accepted samples: ERS on CPU requires approximately 11 s, ERS on GPU approximately 12 s, A* approximately 13 s, and OS* approximately 14 s. Taking acceptance-rate differences into account, ERS is reported as roughly 15 faster than A* on CPU and approximately 16 faster with GPU acceleration.
6. Structural FORS through probabilistic divide-and-conquer
A different route to FORS-like behavior appears in “Probabilistic divide-and-conquer: a new exact simulation method, with integer partitions as an example.” The setup begins with two measurable spaces 17 and 18, independent random variables
19
and an indicator 20 with
21
The target object is
22
Classical rejection sampling is recovered by drawing 23 from the product law and accepting if 24, at expected cost 25.
PDC changes where rejection occurs. If 26 is sampled from 27 and, conditional on 28, 29 is sampled from 30, then 31. In practice this is implemented by rejection on 32 alone. Defining
33
and 34, the optimal acceptance function is
35
The corresponding acceptance cost is
36
and the speedup over naïve rejection is
37
This is exact simulation, not approximate correction.
The integer-partition example is the paper’s central case study. Under Fristedt’s representation, with independent geometric coordinates 38 and total weight 39, basic rejection sampling for a uniform random partition of 40 has success probability
41
so the expected number of proposals is asymptotically 42. A deterministic second-half decomposition takes 43, 44, and completes 45 deterministically after acceptance. The resulting acceptance cost drops from order 46 to order 47. A more elaborate self-similar recursive factorization based on
48
yields constant asymptotic rejection cost per recursion layer: first 49, then 50 after a parity refinement. Theorem 3.7 further states that if the proposal-generation cost is 51 with 52, then
53
The same deterministic-second-half pattern appears for partitions with bounded largest part, random set partitions, and plane partitions. For random set partitions, the proposal count is reduced from 54 to 55. For plane partitions, PDC yields a speedup of order 56 in the rejection stage, reducing that stage to 57 and leaving the overall complexity 58, dominated by Pak’s bijection. The paper also introduces a mix-and-match variant for generating many i.i.d. outputs under a “simple matching” condition
59
where color maps 60 and 61 enable a coupon-collector effect in the 62-phase and can yield sublinear dependence on the number of desired samples (Arratia et al., 2011).
A plausible implication is that PDC represents a structural form of FORS. It does not use derivatives of a density, but it performs a first-stage correction using the local conditional success probability 63, thereby reweighting only part of the proposal and postponing exact completion to a conditional second stage.
7. Limits, exactness, and prospective extensions
The two FORS interpretations differ most sharply in their correctness status. ERS is approximate: it does not guarantee a global analytic envelope 64 outside the observed sample set, and rare false accepts are theoretically possible. The paper attributes its practical reliability to empirical-supremum convergence and reports no evidence of false acceptances in the final empirical checks. PDC, by contrast, is exact whenever the conditional laws are sampled correctly. A common misconception is therefore to treat all rejection-sampling refinements as equally exact; the supplied literature does not support that conclusion (Raff et al., 2023, Arratia et al., 2011).
ERS also inherits the usual dimensionality limitations of rejection sampling. Its efficiency collapses as dimension increases; empirically, beyond approximately 65–66, acceptance rates become similar to KDE-based methods and relatively low. The refinement step is non-convex, so some updates worsen 67 and must be discarded. The GMM with diagonal covariance is flexible for 68 and some moderate-dimensional problems, but may be inadequate for more complex high-dimensional targets. PDC has different limitations: it requires an explicit decomposition 69, tractable access to 70, and, for the strongest recursive results, a self-similar factorization such as the partition identity 71.
The practical guidance in the ERS paper is correspondingly narrow and concrete: use ERS as a default baseline when a differentiable 72 is available and 73 is small; there is no need to specify 74, 75, or domain transformations, though 76 may optionally be supplied when bounded. The paper also suggests using ERS as a front-end to more advanced MCMC, for example by generating a modest number of high-quality i.i.d. samples to initialize chains. For a broader FORS program, the same source proposes three extensions: generalizing the proposal family beyond GMMs, for example to normalizing flows; incorporating explicit first-order information in 77, such as 78, to shape the proposal more aggressively; and adding regularization to balance envelope tightness against proposal variance. These directions remain programmatic rather than settled.