arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1903.05895cs.LGstat.ML
收藏

基于蝶形分解的线性变换快速学习算法

Learning Fast Algorithms for Linear Transforms Using Butterfly Factorizations

Stanford University(斯坦福大学);University at Buffalo, SUNY(纽约州立大学布法罗分校)

Tri Dao, Albert Gu, Matthew Eichhorn, Atri Rudra, Christopher Ré

摘要:

快速线性变换在机器学习中无处不在,包括离散傅立叶变换、离散余弦变换和其他结构化变换,如卷积。所有这些变换都可以用密集矩阵向量乘法来表示,但每一个都有一个专门的高效(次二次)算法。我们问到什么程度手工制作这些算法和实现是必要的,他们编码的结构先验,以及需要多少知识来自动学习一个快速算法提供的结构化变换。出于对稀疏矩阵的产品的快速矩阵向量乘法的表征,我们引入了一个参数化的分而治之的方法,是能够代表一大类的变换。这种通用公式可以自动学习许多重要变换的有效算法;例如,它可以将$O(N \log N)$ Cooley-Tukey FFT算法恢复到机器精度,尺寸$N$高达$1024$。此外,我们的方法可以作为通用矩阵的轻量级替代纳入机器学习管道中,以学习高效和可压缩的变换。在压缩单个隐藏层网络的标准任务中,我们的方法超过了CIFAR-10上无约束矩阵的分类精度3.9个点-这是结构化方法首次做到这一点-推理速度快4倍,参数少40倍。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