We present the first single pass algorithm for computing spectral sparsifiers
of graphs in the dynamic semi-streaming model. Given a single pass over a
stream containing insertions and deletions of edges to a graph G, our algorithm
maintains a randomized linear sketch of the incidence matrix of G into
dimension O((1/epsilon^2) n polylog(n)). Using this sketch, at any point, the
algorithm can output a (1 +/- epsilon) spectral sparsifier for G with high
probability.
While O((1/epsilon^2) n polylog(n)) space algorithms are known for computing
*cut sparsifiers* in dynamic streams [AGM12b, GKP12] and spectral sparsifiers
in *insertion-only* streams [KL11], prior to our work, the best known single
pass algorithm for maintaining spectral sparsifiers in dynamic streams required
sketches of dimension Omega((1/epsilon^2) n^(5/3)) [AGM14].
To achieve our result, we show that, using a coarse sparsifier of G and a
linear sketch of G's incidence matrix, it is possible to sample edges by
effective resistance, obtaining a spectral sparsifier of arbitrary precision.
Sampling from the sketch requires a novel application of ell_2/ell_2 sparse
recovery, a natural extension of the ell_0 methods used for cut sparsifiers in
[AGM12b]. Recent work of [MP12] on row sampling for matrix approximation gives
a recursive approach for obtaining the required coarse sparsifiers.
Under certain restrictions, our approach also extends to the problem of
maintaining a spectral approximation for a general matrix A^T A given a stream
of updates to rows in A.