Optimality of Linear Sketching under Modular Updates Shachar Lovett (UCSD) Kaave Hosseini (UCSD β CMU), Grigory Yaroslavtsev (Indiana)
Streaming and sketching
Streaming with binary updates β’ Counters π¦ 1 , β¦ , π¦ π β πΎ 2 β’ Stream of updates: π¦ π β π¦ π β 1 β’ At the end, want to compute function π(π¦ 1 , β¦ , π¦ π ) β’ For which functions can we do it using βͺ π memory?
Example β’ Initially 000000 β’ Flip π¦ 1 100000 β’ Flip π¦ 5 100010 β’ Flip π¦ 2 110010 β’ Flip π¦ 5 100000 β’ β¦ β’ Compute π π¦ 1 , β¦ , π¦ π
Linear sketching β’ Linear sketching is a useful primitive for streaming π β {0,1} β’ Let π: πΎ 2 β’ π has a linear sketch of size k if it factors as π π¦ = π(π π¦ ) where: π β πΎ 2 π linear function π: πΎ 2 (i) π β {0,1} post-processing function (ii) π: πΎ 2 β’ Equivalently, the βFourier dimensionβ of π is π
Linear sketching implies streaming π β {0,1} factors as π π¦ = π(π π¦ ) where β’ Assume π: πΎ 2 π β πΎ 2 π linear function (i) π: πΎ 2 π β {0,1} post-processing function (ii) π: πΎ 2 π β’ To compute π in the streaming model, maintain π π¦ β πΎ 2 β’ Easy to maintain under updates π¦ π β π¦ π β 1 β’ Requires only k bits of memory
Randomized linear sketching β’ Randomization makes linear sketching more powerful π β {0,1} has a randomized linear sketch of size k if it can be β’ π: πΎ 2 approximated by a distribution over linear sketches of size k β’ That is, if exists a distribution over π, π , where: π β πΎ 2 π linear function π: πΎ 2 (i) π β {0,1} post-processing function π: πΎ 2 (ii) Such that Pr L,p π π¦ = π(π π¦ ) β₯ 1 β π
Randomized sketching gives additional power β’ Consider the OR function: ππ π¦ 1 , β¦ , π¦ π = π¦ 1 β¨ β― β¨ π¦ π β’ Deterministic sketching requires size n β’ Randomized sketching can be done in size π log 1/π (random parities)
Is linear sketching universal? β’ Linear sketching seems like a very useful primitive for streaming β’ Is it universal? β’ That is: given a streaming algorithm that computes π using π bits of memory, can we extract from it a linear sketch for π of size β π ?
Universality of linear sketching
Universality of linear sketching π β {0,1} β’ Let π: πΎ 2 β’ Assume: randomized streaming algorithm supporting π updates and using π bits of memory β’ Goal: extract a randomized linear sketch of size β π β’ True if π β₯ 2 2 2π [Li-Nguyen-Woordruff β14, Ai -Hu-Li- Woodruff β16] β’ True if π = Ξ©(π) for random inputs [Kannan-Mossell-Sanyal-Yaroslavtsev β18] β’ True if π = Ξ©(π 2 ) [This work]
Main theorem: streaming π β {0,1} β’ Let π: πΎ 2 β’ Assume there exists a randomized streaming algorithm for π supporting N = Ξ© π 2 updates which uses π bits of memory β’ Then there exists a randomized linear sketch for π of size π(π)
Extensions (that I will not talk about) π β [0,1] β’ Extends to approximate real-valued functions π: πΎ 2 β’ Extends to functions over other fields β’ Assuming only N = Ξ©(π) updates are supported, we can still extract a randomized linear sketch, but its size will be ππππ§(π) instead of π(π)
One-way communication complexity
One way communication complexity β’ Model a streaming algorithm as a one-way communication protocol β’ Break π updates into π = π/π chunks of size n each β’ Setup: M players, holding inputs π¦ 1 , β¦ , π¦ π β πΎ 2 π ( π¦ π is the aggregate of the n updates in the i-th chunk) β’ Goal: compute π π¦ 1 + β― + π¦ π β’ Communication model: one-way
One way communication complexity β’ M players, holding inputs π¦ 1 , β¦ , π¦ π β πΎ 2 π β’ Model: one-way communication with shared randomness β’ Goal: output = π π¦ 1 + β― + π¦ π w.h.p over shared randomness Message Output Message Message π 1 β 0,1 π π 2 β 0,1 π π πβ1 β 0,1 π ππ£π’ β {0,1} β¦ Player Player Player 1 2 M π¦ 1 β πΎ 2 π¦ 2 β πΎ 2 π¦ π β πΎ 2 π π π
Main theorem: one way communication π β {0,1} β’ Let π: πΎ 2 β’ Assume there exists a one-way communication protocol for computing π π¦ 1 + β― + π¦ π for π = Ξ©(π) players with k-bit messages (recall: this corresponds to π = ππ = Ξ© π 2 binary updates) β’ Then there exists a randomized linear sketch for f of size π π β’ For π = Ξ© 1 players, get linear sketch of size ππππ§(π)
Proof
Proof β’ The proof uses 1. Standard techniques in communication complexity 2. Additive combinatorics
Proof step 1: Yaoβs minimax principle π β {0,1} β’ Let π: πΎ 2 β’ Fix a β hard distribution β π over inputs β’ Goal: linear sketch for π(π¦) where π¦ βΌ π β’ Embed hard distribution to the M players: β’ First M-1 players inputs π¦ 1 , β¦ , π¦ πβ1 are uniform in πΎ 2 π β’ Last player input π¦ π is set so that π¦ 1 + β― + π¦ π = π¦ β’ Intuition: protocol has no information on x until the last player
Proof step 2: protocol structure β’ Target: π¦ βΌ π β’ Players inputs: π¦ 1 , β¦ , π¦ πβ1 β πΎ 2 π uniformly, π¦ π = π¦ 1 + β― + π¦ πβ1 + π¦ β’ We may assume the protocol is deterministic β’ Messages: π 1 π¦ 1 , π 2 π 1 , π¦ 2 , π 3 π 1 , π 2 , π¦ 3 , β¦ β’ Output: ππ£π’ π 1 , β¦ , π πβ1 , π¦ π β’ With good probability out = π π¦ 1 + β― + π¦ π = π(π¦) β’ Can fix the messages (of the first M- 1 players) to β typical messages β, without hurting the success probability too much
Proof step 3: fixing to typical messages β , π 2 β , β¦ , π πβ1 β β’ Fix typical messages π 1 β’ Corresponds to the first M-1 players inputs: β’ π΅ 1 = π¦ 1 β πΎ 2 π : π 1 π¦ 1 = π 1 β β’ π΅ 2 = π¦ 2 β πΎ 2 β , π¦ 2 = π 2 π : π 2 π 1 β β’ β¦ β’ Sets are big: if the protocol uses k bits, then π΅ π β₯ 2 πβπ β’ After conditioning on π¦ 1 β π΅ 1 , β¦ , π¦ πβ1 β π΅ πβ1 , protocol output is a function of only π¦ π = π¦ 1 + β― + π¦ πβ1 + π¦
Proof step 4: mixing β’ Large sets π΅ 1 , β¦ , π΅ πβ1 β πΎ 2 π of density 2 βπ β’ If we sample π¦ 1 β π΅ 1 , β¦ , π¦ πβ1 β π΅ πβ1 and π¦ βΌ π , then with high probability ππ£π’ π¦ 1 + β― + π¦ πβ1 + π¦ = π π¦ β’ Technical lemma: for π = Ξ© π , the sum π¦ 1 + β― + π¦ πβ1 mixes in πΎ 2 π π of co-dimension π(π) , β’ More precisely, there exists a subspace π β πΎ 2 such that the sum is near invariant to a random shift from π
Proof step 5: extracting linear sketch β’ We found a large subspace V of co-dimension O(k) β’ If we sample π¦ 1 β π΅ 1 , β¦ , π¦ πβ1 β π΅ πβ1 , π¦ βΌ π and π€ β π, then with high probability ππ£π’ π¦ 1 + β― + π¦ πβ1 + π¦ + π€ = π π¦ β’ This allows to βfactor outβ V from the output function, and extract a linear sketch for π π¦
Open problems
Linear sketching for modular updates β’ For binary updates (or more general, modular updates), we prove that linear sketching is universal β’ Any streaming algorithm which supports π = Ξ© π 2 updates implies a randomized linear sketch with similar guarantees β’ Open problem 1: can this be improved to π = Ξ© π ? β’ [Kannan-Mossell-Sanyal-Yaroslavtsev β18] proved a partial result in this regime, giving a linear sketch for f on random inputs β’ Our results in this regime incur a polynomial loss in the sketch size
Integer updates β’ Streaming if often considered in the integer case β’ Integer counters π¦ 1 , β¦ , π¦ π β’ Updates π¦ π += 1 or π¦ π β= 1 β’ Sketching corresponds to linear functions over the integers β’ The results of [Li-Nguyen-Woordruff β14, Ai -Hu-Li- Woodruff β16] work in this regime as well, but require assuming π β₯ 2 2 2π β’ Open problem 2: can our techniques be imported to this regime? β’ Challenge: not clear what βmixingβ should mean here
Recommend
More recommend