---
title: Partial Rejection Sampling
url: https://www.emergentmind.com/topics/partial-rejection-sampling
type: topic
---

# Partial Rejection Sampling

Partial rejection sampling (PRS) is a family of algorithmic techniques for generating perfect samples from target distributions defined as product measures conditioned on the non-occurrence of combinatorially or spatially structured “bad events.” PRS generalizes classical rejection sampling by performing local, event-driven resampling of only those variables implicated in witnessed constraint violations, thereby achieving substantially higher algorithmic efficiency, especially in regimes where naive acceptance probabilities are exponentially small. PRS methods are rooted in combinatorial probability, with foundational links to the algorithmic Lovász Local Lemma and the Moser–Tardos resampling paradigm, but introduce additional requirements ensuring samples are drawn from the correct conditional (rather than merely any feasible) law.

## 1. Formal Problem Statement and Algorithmic Structure

Let $X = (X_1, \dots, X_n)$ be random variables, each $X_i$ taking values in a finite or measurable set $D_i$, independent under product measure $D = D_1 \times \cdots \times D_n$. The target distribution is the product law $D$ conditioned on a conjunction of constraints (encoded as a Boolean formula $\Phi(X) = \bigwedge_{k=1}^m \phi_k(X_{(\phi_k)})$), where each clause $\phi_k$ (the “bad event”) depends only on a specified subset of variables (the *scope*). The goal is to efficiently generate $X \sim D$ conditioned on $\Phi(X) = \text{true}$, i.e., to produce a sample from $\Pr_D(\cdot | \Phi(X))$ [2106.07744].

The core PRS algorithm proceeds as follows for discrete variables:

1. **Initialization**: Independently sample $X_i \sim D_i$ for $i = 1, \dots, n$.
2. **Event detection**: Identify the current set $N$ of violated constraints.
3. **Resampling**: While $N \neq \emptyset$, choose any violated clause $k \in N$ and resample all variables in its scope.
4. **Termination**: Stop when all constraints are satisfied; return $X$.

For product measures on continuous spaces or configurations (e.g., spatial point processes), resampling regions are defined by the union of the “scopes” of the bad events present, effectively localizing corrective updates [1801.07342, 1901.05624].

## 2. Theoretical Guarantees and Correctness

PRS is rigorously correct for extremal constraint systems—where any two clauses sharing a variable cannot be simultaneously violated. It generates samples exactly according to the desired conditional law, regardless of the order in which violated clauses are selected for resampling [2106.07744]. The confluence property of such extremal systems ensures that the final distribution is invariant to arbitrary resampling order.

For more general “quasi-extremal” systems (where interactions between bad events are governed by a bounded degree dependency graph), the expected number of resampling steps can be bounded using witness-tree analysis analogous to Moser–Tardos arguments. If the relative likelihood of each bad event $p_k$ satisfies the LLL-like inequality $p_k \le x_k \prod_{\ell \sim k} (1 - x_\ell)$ for some $x_1,\dots,x_m \in (0,1)$, then the expected number of resamplings of each clause $k$ is at most $x_k / (1-x_k)$ [2106.07744].

## 3. Methodological Variants and Continuous Extensions

Partial rejection sampling has been extended to infinite-dimensional and continuous settings, including spatial point processes and high-dimensional geometric models. In such contexts, PRS typically operates on partitioned state spaces (e.g., spatial cells in Gibbs processes), and bad events correspond to localized violations such as pairwise overlaps or forbidden configurations [1801.07342, 1901.05624].

A general structure emerges: sample an initial configuration from a base (e.g., Poisson) process, identify localized constraint violations, define a minimal resampling region (union of the neighborhoods/scopes of all violated constraints), and resample the variables/configuration within this region only. The process iterates until all bad events are eliminated, maintaining correctness through a loop-invariant: the current state is always distributed as the product measure conditioned on the fixed set of failed constraints [1801.07342].

Correctness in continuous settings relies on monotonicity properties of the target density (e.g., if $f^*(X)=0$ and $X\subset Y$, then $f^*(Y)=0$), as well as a lattice condition for incremental update probabilities. These ensure the coupling and conditional law preservation essential for perfect sampling [1801.07342].

## 4. Computational Complexity and Empirical Performance

