Glossary Entry

Rejection Sampling

Sampling from a target distribution by drawing from an easier proposal distribution and probabilistically keeping or discarding each draw.

Statistics Generative AI

Also called: accept-reject sampling

Rejection sampling draws candidates from a distribution that is easy to sample, then accepts each candidate with a probability chosen so the accepted draws follow the hard target distribution exactly. The price of the exactness is waste: the more the proposal disagrees with the target, the more draws get thrown away.

The idea shows up across ML: classical Monte Carlo methods, best-of-n selection over model outputs, and notably speculative decoding, whose accept-with-probability min(1, p/q) rule plus a residual resample makes a large model’s output distribution survive being mostly guessed by a small one.