Lune

VLDB2024Top-tier venue

Efficient Dynamic Weighted Set Sampling and Its Extension

Fangyuan Zhang, Mengxu Jiang, Sibo Wang

Abstract

Given a weighted set S of n elements, weighted set sampling (WSS) samples an element in S so that each element

a i

; is sampled with a probability proportional to its weight w (

a i

). The classic alias method pre-processes an index in O ( n ) time with O ( n ) space and handles WSS with O (1) time. Yet, the alias method does not support dynamic updates. By minor modifications of existing dynamic WSS schemes, it is possible to achieve an expected O (1) update time and draw t independent samples in expected O ( t ) time with linear space, which is theoretically optimal. But such a method is impractical and even slower than a binary search tree-based solution. How to support both efficient sampling and updates in practice is still challenging. Motivated by this, we design BUS , an efficient scheme that handles an update in O (1) amortized time and draws t independent samples in O (log n + t) time with linear space.

A natural extension of WSS is the weighted independent range sampling (WIRS) , where each element in S is a data point from R. Given an arbitrary range Q = [ℓ, r ] at query time, WIRS aims to do weighted set sampling on the set

S Q

of data points falling into range Q. We show that by integrating the theoretically optimal dynamic WSS scheme mentioned above, it can handle an update in O (log n ) time and can draw t independent samples for WIRS in O (log n + t ) time, the same as the state-of-the-art static algorithm. Again, such a solution by integrating the optimal dynamic WSS scheme is still impractical to handle WIRS queries. We further propose WIRS-BUS to integrate BUS to handle WIRS queries, which handles each update in O (log n ) time and draws t independent samples in O (log 2 n + t ) time with linear space. Extensive experiments show that our BUS and WIRS-BUS are efficient for both sampling and updates.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Independent Range Sampling on Interval Data cites Spatial Independent Range Sampling
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. Independent Range Sampling on Interval DataDaichi AmagataICDE 2024 · 9 citations
  2. GENTI: GPU-powered Walk-based Subgraph Extraction for Scalable Representation Learning on Dynamic GraphsZihao Yu, Ningyi Liao, Siqiang LuoVLDB 2024 · 8 citations
  3. Poisson Sampling over Acyclic JoinsLiese Bekkers, Frank Neven, Lorrens Pantelis, Stijn VansummerenSIGMOD 2026 · 1 citation
  4. RidgeWalker: Perfectly Pipelined Graph Random Walks on FPGAsHongshi Tan, Yao Chen, Xinyu Chen, Qizhen Zhang et al.HPCA 2026

Builds on2

  1. Personalized PageRank on Evolving Graphs with an Incremental Index-Update SchemeGuanhao Hou, Qintian Guo, Fangyuan Zhang, Sibo Wang et al.SIGMOD 2023 · 26 citations
  2. Spatial Independent Range SamplingDong Xie, Jeff M. Phillips, Michael Matheny, Feifei LiSIGMOD 2021 · 13 citations

Related papers

  1. DIPS: Optimal Dynamic Index for Poisson πps SamplingJinchao Huang, Sibo WangKDD 2025
  2. Practical Dynamic Extension for Sampling IndexesDouglas B. Rumbaugh, Dong XieSIGMOD 2024 · 3 citations
  3. WOR and p's: Sketches for ℓp-Sampling Without ReplacementEdith Cohen, Rasmus Pagh, David P. WoodruffNeurIPS 2020
  4. Optimal Dynamic Subset Sampling: Theory and ApplicationsLu Yi, Hanzhi Wang, Zhewei WeiKDD 2023 · 4 citations
  5. FIRAS: A Framework for Interval Range Search and SamplingDaichi Amagata, Panagiotis Simatis, Panagiotis Bouros, Nikos MamoulisSIGMOD 2026 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines