Download presentation
Presentation is loading. Please wait.
Published byImogene Dortha Rich Modified over 6 years ago
1
New Characterizations in Turnstile Streams with Applications
Yuqing Ai Tsinghua University Wei Hu Tsinghua University Yi Li Facebook David Woodruff IBM Almaden
2
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
3
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 π΄π₯ π
4
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?
5
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)
6
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 π
7
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
8
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
9
Strengthen the LNW Reduction
Remove the βbox constraintβ Generalize to the strict turnstile model Extend to multi-pass algorithms
10
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.
11
Stream Automaton β¦ + π π β¦ β π π β¦ β π 1 , + π 2 β¦ + π 1 + π 1 + π 5
Start β¦ + π 1 + π 1 + π 5 β π 1 β¦ β¦
12
Path-Independent Automaton
Every π₯β β€ π in a unique state
13
Path-Independent Automaton
+ π π β¦ β π π β¦ β π 1 , + π 2 Start β¦ + π 1 + π 1 0 in two different states + π 5 β π 1 β¦ β¦
14
Path-Independent Automaton
Every π₯β β€ π in a unique state Equivalent to π΄π₯ mod π
15
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
16
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
17
Terminal equivalence class πΆ
π£ ππ freq(π) = 0 Terminal equivalence class πΆβ²
18
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 β¦
19
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 π
20
Tightness of Our Bound πΏβ€poly ππ β
π π +1 π Lower bound: πΏβ₯ π π Ξ©(π)
21
Removing the Box Constraint
Want πΏβ€π πΏβ€poly ππ β
π π +1 π β€ π ππ πΏβ€π βΈ π ππ β€π βΈ log π β€ log π ππ Space of π old
22
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!
23
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
24
Application: Norm Estimation
Problem: for π₯β βπ, β¦, π π , output π₯ π up to additive error π 1/π π Ξ©( log π ) space lower bound π( log π + log log π ) space algorithm (1β€πβ€2) [KNWβ10] Lower bound tight when log log π =π log π βΊ π β€ exp poly(π)
25
Strengthen the LNW Reduction
Remove the βbox constraintβ Generalize to the strict turnstile model Extend to multi-pass algorithms
26
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
27
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
28
Strengthen the LNW Reduction
Remove the βbox constraintβ Generalize to the strict turnstile model Extend to multi-pass algorithms
29
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
30
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!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.