Manuscript Offprint

arXiv:2611.03604

Near-Optimal Space and Time Cut Sparsification in Turnstile Streams

Honghao Lin, Vahab Mirrokni, David P. Woodruff

Abstract

A seminal result of Ahn, Guha, and McGregor (PODS'12) showed that a cut sparsifier of an unweighted graph can be computed from a near-linear number of linear measurements. Later work extended this to spectral sparsifiers (Kapralov et al., FOCS'14) and to near-linear recovery time (Kapralov et al., SODA'20). For weighted graphs, these sketches rely on grouping edges by weight, which general turnstile streams do not allow. Chen, Khanna, and Li (FOCS'22) removed this limitation, using O~(n/ε3)\widetilde{O}(n/\varepsilon^3) bits of space.

We improve the space to O~(n/ε2)\widetilde{O}(n/\varepsilon^2) bits. Our algorithm makes one pass over a general turnstile stream of a weighted graph, processes each update in O~(1)\widetilde{O}(1) time, and recovers, in O~(n/ε2)\widetilde{O}(n/\varepsilon^2) time, a reweighted subgraph with O(nε−2log⁡2n)O(n\varepsilon^{-2}\log^2 n) edges that preserves every cut within a factor of 1±ε1 \pm \varepsilon. Its space, update time, and recovery time are all optimal up to polylogarithmic factors.

1 Introduction

Cut sparsification, introduced by Benczúr and Karger [BK96], has been profoundly influential. Given a weighted graph G=(V,E,w)G = (V, E, w) with n=∣V∣n = |V| vertices, nonnegative edge weights wew_e, and an error parameter ε>0\varepsilon > 0, a (1±ε)(1 \pm \varepsilon)-cut sparsifier of GG is a reweighted subgraph HH on the same vertex set that approximates the weight of every cut of GG within a factor of 1±ε1 \pm \varepsilon. They proved that every undirected graph admits such a sparsifier with only O(nlog⁡n/ε2)O(n \log n/\varepsilon^2) edges. This breakthrough was later extended to the stronger notion of spectral sparsifiers [ST11], for which the edge bound was improved to O(n/ε2)O(n/\varepsilon^2) [BSS12]. A rich line of follow-up work has given alternative constructions and refined bounds for both cut and spectral sparsifiers [FHHP19, KP12, ST04, SS11, LS17, CKST19]. Beyond its theoretical interest, sparsification has become a basic building block of modern graph algorithms, including algorithms for maximum flow and minimum cut [BK15, She13, KLOS14, Pen16], solvers for graph-structured linear systems [ST14, CKM+^+14, JS25], and methods for graph clustering [CSWZ16].

Sparsifiers also serve as compact synopses of a graph, a viewpoint that is central to graph sketching and data streaming [AGM12, McG14]. A cut query asks for the total weight of the edges crossing a partition of the vertex set, a basic aggregate query over the edge set. A single cut sparsifier answers all such queries simultaneously up to a multiplicative error, using space nearly proportional to the number of vertices rather than the number of edges [BK96, BK15]. Downstream procedures for partitioning, connectivity, minimum cut, and flow can then work with this summary without materializing the full graph.

*Google Research

†Google Research

‡Google Research and Carnegie Mellon University

This perspective makes the streaming and linear-sketching models particularly natural. A streaming algorithm processes the edge set as a sequence of updates and maintains only a small summary of the graph. A linear sketch is a summary that is a linear function of the edge-weight vector, so it handles insertions and deletions alike. A seminal result of Ahn, Guha, and McGregor [AGM12] showed that a cut sparsifier of an unweighted undirected graph can be computed from only O~(n/ε2)\widetilde{O}(n/\varepsilon^2) linear measurements. This line of work was subsequently extended to spectral sparsifiers [KLM+17] and to faster recovery algorithms [KMM+20]. On the lower-bound side, Andoni et al. [ACK+16] proved that, for ε>1/n\varepsilon > 1/\sqrt{n}, any data structure that preserves all cuts simultaneously needs Ω(n/ε2)\Omega(n/\varepsilon^2) bits, and Carlson et al. [CKST19] strengthened this to Ω(nlog⁡n/ε2)\Omega(n \log n/\varepsilon^2) bits for ε=ω(n−1/4)\varepsilon = \omega(n^{-1/4}).

