UltraLogLog: A Practical and More Space-Efficient Alternative to HyperLogLog for Approximate Distinct Counting
摘要
Since its invention HyperLogLog has become the standard algorithm for approximate distinct counting. Due to its space efficiency and suitability for distributed systems, it is widely used and also implemented in numerous databases. This work presents UltraLog-Log, which shares the same practical properties as HyperLogLog. It is commutative, idempotent, mergeable, and has a fast guaranteed constant-time insert operation. At the same time, it requires 28% less space to encode the same amount of distinct count information, which can be extracted using the maximum likelihood method. Alternatively, a simpler and faster estimator is proposed, which still achieves a space reduction of 24%, but at an estimation speed comparable to that of HyperLogLog. In a non-distributed setting where martingale estimation can be used, UltraLogLog is able to reduce space by 17%. Moreover, its smaller entropy and its 8-bit registers lead to better compaction when using standard compression algorithms. All this is verified by experimental results that are in perfect agreement with the theoretical analysis which also outlines potential for even more space-efficient data structures. A production-ready Java implementation of UltraLogLog has been released as part of the open-source Hash4j library.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- From Single to Multiple Attributes: Experimental Insights on Sampling-Based Distinct Combination Estimation in Group-by Queries 引用了 Information theoretic limits of cardinality estimation: Fisher meets Shannon
- From Single to Multiple Attributes: Experimental Insights on Sampling-Based Distinct Combination Estimation in Group-by Queries 引用了 AdaNDV: Adaptive Number of Distinct Value Estimation via Learning to Select and Fuse Estimators
- Sublime: Sublinear Error & Space for Unbounded Skewed Streams 引用了 HyperLogLogLog: Cardinality Estimation With One Log More
- PLM4NDV: Minimizing Data Access for Number of Distinct Values Estimation with Pre-trained Language Models 引用了 AdaNDV: Adaptive Number of Distinct Value Estimation via Learning to Select and Fuse Estimators
引用它的顶会 Paper4
- AdaNDV: Adaptive Number of Distinct Value Estimation via Learning to Select and Fuse EstimatorsXianghong Xu, Tieying Zhang, Xiao He, Haoyang Li 等VLDB 2025 · 3 次引用
- PLM4NDV: Minimizing Data Access for Number of Distinct Values Estimation with Pre-trained Language ModelsXianghong Xu, Xiao He, Tieying Zhang, Lei Zhang 等SIGMOD 2025 · 1 次引用
- From Single to Multiple Attributes: Experimental Insights on Sampling-Based Distinct Combination Estimation in Group-by QueriesYujie Zhang, Xiaochun Yang, Bin Wang, Yuan SuiICDE 2026
- Sublime: Sublinear Error & Space for Unbounded Skewed StreamsNavid Eslami, Ioana O. Bercea, Rasmus Pagh, Niv DayanSIGMOD 2026
它引用的 Paper2
相关 Paper
- SetSketch: Filling the Gap between MinHash and HyperLogLogOtmar ErtlVLDB 2021 · 17 次引用
- A Better Cardinality Estimator with Fewer Bits, Constant Update Time, and MergeabilityYang Du, He Huang, Yu-e Sun, Kejian Li 等INFOCOM 2023 · 6 次引用
- Memory-Efficient Key/Foreign-Key Join Size Estimation via Multiplicity and Intersection SizeMagnus Müller, Daniel Flachs, Guido MoerkotteICDE 2021 · 4 次引用
- Learning to be a Statistician: Learned Estimator for Number of Distinct ValuesRenzhi Wu, Bolin Ding, Xu Chu, Zhewei Wei 等VLDB 2022 · 16 次引用
- Locally Uniform HashingIoana O. Bercea, Lorenzo Beretta, Jonas Klausen, Jakob Bæk Tejs Houen 等FOCS 2023 · 4 次引用
