IDEAS home Printed from https://ideas.repec.org/a/bpj/mcmeap/v26y2020i4p273-284n6.html
   My bibliography  Save this article

Gaussian variant of Freivalds’ algorithm for efficient and reliable matrix product verification

Author

Listed:
  • Ji Hao

    (Department of Computer Science, California State Polytechnic University Pomona, Pomona, CA 91768, USA)

  • Mascagni Michael

    (Department of Computer Science, Florida State University, Tallahassee, FL 32306-4530; and Applied and Computational Mathematics Division, Information Technology Laboratory, National Institute of Standards & Technology, ITL, Gaithersburg, MD 20899-8910, USA)

  • Li Yaohang

    (Department of Computer Science, Old Dominion University, Norfolk, VA 23529, USA)

Abstract

In this article, we consider the general problem of checking the correctness of matrix multiplication. Given three n×nn\times n matrices 𝐴, 𝐵 and 𝐶, the goal is to verify that A×B=CA\times B=C without carrying out the computationally costly operations of matrix multiplication and comparing the product A×BA\times B with 𝐶, 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×BA\times B as well as 𝐶 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⁢(n2)O(n^{2}). However, unlike Freivalds’ algorithm, whose probability of a false positive is 2-k2^{-k}, where 𝑘 is the number of iterations, our theoretical analysis shows that, when A×B≠CA\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 𝑘 times, the probability of a false positive decreases as pkp^{k}, where 𝑝 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.

Suggested Citation

  • Ji Hao & Mascagni Michael & Li Yaohang, 2020. "Gaussian variant of Freivalds’ algorithm for efficient and reliable matrix product verification," Monte Carlo Methods and Applications, De Gruyter, vol. 26(4), pages 273-284, December.
  • Handle: RePEc:bpj:mcmeap:v:26:y:2020:i:4:p:273-284:n:6
    DOI: 10.1515/mcma-2020-2076
    as

    Download full text from publisher

    File URL: https://doi.org/10.1515/mcma-2020-2076
    Download Restriction: For access to full text, subscription to the journal or payment for the individual article is required.

    File URL: https://libkey.io/10.1515/mcma-2020-2076?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:bpj:mcmeap:v:26:y:2020:i:4:p:273-284:n:6. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Peter Golla (email available below). General contact details of provider: https://www.degruyter.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.