Skip to main content
QUICK REVIEW

[论文解读] A Note on Random Sampling for Matrix Multiplication

Yue Wu|arXiv (Cornell University)|Nov 27, 2018
Stochastic Gradient Optimization Techniques参考文献 15被引用 3
一句话总结

本文提出了一种基于粗粒度划分的随机采样算法用于矩阵乘法,相较于 BASICMATRIXMULTIPLICATION,该方法提高了小 2-范数近似误差的概率,并将平方 Frobenius 误差控制在原始算法之下。通过将矩阵列和行配对分组,并使用优化的采样概率,该方法在最优概率分布接近均匀分布时显著提升了收敛性,尤其适用于列范数均衡的对称 Gram 矩阵。

ABSTRACT

Randomized matrix algorithms have had significant recent impact on numerical linear algebra. One especially powerful class of methods are algorithms for approximate matrix multiplication based on sampling. Such methods typically sample individual matrix rows and columns using carefully chosen importance sampling probabilities. However, due to practical considerations like memory locality and the preservation of matrix structure, it is often preferable to sample contiguous blocks of rows and columns all together. Recently, (Wu, 2018) addressed this setting by developing an approximate matrix multiplication method based on block sampling. However, the method is inefficient, as it requires knowledge of optimal importance sampling probabilities that are expensive to compute. We address this issue by showing that the method of Wu can be accelerated through the use of a randomized implicit trace estimation method. Doing so allows us to provably reduce the cost of sampling to near-linear in the size of the matrices being multiplied, without impacting the accuracy of the final approximate matrix multiplication. Overall, this yields a fast practical algorithm, which we test on a number of synthetic and real-world data sets. We complement our algorithmic contribution with the first extensive empirical comparison of block algorithms for randomized matrix multiplication. Our method offers a significant runtime advantage over the method of (Wu, 2018) and also outperforms basic uniform sampling of blocks. However, we find another recent method of (Charalambides, 2021) which uses sub-optimal but efficiently computable sampling probabilities often (but not always) offers the best trade-off between speed and accuracy.

研究动机与目标

  • 解决当最优采样概率接近均匀分布时 BASICMATRIXMULTIPLICATION 收敛缓慢的问题。
  • 将文献 [5] 中的随机采样框架扩展至粗粒度划分,支持列和行组的联合采样。
  • 通过降低单次采样中遗漏低权重分量的可能性,提升近似精度。
  • 为 BASICMATRIXMULTIPLICATION 提供一种互补算法,在类似均匀分布的概率分布下表现更优。
  • 在粗粒度划分下,建立 2-范数和 Frobenius 范数近似误差的理论边界。

提出的方法

  • 提出基于矩阵列和行任意划分的广义采样框架,而非单个元素。
  • 推导出在新划分方案下矩阵积的无偏估计器(命题 2.1)。
  • 计算使期望平方 Frobenius 误差最小化的最优采样概率分布(命题 2.2)。
  • 利用非交换 Bernstein 不等式以概率方式界定向 2-范数近似误差,表明最优概率可获得最紧的边界。
  • 提出算法 2 实现成对划分采样,采用定制化的概率和缩放因子。
  • 通过蒙特卡洛模拟比较性能,使用不同样本大小下的相对 Frobenius 误差和 2-范数误差。

实验结果

研究问题

  • RQ1是否可以通过使用粗粒度划分而非最细划分来改进矩阵乘法的随机采样?
  • RQ2对列和行进行分组采样(如成对)是否能降低相对于单元素采样的期望平方 Frobenius 误差?
  • RQ3当最优概率接近均匀分布时,粗粒度划分下的 2-范数近似误差行为如何?
  • RQ4新算法是否能在误差概率和误差界方面优于 BASICMATRIXMULTIPLICATION?
  • RQ5提高最小采样概率对误差分布和收敛性有何影响?

主要发现

  • 基于成对划分的算法 2 所产生的期望平方 Frobenius 误差低于 BASICMATRIXMULTIPLICATION,如推论 2.5 所示,并通过实验验证。
  • 算法 2 的 2-范数相对误差分布呈左偏峰形态,且最大值高于 BASICMATRIXMULTIPLICATION,表明更可能实现小误差。
  • 当最优概率接近均匀分布时,算法 2 相较于 BASICMATRIXMULTIPLICATION 显著提升了收敛性,后者难以可靠采样低权重分量。
  • 最小采样概率从 BASICMATRIXMULTIPLICATION 的 0.00033 提升至算法 2 的 0.00070,增强了捕捉所有分量的可能性。
  • 当样本大小 c = 3000 时,算法 2 的 2-范数误差分布比 BASICMATRIXMULTIPLICATION 更接近零,证实了更快的收敛性。
  • 在不同样本大小下性能增益保持一致,算法 2 始终实现低于基线的相对 Frobenius 误差。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。