Lecture 22: Linearity Testing Sparse Fourier Transform

Slides:



Advertisements
Similar presentations
1+eps-Approximate Sparse Recovery Eric Price MIT David Woodruff IBM Almaden.
Advertisements

Numerical Linear Algebra in the Streaming Model Ken Clarkson - IBM David Woodruff - IBM.
Sublinear Algorithms … Lecture 23: April 20.
Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering.
Compressive Sensing IT530, Lecture Notes.
Image Processing Lecture 4
Deterministic Selection and Sorting Prepared by John Reif, Ph.D. Analysis of Algorithms.
The Rate of Concentration of the stationary distribution of a Markov Chain on the Homogenous Populations. Boris Mitavskiy and Jonathan Rowe School of Computer.
Putting a Junta to the Test Joint work with Eldar Fischer & Guy Kindler.
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 8 May 4, 2005
CS151 Complexity Theory Lecture 10 April 29, 2004.
Foundations of Privacy Lecture 11 Lecturer: Moni Naor.
5.6 Convolution and FFT. 2 Fast Fourier Transform: Applications Applications. n Optics, acoustics, quantum physics, telecommunications, control systems,
1 Sublinear Algorithms Lecture 1 Sofya Raskhodnikova Penn State University TexPoint fonts used in EMF. Read the TexPoint manual before you delete this.
Fall 2015 Lecture 4: Sorting in linear time
Generating a d-dimensional linear subspace efficiently Raphael Yuster SODA’10.
Discrete Methods in Mathematical Informatics Kunihiko Sadakane The University of Tokyo
Chapter 11 Sorting Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and Mount.
Chapter 2 Divide-and-Conquer algorithms
P & NP.
Algorithms for Big Data: Streaming and Sublinear Time Algorithms
Recent Developments in the Sparse Fourier Transform
JPEG Compression What is JPEG? Motivation
The Best Algorithms are Randomized Algorithms
Property Testing (a.k.a. Sublinear Algorithms )
B504/I538: Introduction to Cryptography
Probabilistic Algorithms
Hans Bodlaender, Marek Cygan and Stefan Kratsch
Markov Chains Mixing Times Lecture 5
Outline Introduction Signal, random variable, random process and spectra Analog modulation Analog to digital conversion Digital transmission through baseband.
Streaming & sampling.
T. Chernyakova, A. Aberdam, E. Bar-Ilan, Y. C. Eldar
Spectral Clustering.
Lecture 18: Uniformity Testing Monotonicity Testing
Sublinear Algorithmic Tools 3
Orthogonal Range Searching and Kd-Trees
All about convolution.
Lecture 11: Nearest Neighbor Search
Sublinear Algorithmic Tools 2
Local Decoding and Testing Polynomials over Grids
COMS E F15 Lecture 2: Median trick + Chernoff, Distinct Count, Impossibility Results Left to the title, a presenter can insert his/her own image.
Lecture 10: Sketching S3: Nearest Neighbor Search
Lecture 4: CountSketch High Frequencies
Lecture 7: Dynamic sampling Dimension Reduction
CS 154, Lecture 4: Limitations on DFAs (I),
Lecture 16: Earth-Mover Distance
CIS 700: “algorithms for Big Data”
Bin Fu Department of Computer Science
Matrix Martingales in Randomized Numerical Linear Algebra
RS – Reed Solomon List Decoding.
Locally Decodable Codes from Lifting
Y. Kotidis, S. Muthukrishnan,
עידן שני ביה"ס למדעי המחשב אוניברסיטת תל-אביב
Linear sketching over
CSCI B609: “Foundations of Data Science”
Sudocodes Fast measurement and reconstruction of sparse signals
Linear sketching with parities
CSCI B609: “Foundations of Data Science”
CSCI B609: “Foundations of Data Science”
Aishwarya sreenivasan 15 December 2006.
CS21 Decidability and Tractability
Lecture 6: Counting triangles Dynamic graphs & sampling
Lecture 15: Least Square Regression Metric Embeddings
CIS 700: “algorithms for Big Data”
Minwise Hashing and Efficient Search
Sudocodes Fast measurement and reconstruction of sparse signals
Arun ganesh (UC BERKELEY)
Lecture 6: Fourier Transform
Lecture 9 Randomized Algorithms
Presentation transcript:

