New Characterizations in Turnstile Streams with Applications

Slides:



Advertisements
Similar presentations
Estimating Distinct Elements, Optimally
Advertisements

Fast Moment Estimation in Data Streams in Optimal Space Daniel Kane, Jelani Nelson, Ely Porat, David Woodruff Harvard MIT Bar-Ilan IBM.
1+eps-Approximate Sparse Recovery Eric Price MIT David Woodruff IBM Almaden.
The Data Stream Space Complexity of Cascaded Norms T.S. Jayram David Woodruff IBM Almaden.
Tight Bounds for Distributed Functional Monitoring David Woodruff IBM Almaden Qin Zhang Aarhus University MADALGO Based on a paper in STOC, 2012.
Tight Bounds for Distributed Functional Monitoring David Woodruff IBM Almaden Qin Zhang Aarhus University MADALGO.
Optimal Space Lower Bounds for All Frequency Moments David Woodruff MIT
Routing Complexity of Faulty Networks Omer Angel Itai Benjamini Eran Ofek Udi Wieder The Weizmann Institute of Science.
Numerical Linear Algebra in the Streaming Model Ken Clarkson - IBM David Woodruff - IBM.
The Average Case Complexity of Counting Distinct Elements David Woodruff IBM Almaden.
Optimal Bounds for Johnson- Lindenstrauss Transforms and Streaming Problems with Sub- Constant Error T.S. Jayram David Woodruff IBM Almaden.
Numerical Linear Algebra in the Streaming Model
Sublinear-time Algorithms for Machine Learning Ken Clarkson Elad Hazan David Woodruff IBM Almaden Technion IBM Almaden.
Lower Bounds for Additive Spanners, Emulators, and More David P. Woodruff MIT and Tsinghua University To appear in FOCS, 2006.
Xiaoming Sun Tsinghua University David Woodruff MIT
Tight Lower Bounds for the Distinct Elements Problem David Woodruff MIT Joint work with Piotr Indyk.
Subspace Embeddings for the L1 norm with Applications Christian Sohler David Woodruff TU Dortmund IBM Almaden.
Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
Size-estimation framework with applications to transitive closure and reachability Presented by Maxim Kalaev Edith Cohen AT&T Bell Labs 1996.
Heuristics for the Hidden Clique Problem Robert Krauthgamer (IBM Almaden) Joint work with Uri Feige (Weizmann)
Turnstile Streaming Algorithms Might as Well Be Linear Sketches Yi Li Huy L. Nguyen David Woodruff.
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 8 May 4, 2005
The max flow problem
Approximating the MST Weight in Sublinear Time Bernard Chazelle (Princeton) Ronitt Rubinfeld (NEC) Luca Trevisan (U.C. Berkeley)
Tight Bounds for Graph Problems in Insertion Streams Xiaoming Sun and David P. Woodruff Chinese Academy of Sciences and IBM Research-Almaden.
Streaming Algorithms Piotr Indyk MIT. Data Streams A data stream is a sequence of data that is too large to be stored in available memory Examples: –Network.
Sublinear Algorithms via Precision Sampling Alexandr Andoni (Microsoft Research) joint work with: Robert Krauthgamer (Weizmann Inst.) Krzysztof Onak (CMU)
Data Stream Algorithms Lower Bounds Graham Cormode
Lower bounds on data stream computations Seminar in Communication Complexity By Michael Umansky Instructor: Ronitt Rubinfeld.
The Message Passing Communication Model David Woodruff IBM Almaden.
Discrete Methods in Mathematical Informatics Kunihiko Sadakane The University of Tokyo
New Algorithms for Heavy Hitters in Data Streams David Woodruff IBM Almaden Joint works with Arnab Bhattacharyya, Vladimir Braverman, Stephen R. Chestnut,
Algorithms for Big Data: Streaming and Sublinear Time Algorithms
Information Complexity Lower Bounds
Stochastic Streams: Sample Complexity vs. Space Complexity
Game Theory Just last week:
Hans Bodlaender, Marek Cygan and Stefan Kratsch
Approximating the MST Weight in Sublinear Time
The minimum cost flow problem
Estimating L2 Norm MIT Piotr Indyk.
Sample Mean Distributions
Approximate Matchings in Dynamic Graph Streams
Chapter 5. Optimal Matchings
Background: Lattices and the Learning-with-Errors problem
CS 154, Lecture 6: Communication Complexity
Turnstile Streaming Algorithms Might as Well Be Linear Sketches
Nikhil Bansal, Shashwat Garg, Jesper Nederlof, Nikhil Vyas
Parallel and Distributed Algorithms
CIS 700: “algorithms for Big Data”
Chap 3. The simplex method
Instructor: Shengyu Zhang
Analysis of Algorithms
Linear sketching with parities
Alternating tree Automata and Parity games
Near-Optimal (Euclidean) Metric Compression
The Communication Complexity of Distributed Set-Joins
Linear sketching over
CSCI B609: “Foundations of Data Science”
On the effect of randomness on planted 3-coloring models
Linear sketching with parities
Range-Efficient Computation of F0 over Massive Data Streams
Imperfectly Shared Randomness
Streaming Symmetric Norms via Measure Concentration
Lecture 8: Synchronous Network Algorithms
Algorithms (2IL15) – Lecture 7
CS21 Decidability and Tractability
Lecture 6: Counting triangles Dynamic graphs & sampling
New Jersey, October 9-11, 2016 Field of theoretical computer science
Sublinear Algorihms for Big Data
Error Correction Coding
Presentation transcript:

