Lune

KDD2024Top-tier venue

QSketch: An Efficient Sketch for Weighted Cardinality Estimation in Streams

Yiyan Qi, Rundong Li, Pinghui Wang, Yufang Sun, Rui Xing

Abstract

Estimating cardinality, i.e., the number of distinct elements, of a data stream is a fundamental problem in areas like databases, computer networks, and information retrieval. This study delves into a broader scenario where each element carries a positive weight. Unlike traditional cardinality estimation, limited research exists on weighted cardinality, with current methods requiring substantial memory and computational resources, challenging for devices with limited capabilities and real-time applications like anomaly detection. To address these issues, we propose QSketch, a memory-efficient sketch method for estimating weighted cardinality in streams. QSketch uses a quantization technique to condense continuous variables into a compact set of integer variables, with each variable requiring only 8 bits, making it 8 times smaller than previous methods. Furthermore, we leverage dynamic properties during QSketch generation to significantly enhance estimation accuracy and achieve a lower time complexity of O(1) for updating estimations upon encountering a new element. Experimental results on synthetic and real-world datasets show that QSketch is approximately 30% more accurate and two orders of magnitude faster than the state-of-the-art, using only 1/8 of the memory.

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.

1 top-tier paper has 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

  • Measuring Item Freshness in Data Streams cites On the algebra of data sketches
  • Efficient framework for operating on data sketches cites On the algebra of data sketches
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Measuring Item Freshness in Data StreamsZirui Liu, Zihan Jiang, An Zhang, Zhouran Shi et al.KDD 2025

Builds on4

  1. HyperLogLogLog: Cardinality Estimation With One Log MoreMatti Karppa, Rasmus PaghKDD 2022 · 24 citations
  2. On the algebra of data sketchesJakub LemieszVLDB 2021 · 21 citations
  3. Fast Generating A Large Number of Gumbel-Max VariablesYiyan Qi, Pinghui Wang, Yuanming Zhang, Junzhou Zhao et al.WWW 2020 · 6 citations
  4. Efficient framework for operating on data sketchesJakub LemieszVLDB 2023 · 6 citations

Related papers

  1. ZRing: A Dynamic Sketch for Weighted Cardinality Estimation in Data StreamsZhicheng Li, Pinghui Wang, Qiheng Song, Rundong Li et al.KDD 2026
  2. TardySketch: A Framework for Cardinality Estimation Adaptable to Sliding WindowsXuyang Jing, Qinghua Cao, Chenhao Zhang, Zheng Yan et al.ICDE 2025 · 3 citations
  3. Efficient and Accurate Differentially Private Cardinality Continual ReleasesDongdong Xie, Pinghui Wang, Quanqing Xu, Chuanhui Yang et al.SIGMOD 2025 · 1 citation
  4. Bayesian Sketches for Volume Estimation in Data StreamsFrancesco Da Dalt, Simon Scherrer, Adrian PerrigVLDB 2023 · 5 citations
  5. Convolution and Cross-Correlation of Count Sketches Enables Fast Cardinality Estimation of Multi-Join QueriesMike Heddes, Igor Nunes, Tony Givargis, Alex NicolauSIGMOD 2024 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines