Near-Optimal Relative Error Streaming Quantile Estimation via Elastic Compactors

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Gribelyuk, Elena, Sawettamalya, Pachara, Wu, Hongxun, Yu, Huacheng
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912102852067328
author Gribelyuk, Elena
Sawettamalya, Pachara
Wu, Hongxun
Yu, Huacheng
author_facet Gribelyuk, Elena
Sawettamalya, Pachara
Wu, Hongxun
Yu, Huacheng
contents Computing the approximate quantiles or ranks of a stream is a fundamental task in data monitoring. Given a stream of elements $x_1, x_2, \dots, x_n$ and a query $x$, a relative-error quantile estimation algorithm can estimate the rank of $x$ with respect to the stream, up to a multiplicative $\pm ε\cdot \mathrm{rank}(x)$ error. Notably, this requires the sketch to obtain more precise estimates for the ranks of elements on the tails of the distribution, as compared to the additive $\pm εn$ error regime. Previously, the best-known algorithms for relative error achieved space $\tilde O(ε^{-1}\log^{1.5}(εn))$ (Cormode, Karnin, Liberty, Thaler, Vesel{y}, 2021) and $\tilde O(ε^{-2}\log(εn))$ (Zhang, Lin, Xu, Korn, Wang, 2006). In this work, we present a nearly-optimal streaming algorithm for the relative-error quantile estimation problem using $\tilde O(ε^{-1}\log(εn))$ space, which almost matches the trivial $Ω(ε^{-1} \log (εn))$ lower bound. To surpass the $Ω(ε^{-1}\log^{1.5}(εn))$ barrier of the previous approach, our algorithm crucially relies on a new data structure, called an elastic compactor, which can be dynamically resized over the course of the stream. Interestingly, we design a space allocation scheme which adaptively allocates space to each compactor based on the "hardness" of the input stream. This approach allows us to avoid using the maximal space simultaneously for every compactor and facilitates the improvement in the total space complexity. Along the way, we also propose and study a new problem called the Top Quantiles Problem, which only requires the sketch to provide estimates for a fixed-length tail of the distribution. This problem serves as an important subproblem in our algorithm, though it is also an interesting problem of its own right.
format Preprint
id arxiv_https___arxiv_org_abs_2411_01384
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Near-Optimal Relative Error Streaming Quantile Estimation via Elastic Compactors
Gribelyuk, Elena
Sawettamalya, Pachara
Wu, Hongxun
Yu, Huacheng
Data Structures and Algorithms
68W27
Computing the approximate quantiles or ranks of a stream is a fundamental task in data monitoring. Given a stream of elements $x_1, x_2, \dots, x_n$ and a query $x$, a relative-error quantile estimation algorithm can estimate the rank of $x$ with respect to the stream, up to a multiplicative $\pm ε\cdot \mathrm{rank}(x)$ error. Notably, this requires the sketch to obtain more precise estimates for the ranks of elements on the tails of the distribution, as compared to the additive $\pm εn$ error regime. Previously, the best-known algorithms for relative error achieved space $\tilde O(ε^{-1}\log^{1.5}(εn))$ (Cormode, Karnin, Liberty, Thaler, Vesel{y}, 2021) and $\tilde O(ε^{-2}\log(εn))$ (Zhang, Lin, Xu, Korn, Wang, 2006). In this work, we present a nearly-optimal streaming algorithm for the relative-error quantile estimation problem using $\tilde O(ε^{-1}\log(εn))$ space, which almost matches the trivial $Ω(ε^{-1} \log (εn))$ lower bound. To surpass the $Ω(ε^{-1}\log^{1.5}(εn))$ barrier of the previous approach, our algorithm crucially relies on a new data structure, called an elastic compactor, which can be dynamically resized over the course of the stream. Interestingly, we design a space allocation scheme which adaptively allocates space to each compactor based on the "hardness" of the input stream. This approach allows us to avoid using the maximal space simultaneously for every compactor and facilitates the improvement in the total space complexity. Along the way, we also propose and study a new problem called the Top Quantiles Problem, which only requires the sketch to provide estimates for a fixed-length tail of the distribution. This problem serves as an important subproblem in our algorithm, though it is also an interesting problem of its own right.
title Near-Optimal Relative Error Streaming Quantile Estimation via Elastic Compactors
topic Data Structures and Algorithms
68W27
url https://arxiv.org/abs/2411.01384