New algorithm breaks speed limit for solving linear equations
quantamagazine.org
quantamagazine.org
for any ε > 0 and 0 < δ < 1, using poly(dimension, #nonzeros, condition, 1/ε, 1/δ) floating-point operations, our algorithm finds a solution having less than ε error with probability 1 - δ.
However, that is not the kind of guarantee stated in Theorem 1.1 in the paper. Even though the algorithm uses randomness, the analysis yields a classic big-O complexity guarantee that does not involve probabilities.This is a big difference, and it makes the result stronger.
> This algorithm is only fast with high probability
Why is this not mentioned in Theorem 1.1?
It’s not typical to analyse randomised algorithms this way for that reason.
(I assume this is common knowledge or at least should be)
This article (not the paper) definitely oversells the immediate practical applications; nobody is going to throw out their CG solver and pick this method up in practice to guarantee convergence in this manner.
Like in an adjacency matrix for a graph, you may have a lot of sparsity, but if you're forced to consider neighbors of neighbors, the adjacency matrix you need is A^2. This can be dense even if A is quite sparse.
Typo: should be one-hot encoding scheme.
Sparsity of input isn't often relatively easy to achieve, as you suggest.
Sparsity of intermediate layers requires more work. (But is often a good regularization technique.)
> Now we do.
This is the part of computer science that I love. It's a branch of philosophy about what is possible with computing machines.
Now all that's left is the matter of making this practical.
But isn't matrix multiplication one of the core basis assumptions of GPU based computing architectures, in particular for AI? That doing math in parallel (which matrices fit into like a glove) gets the fastest result?
Does this imply that a new future architecture could be, at least in theory, get the natural advantage over what we have at the moment? Because if the answer is yes or even a "possibly, too early to tell, requires more R&D", then the existing GPU manufacturers suddenly have a long term problem and we're very likely about to see a decade of a new arms race in computing architecture.
The straightforward algorithms use N^3 operations for matrix multiplication and (1/3)*N^3 operations for solving dense systems of linear equations (1 operation being a multiply-add).
For both problems, there are more complex algorithms that reduce the value of the exponent from 3 to some lower value, but above 2.
Methods that can accelerate matrix multiplication can also accelerate the solution of dense systems of linear equations (because the reduction of terms in the matrix of the coefficients of the system of equations can be done using matrix multiplications, of some sub-blocks of the complete matrix).
So the paper demonstrates, as another poster already said, that if the system of equations is sparse, then solving it can always be done faster than if it were dense.
In practice this was already usually true, so sparse systems are typically solved using a number of operations proportional with N^2, but there were cases when previous methods could fail.
I assume that their contribution is to show a foolproof method, which is guaranteed to be better.
For a real example, if the solver isn't good at yielding a solution in a practical time frame (say if I'm fitting models on large genomic dataset of tens of thousands of genes without narrowing down the set of interests), then I might be wrong to use it at all. Isn't that right? Or am I wrong as the article might suggest you could do that in the future?
In the article, they're comparing it to multiplication of square matrices, which is slower, but only slower than solving a single system of equations. If you wanted to multiply square matrices with the new linear solver, you'd have to solve n different systems of equations with shared coefficients, which would end up slower than the naive O(n^3) method, unless you can share work across instances somehow.
Isn't it linear for whatever amount of columns?
I assume they use it for solving a overdetermined linear system. E.g. least square fit. The article was not very clear.
Even if it were, as the article mentions, we don’t even know what the optimal (in terms of basic operations on numbers) algorithm for multiplying matrices is. See https://en.wikipedia.org/wiki/Strassen_algorithm for a starting point.
(“Optimal in time” is a different problem. For fixed-size matrices, as often used in computer graphics, that may be known, but even then, there’s the effect of caching, time needed to move data to and from the GPU, etc)
Also, Strassen multiplication and its improvements have a “somewhat reduced numerical stability, and the algorithm also requires significantly more memory compared to the naive algorithm” (https://en.wikipedia.org/wiki/Numerical_stability)
This algorithm may have some of the same problems.
Being random, it likely also will have varying running times. That can be bad for GPUs if they are used to generate real-time graphics.
In total, I don’t see GPU manufacturers being worried about this. They already live with the worry that somebody will discover an O(n²) matrix multiplication algorithm that’s implementable in hardware and more efficient for small n, and I don’t think they lose sleep over that.
Firstly, faster solutions in fundamental problems can eventually lead to hardware that supports it.
Secondly, this is already happening for sparse matrix multiplication: the nvidia A100 has some sparsity support, to allow making better use of pruned neutral networks, for example.
Thirdly, sparse enough systems, even without the A100, can run faster on cpu than gpu. If you find yourself with one of these problems, you can just choose the correct piece of hardware for the job. Without a sparse algorithm, you are still stuck with the slower dense solution.
Fourthly, giant sparse systems do indeed arise constantly. Just to make one up, consider weather measurements. Each row is a set of measurements from a specific weather station, but there are thousands of stations: it's a sparse set of observations, with some nearby dependencies. Evolving the state in time will often involve solving a giant linear system. (See other comments on the thread about pdes.)
It is absolutely worthwhile research, regardless of how applicable it is to fscking bitcoin.
GPGPU is often about doing few (or one) very big (10^9 x 10^9) matrix op.
You can split big matrix op into smaller ones, but with a big matrix you need to combine the results; with independent smaller matrices you don't.
> which made no sense at all
The way I made some kind of sense of it was as a variation of making your mouth water. But yeah "whet" makes a lot more sense now.
> This is the part of computer science that I love. It's a branch of philosophy about what is possible with computing machines.
Strictly speaking, if w=2 then their bound of n^{(5 w - 4)/(w + 1)} won't be better than n^w.
Since we can't rule out w=2 we still don't know for sure that solving sparse systems is strictly easier. However this is a good indication.
I think what is most fascinating when you compare it to more conventional philosophy is the fact that you can quantify your advances so easily and precise.
[1] http://www.enseignement.polytechnique.fr/profs/informatique/...
I don't know how he didn't get tenure from MIT though
Edit: my bad, looks like he was an associate prof at MIT, which means he was indeed tenured before moving to Tech!
Edit: And here’s a link to the paper discussed in the article for anyone who is curious:
It's still a very cool result though: I love how my intuition would tell me that solving matrix multiplication is surely the fastest way, and then someone comes along and explains this method and my brain goes "oh yeah, that does make sense it could be faster". That's the beauty of certain results and explanations.
Having taught math to both children and undergrads, I think it's very easy to underestimate how easy it is once you already understand it. A sentence like:
> for any ε > 0 and 0 < δ < 1, using poly(dimension, #nonzeros, condition, 1/ε, 1/δ) floating-point operations, our algorithm finds a solution having less than ε error with probability 1 - δ.
Would confuse the shit out of most people.
This video explains really beautifully what I mean: https://www.youtube.com/watch?v=M64HUIJFTZM
A few years ago I studied and partly implemented an earlier (related?) work by Peng (on graph laplacians and SDD systems: https://epubs.siam.org/doi/abs/10.1137/110845914 ) and the big-O improvements did not seem to compensate for the larger constant.
However the block Krylov algorithm itself presented in this paper has a little bit more of a chance of being implementable than fast matrix multiplication (the matrix multipliciation is only used to solve small linear systems to deal with small eigendirections in the Krylov subspace). I am still skeptical that this is a truly practical algorithm due to its complexity, but unlike the case of generic FMM there is no obvious bottleneck.
On the other hand, in recent years Dan Spielman and collaborators have been working on fast implementations of Laplacian solvers: https://github.com/danspielman/Laplacians.jl I believe a lot of the fixed constants and combinatorial routines are changed from what is theoretically provable, but from screwing around with the code in the past it seems very fast in practice.
>“It only works when your matrix is sparse enough,” said Williams.
This is still important but only for this subset of problems really.
https://youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFit...
If there are 30 feet, then there are 15 chickens. Because pigs don't have feet.
Where do I pick up my algebra prize?
Is there a field of research in using ML approaches for this type of problem?
Seems like if the algorithm is applied to a particular domain, there could be efficiencies gained from optimizing what guesses to rule out.
Not very knowledgeable about the subject though.
What about a genetic algorithm? That's the same principle of guess and check.
2. The worst-case time complexity of Simplex is exponential.
And usually simplex is considered as having polynomial complexity - close to their estimations.
That's mostly correct. You end up with a system of equalities for _a subset_ of your points, which yields a single vertex.
Ultimately with a linear program, you're trying to optimize an objective function,
max w'x s.t. Ax <= b, x >= 0 (in canonical form).
The x >= 0 constraint makes this nontrivial to translate from a linear equation Ax = b. If you magically knew the sign of each component of the solution, you'd be able to perform a simple variable substitution, but you generally don't, at least not without solving the system of equations.
(And yes, you need that constraint, or else your LP is unbounded, and your solution ends up with a negative infinity in it.)
Most variants of simplex have exponential runtime on worst case input. (But they do well in practice.)
Recently, some variants of simplex with polynomial runtime have been found.
Solving linear equations was always known to 'only' take polynomial amounts of time at most. But the question is whether that's n^3 or n^2 or something better..