Further limitations of the known approaches for matrix multiplication
Josh Alman, Virginia Vassilevska Williams
Introduction
One of the most fundamental questions in computer science asks how quickly one can multiply two matrices. Since the surprising subcubic algorithm for matrix multiplication by Strassen in 1969 [Str69], there has been a long line of work on improving and refining the techniques and speeding up matrix multiplication algorithms (e.g. [Pan78, Pan80, BCRL79, Str86, CW81, Sch81, Str87, CW90, DS13, Wil12, LG14]). Progress on this problem is typically measured in terms of , the smallest constant such that, for any , one can design an algorithm for matrix multiplication running in time . The biggest open question is whether one can achieve . The best bound we currently know, due to Le Gall [LG14], is .
A related line of work [CW90, Cop97, LG12, GU17] focuses on rectangular matrix multiplication instead of square matrix multiplication. Here, progress is measured in terms of , the largest constant such that for any , one can design an algorithm for matrix multiplication running in time . Recent work [GU17] improved the best known bound to . The two values and are very related, as if and only if .
Our first result is a unifying approach to achieving all known bounds of ([Str86, CW90, DS13, LG14]) since Strassen’s 1986 proof that .
A simple remark first pointed out to us by Michalek [Mic14] is that the so called Coppersmith-Winograd tensor used in the papers on matrix multiplication since 1990 [CW90, DS13, LG14], can be replaced with an equivalent tensor, rotating the original slightly in a certain way (see the Preliminaries), without changing any of the proofs, and thus yielding the same bounds on .
For every , and for every , there is an explicit constant such that any algorithm for matrix multiplication designed in the above way using , or a monomial degeneration of , runs in time . (See Theorem 6.1 below for the precise statement).
The constant is defined as follows. Consider first when is a fixed prime or power of a prime. Let be the unique real number in such that ; then
There is also a variant of Theorem 1.1 that holds for when is not necessarily a prime power, but the constant is slightly different.
This approach yields a square matrix multiplication algorithm with runtime at best , with exponent . Hence, this approach for a fixed cannot yield .
Let be such that . Then, this approach for a fixed cannot yield a value of bigger than .
For modest values of , the value is a fair bit larger than . For instance, . As we will show shortly, the best known algorithms for matrix multiplications use the approach above with a (rotated) Coppersmith-Winograd tensor which is a monomial degeneration of . Our theorem implies among other things that using the approach with as the starting tensor cannot yield a bound on better than , no matter how one zeroes out the tensor powers of or its monomial degenerations. We plot the resulting bounds on and for varying , in Figures 1 and 2 (for technical reasons we discuss below, we get different bounds depending on whether is a power of a prime).
3 A potential idea for improving ω𝜔\omega.
It should be noted that, despite our lower bounds, not all hope is lost for achieving using tensors. Indeed, in the limit as , our lower bound approaches , and our upper bound approaches (see Lemma A.1 in Appendix A for a proof). Hence, our lower bound does not rule out achieving a runtime for matrix multiplication of for all by using bigger and bigger values of . We find this approach very exciting.
4 Tri-Colored Sum-Free Sets
For any integer which is a power of a prime, let be the unique number in satisfying
For notational simplicity in our main results in Section 6, define when is not a power of a prime.
5 Proof Outline
In Section 3, we give a simple rank expression for , and show that the rotated Coppersmith-Winograd tensor can be found as a simple monomial degeneration of .
In Section 4, we show that every matrix multiplication tensor has a zeroing out into a large number of independent triples. This generalizes a classical result that matrix multiplication tensors have monomial degenerations into a large number of independent triples.
In Section 5, we show that if tensor is a monomial degeneration of tensor , and large powers of can be zeroed out into many independent triples, then large powers of can as well.
6 Comparison with Past Work
There are two papers which have proved lower bounds on the value of that one can achieve using certain techniques.
The second prior work is by Blasiak et al. [BCC+17]. Like us, the authors also use recent bounds on the size of certain tri-colored sum-free sets in order to prove lower bounds. However, rather than the tensor-based approach to matrix multiplication algorithms which we have been discussing, and which has been used in all of the improvements to and to date, they instead focus on the ‘group-theoretic approach’ to matrix multiplication [CU03, CKSU05]. This approach has been designed around formulating approaches that would imply rather than on attempting any small improvement to the bounds on , and this paper refutes some earlier conjectures along these lines. The work of Blasiak et al. implies that certain approaches to achieving are impossible, similar to our work here.
Preliminaries
In this section we introduce all the notions related to tensors which are used in the rest of the paper.
Let , , and be three sets of formal variables. A tensor over is a trilinear form
For any positive integer , the th Coppersmith-Winograd tensor Cq [CW90] is given by . It is not hard to verify that using the Coppersmith-Winograd approach, one can obtain exactly the same values for from the following rotated Coppersmith-Winograd tensor , given by
The main reason why CWq works just as well as the original Coppersmith-Winograd tensor Cq is because they both have border rank and because of the following other structural reason which is what is used in the prior work on fast matrix multiplication:
Let , , . Similarly, let , , , and , , . When you restrict Cq and CWq to , or , or , both of them are isomorphic to . When you restrict them to , both are isomorphic to , when you restrict them to , both are isomorphic to , and when you restrict them to , both are isomorphic to . The Coppersmith-Winograd approach only looks at products of these blocks in higher tensor powers, which are hence isomorphic to the same matrix multiplication tensors and give the same bounds on .
2 Subsets and Degenerations
we have , and
furthermore, if and only if as well.
We note that in prior work, degenerations are defined via polynomials in a variable , however when the degenerations are single monomials, the above definition is equivalent, where give the corresponding exponents of .
Finally, we say that is a zeroing out of if is a monomial degeneration of such that for all , for all , and for all . One can think of this as substituting for any variable which , or maps to a positive value.
3 Tensor Product
Let be sets of formal variables. If is a tensor over , and is a tensor over , then the tensor product of and , denoted , is a tensor over given by
The th tensor power of a tensor , denoted , is the result of tensoring copies of together. In other words, , and .
Tensor products preserve many key properties of tensors. For instance, if and , then , and this is also true if subset is replaced by monomial degeneration, or by zeroing out.
For a nonnegative integer , if is a tensor over , and if are disjoint copies of , and similar for and , then denotes the (disjoint) sum of copies of , one over for each .
4 Independent Triples
Two triples are independent if , , and . A tensor is independent if, whenever and , and , then the triples and are independent.
5 Tensor Rank
More generally, is a rank- tensor if it can be written as the sum of rank-one tensors. The rank of , denoted , is the smallest such that is a rank- tensor.
is expanded as a polynomial in whose coefficients are tensors over , then is the coefficient of , and the coefficient of is for all . Similarly, the border rank of is the smallest number of expressions of the form (1) whose sum, when written as a polynomial in , has as its lowest order coefficient.
It is not hard to see that if is a monomial degeneration of , then .
6 Matrix Multiplication Tensor and Algorithms
Now that we have defined tensor rank, we can define as the infimum over all reals so that for all . Similarly, for any , define to be the smallest real such that an matrix can be multiplied by an matrix in time.
We present a useful Lemma that follows from the work of Schönhage, which shows how the tensor rank notions we have been discussing can give bounds on .
If , then .
By Schönhage [Sch81] (see also [Blä13, Lemma 7.7]), we have that implies that for all integers , . Hence, multiplying an by an matrix can be done in time. Thus . ∎
We can also define as the largest real such that . It is known that , and clearly if and only if .
The mod-p tensor and its degenerations
In this section, we give a rank expression for , and then a monomial degeneration of into .
Let us consider the tensor of addition modulo for any integer ; recall that in trilinear notation, is defined as
𝑞2T_{q+2} into Here we will show that the rotated CW tensor for integer is a degeneration of . Recall that
For ease of notation, we will change the indexing of the variables in (i.e. rename the variables) from our original definitionFor every index , we will rename to . to write
In this form, one can see that is the subset of consisting of all the terms containing at least one of , , or . With this in mind, our degeneration of is as follows. We will pick:
, , and for , similarly,
, , and for , and,
, , and for .
We need to verify that for every term in (3) we have , and moreover that for such , if and only if also appears in (2). This is quite straightforward, but we do it here for completeness. Consider any term in (3). We consider three cases based on :
If , then our term is of the form for . This term always appears in (2) as well, and we can see that we always have , and so .
If , then , and we always have , so we definitely have that . Moreover, we can only achieve when , with the term , which is the only term with which appears in (2).
If , then since is not a term in (3), we must have that , and so . Moreover, we only achieve when or , which correspond to the terms of the form or in (2).
𝑞1T_{q+1} into Strassen’s 1986 tensor. Strassen’s 1986 tensor is defined for any integer and is given by .
Similar to before, we will show that is a degeneration of , which we can write as
Our degeneration is as follows: , for all , and for all . Simple casework shows again that the possible values for are , and that is only achieved for the terms in . Among other things, this degeneration gives a simple proof that the border rank of is .
Since a monomial degeneration of a rank expression gives a border rank expression, this shows in particular that the border rank of CWq is . Furthermore, it shows that the best known bounds for [CW90, Wil12, LG14] can be obtained from . Finally, since we only used monomial degenerations, we will be able to obtain lower bounds on what bounds on one can achieve via zeroing out powers of the CWq tensor.
Independent Triples in Matrix Multiplication Tensors
In this section we show that there is a zeroing out of any matrix multiplication tensor into a fairly large independent tensor. This strengthens a classic result (see eg. [Blä13, Lemma 8.6]) that any matrix multiplication tensor has a monomial degeneration into a fairly large independent tensor.
For every positive integer , and , there is a zeroing out of into independent triples.
Recall that . Hence,
We will zero out variables in three phases, and after the third phase we will have a sufficiently large independent tensor as desired.
For vectors , and values , let denote the number of such that and . We say that is balanced if, for all , we have . We similarly say that is balanced if for every and , and say that is balanced similarly. In the first phase, we zero out every variable such that is not balanced. We similarly zero out such that is not balanced, and such that is not balanced.
Note that if is balanced, then for each , we have for exactly choices of . Hence, the number of choices of such that is balanced is exactly . If is balanced, then notice that the number of choices of such that and are also balanced is independent of what and are, and satisfies .
Similarly, the number of choices of and such that is balanced is . Moreover, when is balanced, the number of choices of such that and are balanced satisfies . Note that , since both count the number of triples remaining after phase one, and in particular, .
2 Phase two
Let be an odd prime number to be determined. Pick independently and uniformly at random, then define the hash functions , , and , by:
, , and are balanced, and
.
3 Phase three
In the third phase we zero out some remaining variables to ensure that our resulting tensor is independent. First, however, we will compute some expected values.
We now do our final zeroing out. If there are any distinct terms and remaining in our tensor such that and , then we zero out . We similarly zero out any variables or which appear in multiple terms. As a result, our final tensor is definitely independent.
It remains to show that it has enough terms remaining. Since each pair of terms left from phase two which share a variable is removed in phase three, we see that the number of terms remaining is at least
Let us pick to be an odd prime number in the range . Hence, using our expected value calculations from before, we see that the expected number of remaining terms is at least
where the last step follows since and . By the probabilistic method, there is a choice of hash functions which achieves this expected number of independent triples, as desired. ∎
Monomial Degenerations
Suppose and are two tensors over such that is a monomial degeneration of . Further suppose that has zeroing out into independent triples. Then, has a zeroing out into independent triples.
for all , and
furthermore if and only if .
for all , and
furthermore if and only if .
The range of is integers in . For each integer in that range, let be the set of such that . Define for integers , and for integers , similarly. Now, for , let be the tensor one gets from by zeroing out all the variables not in , all the variables not in , and all the variables not in . Then, letting be the set of triples of integers in , we see that
and each term of appears in exactly one of the summands. Now, let be the zeroing out of into independent triples. Let be the zeroing out of in which we zero out those same variables. Hence,
where the sum is hence a disjoint sum of independent triples. The number of terms on the right is , and so at least one of the terms on the right must have size at least , as desired. ∎
Main Theorem
In this section, we will combine our results above with the bounds on the sizes of tri-colored sum-free sets from past work in order to prove our main theorem. Recall the definition of from Section 1.4, and define .
Let . Let T be a tensor that is a monomial degeneration of and suppose that can be zeroed out into , giving a bound where . Then .
Let so that , and let so that . Since can be zeroed out into , via Lemma 4.1, can be zeroed out into independent triples. Due to Lemma 5.1 this means that can also be zeroed out into independent triples.
Now, let be the indices of the independent triples obtained from . Because they are obtained by zeroing out , for every , in . Now suppose that for some , in . If are not all the same, then cannot be in as the triples in are independent. However, the only way for a triple of to be removed is if or or is set to zero. Suppose that is set to (the other two cases are symmetric). Then there can be no triple in sharing as its first index. Thus in fact forms a tri-colored sum-free set. Hence .
From our earlier bound on we get that , and taking the th root of both sides yields .
Recall that , so that . Plugging in above, we get that Hence, Since , we have that . We obtain that and
As a corollary we obtain the following upper bound on what can be achieved by zeroing out.
Let be a tensor that is a monomial degeneration of . If one can prove using the zeroing-out approach then, .
References
Appendix A Supporting Calculations
We recall some definitions from earlier in the paper. For any integer , let be the unique number in satisfying
.
Rearranging, we see that . Hence,
As , we have that and , as desired. ∎