快速Gumbel-Max草图及其应用
Fast Gumbel-Max Sketch and its Applications
摘要:
用于从分类分布(或更一般地,非负向量)中采样元素的众所周知的Gumbel-Max Trick及其变体已广泛用于诸如机器学习和信息检索等领域。为了与随机元素$i$的正权重$v_i$成比例地对随机元素$i$进行采样,Gumbel-Max技巧首先为每个正权重元素$i$计算Gumbel随机变量$g_i$,然后对具有最大值$g_i+\ln v_i$的元素$i$进行采样。近年来,相似性估计和加权基数估计等应用需要从高维向量中生成$k$独立的Gumbel-Max变量。然而,对于大的$k$(例如,数百甚至数千)时,使用传统的Gumbel-Max伎俩。为了解决这个问题,我们提出了一种新的算法,FastGM,它降低了时间复杂度从$O(kn^+)$到$O(k \ln k + n^+)$,其中$n^+$是在感兴趣的向量中的正元素的数量。FastGM对许多元素停止了Gumbel随机变量的计算过程,特别是对于那些权重较小的元素。我们在各种真实世界的数据集上进行了实验,实验结果表明,FastGM比最先进的方法快几个数量级,而不会牺牲准确性或产生额外的费用。
英文摘要:
The well-known Gumbel-Max Trick for sampling elements from a categorical distribution (or more generally a non-negative vector) and its variants have been widely used in areas such as machine learning and information retrieval. To sample a random element $i$ in proportion to its positive weight $v_i$, the Gumbel-Max Trick first computes a Gumbel random variable $g_i$ for each positive weight element $i$, and then samples the element $i$ with the largest value of $g_i+\ln v_i$. Recently, applications including similarity estimation and weighted cardinality estimation require to generate $k$ independent Gumbel-Max variables from high dimensional vectors. However, it is computationally expensive for a large $k$ (e.g., hundreds or even thousands) when using the traditional Gumbel-Max Trick. To solve this problem, we propose a novel algorithm, FastGM, which reduces the time complexity from $O(kn^+)$ to $O(k \ln k + n^+)$, where $n^+$ is the number of positive elements in the vector of interest. FastGM stops the procedure of Gumbel random variables computing for many elements, especially for those with small weights. We perform experiments on a variety of real-world datasets and the experimental results demonstrate that FastGM is orders of magnitude faster than state-of-the-art methods without sacrificing accuracy or incurring additional expenses.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。