Pseudo-Deterministic Streaming

Shafi Goldwasser, Ofer Grossman, Sidhanth Mohanty, David P. Woodruff

TL;DR

Classic randomized streaming algorithms are notoriously non-reproducible: running the same algorithm on the same input data stream with different random seeds often produces different valid answers. This paper initiates the study of pseudo-deterministic streaming algorithms—randomized streaming algorithms that output the exact same canonical answer with high probability across independent executions. The authors establish strong space lower bounds showing that problems like finding duplicates or non-zero support elements inherently require linear memory to be pseudo-deterministic, but also prove that pseudo-determinism can strictly outperform deterministic streaming algorithms for structured linear algebra and frequency estimation tasks.

What Problem Does This Paper Address?

In data stream computing, algorithms process massive sequences of updates using sublinear memory. Randomization is often essential: classic algorithms for finding duplicates, estimating $\ell_2$ norms, or finding non-zero vector coordinates achieve polylogarithmic space ($O(\text{poly log } n)$), whereas deterministic algorithms often require $\Omega(n)$ space.

However, randomized search algorithms have a reproducibility issue: two independent observers (say, Alice and Bob) running the same algorithm on identical data streams will obtain different valid answers (e.g., finding different duplicate items or slightly different norm approximations). A pseudo-deterministic algorithm eliminates this discrepancy: despite using internal randomness, it guarantees that for every input, there is a unique correct answer produced with high probability across multiple runs.

This paper investigates whether low-memory pseudo-deterministic streaming algorithms exist for fundamental streaming tasks, how the entropy of an algorithm's output relates to memory constraints, and whether pseudo-determinism can ever achieve exponential space savings over purely deterministic streaming algorithms.

Methods

The authors employ a variety of theoretical techniques spanning communication complexity, pseudorandom generators, and adaptive sketching attacks:

  • One-Way Communication Reductions: To prove lower bounds for streaming problems like Find-Duplicate and Find-Support-Elem, the authors reduce from a hard communication problem called One-Way-Partial-Recovery (where Bob must recover a large subset of Alice’s input).
  • Thresholding Technique for Concentration: To bound the output entropy without relying on zero-error assumptions, the authors use a threshold technique. Alice uses shared randomness to identify thresholds where Bob's decisions could fluctuate based on Alice's private random bits, and sends short "correction" messages. This decouples the output sequence from Alice’s private randomness, enabling union bounds across Bob's simulated iterations.
  • Adaptive Sketching Attacks: For $\ell_2$ norm estimation, the authors leverage results on adaptive attacks against linear sketches to show that a sublinear-dimensional pseudo-deterministic sketching scheme would allow an adversary to deduce queries that cause estimation failure.
  • Derandomization via Space-Bounded PRGs: For upper bounds (e.g., Find-Nonzero-Row), the authors combine randomized hashing/dimension reduction with Nisan’s pseudorandom generator (PRG) for space-bounded computation to drastically reduce the random seed size needed to simulate deterministic structures.

Datasets

Not discussed in the paper. (This is a purely theoretical paper; no empirical datasets or experimental benchmarks were used.)

Key Insights and Ideas

  • Pseudo-Determinism vs. Multi-Pseudo-Determinism and Entropy: The authors introduce the notion of concentrated algorithms—algorithms where the most likely output has probability at least $1/k$. Proving lower bounds for $k$-concentrated algorithms simultaneously yields lower bounds for both $k$-pseudo-deterministic algorithms (algorithms whose outputs are concentrated on at most $k$ candidates) and low-entropy randomized algorithms.
  • Entropy is Inherent for Low Memory: If an algorithm uses $s$ memory for Find-Duplicate or Find-Support-Elem, the output must have entropy at least $\log(\frac{n}{s \log n})$. Hence, near-optimal poly-log space algorithms cannot escape producing essentially uniform, high-entropy outputs across runs.
  • A Strict Three-Way Separation: For Find-Nonzero-Row in an $n \times d$ matrix stream, the paper demonstrates a strict complexity hierarchy:
  • Randomized: $\tilde{\Theta}(1)$
  • Pseudo-deterministic: $\tilde{\Theta}(n)$
  • Deterministic: $\tilde{\Theta}(nd)$
  • Bypassing Deterministic Bottlenecks via Hashing: In frequency and inner product estimation, when the stream length $m \ll n$, pseudo-deterministic algorithms can hash the universe $[n]$ into a universe of size $O(m^3)$ with pairwise independence, avoid collisions with high probability, and run deterministic frequency estimators (like Misra–Gries), strictly beating deterministic space lower bounds.

Key Results

  • Find-Duplicate & Find-Support-Elem Lower Bounds: Every pseudo-deterministic streaming algorithm requires $\tilde{\Omega}(n)$ space, in sharp contrast to randomized algorithms that require only $O(\text{poly log } n)$ space. Even allowing bounded error, any $n/s$-concentrated algorithm requires $\tilde{\Omega}(s^{1-\epsilon})$ space.
  • $\ell_2$-Norm Sketching Lower Bound & Phase Transition:
  • Any pseudo-deterministic linear sketch approximating the $\ell_2$ norm within a constant factor requires sketch dimension $d = \Omega(n)$.
  • Any $(2 - \delta)$-concentrated sketching algorithm requires $\Omega(n / \log n)$ sketch dimension.
  • In contrast, there is a $(2 + \delta)$-concentrated sketching algorithm using only $O(\text{poly}(\log n, \log m))$ space, highlighting an abrupt phase transition around concentration factor 2.
  • Upper Bound Separations:
  • Point Query / Inner Product Estimation: A pseudo-deterministic algorithm achieves $O(\frac{\log m}{\epsilon} + \log n)$ bits of space, while any deterministic algorithm requires $\Omega(\frac{\log n}{\epsilon})$ bits.
  • Row-Space Basis Retrieval (RecoverBasis): For a rank-$k$ matrix, pseudo-deterministic streaming achieves $\tilde{O}(\text{poly}(k) + kd)$ space during the streaming phase, compared to the $\tilde{\Omega}(nd)$ deterministic lower bound.

Limitations and Future Work

The authors highlight several intriguing open problems:

  1. Morris Counters: Can the number of elements in a stream up to $n$ be approximated pseudo-deterministically in $O(\log \log n)$ space (matching Morris's randomized counter), or does it require $\Omega(\log n)$ space?
  2. Turnstile $\ell_2$-Norm Estimation: The $\Omega(n)$ lower bound is proven for the sketching model. Whether a general, non-sketching pseudo-deterministic turnstile streaming algorithm can approximate $\ell_2$ norms in $O(\text{poly log } n)$ space remains open.
  3. Multi-Pass Streaming: All proven lower bounds apply strictly to 1-pass streams. The authors show that Find-Duplicate can be solved deterministically in $\tilde{O}(n^{1/p})$ space using $p$ passes; none of the single-pass pseudo-deterministic lower bounds currently extend even to 2-pass algorithms.

Summary updated

BibTeX
@inproceedings{goldwasser2020pseudo,
  author = {Shafi Goldwasser and Ofer Grossman and Sidhanth Mohanty and David P. Woodruff},
  title = {{Pseudo-Deterministic Streaming}},
  booktitle = {ITCS},
  year = {2020},
  url = {https://openreview.net/forum?id=6vS9-l7E4TY},
}
Figure