Faster Algorithms for Rectangular Matrix Multiplication
François Le Gall
Introduction
Finding the optimal value of the exponent of square matrix multiplication is naturally one of the most important open problems in algebraic complexity. It is widely believed that the product of two matrices can be computed with arithmetic operations for any constant . Several conjectures, including conjectures about combinatorial structures and about group theory , would, if true, lead to this result (see also for recent work on these conjectures). Another way to interpret this open problem is by considering the multiplication of an matrix by an matrix. Suppose that the matrices are defined over a field. For any , define the exponent of such a rectangular matrix multiplication as follows:
where denotes the minimum number of arithmetic operations needed to multiply an matrix by an matrix. Note that, while the value may depend on the field under consideration, it is known that it can depend only on the characteristic of the field . Define and . The value represents the exponent of square matrix multiplication, and the value essentially represents the largest value such that the product of an matrix by an matrix can be computed with arithmetic operations for any constant . Since if and only if , one possible strategy towards showing that is to give lower bounds on . Coppersmith showed in 1982 that . Then, based on the techniques developed in , Coppersmith improved this lower bound to . This is the best lower bound on known so far.
Excepting Coppersmith’s works on the value , there have been relatively few algorithms that focused specifically on rectangular matrix multiplication. Since it is well known (see, e.g, ) that multiplying an matrix by an matrix, or an matrix by an matrix, can be done with the same number of arithmetic operations as multiplying an matrix by an matrix, the value represents the exponent of all these three types of rectangular matrix multiplications. Note that, by decomposing the product into smaller matrix products, it is easy to obtain (see, e.g, ) the following upper bound:
Lotti and Romani obtained nontrivial upper bounds on based on the seminal result by Coppersmith and on early works on square matrix multiplication. Huang and Pan showed how to apply ideas from to the rectangular setting and obtained the upper bound , but this approach did not lead to any upper bound better than (1) for . Ke, Zeng, Han and Pan further improved Huang and Pan’s result to , by using again the approach from , and also reported the upper bounds and , which are better than those obtained by (1). Their approach, nevertheless, did not give any improvement for the value of .
Besides the fact that a better understanding of gives insights into the nature of matrix multiplication and ultimately may help showing that , fast algorithms for multiplying an matrix by an with have also a multitude of applications. Typical examples not directly related to linear algebra include the construction of fast algorithms for the all-pairs shortest paths problem , the dynamic computation of the transitive closure , finding ancestors , detecting directed cycles , or computing the diameter of a graph . Rectangular matrix multiplication has also been used in computational complexity , and to speed-up sparse square matrix multiplication or tasks in computational geometry . Obtaining new upper bounds on would thus reduce the asymptotic time complexity of algorithms in a wide range of areas. We nevertheless stress that such improvements are only of theoretical interest, since the huge constants involved in the complexity of fast matrix multiplication usually make these algorithms impractical.
Short description of the approach by Coppersmith and Winograd.
In view of the last result, it was natural to ask if taking larger tensor powers of as the basic construction leads to better bounds on . The case was explicitly mentioned as an open problem in but did not seem to lead to any improvement. Stothers and Vassilevska Williams succeeded in analyzing the fourth tensor product and obtained a better upper bound on , the first improvement in more that twenty years. Vassilevska Williams further presented a general framework that enables a systematic analysis for higher tensor products of the basis construction, and used this framework to show that , for the basic construction , the best upper bound obtained so far.
The algorithms for rectangular matrix multiplication already mentioned use a similar approach. Huang and Pan obtained their improvement on by taking the easiest of the three construction in and carefully modifying the analysis to evaluate the complexity of rectangular matrix multiplication. Ke, Zeng, Han and Pan obtained their improvements similarly, but by using the second basic construction from (the construction ) instead, which lead to better upper bounds. These approaches, while very natural, do not provide any nontrivial lower bounds on : the upper bounds on obtained are strictly larger than 2 even for small values of . In order to obtain the lower bound , Coppersmith relied on a more complex approach: the basic construction considered is still , but several instances for distinct values of are combined together in a subtle way in order to keep the complexity of the resulting algorithm small enough (i.e., not larger than ).
Statement of our results and discussion.
In this paper we construct new algorithms for rectangular matrix multiplication, by taking the tensor power as basic construction and analyzing this construction in the framework of rectangular matrix multiplication. We use these ideas to prove that for any , as stated in the following theorem.
For any value , the product of an matrix by an matrix can be computed with arithmetic operations for any constant .
Theorem 1.1 shows that , which improves the previous record by Coppersmith. More generally, in the present work we present an algorithm for multiplying an matrix by an matrix, for any value . We show that the complexity of this algorithm can be expressed as a (nonlinear) optimization problem, and use this formulation to derive upper bounds on . Table 1 shows the bounds we obtain for several values of . The bounds obtained for are represented in Figure 1 as well.
The results of this paper can be seen as a generalization of Coppersmith-Winograd’s approach to the rectangular setting. In the case of square matrix multiplication (i.e., for ), we recover naturally the same upper bound as the one obtained in . Let us mention that we can, in a rather straightforward way, combine our results with the upper bound by Vassilevska Williams to obtain slightly improved bounds for . The idea is, very similarly to how Equation (1) was obtained, to exploit the convexity of the function . Concretely, for any fixed value , the inequality
holds for any such that . This enables us to combine an upper bound on , for instance one of the values in Table 1, with the improved upper bound by Vassilevska Williams. Since the improvement is small and concerns only the case , we will not discuss it further.
For and , the complexity of our algorithms is better than all known algorithms for rectangular matrix multiplication, including the algorithms mentioned above. Moreover, for , our new bounds are significantly better than what can be obtained solely from the bound and through Equation (1), as illustrated in Figure 1. This suggests that non-negligible improvements can be obtained for all applications of rectangular matrix multiplications that rely on this simple linear interpolation — we will elaborate on this subject in Subsection 1.1.
Let us compare more precisely our results with those reported in . For , we obtain while Ke et al. obtained by using the basic construction . Our improvements are of the same order for the other two values ( and ) analyzed in , as can be seen from Table 1. Note that the order of magnitude of the improvements here is similar to what was obtained in by changing the basic construction from to for square matrix multiplication, which led to a improvement from to .
A noteworthy point is that our algorithm directly leads to improved lower bounds on while, as already mentioned, to obtain a nontrivial lower bound on using the basic construction (as done in ) a specific methodology was needed. Our approach can then be considered as a general framework to study rectangular matrix multiplication, which leads to a unique optimization problem that gives upper bounds on for any value of .
1 Applications
As mentioned in the beginning of the introduction, improvements on the time complexity of rectangular matrix multiplication give faster algorithms for a multitude of computational problems. In this subsection we describe quantitatively the improvements that our new upper bounds imply for some of these problems: sparse square matrix multiplication, the all-pairs shortest paths problem and computing dynamically the transitive closure of a graph.
Yuster and Zwick have shown how fast algorithms for rectangular matrix multiplication can be used to construct fast algorithms for computing the product of two sparse square matrices (this result has been generalized to the product of sparse rectangular matrices in , and the case where the output matrix is also sparse has been studied in ). More precisely, let and be two matrices such that each matrix has at most non-zero entries, where . Yuster and Zwick showed that the product of and can be computed in time
where is the solution of the equation . Using the upper bounds on of Equation (1) with the values and , this gives the complexity depicted in Figure 2.
These upper bounds can be of course directly improved by using the new upper bound on by Vassilevska Williams and the new lower bound on given in the present work, but the improvement is small. A more significant improvement can be obtained by using directly the upper bounds on presented in Figure 1, which gives the new upper bounds on the complexity of sparse matrix multiplication depicted in Figure 2. For example, for , we obtain complexity , which is better than the original upper bound obtained from Equation (1) with and . Note that replacing with the the best known bound only decreases the latter bound to . Thus, even if the algorithms presented in the present paper do not give any improvement on (i.e., for the product of dense square matrices), we do obtain improvements for computing the product of two sparse square matrices.
Graph algorithms.
Zwick has shown how to use rectangular matrix multiplication to compute, with high probability, the all-pairs shortest paths in weighted direct graphs where the weights are bounded integers. The time complexity obtained is , for any constant , where is the solution of the equation . Using the upper bounds on of Equation (1) with and , this gives and thus complexity . This reduction to rectangular matrix multiplication is the asymptotically fastest known approach for weighted directed graphs with small integer weights.
Our results (see Table 1) show that , which gives the upper bound . We thus obtain the following result.
There exists a randomized algorithm that computes the shortest paths between all pairs of vertices in a weighted directed graph with bounded integer weights in time , where is the number of vertices in the graph.
Note that, even if , the complexity of Zwick’s algorithm is . In this perspective, our improvements on the complexity of rectangular matrix multiplication offer a non-negligible speed-up for the all-pairs shortest paths problem in this setting.
The same approach can be used to improve several other existing graph algorithms. Let us describe another example: algorithms for computing dynamically the transitive closure of a graph. Demetrescu and Italiano presented a randomized algorithm for the dynamic transitive closure of directly acyclic graph with vertices that answers queries in time, and performs updates in time, for any . Here is again the solution of the equation . This was the first algorithm for this problem with subquadratic time complexity. This result have been generalized later to general graphs, with the same bounds, by Sankowski . Our new upper bounds thus show the existence of an algorithm for the dynamic transitive closure that answers queries in time and performs updates in time.
2 Overview of our techniques and organization of the paper
Before presenting an overview of the techniques used in this paper, we will give an informal description of algebraic complexity theory (the contents of which will be superseded by the formal presentation of these notions in Section 2). In this paper we will use, for any positive integer , the notation to represent the set .
The matrix multiplication of an matrix by an matrix can be represented by the following trilinear form, denoted as :
where , and are formal variables. This form can be interpreted as follows: the -th entry of the product of an matrix by an matrix can be obtained by setting for all and for all , setting and setting all the other -variables to zero. One can then think of the -variables as formal variables used to record the entries of the matrix product.
More generally, a trilinear form is represented as
An exact (bilinear) algorithm computing corresponds to an equality of the form
A sum of trilinear forms is a direct sum if the ’s do not share variables. Informally, Schönhage’s asymptotic sum inequality for rectangular matrix multiplication states that, if the form can be converted (in the -approximation sense) into a direct sum of trilinear forms, each form being isomorphic to , then
This suggests that good bounds on can be obtained if the form can be used to derive many independent (i.e., not sharing any variables) matrix multiplications. This approach has been applied to derive almost all new bounds on matrix multiplication since its discovery in 1981 by Schönhage.
Overview of our techniques.
Our algorithm uses, as its basic construction, the trilinear form from , which can be written as a sum of fifteen terms , for all fifteen nonnegative integers such that :
If the sum were direct, then, from Schönhage’s asymptotic sum inequality and since an upper bound on the rank of is easy to obtain, this would reduce the problem to the analysis of each part . This is unfortunately not the case: the ’s share variables. To solve this problem, the basic construction is manipulated in order to obtain a direct sum, similarly to . The first step is to take the -th tensor product of the basis construction, where is a large integer. This gives:
We will take fifteen integers and show how the form can be transformed, by zeroing variables, into a direct sum of a large number of forms in which each is such that
The main difference here is that, in , the symmetry of square multiplication implied that the ’s could be taken invariant under permutation of indices, with means that only four parameters (, , and ) needed to be considered. In our case, we still impose the condition , but not more. This reduces the number of parameters to nine: , , , , , , , and . Many nontrivial technical problems arise from this larger number of parameters. In particular, the equations that occur during the analysis do not have a unique solution and an optimization step is necessary. This is similar to the difficulties that appeared in the analysis of the basis construction (for square matrix multiplication) done in . We will show that this further optimization step essentially imposes the additional (nonlinear) constraint .
Showing that can be transformed into a direct sum of many isomorphic forms, as claimed, was also used in previous works based on the approach by Coppersmith and Winograd. Our setting is nevertheless more general than in , for the following two reasons. First, our approach is asymmetric since our parameters are not invariant under permutations of the indices. Second, the technical problems due to the presence of many parameters require more precise arguments. The former complication was addressed implicitly in , and explicitly in . The latter complication was addressed in . Here we need to deal with these two complications simultaneously, which involves a careful analysis. Instead of approaching this task directly in the language of trilinear forms, we give a graph-theoretic interpretation of it, which will make the exposition more intuitive, and also simplify the analysis. Each form will correspond to one vertex in a graph, and an edge in the graph will represent the fact that two forms share one index. We will interpret the task of converting the sum into a direct sum (i.e., a sum where the non-zero forms do not share any index) as the task of converting the graph, by using only simple graph operations, into an edgeless subgraph. We will present algorithms solving this latter graph-theoretic task and show that a large edgeless subgraph can be obtained, which means that many forms not sharing any index can be constructed from .
Now that we have a direct sum of many forms, each form being isomorphic to (2), the only thing to do before applying Schönhage’s asymptotic sum inequality is to show that the form (2) is isomorphic to a direct sum of matrix products . Some of the ’s (more precisely, all the ’s except , and ) can be analyzed in a straightforward way, since they correspond to matrix products, as originally observed in . The forms , and are delicate to analyze since they do not correspond to matrix products. In (see also ), they were analyzed individually through the concept of “value”, a quantity that evaluates the number of square matrix products (and their size) that can be created from the form under consideration. This is nevertheless useless for estimating , except when , because the value is intrinsically symmetric (in particular, the values of , and are identical), while here we are precisely interested in breaking the symmetry in order to obtain bounds for rectangular matrix multiplication. Instead, we will analyze the term
globally. This is the key new idea leading to our new bounds on and more generally on for any . Note that this difficulty was not present in previous works on rectangular matrix multiplication : for simpler basic constructions such as , all the smaller parts correspond to matrix products. We will show that , and can be converted into a large number of objects called “-tensors” in Strassen’s terminology . This will be done by relying on the graph-interpretation we introduced and showing how this conversion can be interpreted as finding large cliques in a graph (this is the main reason why we developed this graph-theoretic interpretation). While the fact that the form corresponds to a sum of -tensors was briefly mentioned in , and a proof sketched, we will need a complete analysis here. We will in particular rely on the fact that the -tensors obtained from , and are not identical. The success of our approach comes from the discovery that these -tensors are actually “complementary”: while the -tensors obtained individually from , and do not give any improvement for the exponent of rectangular matrix multiplication, their combination (i.e., the -tensors corresponding to the whole term (3)) does lead to improvements when analyzed globally by the “laser method” developed by Strassen . This will show that the form (3), and thus the form (2) as well, is isomorphic to a direct sum of matrix products .
Finally, Schönhage’s asymptotic sum inequality will give an inequality, depending on the parameters , that involves . Our new upper bounds on are obtained by optimizing these parameters. While this is done essentially though numerical calculations, the new lower bound on requires a more careful analysis where the optimal values of all but a few of the parameters are found analytically.
Higher powers.
A natural question is whether our bounds can be improved by taking higher tensor powers of as the basic algorithm, i.e., taking for . As can be expected from the analysis for we have outlined above, the analysis is much more difficult than in the square case, for two main reasons. The first reason is that the construction is not symmetric and thus more parameters have to be considered. This problem can be nevertheless addressed through a systematic framework similar to the one described in — this is actually quite accessible without using a computer for . The second, and more fundamental, reason is that the analysis of the smaller parts is different from the square case since it does not use the concept of value. We solved this problem for by applying Strassen’s laser method globally on the combination of , and , which is the key technical contribution of this paper. For larger values of the same approach can in principle be used, but other techniques seem to be necessary to convert these ideas into a systematic framework.
Organization of the paper.
Section 2 describes formally the notions of trilinear forms and Strassen’s laser method. Section 3 presents in details the basic construction from and some of its properties. Section 4 describes the graph-theoretic problems that will arise in the analysis of our trilinear forms. Section 5 describes our algorithm, and Section 6 shows how to use this algorithm to derive the optimization problem giving our new upper bounds on . Finally, the optimization is done in Section 7.
Preliminaries
In this section we present known results about trilinear forms, Strassen’s laser method and Salem-Spencer sets that we will use in this paper. We refer to for an extensive treatment of the first two topics.
It will be convenient for us to use an abstract approach and represent trilinear forms as tensors. Our presentation is independent from what was informally defined and stated in Subsection 1.2, but describes essentially the same contents. We thus encourage the reader who encounter these notions for the first time to refer at Subsection 1.2 for concrete illustrations.
The tensor corresponding to the matrix multiplication of an matrix by an matrix is the tensor of format with coefficients
This tensor will be denoted by .
This new tensor is called a restriction of . Intuitively, the fact that a tensor is a restriction of means that an algorithm computing can be converted into an algorithm computing that uses the same amount of multiplications (i.e., an algorithm with essentially the same complexity). We now give the definition of degeneration of tensors.
Intuitively, the fact that a tensor is a degeneration of a tensor means that an algorithm computing can be converted into an “approximate algorithm” computing with essentially the same complexity. The notion of degeneration can be used to define the notion of border rank.
Let and be two tensors. We can naturally define the direct sum , which is a tensor in , and the tensor product , which is a tensor in . For any integer , we will denote the tensor (with occurrences of ) by and the tensor (with occurrences of ) by . The degeneration of tensors has the following properties.
Let and be four tensors. Suppose that and . Then and .
Schönhage’s asymptotic sum inequality will be one of the main tools used to prove our bounds. Its original statement is for estimating the exponent of square matrix multiplication, but it can be easily generalized to estimate the exponent of rectangular matrix multiplication as well. We will use the following form, which has been also used implicitly in . A proof can be found in .
Let , and be three positive integers. Let be a tensor such that . Then
Theorem 2.1 states that, if the form can be degenerated (i.e., approximately converted, in the sense of Definition 2.1) into a direct sum of forms, each being isomorphic to , then the inequality holds. Note that this is a powerful technique, since the concepts of degeneration and border rank refer to “approximate algorithms”, while refers to the complexity of exact algorithms for rectangular matrix multiplication.
2 Strassen’s laser method and 𝒞\mathscr{C}-tensors
Strassen introduced in 1986 a new approach, often referred as the laser method, to derive upper bounds on the exponent of matrix multiplication. To the best of our knowledge, all the applications of this method have focused so far on square matrix multiplication, in which case several simplifications can be done due to the symmetry of the problem. In this paper we will nevertheless need the full power of the laser method, and in particular the notion of -tensor introduced in , to derive our new bounds on the exponent of rectangular matrix multiplication. The exposition below will mainly follow .
Let be a tensor. Suppose that , and decompose as direct sums of subspaces as follows:
Denote by this decomposition. We say that is a -tensor with respect to if can be written as
where each is a tensor in . The support of is defined as
and the nonzero ’s are called the components of . We will usually omit the reference to when there is no ambiguity or when the decomposition does not matter.
for all , ;
for all , .
Finally, we mention that the concept of -tensor is preserved by the tensor product. We will just state this property for the restricted class of -tensors that we will encounter in this paper (for which the precise decompositions do not matter), and refer to or to Section 7 in for a complete treatment.
3 Salem-Spencer sets
Salem and Spenser have shown the existence of very dense sets with no length-3 arithmetic progression.
We refer to these sets as Salem-Spencer sets. They can be constructed in time polynomial in . Note that this construction has been improved by Behrend , but the above statement will be enough for our purpose.
Coppersmith-Winograd’s construction
In this section we describe the construction by Coppersmith and Winograd , which we will use as the basis of our algorithm, and several of its properties.
In this trilinear form the -variables are . Similarly, the number of -variables is and the number of -variables is as well. Define the form
It is easy to check that the form can be written as , where is a polynomial in and in the -variables, -variables and -variables. In the language of Section 2, this means that and, informally, this means that an algorithm computing can be converted into an algorithm computing with the same complexity. Note that since, by definition, is the sum of products.
A more complex construction is proposed in Section 8 of . It is obtained by taking the tensor product of by itself. By Proposition 2.1 we know that . Consider the tensor product of by itself:
Moreover we know that , since can be written using multiplications.
We will later need to analyze all the forms . It happens, as observed in , that most of these forms (all the forms except , and ) can be analyzed in a straightforward way, since they are isomorphic to the following matrix products:
Graph-Theoretic Problems
In this section we describe and solve several graph-theoretic problems that will arise in the analysis of our trilinear forms. While the presentation given here is independent from the remaining of the paper, the reader may prefer to read Section 5 before going through this section.
Let be a fixed positive integer. Let be a large integer and define the set
Define the three coordinate functions as follows.
From the definition of , two distinct elements in cannot agree on more than one coordinate. Since this simple observation will be crucial in our analysis, we state it explicitly as follows.
Let and be two elements in . If for more than one index , then .
Let be a subset of such that there exist integers and for which the following property holds: for any ,
This means that, for any and any , the size of the set is either or . Let us write , and . It is easy to see that
We are interested in stating asymptotic results holding when goes to infinity. Through this section the ’s and the ’s will be strictly increasing functions of .
Let be the (simple and undirected) graph with vertex set in which two distinct vertices and are connected if and only there exists one index such that . The goal will be to modify the graph to obtain a subgraph satisfying some specific properties. The only modification we allow is to remove all the vertices with a given sequence at a given position: given a sequence and a position , remove all the vertices (if any) such that . We call such an operation a removal operation. The reason why only such removal operations are allowed is that they will correspond, when considering trilinear forms, to setting to zero some variables, which is one of the only operations that can be performed on trilinear forms.
While not stated explicitly in graph-theoretic terms, the key technical result by Coppersmith and Winograd is a method to convert, when , the graph into an edgeless graph that still contains a non-negligible fraction of the vertices. We state this result in the following theorem.
Suppose that . Then, for any constant , the graph can be converted, with only removal operations, into an edgeless graph with vertices.
In this section we will give several generalizations of this result. In Subsection 4.2 we state our generalizations. Then, in Subsections 4.3–4.6, we describe the algorithms and prove the results. We stress that, in this section as in , the number of removal operations (i.e., the time complexity of the algorithms) is irrelevant. This is because, in the applications of these results to matrix multiplication, the parameter will be treated as a large constant independent of the size of the matrices considered.
2 Statement of our results
The generalization we consider assume the existence of a known set such that
for each ;
there exist integers and such that
for each and each .
Note that we have necessarily .
The first problem considered is again to convert the graph into an edgeless subgraph that contains a non-negligible fraction of the vertices using only removal operations, but we additionally require that all the remaining vertices are in . Our first result is the following theorem.
For any constant , the graph can be converted, with only removal operations, into an edgeless graph with
vertices, all of them being in .
Theorem 4.1 is a special case of Theorem 4.2, for . The case has been proved implicitly by Stothers and Vassilevska Williams .
Our second problem deals with another kind of conversion. Remember that, from the definition of the graph and Fact 1, for any edge connecting two vertices and in there exists exactly one index such that . Let us define the concept of 1-clique as follows.
A 1-clique in the graph is a set for which there exists a sequence such that for all . The size of the 1-clique is .
Our second result shows how to convert, using only removal operations, the graph into a graph with vertices in that is the disjoint union of many large 1-cliques. The formal statement follows.
Suppose that . Assume that . Then, for any constant , the graph can be converted, with only removal operations, into a graph satisfying the following conditions:
all the vertices of the graph are in ;
each connected component is a 1-clique (i.e., the graph is a disjoint union of 1-cliques);
among these 1-cliques, there are 1-cliques that have size .
Note that, when only removal operations are allowed, the graph obtained is necessary a subgraph of induced be a subset of its vertices. Theorem 4.3 thus states that there exist 1-cliques such that the graph obtained after the removal operations is the subgraph of induced by , at least of these ’s have size , and for any there is no edge with one extremity in and the other extremity in . We mention that the constant in the assumption of Theorem 4.3 is chosen only for concreteness. The same theorem actually holds even for weaker conditions on and , but this simpler version will be sufficient for our purpose.
3 Choice of the weight functions
Let us introduce the notion of a compatible vertex.
A vertex is compatible if for each . Let be the set of vertices in that are compatible, and denote .
We stress that the definition of compatibility (and thus the definitions of and too) depend of the choice of and of the weights . Using the fact that is a Salem-Spencer set we can give the following simple but very useful characterization of compatible vertices.
Let and be any two distinct indexes. Then a vertex is compatible if and only if for some .
Let us take a vertex , and write , and .
Suppose that for some , where and are distinct. For instance, suppose that and . Then, since is a prime, the above property implies that , which means that is compatible. The same conclusion is true for the other choices of and .
Now suppose that is compatible. From the definition of a Spencer-Salem set, we can conclude that there exists an element such that . ∎
4 The first pruning
Similarly to , the first pruning simply eliminates all the nodes that are not compatible. Note that this can be done using removal operations: for each , we remove all the vertices such that . The vertices remaining are precisely those in . Among those remaining vertices, the vertices in are precisely those in .
We now evaluate the expectation of . The proof is very similar to what was shown in for the case , and to what was shown in for .
Let be the edge set of the subgraph of induced by : it consists of all edges connecting two distinct vertices and in such that for some . Let be the subset of edges in with (at least) one extremity in . Let be the subset of edges in connecting two vertices and such that (which means that either or ). The following lemma gives upper bounds on the expectations of and . The proof can be considered as a generalization of similar statements in .
We show that, for any index , the expected number of ordered pairs with and such that is exactly
The expectation of the number of edges (i.e., unordered pairs) is necessarily smaller.
The factor counts the number of vertices in . For any vertex , there are exactly vertices such that .
Let be a vertex in and be a vertex in such that . Take another index arbitrarily. From Lemma 4.1, both and are in if and only if
for some element . This happens with probability since the random variables , , and are mutually independent. From the linearity of the expectation, the expected number of ordered pairs is times this probability. ∎
Lemmas 4.2 and 4.3 focused on expected values and were proven, essentially, by the linearity of the expectation. This was sufficient for the applications to square matrix multiplication presented in , and this will be sufficient for proving Theorem 4.2 as well. Since, in order to prove Theorem 4.3, we will need a more precise analysis of the behavior of the random variables considered, we now prove the following lemma, which gives a lower bound on the probability that the subgraph induced by has many large -cliques.
With probability (on the choice of the weights ) at least , there exists a set satisfying the following two conditions:
for any , there exist at least vertices such that .
Let us consider the set . For each element , define the set
Note that , and for each .
Fix an element and define
This random variable represents the number of vertices from that are mapped by into . For any vertex , we have the equivalence
where the second inequality is obtained by Chebyshev’s inequality.
From the union bound we can conclude that, with probability at least , the inequality holds and simultaneously, for each element , there exist at least vertices such that and . These vertices are in by Lemma 4.1. ∎
5 The second pruning: first version and proof of Theorem 4.2
In this subsection is an arbitrary prime number such that .
The first pruning has transformed the graph into the subgraph induced by . The second pruning, similarly to , will further modify this subgraph by removing vertices in order to obtain a subgraph consisting of isolated vertices from (i.e., an edgeless graph). This is done by constructing greedily a set of isolated vertices. Initially and, at each iteration, either one remaining vertex in will be added to or several vertices in will be removed. This will be repeated until there is no remaining vertex in . Finally, all the remaining vertices not in will be removed. The detailed procedure is described in Figure 3, where represents the set of remaining vertices (initially ). Note that the procedure slightly differs from what was done in since we need to take in consideration the asymmetry of the problem.
Let denote the contents of at the end of the procedure. The following proposition, shown using the same ideas as in , shows that what we obtain is a large set of isolated vertices from .
The subgraph of induced by is an edgeless graph. Moreover, and the expectation of (over the choices of ) is
Let denote the contents of at the end of the procedure. First observe that , due to Step 3. Note that any vertex added to cannot be later removed from , since it has no neighbor. Thus , and we conclude that . This shows in particular that . Moreover, since each vertex in has no neighbor, the subgraph induced by is edgeless.
To prove the second part, we will show an upper bound on the number of vertices in removed from during the loop of Step 2. The bound will be obtained by considering the number of edges from remaining in the subgraph induced by .
Let us consider what happens during Step 2.2. Let be the vertex currently examined. Suppose that another vertex in sharing one index with is found. For example, suppose that we find another vertex with . Let be the set of vertices in eliminated by the consequent removal operation. Observe that this removal operation will eliminate at least new edges from : the edges between two vertices in , and the edge connecting and . Since , the number of vertices in removed during one execution of Step 2.2 is at most the number of edges eliminated from .
The total number of vertices from that are removed by the procedure during the loop of Step 2 is thus at most , which means that . Since , Lemmas 4.2 and 4.3 imply that the expected number of vertices in is at least
6 The second pruning: second version and proof of Theorem 4.3
In this subsection is an arbitrary prime such that .
The first version of the pruning described in Subsection 4.5 was designed to obtain an edgeless subgraph of . In this subsection we describe how to modify it to obtain a union of many large 1-cliques instead. The detailed procedure of the new pruning algorithm is described in Figure 4. The only difference is that, at Step 2.2, a vertex is not added in only if it is connected to another vertex with the same second or third index.
Let denote the contents of at the end of the procedure. By slightly modifying the arguments of the previous subsection, it is easy to see that the resulting graph has only vertices from and is a disjoint union of 1-cliques (i.e., each connected component is a 1-clique).
The subgraph of induced by is a disjoint union of 1-cliques. Moreover, and .
Let denote the contents of at the end of the procedure. Due to Step 3, we know that . Moreover, any vertex added to cannot be later removed from , since it has no neighbor with the same second or third index. Thus , and we conclude that , which shows in particular that . Furthermore, since each vertex in has no neighbor with the same second or third index, the subgraph induced by is a disjoint union of 1-cliques.
The inequality is obtained as in the proof of Proposition 4.1, but replacing the edge set by . ∎
We now give the proof of Theorem 4.3, by using Lemmas 4.3 and 4.4 to evaluate the size and the numbers of 1-cliques in the resulting graph.
Using Lemma 4.3 with the value and Markov’s bound, we conclude that
Note that the conditions and imply that
Thus the probability that a set as in Lemma 4.4 exists and the inequality simultaneously holds is positive. There then exists a choice of the weights such that this happens. Let us take such a choice.
From Proposition 4.2 we know that at most vertices in are removed by the second pruning. Then there exists a set of size such that, for any , there are at least vertices with remaining after the second pruning. This is because, otherwise, from the properties of the set stated in Lemma 4.4 it would be necessary to remove more than vertices during the second pruning. ∎
Algorithm for Rectangular Matrix Multiplication
In this section we present our algorithm, which essentially consists in the two algorithmic steps described in Subsections 5.2 and 5.4. We first start by explaining the construction we will use.
Let be nine arbitrary positive The hypothesis that each is not zero is made only for convenience (all the bounds presented in this paper are obtained using positive values for these parameters). More specifically, this hypothesis is used only when approximating quantities like using Stirling’s inequality. Without the hypothesis it would be necessary to treat the (trivial) case separately. rational numbers such that
Let us define rational numbers as follows:
Note that
It will be convenient to define six additional numbers , , , , and as , , , , and . We can then rewrite concisely the ’s and the ’s as follows.
Let be a large enough positive integer such each is an integer. We rise the construction described in Section 3 to the -th power. Observe that and
Let us introduce the following definition.
Let , , , , , , , , , , , , , , be fifteen nonnegative rational numbers. We say that a triple is of type if
for all 15 combinations of positive with .
With a slight abuse of notation, we will say that a form is of type if the triple is of type .
2 The first step
sequences of type (the approximation is done using Stirling’s formula). After the zeroing operation, all forms such that is not of type disappear (i.e., become zero).
After these three zeroing operations, the forms remaining are precisely those such that is of type , is of type , and is of type . Equivalently, the forms remaining are precisely the forms that are of type with fifteen numbers (for all fifteen combinations of positive such that ) satisfying the following four conditions:
Let be a fixed sequence of type . The number of non-zeros forms with this sequence as its first index is thus precisely
where the sum is over all the choices of fifteen parameters ’s satisfying conditions (4)–(7).
For a fixed sequence of type , the number of non-zeros forms with this sequence as its second index is
where the sum is again over all the choices of fifteen parameters ’s satisfying conditions (5)–(7). Similarly, for a fixed sequence of type , the number of non-zeros forms with this sequence as its third index is
Note that this implies that .
We will also be interested in the number of remaining forms of type . For a fixed sequence of type , the number of non-zeros forms of type with this sequence as its first index is
For a fixed sequence of type , the number of non-zeros forms of type with this sequence as its second index is
3 Approximation
In this subsection we will use the notation to represent an arbitrary set of fifteen parameters such that for each . Let denote the number of nonzero elements among these fifteen parameters. Consider the following expression:
Using Stirling’s formula, we can give the following approximations.
The first two sums are again over all the choices of fifteen parameters ’s satisfying conditions (4)–(7). Note that, for any satisfying these four conditions, , since the ’s are non-zero.
We know that and , by definition. The following proposition shows that and can actually be approximated by and , respectively.
.
Any set of values that satisfies conditions (4)–(7) is such that , and . Moreover, the other values depend only on and :
Note that there are at most choices for each and , from condition (4). There are thus at most choices for the values satisfying conditions (4)–(7).
We now show that the expression is maximized for the values . Let us take the logarithm of the expression . Since this is a concave function on a convex domain, a local optimum of is a global maximum of . The partial derivatives of are as follows.
The values satisfy since .
and similarly . ∎
4 The second step
We will now apply the results of Section 4, by associating to the set of all forms that are of type for values satisfying conditions (4)–(7), and to the set of all forms of type . Note that all the conditions of Subsection 4.1 are satisfied: we have , and values , , , , and .
holds. Then , and Equalities (8) and (9) imply that and . From Proposition 5.1 we then obtain the relation . By the above discussion and Theorem 4.2, we can obtain a direct sum of
forms, all of type . By using the trivial upper bound , we obtain the following theorem.
Let be any positive integer and , , , , , , , and be any nine positive rational numbers satisfying the following three conditions:
;
;
.
Then, for any constant , the trilinear form can be converted (i.e., degenerated in the sense of Definition 2.1) into a direct sum of
Upper Bounds on the Exponent of Rectangular Matrix Multiplication
Theorem 5.1 showed how the form can be used to obtain a direct sum of many forms such that
In order to apply Schönhage’s asymptotic sum inequality (Theorem 2.1), we need to analyze the smaller forms . All the forms except , and correspond to matrix multiplications, as described in Section 3. In Subsection 6.1 we analyze the forms , and . Then, in Subsection 6.2, we put all our results together and prove our main result.
Let us recall the definition of these three forms.
We first focus on the form . It will be convenient to write , where
The following proposition states that tensor powers of can be used to construct a direct sum of several trilinear forms, each one being a -tensor in which the support and all the components are isomorphic to a rectangular matrix product.
Let be any constant such that . Then there exists a constant depending only on such that, for any and any large enough integer , the form can be converted into a direct sum of
trilinear forms, each form being a -tensor in which:
each component is isomorphic to ;
For simplicity we suppose that is an integer (otherwise, we can work with , which gives the same asymptotic complexity).
This means that each form in this new sum (i.e., each component in the corresponding -tensor) is isomorphic to
We now analyze the support of the new sum (the decomposition considered is unchanged).
To analyze the case , we will interpret the sum in the framework developed in Section 4, by letting be the set of triples satisfying the above four conditions. Indeed, all the requirements for are satisfied: we have and
and thus . By Theorem 4.3, for any we can then convert the sum into a direct sum of
and components isomorphic to . Finally, note that
for some constant depending only on , since . ∎
In all these -tensors, each component is isomorphic to the rectangular matrix multiplication
2 Main theorem
Let us define the following three quantities.
Our main theorem gives an upper bound on that depends on these quantities.
;
;
.
Let be an arbitrary positive value. Let be a large integer and consider the trilinear form . Theorem 5.1 shows that this form can be used to obtain a direct sum of
All the terms in this form, except , and , correspond to matrix multiplications and have been analyzed in Section 3. By Proposition 6.2 the part can be used to obtain a direct sum of
This means that the trilinear form can be converted into a direct sum of matrix multiplications . In other words:
Since , as mentioned in Section 3, we know that . By Schönhage’s asymptotic sum inequality (Theorem 2.1) we then conclude that
For any the above inequality holds for large enough integers . By letting grow to infinity, and then letting decrease to zero, we conclude that ∎
Optimization
In this section we use Theorem 6.1 to derive numerical upper bounds on the exponent of rectangular matrix multiplication, and prove Theorem 1.1.
In this subsection we briefly show that our results give, for the exponent of square matrix multiplication, the same upper bound as the bound obtained by Coppersmith and Winograd .
By choosing , , , , and , we obtain the upper bound .
This upper bound on the exponent of square matrix multiplication is exactly the same value as in . This is not a coincidence. Indeed, by setting , which is larger than 0.916027 for , we obtain
which is exactly the same optimization problem as in Section 8 of .
2 Rectangular matrix multiplication
In this subsection we explain how to use Theorem 6.1 to derive an upper bound on for an arbitrary value , and show how to obtain the results stated in Table 1 and Figure 1.
The conditions that have to be satisfied are:
.
If these conditions are satisfied, by Theorem 6.1 this gives the upper bound
The above discussion reduces the problem of finding an upper bound on to solving a nonlinear optimization problem. The upper bounds presented in Table 1 are obtained precisely by solving this optimization problem using Maple. We show exact values of the parameters proving that , and in Table 2.
3 The value 𝜶\alpha
In this subsection we describe how to use Theorem 6.1 to obtain a lower bound on the value , the largest value such that the product of an matrix by an matrix can be computed with arithmetic operations for any . The analysis is more delicate than in the previous subsection, since we will need to exhibit parameters such that , with an equality rather than an inequality, and is done by finding analytically the optimal values of all but a few parameters.
Putting these values in the formula for , we obtain:
Observe that , , and . Then we obtain the following equality.
The following lemma shows that, when is small enough, the condition is satisfied.
which gives . ∎
We now explain how to determine the three remaining parameters , and . Remember that the parameters should satisfy the equalities
From our choice of parameters, the second equality can be rewritten as . Since the parameter should be positive, we obtain the condition
If , and satisfy this inequality, then the parameter is fixed:
Note that Inequality (11) forces the value to be at most .
All the values are thus determined by the choice of , , and . In particular, we obtain
We can similarly express the values of , , , and in function of these four parameters. We then want to solve the following optimization problem.
By taking the values , , and , we obtain the value . These parameters satisfy all the constraints. We obtain in particular the following numerical values.
A more precise lower bound on can be found using optimization software and high precision arithmetic. Using Maple and truncating the result of the optimization after the 25th digit, we find that for the values
Acknowledgments
The author is grateful to Virginia Vassilevska Williams and Ryan Williams for helpful correspondence about Andrew Stothers’ work, and to Virginia Vassilevska Williams for suggesting that the next step is to use higher tensor powers of the basic construction to improve rectangular matrix multiplication. He also acknowledges support from the JSPS and the MEXT, under the grant-in-aids Nos. 22800006 and 24700005.