arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.20538cs.CC
收藏

改进矩阵乘法的首项常数

Improving the Leading Constant of Matrix Multiplication

Josh Alman, Hantao Yu

AI总结:

本文提出利用张量秩界设计矩阵乘法算法的新递归方法,将首项常数由 $O(n^2)$ 降至 $n^{O(1/(\log n)^{0.33})}$,并改进 $\omega=2$、最快算法及群论算法情形。

摘要:

代数矩阵乘法算法的设计方式是:界定矩阵乘法张量的秩,然后使用递归方法。然而,以这种方式设计算法会很快导致很大的常数因子:如果证明用于相乘 $n \times n$ 矩阵的张量具有秩 $\leq t$,那么所得递推关系表明,$M \times M$ 矩阵可以用 $O(n^2 \cdot M^{\log_n t})$ 次运算完成相乘,其中首项常数与 $n^2$ 成比例增长。即使 $n$ 只是适度增大,也可能使首项常数膨胀得过于严重,以至于不值得换取 $M$ 的指数的微小下降。与此同时,渐近最优的算法使用非常大的 $n$,使得 $n^2$ 比可见宇宙中的原子数量还要大!在本文中,我们给出了利用张量秩界设计矩阵乘法算法的新方法,这些方法产生的首项常数小于标准递归方法。我们的主要结果表明,如果用于相乘 $n \times n$ 矩阵的张量具有秩 $\leq t$,那么 $M \times M$ 矩阵仅需使用 $n^{O(1/(\log n)^{0.33})} \cdot M^{\log_n t}$ 次运算即可相乘。换言之,我们将首项常数总体上从 $O(n^2)$ 改进到 $n^{O(1/(\log n)^{0.33})} < n^{o(1)}$。随后,我们应用这一结果,并在许多受关注的情形中进一步改进首项常数。我们表明,在被广泛猜想的 $\omega=2$ 情形下,一种新的、不同的递归方法可以带来改进。我们还表明,通过利用底层张量恒等式的额外结构,当前渐近最快矩阵乘法算法以及任何使用群论方法设计的算法,其首项常数都可以得到进一步改进。

英文摘要:

Algebraic matrix multiplication algorithms are designed by bounding the rank of matrix multiplication tensors, and then using a recursive method. However, designing algorithms in this way quickly leads to large constant factors: if one proves that the tensor for multiplying $n \times n$ matrices has rank $\leq t$, then the resulting recurrence shows that $M \times M$ matrices can be multiplied using $O(n^2 \cdot M^{\log_n t})$ operations, where the leading constant scales proportionally to $n^2$. Even modest increases in $n$ can blow up the leading constant too much to be worth the slight decrease in the exponent of $M$. Meanwhile, the asymptotically best algorithms use very large $n$, such that $n^2$ is larger than the number of atoms in the visible universe! In this paper, we give new ways to use tensor rank bounds to design matrix multiplication algorithms, which lead to smaller leading constants than the standard recursive method. Our main result shows that, if the tensor for multiplying $n \times n$ matrices has rank $\leq t$, then $M \times M$ matrices can be multiplied using only $n^{O(1/(\log n)^{0.33})} \cdot M^{\log_n t}$ operations. In other words, we improve the leading constant in general from $O(n^2)$ to $n^{O(1/(\log n)^{0.33})} < n^{o(1)}$. We then apply this and further improve the leading constant in a number of situations of interest. We show that, in the popularly-conjectured case where $ω=2$, a new, different recursive approach can lead to an improvement. We also show that the leading constant of the current asymptotically fastest matrix multiplication algorithm, and any algorithm designed using the group-theoretic method, can be further improved by taking advantage of additional structure of the underlying tensor identities.

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

↑