The general turnstile model captures a more flexible form of dynamic graph data. Edge weights may represent aggregate quantities such as counts, frequencies, capacities, or affinities, and updates may both increase and decrease them. Such updates arise naturally when records are inserted or deleted, when late-arriving records correct earlier aggregates, or when transactions are rolled back. Prior linear sketches for weighted graphs handle a more restrictive dynamic model by grouping edges into geometric weight classes [AGM12, KLM+17, KMM+20]. This requires every deletion of an edge to reveal the weight used at its insertion, so that the edge stays in the same weight class throughout the stream.

Grouping edges by weight, however, is inherently nonlinear, so it cannot be implemented in the general turnstile model, where the input is an arbitrary sequence of edge-weight updates. To overcome this limitation, Chen, Khanna, and Li [CKL22] gave a linear sketch for weighted undirected graphs with O~(n/ε3)\widetilde{O}(n/\varepsilon^3) measurements, yielding a turnstile streaming algorithm with the same space bound. The dependence on ε\varepsilon is central here: the offline sparsification bounds [BK96, BK15, BSS12] and the sketching lower bounds [ACK+16, CKST19] suggest that O~(n/ε2)\widetilde{O}(n/\varepsilon^2) space is the right target. Improving this dependence matters most in high-accuracy regimes, where ε\varepsilon is small and the extra 1/ε1/\varepsilon factor dominates the space. Time is the other resource. Ideally, each update takes polylogarithmic time and the sparsifier is recovered in time nearly linear in its size. For dynamic streams with weight grouping, Kapralov et al. [KMM+20] achieved such a recovery time. This leads to the following question:

Can we design a cut sparsifier algorithm for general turnstile streams that matches the near-optimal O~(n/ε2)\widetilde{O}(n/\varepsilon^2) space bound of the offline setting and runs in near-linear time?

References (39)

  • On sketching quadratic forms
  • Graph sketches: Sparsification, spanners, and subgraphs
  • Approximating $s$-t minimum cuts in $\widetilde{\sigma}(n^2)$ time
  • Randomized approximation schemes for cuts and flows in capacitated graphs
  • Concentration Inequalities: A Nonasymptotic Theory of Independence
  • Twice-Ramanujan sparsifiers
  • Graph sparsification, spectral sketches, and faster resistance computation via short cycle decompositions
  • On weighted graph sparsification by linear sketching
  • Solving SDD linear systems in nearly $m \log^{1/2} n$ time
  • Optimal lower bounds for sketching graph cuts
  • Communication-optimal distributed clustering
  • Near-optimal extractors against quantum storage
  • A general framework for graph sparsification
  • Multi-terminal network flows
  • Efficient $\tilde{O}(n/\epsilon)$ spectral sketches for the Laplacian and its pseudoinverse
  • Ultrasparse ultrasparsifiers and faster Laplacian system solvers
  • Perfect $l_{p}$ sampling in a data stream
  • Single pass spectral sparsification in dynamic streams
  • An almost-linear-time algorithm for approximate max flow in undirected graphs, and its multi-commodity generalizations
  • Fast and space efficient spectral sparsification in dynamic streams
  • Spectral sparsification via random spanners
  • Finite Fields, volume 20 of Encyclopedia of Mathematics and its Applications
  • Near-linear time approximations for cut problems via fair cuts (opens arXiv in a new tab)
  • Unbiased insights: Optimal streaming algorithms for $ \ell_{p} $ sampling, the forget model, and beyond
  • A Nearly Optimal Min-Cut Algorithm for Dynamic Streams
  • Approximate Gomory–Hu tree is faster than n - 1 max-flows
  • An SDP-based algorithm for linear-sized spectral sparsification
  • Stellar Colosseum: A Many-Agent Harness for Long-Horizon Research in Mathematics and Theoretical Computer Science
  • Randomness is linear in space
  • Graph sparsification by effective resistances
  • Nearly-linear time algorithms for graph partitioning, graph sparsification, and solving linear systems
  • Spectral sparsification of graphs
  • Nearly linear time algorithms for preconditioning and solving symmetric, diagonally dominant linear systems
  • This changes each of them by at most a factor of two and affects only constants
  • This uses $O(N \log(MU + 2))$ bits, $O(1)$ time per update, and $O(N)$ recovery time
  • Together with $M, U, \delta^{-1} \leq n^{O(1)}$, this implies that every parameter has an $O(\log n)$-bit representation
  • Recovery computes medians, squares of difference queries, averages of $R$ counters, and rescalings by $2^k$, and compares these values with thresholds determined by $\kappa_e$
  • A set $S$ is a union of components of $x$ exactly when $x(S)=0$, which by the previous step happens exactly when $Y'(S)=0$
  • Then $m = O(\log n)$