Simple & Optimal Quantile Sketch: Combining Greenwald-Khanna with Khanna-Greenwald

Author:

Gribelyuk Elena1ORCID,Sawettamalya Pachara1ORCID,Wu Hongxun2ORCID,Yu Huacheng1ORCID

Affiliation:

1. Princeton University, Princeton, NJ, USA

2. EECS, UC Berkeley, Berkeley, CA, USA

Abstract

Estimating the ε-approximate quantiles or ranks of a stream is a fundamental task in data monitoring. Given a stream x_1,..., x_n from a universe \mathcalU with total order, an additive-error quantile sketch \mathcalM allows us to approximate the rank of any query y\in \mathcalU up to additive ε n error. In 2001, Greenwald and Khanna gave a deterministic algorithm (GK sketch) that solves the ε-approximate quantiles estimation problem using O(ε^-1 łog(ε n)) space \citegreenwald2001space ; recently, this algorithm was shown to be optimal by Cormode and Vesleý in 2020 \citecormode2020tight. However, due to the intricacy of the GK sketch and its analysis, over-simplified versions of the algorithm are implemented in practical applications, often without any known theoretical guarantees. In fact, it has remained an open question whether the GK sketch can be simplified while maintaining the optimal space bound. In this paper, we resolve this open question by giving a simplified deterministic algorithm that stores at most (2 + o(1))ε^-1 łog (ε n) elements and solves the additive-error quantile estimation problem; as a side benefit, our algorithm achieves a smaller constant factor than the \frac11 2 ε^-1 łog(ε n) space bound in the original GK sketch~\citegreenwald2001space. Our algorithm features an easier analysis and still achieves the same optimal asymptotic space complexity as the original GK sketch. Lastly, our simplification enables an efficient data structure implementation, with a worst-case runtime of O(łog(1/ε) + łog łog (ε n)) per-element for the ordinary ε-approximate quantile estimation problem. Also, for the related "weighted'' quantile estimation problem, we give efficient data structures for our simplified algorithm which guarantee a worst-case per-element runtime of O(łog(1/ε) + łog łog (ε W_n/w_\textrmmin )), achieving an improvement over the previous upper bound of \citeassadi2023generalizing.

Funder

Simons Junior Faculty Award

Publisher

Association for Computing Machinery (ACM)

Reference27 articles.

1. [n. d.]. GKQuantiles Class - Micrometer Core 0.11.0.RELEASE Documentation. https://www.javadoc.io/doc/io. micrometer/micrometer-core/0.11.0.RELEASE/io/micrometer/core/instrument/stats/quantile/GKQuantiles.html. Accessed: 2023--11--15.

2. [n. d.]. Problem 2: Quantiles - Open Problems in Sublinear Algorithms. https://sublinear.info/index.php?title=Open_ Problems:2. Suggested by Graham Cormode, Source: Kanpur 2006, Accessed: 2023--11--15.

3. [n. d.]. quantiles Crate Documentation - Rust. https://docs.rs/quantiles/latest/quantiles/. Accessed: 2023--11--15.

4. Adversarial laws of large numbers and optimal regret in online classification

5. The space complexity of approximating the frequency moments

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3