The Flajolet-Martin Sketch Itself Preserves Differential Privacy: Private Counting with Minimal Space
Adam D. Smith, Shuang Song, Abhradeep Thakurta
Abstract
We revisit the problem of counting the number of distinct elements F 0 (D) in a data stream D, over a domain [u]. We propose an (ε, δ)-differentially private algorithm that approximates F 0 (D) within a factor of (1 ± γ), and with additive error of O( ln(1/δ)/ε), using space O(ln(ln(u)/γ)/γ 2 ). We improve on the prior work at least quadratically and up to exponentially, in terms of both space and additive error. Our additive error guarantee is optimal up to a factor of O( ln(1/δ)), and the space bound is optimal up to a factor of O min ln ln(u) . We assume the existence of an ideal uniform random hash function, and ignore the space required to store it. We later relax this requirement by assuming pseudorandom functions and appealing to a computational variant of differential privacy, SIM-CDP. Our algorithm is built on top of the celebrated Flajolet-Martin (FM) sketch. We show that FM-sketch is differentially private as is, as long as there are ≈ ln(1/δ)/(εγ) distinct elements in the data set. Along the way, we prove a structural result showing that the maximum of k i.i.d. random variables is statistically close (in the sense of ε-differential privacy) to the maximum of (k + 1) i.i.d. samples from the same distribution, as long as k = Ω 1 ε . Finally, experiments show that our algorithms introduces error within an order of magnitude of the non-private analogues for streams with thousands of distinct elements, even while providing strong privacy guarantee (ε ≤ 1).
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 03b6922d-8bb8-4afc-ae5d-df8ca97a3272Cited by top-tier papers20
- Differentially Private Linear Sketches: Efficient Implementations and ApplicationsFuheng Zhao, Dan Qiao, Rachel Redberg, Divyakant Agrawal et al.NeurIPS 2022 · 40 citations
- Differentially Private Vertical Federated ClusteringZitao Li, Tianhao Wang, Ninghui LiVLDB 2023 · 26 citations
- Counting Distinct Elements in the Turnstile Model with Differential Privacy under Continual ObservationPalak Jain, Iden Kalemaj, Sofya Raskhodnikova, Satchit Sivakumar et al.NeurIPS 2023 · 24 citations
- Differentially Private Fractional Frequency Moments Estimation with Polylogarithmic SpaceLun Wang, Iosif Pinelis, Dawn SongICLR 2022 · 19 citations
- Order-Invariant Cardinality Estimators Are Differentially PrivateCharlie Dickens, Justin Thaler, Daniel TingNeurIPS 2022 · 17 citations
Builds on2
Related papers
- An LDP Compatible Sketch for Securely Approximating Set Intersection CardinalitiesPinghui Wang, Yitong Liu, Zhicheng Li, Rundong LiSIGMOD 2024 · 7 citations
- An Effective and Differentially Private Protocol for Secure Distributed Cardinality EstimationPinghui Wang, Chengjin Yang, Dongdong Xie, Junzhou Zhao et al.SIGMOD 2023 · 5 citations
- Differentially Private Space-Efficient Algorithms for Counting Distinct Elements in the Turnstile ModelRachel Cummings, Alessandro Epasto, Jieming Mao, Tamalika Mukherjee et al.ICML 2025
- 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
- How to Make Private Distributed Cardinality Estimation Practical, and Get Differential Privacy for FreeChanghui Hu, Jin Li, Zheli Liu, Xiaojie Guo et al.USENIX Security 2021 · 22 citations