New Characterizations in Turnstile Streams with Applications Yuqing Ai Tsinghua University Wei Hu Tsinghua University Yi Li Facebook David Woodruff IBM Almaden

Turnstile Streaming Model Underlying 𝑛-dimensional vector 𝑥 initialized to 0 Stream of updates 𝑥←𝑥+ 𝑒 𝑖 or 𝑥←𝑥− 𝑒 𝑖 for standard unit vector 𝑒𝑖 At end of the stream, 𝑥∈{−𝑚, …, −1, 0, 1,…, 𝑚}𝑛 Output an approximation to 𝑓(𝑥) w.h.p. Goal: use as small space in bits as possible

Example: Estimating the ℓ 2 -norm Output 𝑍 with 1−𝜖 𝑥 2 ≤𝑍≤ 1+𝜖 𝑥 2 Algorithm: Let 𝑟=1/ 𝜖 2 Choose an 𝑟×𝑛 matrix 𝐴 of i.i.d. sign random variables (+1 w.p. 1/2, −1 w.p. 1/2) Maintain 𝐴𝑥 in the stream Output 𝐴𝑥 2 𝑟

Generic Form All known algorithms have the following generic form (linear sketch): Sample a random matrix 𝐴 Maintain 𝐴𝑥 in the stream Output a function of 𝐴𝑥 Question (?!): does the optimal algorithm for approximating any function in the turnstile model have this form?

The LNW Reduction Yes! [Li, Nguyễn, Woodruff’14] Theorem: for computing a function 𝑓 of 𝑥 in −𝑚, …, 𝑚 𝑛 in the turnstile model, there is a randomized algorithm which samples a matrix 𝐴 and a vector 𝑞 uniformly from 𝑂(𝑛 log 𝑚 ) instances maintains (𝐴𝑥 mod 𝑞) in the stream outputs a function of (𝐴𝑥 mod 𝑞) Space complexity is optimal up to a constant factor (not including the 𝑂( log 𝑛 + log log 𝑚 ) bits for randomness)

Consequence Input 𝑥 Input 𝑦 Create stream 𝑠(𝑥) Create stream 𝑠(𝑦) Lower Bound Technique Streaming algorithm 𝒜 Run 𝒜 on 𝑠(𝑥), send state of 𝒜(𝑠(𝑥)) to Bob Bob computes 𝒜(𝑠(𝑥), 𝑠(𝑦)) If Bob solves 𝑔(𝑥,𝑦), space complexity of 𝒜 at least the 1-way communication complexity of 𝑔

Consequence Input 𝑥 Input 𝑦 Create stream 𝑠(𝑥) Create stream 𝑠(𝑦) The LNW reduction implies If players can solve 𝑔(𝑥,𝑦), then space of 𝒜 at least the simultaneous communication complexity of 𝑔 Weaker model in which Alice and Bob simultaneously send a message to a referee who outputs the answer

