This article studies the fundamental problem of using i.i.d. coin tosses from an entropy source to efficiently generate random variables $X_i \sim P_i$ $(i \ge 1)$, where $(P_1, P_2, \dots)$ is a random sequence of rational discrete probability distributions subject to an \textit{arbitrary} 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 $X_i$ and $P_i$, and in expectation to obtain a rate of $\mathbb{E}[H(P_1) + \dots + H(P_n)]/n + \varepsilon$ bits per sample as $n \to \infty$ (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 \textit{randomness 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.


翻译:本文研究一个基础性问题:如何利用来自熵源的独立同分布硬币抛掷结果,高效地生成服从分布 $X_i \sim P_i$ $(i \ge 1)$ 的随机变量,其中 $(P_1, P_2, \dots)$ 是服从任意随机过程的有理离散概率分布随机序列。我们的方法以 $O(\log(1/\varepsilon))$ 的空间复杂度,实现了摊销期望熵成本在信息论最优香农下界 $\varepsilon > 0$ 比特范围内。该结果在以下两方面均成立:在基于 $X_i$ 和 $P_i$ 条件的香农信息内容点态意义上,以及在期望意义上达到 $\mathbb{E}[H(P_1) + \dots + H(P_n)]/n + \varepsilon$ 比特每样本的速率(当 $n \to \infty$,其中 $H$ 表示香农熵)。本方法在空间、时间与熵特性上的综合表现,优于 Knuth 与 Yao(1976)提出的熵最优算法以及 Han 与 Hoshi(1997)针对在线采样的区间算法(二者均需无限空间)。相较于 Kozen 与 Soloviev(2022)以及 Shao 与 Wang(2025)专门针对固定分布生成独立同分布样本的方法,本方法所需空间呈指数级减少。我们的在线采样算法基于一种称为随机性回收的强大算法技术,该技术通过重复利用概率算法所消耗的部分随机信息来降低其摊销熵成本。在实践层面,我们开发了随机性回收技术以加速多种重要采样算法。我们证明,在使用密码学安全伪随机数生成器时,随机性回收能使 Fisher-Yates 洗牌算法达到最先进的运行时性能,同时降低离散高斯采样的熵成本。本文附有以 C 编程语言实现的高性能软件库。

0
下载
关闭预览

相关内容

在数学和计算机科学之中,算法(Algorithm)为一个计算的具体步骤,常用于计算、数据处理和自动推理。精确而言,算法是一个表示为有限长列表的有效方法。算法应包含清晰定义的指令用于计算函数。 来自维基百科: 算法
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
【干货书】面向工程师的随机过程,448页pdf
专知会员服务
80+阅读 · 2021年11月3日
【哈佛经典书】概率论与随机过程及其应用,382页pdf
专知会员服务
64+阅读 · 2020年11月14日
数据分析师应该知道的16种回归方法:泊松回归
数萃大数据
35+阅读 · 2018年9月13日
数据分析师应该知道的16种回归方法:定序回归
数萃大数据
16+阅读 · 2018年9月9日
最新|深度离散哈希算法,可用于图像检索!
全球人工智能
14+阅读 · 2017年12月15日
绝对干货 | 随机梯度下降算法综述
菜鸟的机器学习
15+阅读 · 2017年10月30日
从点到线:逻辑回归到条件随机场
夕小瑶的卖萌屋
15+阅读 · 2017年7月22日
精品公开课 | 随机梯度下降算法综述
七月在线实验室
13+阅读 · 2017年7月11日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 1月14日
VIP会员
相关资讯
数据分析师应该知道的16种回归方法:泊松回归
数萃大数据
35+阅读 · 2018年9月13日
数据分析师应该知道的16种回归方法:定序回归
数萃大数据
16+阅读 · 2018年9月9日
最新|深度离散哈希算法,可用于图像检索!
全球人工智能
14+阅读 · 2017年12月15日
绝对干货 | 随机梯度下降算法综述
菜鸟的机器学习
15+阅读 · 2017年10月30日
从点到线:逻辑回归到条件随机场
夕小瑶的卖萌屋
15+阅读 · 2017年7月22日
精品公开课 | 随机梯度下降算法综述
七月在线实验室
13+阅读 · 2017年7月11日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员