A Better Cardinality Estimator with Fewer Bits, Constant Update Time, and Mergeability
Yang Du, He Huang, Yu-e Sun, Kejian Li, Boyu Zhang, Guoju Gao
Abstract
Cardinality estimation is a fundamental problem with diverse practical applications. HyperLogLog (HLL) has become a standard in practice because it offers good memory efficiency, constant update time, and mergeability. Some recent work achieved better memory efficiency, but typically at the cost of impractical update time or losing mergeability, making them incompatible with applications like network-wide traffic measurement. This work presents SpikeSketch, a better cardinality estimator that reduces memory usage of HLL by 37% without sacrificing other crucial metrics. We adopt a bucket-based data structure to promise constant update time, design a smoothed log4ranking and a spike coding scheme to compress cardinality observables into buckets, and propose a lightweight mergeable lossy compression to balance memory usage, information loss, and mergeability. Then we derive an unbiased estimator for recovering cardinality from the lossy-compressed sketch. Theoretical and empirical results show that SpikeSketch can work as a drop-in replacement for HLL because it achieves a near-optimal MVP (memory-variance-product) of 4.08 (37% smaller than HLL) with constant update time and mergeability. Its memory efficiency even defeats ACPC and HLLL, the state-of-the-art lossless-compressed sketches using linear-time compression to reduce memory usage.
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.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 3fcc46d7-cde2-4d9f-a0b4-cc3a7986ba11Cited by top-tier papers1
Ask how each one uses itRelated papers
- HyperLogLogLog: Cardinality Estimation With One Log MoreMatti Karppa, Rasmus PaghKDD 2022 · 24 citations
- Efficient and Accurate Differentially Private Cardinality Continual ReleasesDongdong Xie, Pinghui Wang, Quanqing Xu, Chuanhui Yang et al.SIGMOD 2025 · 1 citation
- Unmasking Vulnerabilities: Cardinality Sketches under Adaptive InputsSara Ahmadian, Edith CohenICML 2024 · 7 citations
- SetSketch: Filling the Gap between MinHash and HyperLogLogOtmar ErtlVLDB 2021 · 17 citations
- One-Sketch: A Unified Framework for Per-Flow Cardinality Measurement with Flexible Bias ControlKejun Guo, Fuliang Li, Jiaxing Shen, Haorui Wan et al.INFOCOM 2026 · 2 citations
