Lune

SIGMOD2026Top-tier venue

A Fast, Mergeable, and LDP Compatible Sketch for Counting the Number of Distinct Values in Fully Dynamic Tables

Zhicheng Li, Pinghui Wang, Zeli Lin, Bichun Chen, Dongdong Xie

Abstract

Counting the number of distinct values (NDV) is a fundamental problem in web applications and databases, particularly under memory constraints. Sketch-based methods, such as the Flajolet-Martin sketch, construct compact data summaries to estimate NDV but primarily focus on insertion-only scenarios. However, supporting delete operations is crucial for maintaining accurate and up-to-date cardinality estimates in many real-world applications, such as databases. Existing methods for fully dynamic scenarios, involving both insertions and deletions, often incur considerable computational and memory overhead. Furthermore, collaborative computation often requires sharing sketches with external or untrusted parties, which introduces significant privacy risks. To address these challenges, we propose a novel sketch method, GMod, specifically designed for fully dynamic scenarios and compatible with local differential privacy (LDP) for both NDV estimation and privacy preservation. Our method supports efficient deletions with minimal additional overhead by utilizing a single discrete uniformly distributed random variable. Additionally, we introduce a lightweight probabilistic estimation model to compute NDV, achieving 3× faster performance compared to the state-of-the-art. By incorporating carefully designed sketch perturbation mechanisms, our model mitigates the impact of LDP noise. Experimental results demonstrate that our method uses 1/3 of the memory to achieve comparable estimation accuracy in local settings and provides 8× higher accuracy under LDP scenarios compared to state-of-the-art methods.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

its abstract · related work

Get the answer

Free to start. No credit card required.

Related papers

  1. An LDP Compatible Sketch for Securely Approximating Set Intersection CardinalitiesPinghui Wang, Yitong Liu, Zhicheng Li, Rundong LiSIGMOD 2024 · 7 citations
  2. An Effective and Differentially Private Protocol for Secure Distributed Cardinality EstimationPinghui Wang, Chengjin Yang, Dongdong Xie, Junzhou Zhao et al.SIGMOD 2023 · 5 citations
  3. ZRing: A Dynamic Sketch for Weighted Cardinality Estimation in Data StreamsZhicheng Li, Pinghui Wang, Qiheng Song, Rundong Li et al.KDD 2026
  4. The Flajolet-Martin Sketch Itself Preserves Differential Privacy: Private Counting with Minimal SpaceAdam D. Smith, Shuang Song, Abhradeep ThakurtaNeurIPS 2020 · 48 citations
  5. Sketches-Based Join Size Estimation Under Local Differential PrivacyMeifan Zhang, Xin Liu, Lihua YinICDE 2024 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines