Greedy Poisson Rejection Sampling

Gergely Flamich · DOI

Abstract

One-shot channel simulation is a fundamental problem in stochastic data compression and differential privacy, where a sample from a target distribution must be communicated using a proposal distribution and shared randomness. Traditional methods, such as standard rejection sampling and A* coding, suffer from runtimes that scale with the maximum density ratio ($D_\infty$), which can be prohibitively large or infinite. This paper introduces Greedy Poisson Rejection Sampling (GPRS), a novel algorithm that recasts rejection sampling as a greedy search over a Poisson process. For one-dimensional unimodal distributions, GPRS achieves a runtime scaling with the Kullback-Leibler (KL) divergence rather than $D_\infty$, while maintaining near-optimal communication costs.

Introduction

In the one-shot channel simulation framework, Alice possesses a sample $x$ drawn from a target distribution $Q$. Her goal is to transmit this sample to Bob, who only has access to a proposal distribution $P$ and a sequence of shared random variables. The objective is to minimize the expected number of bits transmitted while ensuring the sample Bob receives is exactly distributed according to $Q$.

Historically, this problem has been addressed through rejection sampling or A* coding. However, these methods are limited by their dependence on the infinity-divergence $D_\infty[Q\|P]$. In many practical scenarios, such as neural compression using Variational Autoencoders (VAEs), the density ratio can be extremely high in the tails, leading to computational intractability. GPRS addresses this by shifting from a non-causal search to a causal, greedy approach over a Poisson process.

Methods

The GPRS Framework

Greedy Poisson Rejection Sampling treats the sampling process as a search for the "first arrival" of a Poisson process $\Pi$ that falls within a specific region defined by the density ratio $r = dQ/dP$. The algorithm utilizes a stretch function ($\sigma$), derived from a time-invariant ordinary differential equation (ODE). This function maps the density ratio onto the time axis of the Poisson process, ensuring that the first point identified by the search is a valid sample from the target distribution $Q$.

Unlike A coding, which is non-causal (decisions depend on potential future samples), GPRS is a causal sampler*. Its acceptance criterion at any given step depends solely on the samples examined up to that point. This causality is the key to unlocking more efficient search strategies.

Parallelization and Branch-and-Bound

Due to the superposition theorem of Poisson processes, GPRS is inherently parallelizable. Alice can distribute the search across $J$ simultaneous threads, resulting in a linear reduction in expected runtime.

For one-dimensional problems where the density ratio is unimodal—a common occurrence in Gaussian or Laplace models—the author introduces a Branch-and-Bound GPRS variant. This method employs a binary search tree to prune large regions of the search space that cannot contain the first arrival. This optimization allows the algorithm to bypass the linear scan of the Poisson process, significantly accelerating the sampling procedure.

Key Insights

Breaking the $D_\infty$ Barrier

The most significant theoretical contribution of GPRS is the reduction of runtime complexity. For 1D unimodal distributions, the binary search variant of GPRS achieves a runtime of $O(D_{KL}[Q\|P])$. This is a substantial improvement over the $O(D_\infty[Q\|P])$ runtime of previous state-of-the-art methods. By tying complexity to the KL divergence (or mutual information $I[x; y]$), GPRS remains efficient even when the target distribution has heavy tails or sharp peaks relative to the proposal.

Optimal Coding

To communicate the accepted sample, Alice encodes the index of the accepted Poisson arrival. The paper demonstrates that by using a Zeta distribution for this encoding, the expected codelength is bounded by: $$L \le I[x; y] + \log_2(I[x; y] + 1) + 11 \text{ bits}$$ Empirical results suggest that the actual overhead is often much lower than this theoretical upper bound.

Experimental Results

The algorithm was evaluated using synthetic one-dimensional distributions, including Gaussian-Gaussian, Laplace-Laplace, and Triangular-Uniform pairs. These experiments focused on the relationship between runtime (number of steps) and codelength (bitrate) as the divergence between $Q$ and $P$ increased.

In all tests, GPRS with binary search maintained a flat runtime relative to $D_\infty$, whereas the runtime for A coding exploded. Specifically, GPRS's performance remained tied to the much smaller $D_{KL}$, confirming the theoretical complexity gains. Furthermore, the codelength overhead remained minimal, outperforming A coding in both speed and reliability, particularly in cases where the proposal distribution was a poor match for the target's peaks.

Discussion and Future Work

While GPRS represents a breakthrough for one-dimensional channel simulation, several challenges remain for its application in high-dimensional neural compression:

  1. Dimensionality: The optimal binary search variant is currently restricted to 1D. Extending this to multivariate distributions (e.g., high-dimensional Gaussians) is critical for practical deployment.
  2. Unimodality: The fastest search variant requires a unimodal density ratio. While a "splitting function" version exists for non-unimodal cases, its performance characteristics require further study.
  3. Exact Densities: The algorithm requires exact knowledge of $dQ/dP$, making it currently unsuitable for energy-based models where the normalization constant is unknown.

Despite these limitations, GPRS provides a robust theoretical foundation for efficient, bit-accurate stochastic communication, offering a path toward more practical neural data compression.

Summary updated

BibTeX
@inproceedings{flamich2023greedy,
  author = {Gergely Flamich},
  title = {{Greedy Poisson Rejection Sampling}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=axRMkinASf},
}
Figure