mlsanityData to 14 Oct 2026

Efficient Online Random Sampling via Randomness Recycling

arXiv 2505.18879 ↗First posted 24 May 2025cs.DS cs.DM cs.ITcited by 1

Not on the map. Why?

Abstract (arXiv)

This article studies the fundamental problem of using i.i.d. coin tosses from an entropy source to efficiently generate random variables Xi ~ Pi (i ≥ 1), where (P1, P2, dots) is a random sequence of rational discrete probability distributions subject to an textitarbitrary stochastic process. Our method achieves an amortized expected entropy cost within varepsilon > 0 bits of the information-theoretically optimal Shannon lower bound using O(log(1/varepsilon)) space. This result holds both pointwise in terms of the Shannon information content conditioned on Xi and Pi, and in expectation to obtain a rate of mathbbE[H(P1) + dots + H(Pn)]/n + varepsilon bits per sample as n → ∞ (where H is the Shannon entropy). The combination of space, time, and entropy properties of our method improves upon the Knuth and Yao (1976) entropy-optimal algorithm and Han and Hoshi (1997) interval algorithm for online sampling, which require unbounded space. It also uses exponentially less space than the more specialized methods of Kozen and Soloviev (2022) and Shao and Wang (2025) that generate i.i.d. samples from a fixed distribution. Our online sampling algorithm rests on a powerful algorithmic technique called textitrandomness recycling, which reuses a fraction of the random information consumed by a probabilistic algorithm to reduce its amortized entropy cost. On the practical side, we develop randomness recycling techniques to accelerate a variety of prominent sampling algorithms. We show that randomness recycling enables state-of-the-art runtime performance on the Fisher-Yates shuffle when using a cryptographically secure pseudorandom number generator, and that it reduces the entropy cost of discrete Gaussian sampling. Accompanying the manuscript is a performant software library in the C programming language.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). First posted on arXiv 24 May 2025.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.