Partial Rejection Sampling (PRS)
- Partial Rejection Sampling (PRS) is a framework for generating perfect samples from a product distribution conditioned on complex, hard constraints.
- It improves efficiency by resampling only the local subsets of variables that violate constraints, overcoming the infeasibility of classical rejection sampling.
- PRS extends to continuous state spaces and statistical physics models, enabling parallelizable algorithms with strong theoretical guarantees.
Partial Rejection Sampling (PRS) is a probabilistic algorithmic framework for generating perfect (i.e., exactly drawn) samples from a product distribution conditioned on a collection of “hard” constraints (“bad-event” exclusions). Unlike classical rejection sampling, which is typically infeasible for rare events due to global rejection probabilities, PRS strategically resamples only local subsets of the variables responsible for constraint violations, yielding vastly improved efficiency in many settings. PRS is closely related to algorithmic versions of the Lovász Local Lemma (LLL), notably the Moser–Tardos resampling procedure, but with the extra requirement that the output follows the correct conditioned distribution (Jerrum, 2021).
1. Formal Framework and Algorithmic Description
Let be random variables, each taking values in a finite domain according to a prescribed marginal, inducing the product measure . A set of constraints (or “clauses”) act as “bad events,” each depending on a subset of variables . The global “acceptance” event is , and the target is the distribution , i.e., conditioned on 0.
A key scenario is the extremal instance: whenever two clauses share a variable, they cannot both be violated. In this case, the PRS loop is as follows:
- Sample 1 from 2.
- While 3 does not hold:
- Select a violated clause 4.
- Resample the variables in 5 according to their product marginal.
- Return 6.
On each step, only the minimal local set needed to resolve the current violation is resampled, not the full variable set (Jerrum, 2021).
2. Theoretical Guarantees and Complexity
For extremal instances:
- Correctness: The PRS output is distributed exactly as 7 upon termination.
- Almost sure termination: For any satisfiable 8, the algorithm halts with probability 1.
- Expected resampling counts: The expected number of times each clause is resampled can be expressed in terms of the probabilities 9 and the dependency structure, via inclusion–exclusion formulas.
- Expected iterations: The expected number of iterations of the while-loop is at most
0
Polynomial expected runtime is established for archetypal combinatorial objects, including sink-free orientations, uniform spanning trees (via cycle-popping), root-connected subgraphs, and bicircular matroids, typically by bounding the expected number of iterations through combinatorial injection or bijection arguments (Jerrum, 2021).
3. Extensions to Continuous State Spaces and Gibbs Point Processes
PRS generalizes to continuous spaces and infinite-state systems under suitable measurability and locality conditions:
- Hard disks and hard spheres models: In the continuous setting, PRS samples from point processes conditioned on geometric exclusion (e.g., no two points closer than 1). Here, the “bad events” correspond to pairs within forbidden distance; the resampling region is the union of 2-balls around violated points. Under sufficiently low intensities, PRS terminates in 3 rounds with total cost 4 (Guo et al., 2018).
- Gibbs point processes: For pairwise interaction models with finite interaction range, PRS operates on a decomposition of the space into cells. Bad events are pairs of cells with “conflicting” configurations (assessed via auxiliary uniform variables), and only the necessary cells are refreshed per resampling step. The sampling procedure achieves expected 5 wall-clock time and is naturally parallelizable (Moka et al., 2019).
For the hard disks model in 6, Wellens introduced a refinement in area-union analysis leveraging the "spreading apart" geometric fact (Bollobás; Bezdek–Connelly), which states that the area of a union of disks increases under uniform radial expansion of centers. This yields a provable increase in the maximum density threshold for PRS's guaranteed geometric convergence from 7 to 8, representing an ∼11% improvement (Wellens, 2018).
4. Applications and Algorithmic Innovations
Partial Rejection Sampling has been pivotal in perfect sampling for several combinatorial and statistical physics models:
- Combinatorial structures: Uniform generation of sink-free orientations, spanning trees (cycle-popping), root-connected subgraphs (cluster-popping), and bicircular matroids, through efficient CNF-type encodings of the forbidden set and exploitation of extremality or quasi-extremality (Jerrum, 2021).
- Graph colorings: Direct application of classical PRS fails for uniform 9-colorings of graphs due to global propagation of bad events. Recent work employs a "soft coloring" relaxation: auxiliary continuous variables induce passive states that prevent runaway resampling, and a hybrid decomposition recursively reduces the problem size. This hybrid variant achieves complexity 0 (with 1 the number of relaxation levels), and empirical evidence suggests 2, leading to conjectured linear time for general graphs (Moka et al., 5 Apr 2026).
- Gibbs and area-interaction processes: PRS has enabled perfect samples for pairwise- and area-interacting configurations, delivering parallel algorithms that outperform previous methods for moderate and high-dimensional regimes (Moka et al., 2019).
5. PRS Versus Classical Rejection Methods
Classical rejection sampling attempts to sample 3 from 4 until the global predicate 5 is satisfied, which has expected cost 6. For typical applications, 7 can be exponentially small in problem size, rendering classical methods intractable. By contrast, PRS resamples only the local variables implicated in constraint violations. If the local violation probabilities are only polynomially small and dependencies are localized, PRS achieves exponential speedup over the naïve method (Jerrum, 2021).
Softening the constraints (e.g., via auxiliary variables or partial relaxations) further enhances efficiency by capping the size of resampling sets even in dense or globally connected instances. Adaptive schemes such as soft-coloring PRS for graph colorings exemplify these advances (Moka et al., 5 Apr 2026).
6. Connections to the Moser–Tardos Algorithm and the Lovász Local Lemma
PRS can be viewed as an algorithmic extension of the Moser–Tardos resampling procedure under the Lovász Local Lemma (LLL), but with a crucial distinction: while Moser–Tardos guarantees the discovery of some feasible assignment under LLL conditions, PRS ensures the resulting output is also a perfect sample from the target conditioned measure. Achieving the correct output distribution necessitates technical considerations such as order independence, local commutativity (the "diamond property"), and the "resampling table" argument for correctness (Jerrum, 2021).
Extensions covering quasi-extremal and lopsided dependency cases, Shearer-region criteria, and strongly-mixing regimes broaden the applicability of PRS to a range of constraint families. Continuous models and spin systems are likewise encompassed by suitable adaptation of the “bad event” framework and localized resampling logic (Jerrum, 2021, Guo et al., 2018).
7. Variants, Implementation, and Further Directions
- Partial Rejection Control (PRC): In sequential Monte Carlo contexts, the PRC variant rejects only moves with low incremental importance weights, reducing the variance of particle weights and improving practical performance in likelihood-free and ABC settings (Peters et al., 2008).
- Soft constraints and auxiliary variables: For non-extremal or globally connected dependencies, softening constraints enables scalable PRS applications, e.g., soft-coloring for sampling uniform graph colorings (Moka et al., 5 Apr 2026).
- Parallelizability: Cell-wise and local resampling independence render PRS highly amenable to parallel implementation, in contrast to inherently sequential approaches like coupling-from-the-past (CFTP) (Moka et al., 2019, Moka et al., 5 Apr 2026).
- Open problems: Raising the density/intensity threshold in geometric sampling, extending geometric facts to higher dimensions or varying radii, and further reducing the resampling set size in general constraint systems are active topics. The empirical observation that the requisite number of softening levels in hybrid PRS for colorings remains bounded warrants theoretical explanation (Wellens, 2018, Moka et al., 5 Apr 2026).
In summary, Partial Rejection Sampling constitutes a general, rigorously analyzable, and adaptable framework for uniform and perfect random generation in discrete and continuous spaces, especially where naive resampling is prohibitive and local constraint structure can be exploited (Jerrum, 2021, Guo et al., 2018, Moka et al., 2019, Moka et al., 5 Apr 2026, Peters et al., 2008, Wellens, 2018).