Compressed matrix multiplication

Motivated by the problems of computing sample covariance matrices, and of transforming a collection of vectors to a basis where they are sparse, we present a simple algorithm that computes an approximation of the product of two <i>n</i>-by-<i>n</i> real matrices <i>A</i> and <i>B</i>. Let ||<i>AB</i>||<sub><i>F</i></sub> denote the Frobenius norm of <i>AB</i>, and <i>b</i> be a parameter determining the time/accuracy trade-off. Given 2-wise independent hash functions <i>h</i><sub>1</sub>, <i>h</i><sub>2</sub>: [<i>n</i>] → [<i>b</i>], and <i>s</i><sub>1</sub>, <i>s</i><sub>2</sub>: [<i>n</i>] → {-1, +1} the algorithm works by first "compressing" the matrix product into the polynomial [EQUATION] Using FFT for polynomial multiplication, we can compute <i>c</i><sub>0</sub>,...,<i>c</i><sub><i>b</i>-1</sub> such that Σ<sub><i>i</i></sub> <i>c</i><sub><i>i</i></sub><i>x</i><sup><i>i</i></sup> = (<i>p</i>(<i>x</i>) mod <i>x</i><sup><i>b</i></sup>) + (<i>p</i>(<i>x</i>) div <i>x</i><sup><i>b</i></sup>) in time <i>Õ</i>(<i>n</i><sup>2</sup> + <i>nb</i>). An unbiased estimator of (<i>AB</i>)<sub><i>ij</i></sub> with variance at most ||<i>AB</i>||<sup>2</sup><sub><i>F</i></sub>/<i>b</i> can then be computed as: [EQUATION] Our approach also leads to an algorithm for computing <i>AB</i> exactly, whp., in time <i>Õ</i>(<i>N</i> + <i>nb</i>) in the case where <i>A</i> and <i>B</i> have at most <i>N</i> nonzero entries, and <i>AB</i> has at most <i>b</i> nonzero entries. Also, we use error-correcting codes in a novel way to recover significant entries of <i>AB</i> in near-linear time.

[1]  Rasmus Pagh,et al.  Faster join-projects and sparse matrix multiplications , 2009, ICDT '09.

[2]  Andrzej Lingas,et al.  A Fast Output-Sensitive Algorithm for Boolean Matrix Multiplication , 2011, Algorithmica.

[3]  Rasmus Pagh,et al.  Better Size Estimation for Sparse Matrix Products , 2010, Algorithmica.

[4]  Larry Carter,et al.  Universal Classes of Hash Functions , 1979, J. Comput. Syst. Sci..

[5]  Mark A. Iwen,et al.  A note on compressed sensing and the complexity of matrix multiplication , 2009, Inf. Process. Lett..

[6]  Edith Cohen,et al.  Approximating matrix multiplication for pattern recognition tasks , 1997, SODA '97.

[7]  Yossi Matias,et al.  Polynomial Hash Functions Are Reliable (Extended Abstract) , 1992, ICALP.

[8]  Sanguthevar Rajasekaran,et al.  The light bulb problem , 1995, COLT '89.

[9]  Moses Charikar,et al.  Finding frequent items in data streams , 2002, Theor. Comput. Sci..

[10]  Gregory Valiant,et al.  Finding Correlations in Subquadratic Time, with Applications to Learning Parities and Juntas , 2012, 2012 IEEE 53rd Annual Symposium on Foundations of Computer Science.

[11]  Tamás Sarlós,et al.  Improved Approximation Algorithms for Large Matrices via Random Projections , 2006, 2006 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS'06).

[12]  Daniel A. Spielman,et al.  Expander codes , 1994, Proceedings 35th Annual Symposium on Foundations of Computer Science.

[13]  L. A. Goodman On the Exact Variance of Products , 1960 .

[14]  Piotr Indyk,et al.  Sparse Recovery Using Sparse Matrices , 2010, Proceedings of the IEEE.

[15]  Don Coppersmith,et al.  Matrix multiplication via arithmetic progressions , 1987, STOC.

[16]  Raphael Yuster,et al.  Fast sparse matrix multiplication , 2004, TALG.

[17]  D. Spielman,et al.  Expander codes , 1996 .

[18]  Konstantin Kutzkov,et al.  Deterministic algorithms for skewed matrix products , 2012, STACS.

[19]  Ely Porat,et al.  Approximate sparse recovery: optimizing time and measurements , 2009, STOC '10.

[20]  Mikkel Thorup,et al.  The power of simple tabulation hashing , 2010, STOC.

[21]  Noga Alon,et al.  Tracking join and self-join sizes in limited storage , 1999, PODS '99.

[22]  J. Tukey,et al.  An algorithm for the machine calculation of complex Fourier series , 1965 .

[23]  Noga Alon,et al.  The space complexity of approximating the frequency moments , 1996, STOC '96.

[24]  Russ Bubley,et al.  Randomized algorithms , 1995, CSUR.

[25]  Michael W. Mahoney Algorithmic and Statistical Perspectives on Large-Scale Data Analysis , 2010, ArXiv.

[26]  Virginia Vassilevska Williams,et al.  Multiplying matrices faster than coppersmith-winograd , 2012, STOC '12.

[27]  Edith Cohen,et al.  Structure Prediction and Computation of Sparse Matrix Products , 1998, J. Comb. Optim..

[28]  Piotr Indyk,et al.  Declaring independence via the sketching of sketches , 2008, SODA '08.

[29]  Rafail Ostrovsky,et al.  AMS Without 4-Wise Independence on Product Domains , 2008, STACS.

[30]  David P. Woodruff,et al.  Numerical linear algebra in the streaming model , 2009, STOC '09.

[31]  Petros Drineas,et al.  Fast Monte Carlo Algorithms for Matrices I: Approximating Matrix Multiplication , 2006, SIAM J. Comput..

[32]  François Le Gall,et al.  Faster Algorithms for Rectangular Matrix Multiplication , 2012, 2012 IEEE 53rd Annual Symposium on Foundations of Computer Science.