Our Result Strengthen the LNW reduction from several aspects: Remove the “box constraint” Generalize to the strict turnstile model Extend to multi-pass algorithms Obtain new tight lower bounds

Strengthen the LNW Reduction Remove the “box constraint” Generalize to the strict turnstile model Extend to multi-pass algorithms

The “Box Constraint” The LNW reduction requires the algorithm to be correct as long as 𝑥∈ −𝑚, …, 𝑚 𝑛 at the end of the stream. While processing the stream, may have 𝑥 ∞ ≫𝑚 The algorithm is not allowed to abort if this happens. It must still be correct at the end of the stream as long as 𝑥∈ −𝑚, …, 𝑚 𝑛 . More natural requirement: the algorithm only needs to be correct when 𝑥 belongs to −𝑚, …, 𝑚 𝑛 at all time in the stream.

Stream Automaton … + 𝑒 𝑛 … − 𝑒 𝑛 … − 𝑒 1 , + 𝑒 2 … + 𝑒 1 + 𝑒 1 + 𝑒 5 Start … + 𝑒 1 + 𝑒 1 + 𝑒 5 − 𝑒 1 … …

Path-Independent Automaton Every 𝑥∈ ℤ 𝑛 in a unique state

Path-Independent Automaton + 𝑒 𝑛 … − 𝑒 𝑛 … − 𝑒 1 , + 𝑒 2 Start … + 𝑒 1 + 𝑒 1 0 in two different states + 𝑒 5 − 𝑒 1 … …

Path-Independent Automaton Every 𝑥∈ ℤ 𝑛 in a unique state Equivalent to 𝐴𝑥 mod 𝑞

Zero-Frequency Graph For stream 𝜎, let freq 𝜎 ∈ ℤ 𝑛 be the “net update” to all coordinates. Zero-freq graph: directed graph 𝐺=(𝑉, 𝐸) 𝑉 = states of the automaton 𝑢, 𝑣 ∈𝐸 if there exists stream 𝜎 such that 𝑢⊕𝜎 =𝑣 and freq 𝜎 = 0 Terminal equivalence class: strongly connected component in 𝐺 with no outgoing edge Walk in G is a sequence of zero-frequency streams

The LNW Reduction 𝐺: zero-frequency graph of 𝒜 old States of new automaton 𝒜 new = terminal equivalence classes in 𝐺 For a terminal equivalence class 𝐶 and an update 𝑒 𝑖 , define transition as: Let 𝑣∈𝐶 be an arbitrary node Compute 𝑣⊕ 𝑒 𝑖 using transition function of 𝒜 old Walk from 𝑣⊕ 𝑒 𝑖 in 𝐺 until reach a terminal equivalence class 𝐶′ 𝐶′ is unique Does not depend on 𝑣 or the walk

Terminal equivalence class 𝐶 𝑣 𝑒𝑖 freq(𝜎) = 0 Terminal equivalence class 𝐶′

The Box Constraint For a stream 𝜎, define | 𝜎| max = max prefix 𝜔 of 𝜎 freq 𝜔 ∞ 𝜏 1 , 𝜏 2 , … are zero-frequency streams (walks in 𝐺) Length of 𝜏 𝑖 could be very large When | 𝜎| max ≤𝑚, | 𝜎′| max could be very large 𝜎=( 𝜎 1 , 𝜎 2 , …, 𝜎 𝑘 ) on 𝒜 new 𝜎′=(… ,𝜎 1 ,…, 𝜎 2 , …, 𝜎 𝑘 , …) on 𝒜 old 𝜏 1 𝜏 2 𝜏 3 𝜏 4 𝜏 5 𝜏 6 …

Zero-Freq Stream Length 𝐿: upper bound on the lengths of 𝜏 𝑖 ’s | 𝜎| max ≤𝑚 ⟹| 𝜎′| max ≤𝑚+𝐿/2 Want 𝐿≤𝑚 Let s = # states in 𝒜 old Lemma: if there is a zero-freq stream from 𝑢 to 𝑣, then there exists such a stream with length at most poly 𝑛𝑠 ⋅ 𝑠 𝑛 +1 𝑛 𝐿≤poly 𝑛𝑠 ⋅ 𝑠 𝑛 +1 𝑛

