ResearchTrend.AI
  • Papers
  • Communities
  • Events
  • Blog
  • Pricing
Papers
Communities
Social Events
Terms and Conditions
Pricing
Parameter LabParameter LabTwitterGitHubLinkedInBlueskyYoutube

© 2025 ResearchTrend.AI, All rights reserved.

  1. Home
  2. Papers
  3. 2302.05176
15
2

Fast Gumbel-Max Sketch and its Applications

10 February 2023
Yuanming Zhang
P. Wang
Yiyan Qi
Kuankuan Cheng
Junzhou Zhao
Guangjian Tian
Xiaohong Guan
ArXivPDFHTML
Abstract

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 iii in proportion to its positive weight viv_ivi​, the Gumbel-Max Trick first computes a Gumbel random variable gig_igi​ for each positive weight element iii, and then samples the element iii with the largest value of gi+ln⁡vig_i+\ln v_igi​+lnvi​. Recently, applications including similarity estimation and weighted cardinality estimation require to generate kkk independent Gumbel-Max variables from high dimensional vectors. However, it is computationally expensive for a large kkk (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+)O(kn^+)O(kn+) to O(kln⁡k+n+)O(k \ln k + n^+)O(klnk+n+), where n+n^+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.

View on arXiv
Comments on this paper