Skip to content

Space-Optimal Streaming Algorithms via Efficient Encodings

Liudeng Wang, David P. Woodruff, Shenghao Xie, Samson Zhou

cs.DS

Abstract

We study the problem of constructing coresets on data streams: Given a dataset of nn points in Rd\mathbb{R}^d arriving sequentially, the goal is to maintain a small weighted subset that accurately approximates the objective values of the entire dataset for a given class of query functions. Previous methods like merge-and-reduce and online sensitivity sampling required more space than the size of an optimal such subset in the offline setting. In this work, we show that such overheads are not necessary by presenting space-optimal streaming algorithms for central high-dimensional optimization problems such as Euclidean (k,z)(k,z)-clustering and LpL_p subspace embeddings, as well as applications to projection-cost preserving sketches. For (k,z)(k,z)-clustering, our streaming algorithm uses memory independent of the number nn of input points (in words of memory) and the aspect ratio ΔΔ, yielding a coreset with an optimal O~(dkmin⁡(ε4,εz+2))\widetilde{O}\left(\frac{dk}{\min(\varepsilon^4,\varepsilon^{z+2})}\right) words of memory for accuracy parameter ε∈(0,1)\varepsilon\in(0,1). For LpL_p subspace embeddings, where the rows of matrix A∈Rn×d\mathbf{A} \in \mathbb{R}^{n \times d} arrive in an insertion-only stream, we achieve an efficient algorithm that uses optimal space for different ranges of pp: O~(d2ε2)\widetilde{O}\left(\frac{d^2}{\varepsilon^2}\right) words for p≤2p\le 2 and O~(dp/2+1ε2)\widetilde{O}\left(\frac{d^{p/2+1}}{\varepsilon^2}\right) words for p>2p>2, both independent of the number of rows nn. Thus, our work shows that streaming algorithms can match offline algorithms in space complexity.

Create a lesson

Metadata

Comments
Updated version of arXiv:2504.16229, accepted by NeurIPS 2026. We include the space-optimal results in arXiv:2504.16229 and a new application to projection-cost preserving sketches. A companion paper (in submission) focuses on fast update times