Lecture 22: Linearity Testing Sparse Fourier Transform COMS E6998-9 F15 Lecture 22: Linearity Testing Sparse Fourier Transform Left to the title, a presenter can insert his/her own image pertinent to the presentation.

Administrivia, Plan Thu: no class. Happy Thanksgiving! Tue, Dec 1st: Sergei Vassilvitskii (Google Research) on MapReduce model and algorithms I’m away until next Thu, Dec 3rd Office hours: Tue 2:30-4:30, Wed 4-6pm Plan: Linearity Testing (finish) Sparse Fourier Transform

Last lecture Linearity Testing: Test: repeat 𝑂(1/𝜖) times 𝑓: −1,+1 𝑛 is linear iff for any 𝑥,𝑦∈ −1,+1 𝑛 , we have: 𝑓 𝑥 ⋅𝑓 𝑦 =𝑓(𝑥⊕𝑦) Test: repeat 𝑂(1/𝜖) times Pick random 𝑥,𝑦 Verify that 𝑓 𝑥 ⋅𝑓 𝑦 =𝑓(𝑥⊕𝑦) Main Theorem: If 𝑓 is 𝜖-far from linearity, then Pr 𝑡𝑒𝑠𝑡 𝑓𝑎𝑖𝑙𝑠 ≥𝜖

Linearity Testing Remaining Lemma: Let 𝑇 𝑥𝑦 =1 iff 𝑓 𝑥 ⋅𝑓 𝑦 =𝑓(𝑥⊕𝑦) Pr 𝑇 𝑥𝑦 =1 = 1 2 + 1 2 𝑆⊆[𝑛] 𝑓 𝑆 3 Where 𝑓 𝑆 =〈𝑓, 𝜒 𝑆 〉 for 𝜒 𝑆 𝑥 = 𝑖∈S 𝑥 𝑖

Discrete Fourier Transform 𝑥 𝑖 = 1 𝑛 𝑗∈[𝑛] 𝑥 𝑗 𝜔 −𝑖𝑗 , 𝜔= 𝑒 −2𝜋𝐢/𝑛 ( 𝑛 𝑡ℎ root of unity) 𝑥 𝑖 = 𝑗∈ 𝑛 𝑥 𝑗 𝜔 𝑖𝑗 Consider 𝑓: 𝑛 →ℜ also special case of more general setting: 𝑓: 𝑛 𝑑 →ℜ Will call such function: 𝑥=( 𝑥 1 ,… 𝑥 𝑛 ) Fourier transform: 𝑥 𝑖 = 1 𝑛 𝑗∈[𝑛] 𝑥 𝑗 𝜔 −𝑖𝑗 , where 𝜔= 𝑒 −2𝜋𝐢/𝑛 is the 𝑛 𝑡ℎ root of unity 𝑥 𝑖 = 𝑗∈ 𝑛 𝑥 𝑗 𝜔 𝑖𝑗 Assume: 𝑛 is power of 2

Why important? Imaging Compression: Signal processing Data analysis … 𝑥 𝑖 = 1 𝑛 𝑗∈[𝑛] 𝑥 𝑗 𝜔 −𝑖𝑗 , 𝜔= 𝑒 −2𝜋𝐢/𝑛 ( 𝑛 𝑡ℎ root of unity) 𝑥 𝑖 = 𝑗∈ 𝑛 𝑥 𝑗 𝜔 𝑖𝑗 Imaging MRI, NMR Compression: JPEG: retain only high Fourier coefficients Signal processing Data analysis …

Computing Naively: Fast Fourier Transform: 𝑥 𝑖 = 1 𝑛 𝑗∈[𝑛] 𝑥 𝑗 𝜔 −𝑖𝑗 , 𝜔= 𝑒 −2𝜋𝐢/𝑛 ( 𝑛 𝑡ℎ root of unity) 𝑥 𝑖 = 𝑗∈ 𝑛 𝑥 𝑗 𝜔 𝑖𝑗 Naively: 𝑂( 𝑛 2 ) Fast Fourier Transform: 𝑂 𝑛 log 𝑛 time [Cooley-Tukey 1964] [Gauss 1805] One of the biggest open questions in CS: Can we do in 𝑂(𝑛) time?

