Table of Contents
Fetching ...

Matrix Multiplication Verification Using Coding Theory

Huck Bennett, Karthik Gajulapalli, Alexander Golovnev, Evelyn Warton

TL;DR

This work gives two algorithms for MMV and shows a barrier to proving a super-quadratic running time lower bound for matrix multiplication (and hence MMV) under the Strong Exponential Time Hypothesis (SETH).

Abstract

We study the Matrix Multiplication Verification Problem (MMV) where the goal is, given three $n \times n$ matrices $A$, $B$, and $C$ as input, to decide whether $AB = C$. A classic randomized algorithm by Freivalds (MFCS, 1979) solves MMV in $\widetilde{O}(n^2)$ time, and a longstanding challenge is to (partially) derandomize it while still running in faster than matrix multiplication time (i.e., in $o(n^ω)$ time). To that end, we give two algorithms for MMV in the case where $AB - C$ is sparse. Specifically, when $AB - C$ has at most $O(n^δ)$ non-zero entries for a constant $0 \leq δ< 2$, we give (1) a deterministic $O(n^{ω- \varepsilon})$-time algorithm for constant $\varepsilon = \varepsilon(δ) > 0$, and (2) a randomized $\widetilde{O}(n^2)$-time algorithm using $δ/2 \cdot \log_2 n + O(1)$ random bits. The former algorithm is faster than the deterministic algorithm of Künnemann (ESA, 2018) when $δ\geq 1.056$, and the latter algorithm uses fewer random bits than the algorithm of Kimbrel and Sinha (IPL, 1993), which runs in the same time and uses $\log_2 n + O(1)$ random bits (in turn fewer than Freivalds's algorithm). We additionally study the complexity of MMV. We first show that all algorithms in a natural class of deterministic linear algebraic algorithms for MMV (including ours) require $Ω(n^ω)$ time. We also show a barrier to proving a super-quadratic running time lower bound for matrix multiplication (and hence MMV) under the Strong Exponential Time Hypothesis (SETH). Finally, we study relationships between natural variants and special cases of MMV (with respect to deterministic $\widetilde{O}(n^2)$-time reductions).

Matrix Multiplication Verification Using Coding Theory

TL;DR

This work gives two algorithms for MMV and shows a barrier to proving a super-quadratic running time lower bound for matrix multiplication (and hence MMV) under the Strong Exponential Time Hypothesis (SETH).

Abstract

We study the Matrix Multiplication Verification Problem (MMV) where the goal is, given three matrices , , and as input, to decide whether . A classic randomized algorithm by Freivalds (MFCS, 1979) solves MMV in time, and a longstanding challenge is to (partially) derandomize it while still running in faster than matrix multiplication time (i.e., in time). To that end, we give two algorithms for MMV in the case where is sparse. Specifically, when has at most non-zero entries for a constant , we give (1) a deterministic -time algorithm for constant , and (2) a randomized -time algorithm using random bits. The former algorithm is faster than the deterministic algorithm of Künnemann (ESA, 2018) when , and the latter algorithm uses fewer random bits than the algorithm of Kimbrel and Sinha (IPL, 1993), which runs in the same time and uses random bits (in turn fewer than Freivalds's algorithm). We additionally study the complexity of MMV. We first show that all algorithms in a natural class of deterministic linear algebraic algorithms for MMV (including ours) require time. We also show a barrier to proving a super-quadratic running time lower bound for matrix multiplication (and hence MMV) under the Strong Exponential Time Hypothesis (SETH). Finally, we study relationships between natural variants and special cases of MMV (with respect to deterministic -time reductions).
Paper Structure (36 sections, 27 theorems, 35 equations, 4 figures, 1 table)

This paper contains 36 sections, 27 theorems, 35 equations, 4 figures, 1 table.

Key Result

Theorem 1.1

Let $A, B, C \in \Z^{n \times n}$ be matrices satisfying $\max_{i,j} \set{\abs{A_{i,j}}, \abs{B_{i,j}}, \abs{C_{i,j}}} \leq n^c$ for some constant $c > 0$ and satisfying ${\norm{AB - C}_0 \leq n^{\delta}}$ for $0 \leq \delta \leq 2$. Then for any constant $\eps > 0$, there is a deterministic algorit

Figures (4)

  • Figure 1: Running times of deterministic algorithms for MMV when $AB - C$ is $O(n^{\delta})$-sparse for $1 \leq \delta \leq 2$. Our algorithm from \ref{['thm:rmm-deterministic-intro']} is faster than the best known algorithms for matrix multiplication williams2024new and faster than Künnemann's algorithm kunnemann2018nondeterministic for all $1.056 \leq \delta < 2$. The plotted blue points corresponding to the running time of the algorithm in \ref{['thm:rmm-deterministic-intro']} are derived from the bounds on $\omega(1, 1, \delta/2)$ in williams2024new. The line segments connecting them are justified by the fact that $\omega(1, 1, \cdot)$ is a convex function.
  • Figure 2: Deterministic Algorithm for $\textrm{MMV}_{\Z}^t$.
  • Figure 3: Randomized Algorithm for $\textrm{MMV}_\Z^{t}$.
  • Figure 4: A diagram of reductions among $\MMV$ and related problems on $n \times n$ matrices. Arrows represent deterministic $O(n^2)$-time reductions (and double-headed arrows denote equivalences under such reductions). Red arrows indicate new (non-trivial) reductions.

Theorems & Definitions (66)

  • Theorem 1.1: Fast deterministic MMV for sparse matrices, informal
  • Theorem 1.2: Fast randomized MMV for sparse matrices, informal
  • Definition 2.1: $\textrm{MM}_R$
  • Definition 2.2: Rectangular and Square Matrix Multiplication Exponents
  • Theorem 2.3: lotti1983asymptoticle2012faster
  • Lemma 2.4
  • proof
  • Theorem 2.5: lotti1983asymptotic
  • Definition 2.6: $\textrm{MMV}_R^t$
  • Definition 2.7: $\textrm{AllZeroes}_R^t$
  • ...and 56 more