Learning Fast Algorithms for Linear Transforms Using Butterfly Factorizations
Preprint
Abstract
Fast linear transforms are ubiquitous in machine learning, including the discrete Fourier transform, discrete cosine transform, and other structured transformations such as convolutions. All of these transforms can be represented by dense matrix-vector multiplication, yet each has a specialized and highly efficient (subquadratic) algorithm. We ask to what extent hand-crafting these algorithms and implementations is necessary, what structural priors they encode, and how much knowledge is required to automatically learn a fast algorithm for a provided structured transform. Motivated by a characterization of fast matrix-vector multiplication as products of sparse matrices, we introduce a parameterization of divide-and-conquer methods that is capable of representing a large class of transforms. This generic formulation can automatically learn an efficient algorithm for many important transforms; for example, it recovers the $O(N \log N)$ Cooley-Tukey FFT algorithm to machine precision, for dimensions $N$ up to $1024$. Furthermore, our method can be incorporated as a lightweight replacement of generic matrices in machine learning pipelines to learn efficient and compressible transformations. On a standard task of compressing a single hidden-layer network, our method exceeds the classification accuracy of unconstrained matrices on CIFAR-10 by 3.9 points -- the first time a structured approach has done so -- with 4X faster inference speed and 40X fewer parameters.
Keywords
All Related Versions
This publication has 14 references indexed in Scilit:
- Flexible Multilayer Sparse Approximations of Matrices and ApplicationsIEEE Journal of Selected Topics in Signal Processing, 2016
- Chasing butterflies: In search of efficient dictionaries2015
- Every Matrix is a Product of Toeplitz MatricesFoundations of Computational Mathematics, 2015
- Algebraic Signal Processing Theory: Cooley–Tukey Type Algorithms for Real DFTsIEEE Transactions on Signal Processing, 2008
- Automatic generation of fast discrete signal transformsIEEE Transactions on Signal Processing, 2001
- Guest Editors Introduction to the top 10 algorithmsComputing in Science & Engineering, 2000
- Algebraic Complexity Theory1997
- A fast cosine transform in one and two dimensionsIEEE Transactions on Acoustics, Speech, and Signal Processing, 1980
- Displacement ranks of matrices and linear equationsJournal of Mathematical Analysis and Applications, 1979
- Griffith Conrad Evans, Ph. D. Professor of pure Mathematics the Rice Institute. The Logarithmic Potential Discontinuous Dirichlet and Neumann Problems. American Mathematical Society Colloquium Publications. Volume VI. American Mathematical Society, New York 1927. VIII + 150 S. Preis 2 $ZAMM - Journal of Applied Mathematics and Mechanics / Zeitschrift für Angewandte Mathematik und Mechanik, 1928