Simple and Practical Algorithm for the Sparse Fourier Transform Haitham Hassanieh Piotr Indyk Dina Katabi Eric Price MIT 2012-01-19 Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 1 / 19 Outline 1 Introduction 2 Algorithm 3 Experiments Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 2 / 19 The Dicrete Fourier Transform Discrete Fourier transform: given x ∈ Cn , find X xbi = xj ω ij Fundamental tool I I I I Compression (audio, image, video) Signal processing Data analysis ... FFT: O(n log n) time. Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 4 / 19 Sparse Fourier Transform Often the Fourier transform is dominated by a small number of “peaks” I Precisely the reason to use for compression. If most of mass in k locations, can we compute FFT faster? Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 5 / 19 Previous work Boolean cube: [KM92], [GL89]. What about C? [Mansour-92]: k c logc n. Long list of other work [GGIMS02, AGS03, Iwen10, Aka10] Fastest is [Gilbert-Muthukrishnan-Strauss-05]: k log4 n. I I I I All have poor constants, many logs. Need n/k > 40,000 or ω(log3 n) to beat FFTW. Our goal: beat FFTW for smaller n/k in theory and practice. Result: n/k > 2, 000 or ω(log n) to beat FFTW. Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 6 / 19 Our result Simple, practical algorithm with good constants. √ Compute the k-sparse Fourier transform in O( kn log3/2 n) time. Get xb0 with approximation error kxb0 − xbk2∞ ≤ 1 kxb − xbk k22 k If xb is sparse, recover it exactly. Caveats: I I Additional kxk2 /nΘ(1) error. n must be a power of 2. Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 7 / 19 Structure of this section If xb is k-sparse with known support S, find xbS exactly in O(k log2 n) time. √ e nk ) time. In general, estimate xb approximately in O( Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 9 / 19 Intuition Original signal (time) Original signal (freq) n-dimensional DFT Cutoff signal (time) Cutoff signal (freq) n-dimensional DFT of first B terms. Cutoff signal (time) Cutoff signal, subsampled (freq) B-dimensional DFT of first B terms. Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 10 / 19 Framework Cutoff signal (time) Cutoff subsampled signals (freq) “Hashes” into B buckets in B log B time. Issues: I “Hashing” needs a random hash function F I Collisions F I I Access xt0 = ω −at xσt , so xb0 t = xbσ−1 t+a [GMS-05] Have B > 4k , repeat O(log n) times and take median. [Count-Sketch, CCF02] Leakage Finding the support. [Porat-Strauss-12], talk at 9:45am. Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 11 / 19 Leakage Cutoff signal (time) Cutoff, subsampled signals (freq)  1 i 2,000. Faster than AAFFT for n/k < 1,000,000. Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 17 / 19 Empirical Performance: noise 22 Robustness vs SNR (n=2 , k=50) sFFT 1.0 Average L1 Error per Enrty 1 sFFT 2.0 AAFFT 0.9 0.1 0.01 0.001 0.0001 1e-05 1e-06 1e-07 -20 0 20 40 60 80 100 SNR (dB) Just like in Count-Sketch, algorithm is noise tolerant. Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 18 / 19 Conclusions Roughly: fastest algorithm for n/k ∈ [2 × 103 , 106 ]. Recent improvements [HIKP12b?] I I I O(k log n) for exactly sparse xb O(k log kn log n) for approximation. Beats FFTW for n/k > 400 (in the exact case). Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 19 / 19 Hassanieh, Indyk, Katabi, and Price (MIT) Simple and Practical Algorithm for the Sparse Fourier Transform 2012-01-19 20 / 19