ZRing: A Dynamic Sketch for Weighted Cardinality Estimation in Data Streams
Zhicheng Li, Pinghui Wang, Qiheng Song, Rundong Li, Tong Yang, Qun Huang
Abstract
Estimating the number of distinct elements in a dataset, known as cardinality estimation, plays a central role in data management tasks such as query optimization, network monitoring, and privacy-preserving analytics. In practical scenarios, data often arrive as high-speed streams, making it impractical to store or process the entire dataset. This challenge is further exacerbated in Weighted Cardinality Estimation (WCE), where elements carry different importance levels, and the goal is to estimate the total weight of distinct elements. While existing solutions address WCE under insert-only assumptions, they fall short in fully dynamic settings where both insertions and deletions occur. In this work, we propose a novel sketch-based approach for fully dynamic WCE. We first develop a multi-layer perceptron-based estimator that learns from the structural features of the sketch. To further enhance accuracy, we introduce a Markov-process-inspired probabilistic estimator, which yields unbiased results. We evaluate our approach on both synthetic and real-world datasets, demonstrating up to an order-of-magnitude improvement in estimation accuracy over existing techniques under the same memory budget.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Related papers
- QSketch: An Efficient Sketch for Weighted Cardinality Estimation in StreamsYiyan Qi, Rundong Li, Pinghui Wang, Yufang Sun et al.KDD 2024 · 3 citations
- Efficient and Accurate Differentially Private Cardinality Continual ReleasesDongdong Xie, Pinghui Wang, Quanqing Xu, Chuanhui Yang et al.SIGMOD 2025 · 1 citation
- A Fast, Mergeable, and LDP Compatible Sketch for Counting the Number of Distinct Values in Fully Dynamic TablesZhicheng Li, Pinghui Wang, Zeli Lin, Bichun Chen et al.SIGMOD 2026 · 1 citation
- Bayesian Sketches for Volume Estimation in Data StreamsFrancesco Da Dalt, Simon Scherrer, Adrian PerrigVLDB 2023 · 5 citations
- 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
