一种高效可靠的矩阵乘积验证的Freivalds算法的高斯变体
Gaussian Variant of Freivalds' Algorithm for Efficient and Reliable Matrix Product Verification
摘要:
本文考虑矩阵乘法正确性检验的一般问题。给定三个$n \times n$矩阵$A$、$B$和$C$,目标是验证$A \times B=C$,而不执行计算成本高的矩阵乘法运算,并逐项比较乘积$A \times B$和$C$。当这些矩阵中的一些或全部非常大时,以及当计算环境易于出现软错误时,这一点尤其重要。在这里,我们将Freivalds算法扩展到Freivalds算法的高斯变体(GVFA),通过将乘积$A \times B$以及$C$投影到高斯随机向量上,然后比较得到的向量。GVFA的计算复杂度与Freivalds的算法$O(n^{2})$一致。然而,与Freivalds算法不同,其误报概率为$2^{-k}$,其中$k$是迭代次数。我们的理论分析表明,当$A \times B \neq C$,GVFA产生一个假阳性的一组测量零的输入与精确的算法。当我们在分析中引入舍入误差和浮点运算时,我们可以证明,这个误差越大,GVFA避免误报的概率就越高。此外,通过迭代GVFA $k$次,假阳性的概率随着$p^k$而减小,其中$p$是非常小的值,这取决于结果矩阵上的故障的性质和算术系统的浮点精度。与确定性算法不同,不存在任何GVFA完全无法检测的故障模式。因此,GVFA可以用来提供有效的容错数值线性代数,它可以有效地实现在现代计算架构。特别是,GVFA可以非常有效地实现与融合乘加运算的硬件支持的架构。
英文摘要:
In this article, we consider the general problem of checking the correctness of matrix multiplication. Given three $n \times n$ matrices $A$, $B$, and $C$, the goal is to verify that $A \times B=C$ without carrying out the computationally costly operations of matrix multiplication and comparing the product $A \times B$ with $C$, term by term. This is especially important when some or all of these matrices are very large, and when the computing environment is prone to soft errors. Here we extend Freivalds' algorithm to a Gaussian Variant of Freivalds' Algorithm (GVFA) by projecting the product $A \times B$ as well as $C$ onto a Gaussian random vector and then comparing the resulting vectors. The computational complexity of GVFA is consistent with that of Freivalds' algorithm, which is $O(n^{2})$. However, unlike Freivalds' algorithm, whose probability of a false positive is $2^{-k}$, where $k$ is the number of iterations. Our theoretical analysis shows that when $A \times B \neq C$, GVFA produces a false positive on set of inputs of measure zero with exact arithmetic. When we introduce round-off error and floating point arithmetic into our analysis, we can show that the larger this error, the higher the probability that GVFA avoids false positives. Moreover, by iterating GVFA $k$ times, the probability of a false positive decreases as $p^k$, where $p$ is a very small value depending on the nature of the fault on the result matrix and the arithmetic system's floating-point precision. Unlike deterministic algorithms, there do not exist any fault patterns that are completely undetectable with GVFA. Thus GVFA can be used to provide efficient fault tolerance in numerical linear algebra, and it can be efficiently implemented on modern computing architectures. In particular, GVFA can be very efficiently implemented on architectures with hardware support for fused multiply-add operations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。