In favorable parameter regimes—specifically, when the marginal probability that any bad event occurs is small and the corresponding dependency graph has bounded degree—PRS exhibits polylogarithmic (often $O(\log n)$ or $O(\log(1/r))$) expected number of iterations, compared to the exponential scaling of naive rejection algorithms [2106.07744, 1801.07342, 1808.03367, 1901.05624]. 

For hard-disk and hard-sphere models, this translates to perfect samples in $O(\log n)$ rounds and $O(n)$ total time, provided the packing intensity is below an explicit threshold (e.g., $A < 0.2344$ for the 2D hard-disk model) [1808.03367, 1801.07342]. In finite-range Gibbs point processes, the expected running time is $O(\log(1/r))$ iterations, where $r$ is the interaction range, and each iteration can be parallelized due to localized dependency structure [1901.05624].

Empirical simulation studies support these theoretical findings, highlighting the competitiveness of PRS in domains like uniform proper graph coloring, statistical physics models (hard disks/spheres), and random constraint satisfaction, especially when implemented with parallelism [2604.03947, 1901.05624].

## 5. Connections, Extensions, and Algorithmic Comparisons

PRS generalizes classical rejection sampling (which requires resampling all variables on any violation) and improves on its efficiency whenever high-dimensional or rare-event conditioning causes acceptance probabilities to become negligible. The main innovation is strictly local resampling, controlled by the dependency graph of bad events. 

Comparisons with the Moser–Tardos algorithm highlight that PRS preserves the correct output distribution (i.e., draws a perfect sample from the target conditioned law), whereas Moser–Tardos guarantees only feasibility (returns some satisfying assignment but not with the right probability law) [2106.07744].

Extensions to sequential Monte Carlo and approximate Bayesian computation take the form of partial rejection control (PRC), which is not a direct generalization of PRS but rather applies its acceptance/rejection ideas within SMC frameworks to achieve variance reduction and increased effective sample size. Here, rejections are controlled adaptively to maintain a minimal particle quality, with provable variance reduction and unbiasedness properties [0808.3466, 1910.09527].

In Markov chain Monte Carlo, the philosophy has also inspired designs such as rejection-free jump chains and partial neighbor search, which subsample local neighborhoods for enhanced parallel speedup while controlling bias and maintaining detailed balance [2210.10513].

## 6. Practical Implementation and Algorithmic Applications

The modular structure of PRS allows hybrid and parallelized variants. For example, in uniform sampling of proper graph colorings, a soft relaxation approach creates a hierarchy of constraints, each enforced using PRS locally within subcritical percolation clusters of $O(\log n)$ size, yielding near-linear expected run time with inherent parallelism [2604.03947]. 

In continuum settings, domain decomposition enables scalable, distributive implementation: each spatial cell or resampling region is solved independently, often via a smaller-scale perfect sampling method (e.g., local dominating CFTP). Localized dependency management ensures that each region can be sampled in parallel without global synchronization, leveraging the bounded dependency structure induced by short-range interactions in the target law [1901.05624, 1801.07342].

Applications span hard constraint models in statistical mechanics (hard disks, hard spheres), Gibbs random fields with finite-range interactions, random graph models, and combinatorial configurations such as sink-free orientations or proper colorings [2106.07744, 2604.03947, 1801.07342].

## 7. Limitations and Open Directions

The main bottleneck in PRS-based algorithms is the intensity of dependencies and the probability of bad events. Above certain model- or dimension-specific thresholds (e.g., packing density for geometric models), the expected number of rounds can become polynomial or worse, as resampling regions may grow to include a non-negligible fraction of the system [1801.07342, 1808.03367, 1901.05624].

Other limitations include:
- Extension to non-monotone constraint families and infinite-dimensional non-lattice models may require substantial additional theory.
- In high-density regimes, overlap of constraint scopes undermines the efficacy of local resampling.
- Generalizations to heterogeneous or continuous constraints in high-dimensional or non-Euclidean spaces remain technically challenging.

Despite these challenges, PRS represents a unifying and widely applicable paradigm for exact sampling in structured probabilistic models. Continued development in coupling theory, dependency management, and parallel algorithm design are expected to further expand its range of effective applications [2604.03947, 1901.05624, 1801.07342, 2106.07744].

Source: https://www.emergentmind.com/topics/partial-rejection-sampling