We study the problem of generating a random variate $X$ from a finite discrete probability distribution $P$ using an entropy source of independent fair coin flips. A classic result from Knuth and Yao shows that the optimal expected number of input coin flips per output sample lies between $H(P)$ and $H(P)\,{+}\,2$, where $H$ is the Shannon entropy function. However, implementing the Knuth and Yao ``entropy-optimal'' sampler entails a tradeoff between using either exponential space with low runtime per sample, or linear space with high runtime per sample. We introduce a new sampling algorithm that avoids this tradeoff: it requires linearithmic space, incurs negligible runtime overhead per sample, and uses an expected number of coin flips that lies in the entropy-optimal range $[H(P), H(P)\,{+}\,2)$. No previous sampler for discrete distributions simultaneously achieves these space, time, and entropy characteristics. Numerical experiments demonstrate improvements in runtime and entropy of the proposed method compared to the celebrated alias method.


翻译:我们研究了使用独立公平硬币抛掷的熵源从有限离散概率分布$P$中生成随机变量$X$的问题。Knuth和Yao的一个经典结果表明,每个输出样本所需的期望输入硬币抛掷次数介于$H(P)$和$H(P)\,{+}\,2$之间,其中$H$为香农熵函数。然而,实现Knuth-Yao“熵最优”采样器需要在两种方案间权衡:要么使用指数级空间且每样本运行时低,要么使用线性空间且每样本运行时高。我们提出了一种避免此权衡的新采样算法:它仅需线性对数级空间,每样本运行时开销可忽略,且使用的期望硬币抛掷次数位于熵最优区间$[H(P), H(P)\,{+}\,2)$内。此前没有任何针对离散分布的采样器能同时实现这些空间、时间和熵特性。数值实验表明,与著名的别名方法相比,所提方法在运行时和熵效率方面均有提升。

0
下载
关闭预览

相关内容

专知会员服务
119+阅读 · 2021年3月23日
换个角度看GAN:另一种损失函数
机器之心
16+阅读 · 2019年1月1日
机器学习各种熵:从入门到全面掌握
AI研习社
10+阅读 · 2018年3月22日
从香农熵到手推KL散度:一文带你纵览机器学习中的信息论
算法与数学之美
10+阅读 · 2018年1月14日
最新|深度离散哈希算法,可用于图像检索!
全球人工智能
14+阅读 · 2017年12月15日
【直观详解】信息熵、交叉熵和相对熵
机器学习研究会
10+阅读 · 2017年11月7日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 5月12日
Arxiv
0+阅读 · 4月13日
VIP会员
最新内容
《通过小型无人机系统将情报能力“作战化”》
消耗优势:美军的“精确规模化”概念
专知会员服务
8+阅读 · 6月15日
《离线语言支持系统:面向空战战术决策》
专知会员服务
10+阅读 · 6月15日
相关VIP内容
专知会员服务
119+阅读 · 2021年3月23日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员