Sparse Fourier Transform 𝑥 𝑖 = 1 𝑛 𝑗∈[𝑛] 𝑥 𝑗 𝜔 −𝑖𝑗 , 𝜔= 𝑒 −2𝜋𝐢/𝑛 ( 𝑛 𝑡ℎ root of unity) 𝑥 𝑖 = 𝑗∈ 𝑛 𝑥 𝑗 𝜔 𝑖𝑗 Many signals represented well by sparse Fourier transform If 𝑥 is sparse, Can we do better? YES! 𝑂(𝑘⋅ log 2 𝑛) time possible, assuming 𝑘 non-zero Fourier coefficients! Sublinear time: just sample a few positions in 𝑥 Even when 𝑥 is approximately sparse

Similar to Compressed Sensing 𝑥 𝑖 = 1 𝑛 𝑗∈[𝑛] 𝑥 𝑗 𝜔 −𝑖𝑗 , 𝜔= 𝑒 −2𝜋𝐢/𝑛 ( 𝑛 𝑡ℎ root of unity) 𝑥 𝑖 = 𝑗∈ 𝑛 𝑥 𝑗 𝜔 𝑖𝑗 Sparse Fourier Transform Sparse: 𝑥 =𝐹𝑥 Access: 𝑥= 𝐹 −1 𝑥 of dimension 𝑛 𝐹, 𝐹 = concrete matrix Compressed Sensing Sparse: 𝑥∈ ℜ 𝑛 Access: 𝑦=𝐴𝑥∈ ℜ 𝑚 , where 𝑚=𝑂 𝑘 log 𝑛 𝐴 is usually designed (though sometimes: random rows of the Fourier matrix)

Warm-up: 𝑘=1 Assume 𝑥 is exactly 1-sp. Problem: Algorithm: 𝑥 𝑖 = 1 𝑛 𝑗∈[𝑛] 𝑥 𝑗 𝜔 −𝑖𝑗 , 𝜔= 𝑒 −2𝜋𝐢/𝑛 ( 𝑛 𝑡ℎ root of unity) 𝑥 𝑖 = 𝑗∈ 𝑛 𝑥 𝑗 𝜔 𝑖𝑗 Assume 𝑥 is exactly 1-sp. 𝑥 𝑓 ≠0 Problem: How many queries into 𝑥 ? Algorithm: Sample 𝑥 0 , 𝑥 1 𝑥 0 =𝑎 𝜔 0𝑓 =𝑎 𝑥 1 =𝑎 𝜔 𝑓 𝜔 𝑓 = 𝑥 1 / 𝑥 0 Can read off the frequency 𝑓

What about noise? 𝑥 𝑖 =𝑎 𝜔 𝑖𝑓 +𝑛𝑜𝑖𝑠𝑒 Problem: 𝑥 𝑖 = 1 𝑛 𝑗∈[𝑛] 𝑥 𝑗 𝜔 −𝑖𝑗 , 𝜔= 𝑒 −2𝜋𝐢/𝑛 ( 𝑛 𝑡ℎ root of unity) 𝑥 𝑖 = 𝑗∈ 𝑛 𝑥 𝑗 𝜔 𝑖𝑗 𝑥 𝑖 =𝑎 𝜔 𝑖𝑓 +𝑛𝑜𝑖𝑠𝑒 Problem: Find 𝑦 s.t. 1-sparse (in Fourier domain) Best approximation to 𝑥 || 𝑥 − 𝑦 | | 2 ≤𝐶⋅ min 𝑦 : 1−𝑠𝑝𝑎𝑟𝑠𝑒 || 𝑥 − 𝑦 || ||𝑥−𝑦| | 2 ≤𝐶⋅ min 𝑦: 1−𝑠𝑝𝑎𝑟𝑠𝑒 ||𝑥−𝑦|| Will assume “error” is 𝜖 fraction: min 𝑦 : 1−𝑠𝑝𝑎𝑟𝑠𝑒 || 𝑥 − 𝑦 | | 2 = 𝑗≠𝑓 | 𝑥 𝑗 | 2 ≤ 𝜖 2 ⋅ 𝑥 𝑓 2 = 𝜖 2 𝑎 2 𝐸 𝑗 𝑥 𝑗 − 𝑦 𝑗 2 ≤ 𝜖 2 𝑎 2 (Parserval’s) Interesting when 𝜖≪1 Parseval’s: || 𝑧 | | 2 = 1 𝑛 ||𝑧| | 2 = 𝐸 𝑗 𝑧 𝑗 2 Use for 𝑧=𝑥−𝑦 !

