Skip to content

Tight Bounds for Rank Estimation in Turnstile Streams

Yang S. Hu, Cheng Jiang, Yinchen Liu, Huacheng Yu

cs.DS

Abstract

We study rank estimation in turnstile streams. A frequency vector ff over the universe [U][U] receives insertions and deletions. Given a query x∈[U]x\in[U], the goal is to estimate the rank ∑u<xfu\sum_{u<x}f_u within additive error ε∥f∥1ε\|f\|_1 with constant probability. The standard approach is Dyadic CountSketch by Luo, Wang, Yi and Cormode, using O~(ε−1log⁡3/2Ulog⁡n)\tilde{O}(ε^{-1}\log^{3/2}U\log n) bits, where nn is the final ℓ1\ell_1 norm of ff. Bulánek, Kumar, Meka, Nelson, and Sarlós placed this approach in a matrix-factorization framework. They improved the space of Dyadic CountSketch to O(ε−1log⁡3/2U)O(ε^{-1}\log^{3/2}U) words, and proved a lower bound of Ω(ε−1log⁡2(εU))Ω(ε^{-1}\log^2(εU)) bits for all streaming algorithms when U≤n≤UO(1)U\le n\le U^{O(1)} and ε=U−1+Ω(1)ε=U^{-1+Ω(1)}. This leaves a gap of log⁡U\sqrt{\log U}. In this work, we fully determine the space cost of rank estimation up to an absolute constant. Our main result is a space lower bound for all streaming algorithms: for 0<ε≤1/80<ε\le 1/8 and n≥log⁡2Un\ge\log^2 U, the space is at least Ω(min⁡{ε−1L3/2log⁡(2+nε/L),ε−2log⁡Ulog⁡n,log⁡(U+nn)})Ω(\min\{ε^{-1}L^{3/2}\log(2+nε/\sqrt{L}), ε^{-2}\log U\log n, \log\binom{U+n}{n}\}) bits, where L=log⁡(2+Uε)L=\log(2+Uε). When U≤n≤UO(1)U\le n\le U^{O(1)} and ε=U−1+Ω(1)ε=U^{-1+Ω(1)}, this simplifies to Ω(min⁡{ε−1log⁡5/2U,ε−2log⁡2U})Ω(\min\{ε^{-1}\log^{5/2}U, ε^{-2}\log^2 U\}) bits. Our proof uses a surprising hard distribution and novel information-theoretic techniques. The above bound matches Dyadic CountSketch when n≥Un\ge U and U−1+Ω(1)≤ε≤O(1/log⁡U)U^{-1+Ω(1)}\leε\le O(1/\sqrt{\log U}). The lower bound is also tight in the remaining regimes. For ε≥(log⁡U)−1/2ε\ge(\log U)^{-1/2}, there exists an algorithm that uses O(ε−2log⁡Ulog⁡n)O(ε^{-2}\log U\log n) bits using ℓ1\ell_1 samplers. For ε≤U−1+o(1)ε\le U^{-1+o(1)}, we refine Dyadic CountSketch so that its space in bits matches the first term of the bound.

Create a lesson