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

稀疏矩阵乘法的Input/Output复杂度

The Input/Output Complexity of Sparse Matrix Multiplication

Rasmus Pagh, Morten Stöckel

摘要:

本文研究了半环上非零元素个数大于主存数的稀疏矩阵的乘法问题。在Hong和Kung(STOC '81)的经典论文中,证明了为了计算密集$U \times U$矩阵的乘积,在具有内部存储器大小$M$和存储器块大小$B$的I/O模型中,$Θ\left(U^3 / (B \sqrt{M}) \right)$ I/O是必要且充分的。本文将Hong和Kung的上、下界推广到稀疏情形。我们的边界依赖于$A$和$C$中非零项的数量$N = \mathtt{nnz}(A)+\mathtt{nnz}(C)$,以及$AC$中非零项的数量$Z = \mathtt{nnz}(AC)$。我们表明,$AC$可以计算使用$\tilde{O} \left(\tfrac{N}{B} \min\left(\sqrt{\tfrac{Z}{M}},\tfrac{N}{M}\right) \right)$ I/O,具有很高的概率。太紧了(直至多对数因子)仅允许半环运算时,即使对于稠密矩形矩阵:我们展示了$Ω\left(\tfrac{N}{B} \min\left(\sqrt{\tfrac{Z}{M}},\tfrac{N}{M}\right) \right)$ I/O的下限。虽然我们的下限使用了相当标准的技术,但上限使用了“压缩矩阵乘法”草图,这在I/O高效算法的上下文中是新的,以及一种新的矩阵乘积大小估计技术,它避免了“无抵消”假设。

英文摘要:

We consider the problem of multiplying sparse matrices (over a semiring) where the number of non-zero entries is larger than main memory. In the classical paper of Hong and Kung (STOC '81) it was shown that to compute a product of dense $U \times U$ matrices, $Θ\left(U^3 / (B \sqrt{M}) \right)$ I/Os are necessary and sufficient in the I/O model with internal memory size $M$ and memory block size $B$. In this paper we generalize the upper and lower bounds of Hong and Kung to the sparse case. Our bounds depend of the number $N = \mathtt{nnz}(A)+\mathtt{nnz}(C)$ of nonzero entries in $A$ and $C$, as well as the number $Z = \mathtt{nnz}(AC)$ of nonzero entries in $AC$. We show that $AC$ can be computed using $\tilde{O} \left(\tfrac{N}{B} \min\left(\sqrt{\tfrac{Z}{M}},\tfrac{N}{M}\right) \right)$ I/Os, with high probability. This is tight (up to polylogarithmic factors) when only semiring operations are allowed, even for dense rectangular matrices: We show a lower bound of $Ω\left(\tfrac{N}{B} \min\left(\sqrt{\tfrac{Z}{M}},\tfrac{N}{M}\right) \right)$ I/Os. While our lower bound uses fairly standard techniques, the upper bound makes use of ``compressed matrix multiplication'' sketches, which is new in the context of I/O-efficient algorithms, and a new matrix product size estimation technique that avoids the ``no cancellation'' assumption.

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

↑