Algorithms for Matrix Multiplication via Sampling and Opportunistic Matrix Multiplication
Karppa & Kaski (2019) proposed a novel type of "broken" or "opportunistic" multiplication algorithm, based on a variant of Strassen’s algorithm, and used this to develop new algorithms for Boolean matrix multiplication, among other tasks. For instance, their algorithm can compute Boolean matrix multiplication in O(n^log₂(6+6/7) log n) = O(n^2.778) time. While faster matrix multiplication algorithms exist asymptotically, in practice most such algorithms are infeasible for practical problems.
We describe an alternative way to use the broken matrix multiplication algorithm to approximately compute matrix multiplication, either for real-valued matrices 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. Asymptotically, the resulting algorithm has runtime O(n^{(3 log6)/log7} log n) ≤ O(n^2.763), a slight improvement of Karppa-Kaski’s algorithm.
Since the goal is to obtain new practical matrix-multiplication algorithms, these asymptotic runtime bounds are not directly useful. We estimate the runtime for our algorithm for some sample problems which are at the upper limits of practical algorithms; it appears that for these parameters, further optimizations are still needed to make our algorithm competitive.
Matrix multiplication
Boolean matrix multiplication
Strassen’s algorithmkeyword
Theory of computation~Design and analysis of algorithms
57:1-57:17
Regular Paper
https://arxiv.org/abs/2109.13335
Thanks for Richard Stong for suggesting the proof of Lemma 10.
David G.
Harris
David G. Harris
University of Maryland, College Park, MD, USA
https://orcid.org/0000-0002-3021-3555
10.4230/LIPIcs.ESA.2023.57
Martin Albrecht, Gregory Bard, and William Hart. Algorithm 898: Efficient multiplication of dense matrices over GF(2). ACM Transactions on Mathematical Software (TOMS), 37(1):1-14, 2010.
Josh Alman and Virginia Vassilevska Williams. A refined laser method and faster matrix multiplication. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 522-539. SIAM, 2021.
Vladimir L'vovich Arlazarov, Yefim A Dinitz, MA Kronrod, and IgorAleksandrovich Faradzhev. On economical construction of the transitive closure of an oriented graph. In Doklady Akademii Nauk, volume 194, pages 487-488. Russian Academy of Sciences, 1970.
Grey Ballard, James Demmel, Olga Holtz, Benjamin Lipshitz, and Oded Schwartz. Communication-optimal parallel algorithm for Strassen’s matrix multiplication. In Proceedings of the twenty-fourth annual ACM symposium on Parallelism in algorithms and architectures, pages 193-204, 2012.
Austin R Benson and Grey Ballard. A framework for practical parallel fast matrix multiplication. ACM SIGPLAN Notices, 50(8):42-53, 2015.
Don Coppersmith and Shmuel Winograd. Matrix multiplication via arithmetic progressions. In Proceedings of the nineteenth annual ACM symposium on Theory of computing, pages 1-6, 1987.
François Le Gall and Florent Urrutia. Improved rectangular matrix multiplication using powers of the Coppersmith-Winograd tensor. In Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1029-1046. SIAM, 2018.
Jianyu Huang, Tyler M Smith, Greg M Henry, and Robert A Van De Geijn. Strassen’s algorithm reloaded. In SC'16: Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, pages 690-701. IEEE, 2016.
Svante Janson, Tomasz Luczak, and Andrzej Rucinski. An exponential bound for the probability of nonexistence of a specified subgraph in a random graph. In Random graphs, volume 87, pages 73-87, 1990.
Matti Karppa. Techniques for similarity search and Boolean matrix multiplication. PhD thesis, 2020.
Matti Karppa and Petteri Kaski. Probabilistic tensors and opportunistic Boolean matrix multiplication. In Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 496-515. SIAM, 2019.
François Le Gall. Faster algorithms for rectangular matrix multiplication. In 2012 IEEE 53rd annual symposium on foundations of computer science, pages 514-523. IEEE, 2012.
Huacheng Yu. An improved combinatorial algorithm for boolean matrix multiplication. Information and Computation, 261:240-247, 2018.
David G. Harris
Creative Commons Attribution 4.0 International license
https://creativecommons.org/licenses/by/4.0/legalcode