Re-use 𝑘=1 algorithm? Suppose: 𝑎=1 𝑥 0 =1+𝜖 𝑥 1 = 𝜔 𝑓 +𝜖 𝜔 𝑞 So: 𝑥 1 𝑥 0 = 1 1+𝜖 ( 𝜔 𝑓 +𝜖 𝜔 𝑞 ) Error in frequency! Will recover 𝑦= 𝜔 𝑔 for 𝑔≠𝑓 Thus || 𝑥 − 𝑦 ||≥|| 𝑥 𝑓 ||=1 instead of 𝑂(𝜖)… Good news: error bounded, up to 𝜖𝑛

Algorithm for 𝑘=1 + noise 𝑥 𝑖 = 𝜔 𝑖𝑓 +𝑛𝑜𝑖𝑠𝑒 Will find 𝑓 by binary search! Bit 0: 𝑓=2 𝑓 1 +𝑏 for 𝑏∈{0,1} Claim: for pure signal 𝑦 𝑖 = 𝜔 𝑖𝑓 : 𝑦 𝑛/2 = 𝑦 0 ⋅ −1 𝑏 𝑦 𝑛/2+𝑟 = 𝑦 𝑟 −1 𝑏 Proof: 𝑦 𝑛/2 = 𝜔 𝑓⋅𝑛/2 = −1 𝑓 = −1 2 𝑓 1 ⋅ −1 𝑏 = −1 𝑏 𝑦 0 𝑦 𝑛/2+𝑟 = 𝜔 𝑓⋅𝑛/2+𝑓𝑟 = −1 𝑓 𝜔 𝑓𝑟 = −1 𝑏 𝑦 𝑟 What about noise?

Bit 0 with noise We have: Algorithm: If 𝑏=0: 𝑦 𝑛/2+𝑟 + 𝑦 𝑟 =2 𝑦 𝑛/2+𝑟 − 𝑦 𝑟 =0 If 𝑏=1: 𝑦 𝑛/2+𝑟 + 𝑦 𝑟 =0 𝑦 𝑛/2+𝑟 − 𝑦 𝑟 =2 We have: 𝑥 𝑖 = 𝜔 𝑖⋅(2 𝑓 1 +𝑏) +𝑛𝑜𝑖𝑠𝑒 𝑦 𝑖 = 𝜔 𝑖⋅(2 𝑓 1 +𝑏) Claim: 𝑦 𝑛/2+𝑟 = 𝑦 𝑟 −1 𝑏 𝐸 𝑗 𝑥 𝑗 − 𝑦 𝑗 2 ≤ 𝜖 2 (Parseval’s) Algorithm: For 𝑡 times: Pick random 𝑟∈[𝑛] Check 𝑥 𝑛/2+𝑟 + 𝑥 𝑟 >| 𝑥 𝑛/2+𝑟 − 𝑥 𝑟 | : then 𝑏=0 Otherwise 𝑏=1 Take majority vote Claim: output the right 𝑏 with 1− 2 −Ω(𝑡) probability Proof: Each test: 𝑥 𝑛/2+𝑟 , 𝑥 𝑟 are within 5 𝜖 2 of 𝑦 𝑛/2+𝑟 , 𝑦 𝑟 with probability 1−2⋅1/5 (Markov) Hence test works with at least 0.6 probability Majority of 𝑡 tests work with 1− 2 −Ω 𝑡 probability (Chernoff bound concentration)

