# Relative Error Streaming Quantiles

arXiv: https://arxiv.org/abs/2004.01668 · HTML: https://mlsanity.com/paper/2004.01668/

## Key facts

- Cited by 4 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 3 Apr 2020.

## Built on by (most cited first, 4 of 4)

- [Amazon SageMaker Model Monitor: A System for Real-Time Insights into Deployed Machine Learning Models](https://mlsanity.com/paper/2111.13657/) (2021)
- [A Human-Centric Take on Model Monitoring](https://mlsanity.com/paper/2206.02868/) (2022)
- [Measuring Distributional Shifts in Text: The Advantage of Language Model-Based Embeddings](https://mlsanity.com/paper/2312.02337/) (2023)
- [FedPS: Federated Preprocessing for structured data via aggregated Statistics](https://mlsanity.com/paper/2602.10870/) (2026)

## Abstract (arXiv)

Estimating ranks, quantiles, and distributions over streaming data is a central task in data analysis and monitoring. Given a stream of n items from a data universe equipped with a total order, the task is to compute a sketch (data structure) of size polylogarithmic in n. Given the sketch and a query item y, one should be able to approximate its rank in the stream, i.e., the number of stream elements smaller than or equal to y. Most works to date focused on additive varepsilon n error approximation, culminating in the KLL sketch that achieved optimal asymptotic behavior. This paper investigates multiplicative (1±varepsilon)-error approximations to the rank. Practical motivation for multiplicative error stems from demands to understand the tails of distributions, and hence for sketches to be more accurate near extreme values. The most space-efficient algorithms due to prior work store either O(log(varepsilon2 n)/varepsilon2) or O(log3(varepsilon n)/varepsilon) universe items. We present a randomized sketch storing O(log1.5(varepsilon n)/varepsilon) items that can (1±varepsilon)-approximate the rank of each universe item with high constant probability; this space bound is within an O(√log(varepsilon n)) factor of optimal. Our algorithm does not require prior knowledge of the stream length and is fully mergeable, rendering it suitable for parallel and distributed computing environments.