Tightness of Our Bound 𝐿≤poly 𝑛𝑠 ⋅ 𝑠 𝑛 +1 𝑛 Lower bound: 𝐿≥ 𝑠 𝑛 Ω(𝑛)

Removing the Box Constraint Want 𝐿≤𝑚 𝐿≤poly 𝑛𝑠 ⋅ 𝑠 𝑛 +1 𝑛 ≤ 𝑠 𝑐𝑛 𝐿≤𝑚 ⟸ 𝑠 𝑐𝑛 ≤𝑚 ⟸ log 𝑠 ≤ log 𝑚 𝑐𝑛 Space of 𝒜 old

Application: Counting 𝑛=1 Problem: output |𝑥| up to additive error 𝑚/4, while 𝑥 varies in {−𝑚, …, 𝑚} 𝑂( log 𝑚 ) space algorithm Is there an Ω( log 𝑚 ) lower bound? For insertion streams, no: approximate counting For relative error, yes: but proof doesn’t apply For additive error… yes!

Application: Counting Condition for removing box constraint: space ≤ log 𝑚 𝑐𝑛 = log 𝑚 𝑐 Assume space ≤ log 𝑚 𝑐 , otherwise done 𝐴𝑥 mod 𝑞=( 𝑎 1 𝑥 mod 𝑞 1 , 𝑎 2 𝑥 mod 𝑞 2 , …, 𝑎 𝑟 𝑥 mod 𝑞 𝑟 ) Show lcm 𝑞 1 , …, 𝑞 𝑟 =Ω(𝑚) Cannot distinguish 𝑥, 𝑥+lcm, 𝑥+2⋅lcm, … Ω(𝑚) different states, Ω( log 𝑚 ) space

Application: Norm Estimation Problem: for 𝑥∈ −𝑚, …, 𝑚 𝑛 , output 𝑥 𝑝 up to additive error 1 4 𝑛 1/𝑝 𝑚 Ω( log 𝑚 ) space lower bound 𝑂( log 𝑚 + log log 𝑛 ) space algorithm (1≤𝑝≤2) [KNW’10] Lower bound tight when log log 𝑛 =𝑂 log 𝑚 ⟺ 𝑛 ≤ exp poly(𝑚)

Strengthen the LNW Reduction Remove the “box constraint” Generalize to the strict turnstile model Extend to multi-pass algorithms

The Strict Turnstile Model The strict turnstile model: no negative coordinates, i.e., 𝑥 𝑖 ≥0 at all times in the stream Dynamic graph streams: insertions and deletions of edges Allow multi-graphs, but no negative edges Generalize the LNW reduction to the strict turnstile model 𝐿: upper bound on the length of zero-freq streams Initialize all coordinates of 𝑥 to be 𝐿 Now the reduction guarantees 𝑥 is always nonnegative Subtract 𝐿 from all coordinates at the end of the stream

Application: Maximum Matching [AKLY’16]: For outputting an 𝑛 𝜖 -approximate maximum matching, space is Θ ( 𝑛 2−3𝜖 ) Lower bound only in simultaneous communication model Can apply our reduction

Strengthen the LNW Reduction Remove the “box constraint” Generalize to the strict turnstile model Extend to multi-pass algorithms

Multi-Pass Algorithms 𝑝-pass automaton After 𝑖-th pass (𝑖<𝑝), output an automaton 𝒜 𝑖+1 Run 𝒜 𝑖+1 on input stream in (𝑖+1)-st pass After 𝑝-th pass, output answer Theorem: There is a 𝑝-pass automaton for which each automaton in each pass is path-independent Space is optimal up to a constant factor

Conclusions New progress on characterizing turnstile streaming algorithms as linear sketches Applications Optimal lower bounds for counting with additive error, maximum matching in dynamic graph Open questions Box constraint After removing box constraint, still have very long streams Better reduction? Thank you!