Table of Contents
Fetching ...

Algorithms for matrix multiplication via sampling and opportunistic matrix multiplication

David G. Harris

TL;DR

This work introduces a sampling-based, opportunistic variant of the KK broken matrix multiplication that aggregates multiple randomized terms into a single larger pseudo-multiplication to approximate $AB$ for $A,B$ real-valued or Boolean. By analyzing the mean and variance of the estimator and applying probabilistic tools, the authors obtain nontrivial asymptotic bounds, including a near $O(n^{2.77})$ runtime for square matrices in the approximate real/Boolean settings. Concrete complexity estimates and case studies suggest the approach yields practical insights but currently does not outperform established methods like Strassen or KK at large scales; nonetheless, the framework identifies clear avenues for improvements in hash design and variance reduction. Overall, the paper advances practical randomized approaches to matrix multiplication, highlighting trade-offs between sampling, error, and computation in real-world problem sizes.

Abstract

Karppa & Kaski (2019) proposed a novel ``broken" or ``opportunistic" matrix multiplication algorithm, based on a variant of Strassen's algorithm, and used this to develop new algorithms for Boolean matrix multiplication, among other tasks. Their algorithm can compute Boolean matrix multiplication in $O(n^{2.778})$ time. While asymptotically faster matrix multiplication algorithms exist, most such algorithms are infeasible for practical problems. We describe an alternative way to use the broken multiplication algorithm to approximately compute matrix multiplication, either for real-valued or Boolean matrices. In brief, instead of running multiple iterations of the broken algorithm on the original input matrix, we form a new larger matrix by sampling and run a single iteration of the broken algorithm on it. Asymptotically, our algorithm has runtime $O(n^{2.763})$, a slight improvement over the Karppa-Kaski algorithm. Since the goal is to obtain new practical matrix-multiplication algorithms, we also estimate the concrete runtime for our algorithm for some large-scale sample problems. It appears that for these parameters, further optimizations are still needed to make our algorithm competitive.

Algorithms for matrix multiplication via sampling and opportunistic matrix multiplication

TL;DR

This work introduces a sampling-based, opportunistic variant of the KK broken matrix multiplication that aggregates multiple randomized terms into a single larger pseudo-multiplication to approximate for real-valued or Boolean. By analyzing the mean and variance of the estimator and applying probabilistic tools, the authors obtain nontrivial asymptotic bounds, including a near runtime for square matrices in the approximate real/Boolean settings. Concrete complexity estimates and case studies suggest the approach yields practical insights but currently does not outperform established methods like Strassen or KK at large scales; nonetheless, the framework identifies clear avenues for improvements in hash design and variance reduction. Overall, the paper advances practical randomized approaches to matrix multiplication, highlighting trade-offs between sampling, error, and computation in real-world problem sizes.

Abstract

Karppa & Kaski (2019) proposed a novel ``broken" or ``opportunistic" matrix multiplication algorithm, based on a variant of Strassen's algorithm, and used this to develop new algorithms for Boolean matrix multiplication, among other tasks. Their algorithm can compute Boolean matrix multiplication in time. While asymptotically faster matrix multiplication algorithms exist, most such algorithms are infeasible for practical problems. We describe an alternative way to use the broken multiplication algorithm to approximately compute matrix multiplication, either for real-valued or Boolean matrices. In brief, instead of running multiple iterations of the broken algorithm on the original input matrix, we form a new larger matrix by sampling and run a single iteration of the broken algorithm on it. Asymptotically, our algorithm has runtime , a slight improvement over the Karppa-Kaski algorithm. Since the goal is to obtain new practical matrix-multiplication algorithms, we also estimate the concrete runtime for our algorithm for some large-scale sample problems. It appears that for these parameters, further optimizations are still needed to make our algorithm competitive.

Paper Structure

This paper contains 11 sections, 19 theorems, 60 equations, 2 figures, 1 algorithm.

Key Result

Theorem 1

For square matrices of dimension $n$, we can compute BMM in $O( n^{\frac{3 \log 6}{\log 7}} (\log n)^{\frac{\log 6}{\log 7}}) \leq O(n^{2.763})$ bit operations with high probability.

Figures (2)

  • Figure 1: Runtime of our algorithm for the sample problem. To handle the wide dynamic range, all figures are given in log base two; e.g., for $s = 10$, the relative variance is $2^{25.9}$ and the runtime is $2^{55.8}$
  • Figure 2: Possible failure parameters for the algorithm. All figures are given in log base two. Some of the empirical estimates are left blank because no statistically significant estimates could be obtained. For sake of comparison with $\kappa$, we also write $\mu = 7^s p_1 p_2 p_3$.

Theorems & Definitions (33)

  • Theorem 1
  • Theorem 2
  • Theorem 3: kk
  • Theorem 4
  • proof
  • Corollary 5
  • proof
  • Lemma 6
  • proof
  • Corollary 7
  • ...and 23 more