Fast Matrix Multiplication Without Tears: A Constraint Programming Approach

by   Arnaud Deza, et al.

It is known that the multiplication of an N × M matrix with an M × P matrix can be performed using fewer multiplications than what the naive NMP approach suggests. The most famous instance of this is Strassen's algorithm for multiplying two 2× 2 matrices in 7 instead of 8 multiplications. This gives rise to the constraint satisfaction problem of fast matrix multiplication, where a set of R < NMP multiplication terms must be chosen and combined such that they satisfy correctness constraints on the output matrix. Despite its highly combinatorial nature, this problem has not been exhaustively examined from that perspective, as evidenced for example by the recent deep reinforcement learning approach of AlphaTensor. In this work, we propose a simple yet novel Constraint Programming approach to find non-commutative algorithms for fast matrix multiplication or provide proof of infeasibility otherwise. We propose a set of symmetry-breaking constraints and valid inequalities that are particularly helpful in proving infeasibility. On the feasible side, we find that exploiting solver performance variability in conjunction with a sparsity-based problem decomposition enables finding solutions for larger (feasible) instances of fast matrix multiplication. Our experimental results using CP Optimizer demonstrate that we can find fast matrix multiplication algorithms for matrices up to 3× 3 in a short amount of time.


page 1

page 2

page 3

page 4


Simple, Fast and Practicable Algorithms for Cholesky, LU and QR Decomposition Using Fast Rectangular Matrix Multiplication

This note presents fast Cholesky/LU/QR decomposition algorithms with O(n...

Improved algorithms for Boolean matrix multiplication via opportunistic matrix multiplication

Karppa Kaski (2019) proposed a novel type of "broken" or "opportunis...

Equivalent Polyadic Decompositions of Matrix Multiplication Tensors

Invariance transformations of polyadic decompositions of matrix multipli...

Look-ups are not (yet) all you need for deep learning inference

Fast approximations to matrix multiplication have the potential to drama...

Algorithms for Interference Minimization in Future Wireless Network Decomposition

We propose a simple and fast method for providing a high quality solutio...

Strassen's 2x2 matrix multiplication algorithm: A conceptual perspective

Despite its importance, all proofs of the correctness of Strassen's famo...

A Method for Finding a Design Space as Linear Combinations of Parameter Ranges for Biopharmaceutical Control Strategies

According to ICH Q8 guidelines, the biopharmaceutical manufacturer submi...

Please sign up or login with your details

Forgot password? Click here to reset