Bit 1 Reduce to bit 0 case! We have Suppose 𝑏=0: Suppose 𝑏=1 ? 𝑥 𝑖 = 𝜔 𝑖(2 𝑓 1 +𝑏) +𝑛𝑜𝑖𝑠𝑒 𝑦 𝑖 = 𝜔 𝑖(2 𝑓 1 +𝑏) Suppose 𝑏=0: 𝑦 𝑖 = 𝜔 𝑖⋅2 𝑓 1 = 𝜔 2 𝑖 𝑓 1 = 𝜔 𝑛/2 𝑖 𝑓 1 where 𝜔 𝑛/2 is the 𝑛/2 𝑡ℎ root of unity Same problem as for Fourier transform over [𝑛/2] ! Suppose 𝑏=1 ? Define 𝑦 𝑖 ′ = 𝑦 𝑖 𝜔 −𝑖 Then 𝑦 𝑖 ′ = 𝜔 𝑖𝑓−𝑖 = 𝜔 𝑖 2 𝑓 1 +1−1 = 𝜔 𝑖⋅ 2 𝑓 1 Just shifts all frequencies down by one! Continue as above for 𝑥 𝑖 ′ = 𝑥 𝑖 𝜔 −𝑖 Note: we compute 𝑥 𝑖 ′ on the fly when whenever we query some 𝑥 𝑖

Overall algorithm to recover 𝑓 𝑥 𝑖 = 𝜔 𝑖𝑓 +𝑛𝑜𝑖𝑠𝑒 Where 𝑓= 𝑏 0 + 𝑏 1 ⋅ 2 1 + 𝑏 2 ⋅ 2 2 +…+ 𝑏 lg 𝑛 2 ⋅ 𝑛 2 Algorithm: Learn 𝑏 0 : take majority of 𝑡 trials of Pick random 𝑟 Check: 𝑥 𝑛/2+𝑟 + 𝑥 𝑟 >| 𝑥 𝑛/2+𝑟 − 𝑥 𝑟 | Then set 𝑏 0 =0 Learn 𝑏 1 : take majority of 𝑡 trials of Check: 𝜔 𝑛/4 ⋅𝑏 0 𝑥 𝑛/4+𝑟 + 𝑥 𝑟 >| 𝜔 𝑛/4 ⋅𝑏 0 𝑥 𝑛/4+𝑟 − 𝑥 𝑟 | Then set 𝑏 1 =0 Learn 𝑏 2 : take majority of 𝑡 trials of Check: 𝜔 𝑛/8 ⋅(𝑏 0 +2 𝑏 1 ) 𝑥 𝑛/8+𝑟 + 𝑥 𝑟 >| 𝜔 𝑛/8 ⋅(𝑏 0 +2 𝑏 1 ) 𝑥 𝑛/8+𝑟 − 𝑥 𝑟 | Then set 𝑏 2 =0 …

Wrap-up of the algorithm 𝑘=1 Correctness: We learn 𝑂(log 𝑛) bits Each needs to succeed with probability 1−𝑂(1/ log 𝑛 ) Hence set 𝑡=𝑂( log log 𝑛 ) Overall performance: Number of samples: 𝑂( log 𝑛 ⋅ log log 𝑛 ) Same run-time

𝑘>1 𝑥 𝑖 = 𝑎 1 𝜔 𝑖 𝑓 1 + 𝑎 2 𝜔 𝑖 𝑓 2 +… 𝑎 𝑘 𝜔 𝑖 𝑓 𝑘 +𝑛𝑜𝑖𝑠𝑒 𝑥 𝑖 = 𝑎 1 𝜔 𝑖 𝑓 1 + 𝑎 2 𝜔 𝑖 𝑓 2 +… 𝑎 𝑘 𝜔 𝑖 𝑓 𝑘 +𝑛𝑜𝑖𝑠𝑒 Main ideas: Isolate each frequency Like in CountSketch or compressed sensing! “Throw” frequencies in “buckets” Hope have 1 frequency per “bucket” Throw in buckets: permute the frequencies (pseudo-)randomly Can have frequencies go as 𝑖→𝑎𝑖+𝑏 for random 𝑎,𝑏 partition in blocks: 1, 𝑛 𝑘 , 𝑛 𝑘 +1, 2𝑛 𝑘 ,… Apply a filter that keeps only the correct block