Slashdot Mirror


Astonishing Speedup In Solving Linear SDD Systems

eldavojohn writes "A new paper (PDF) out of Carnegie Mellon University shows how to solve symmetric diagonally dominant linear systems much faster than before. The technique employs graph theory, randomized algorithms, and linear algebra to achieve an astonishing advantage over current methods to solve such systems. From the article: 'The result is a significant decrease in computer run times. The Gaussian elimination algorithm runs in time proportional to s^3, where s is the size of the SDD system as measured by the number of terms in the system, even when s is not much bigger the number of variables. The new algorithm, by comparison, has a run time of s*[log(s)]^2. That means, if s = 1 million, that the new algorithm run time would be about a billion times faster than Gaussian elimination.' Developers out there who maintain matrix packages and linear algebra tools might want to take a peak at the paper. Anyone who has modeled real-world systems will be able to tell you that speedups in linear algebra algorithms have a weighty effect on efficiency in simulations — especially as one approaches the theoretical limits of optimality. This research is currently being presented at the IEEE Symposium on Foundations of Computer Science."

30 of 157 comments (clear)

  1. May I be the first to say by Anonymous Coward · · Score: 5, Funny

    Huh?

    1. Re:May I be the first to say by Gilmoure · · Score: 2, Funny

      Tonight's the night I shall be talking about of flu the subject of word association football. This is a technique out a living much used in the practice makes perfect of psychoanalysister and brother and one that has occupied piper the majority rule of my attention squad by the right number one two three four the last five years to the memory. It is quite remarkable baker charlie how much the miller's son this so-called while you were out word association immigrants' problems influences the manner from heaven in which we sleekit cowering timrous beasties all-American Speke, the famous explorer. And the really well that is surprising partner in crime is that a lot and his wife of the lions' feeding time we may be c d e effectively quite unaware of the fact or fiction section of the Watford Public Library that we are even doing it is a far, far better thing that I do now then, now then, what's going onward christian Barnard the famous hearty part of the lettuce now praise famous mental homes for loonies like me. So on the button, my contention causing all the headaches, is that unless we take into account of Monte Cristo in our thinking George the Fifth this phenomenon the other hand we shall not be able satisFact or Fiction section of the Watford Public Library againily to understand to attention when I'm talking to you and stop laughing, about human nature, man's psychological make-up some story the wife'll believe and hence the very meaning of life itselfish bastard, I'll kick him in the Ball's Pond Road.

      --
      I drank what? -- Socrates
    2. Re:May I be the first to say by mdmkolbe · · Score: 4, Informative

      It lets us compute more precise simulations faster. This helps everything from better weather predictions, to faster simulations for industrial design, to game physics engines.

      Basically if you can solve X=A*B or Ax=b more quickly then you can run simulations faster. The paper shows a way to solve Ax=b faster provided A is diagonally dominant (it usually is). Here A, B and b are given, X and x are unknowns. Upper case is matrix. Lower case is vector.

      In theory simulations that took days (~10^15 cycles) will now take hundreds of microseconds (~10^5 cycles). In practice, we already have techniques that usually work on "most" inputs to these types of simulations. This paper presents a technique that works on "more" inputs to those systems. (But note that their runtime, n*[log(n)]^2, is expected time and not worst case time.) The potential impact is huge but the actual impact is yet to be seen.

      Disclaimer: I've published in this area before so I have some background understanding, but it's been a while and I've read only the abstract of the paper. Once I read the full paper I'll have a better idea of whether it lives up to the hype. I'm hopeful because this could be a very important result. I'm also cautious because they use an approximation algorithm (that is what the " epilon" is about) and also use expected time rather than worst case time. These factors may limit the usefulness of the algorithm.

    3. Re:May I be the first to say by sirrunsalot · · Score: 2, Interesting

      Or in limerick form, as published in a paper by Roe, LeVeque, and van Leer,

      So medium-term weather prediction
      turns out to be merely a fiction.
      It's just anyone's guess
      if you ask how to dress
      it will offer no useful restrictions.

    4. Re:May I be the first to say by Overunderrated · · Score: 3, Informative

      >"I'm also cautious because they use an approximation algorithm (that is what the " epilon" is about)"

      The iterative methods normally used for linear systems that this could possibly replace all have epsilon (error) terms as well. I do work on the applied numerical methods side, so it's going to take me a bit to parse through the graph-theory heavy stuff here, but it is potentially very exciting.

      Are there actually large-scale applications where gaussian elimination is actually used that makes this a valid comparison? It's my understanding that the roundoff error accumulated for systems of millions of unknowns in the "exact" direct gaussian method can even be worse than the far far faster methods for sparse iterative solvers.

  2. Wow? by JargonScott · · Score: 5, Funny

    Good gravy, now I understand why my non-tech wife just stares blankly at me when I'm describing my plain old IT job.

    --
    Nuke Gay Whales for Jesus.
  3. A Perfect Slashdot Article by GrifterCC · · Score: 5, Insightful

    I can tell it's truly News for Nerds because I can barely understand what it's saying and it drops causal references to advanced mathematics--the stuff I only wish I'd had the fortitude to study in college.

    I'm serious. This is exactly what I want from Slashdot.

    1. Re:A Perfect Slashdot Article by jgagnon · · Score: 2, Insightful

      I was thinking something similar. I'm a fairly smart guy and this went way over my head. I love math and the problems it can solve when used creatively. I've just never had the energy to pursue it to a level these (and other) researchers have.

      I feel myself chanting "I'm not worthy."

      --
      Remember to maintain your supply of /facepalm oil to prevent chafing.
    2. Re:A Perfect Slashdot Article by Peach+Rings · · Score: 4, Insightful

      Why do you need to go to college? Here, watch Linear Algebra and Algorithms.

      Also there is no remotely advanced math dropped in TFA, though the actual paper of course is cutting edge research.

    3. Re:A Perfect Slashdot Article by ceoyoyo · · Score: 5, Insightful

      Mathematicians like it that way.

      One of the math professors at Berkeley tells his students that math is messy - when you're working on a proof you start from one place, wander around for a while, then get to your destination.

      Then you clean everything up and present it to the world as obvious.

    4. Re:A Perfect Slashdot Article by jdgeorge · · Score: 3, Funny

      Or Khan Academy. Out of curiosity, I watched all of Khan's math topics that weren't over my head. Next, I'm on to Addition 2!

    5. Re:A Perfect Slashdot Article by ObsessiveMathsFreak · · Score: 5, Informative

      I can tell it's truly News for Nerds because I can barely understand what it's saying and it drops causal references to advanced mathematics--the stuff I only wish I'd had the fortitude to study in college.

      You more than likely did study this in college. This involves linear algebra, specifically the inversion of matrices and/or solving linear system. Ax=b, where A is an mxn matrix, and x and b are nx1 and mx1 vectors respectively. What we'd like to do is solve for x using x=A^-1 b, where A^-1 is an inverse matrix of some kind. But getting the inverse is a notoriously difficult problem.

      In fact, a large reason digital computers were invented at all was so that "large" matrices could be inverted. And by large, I mean 12x12 matrices (keep in mind this was the 1950s). Computer games, mp3 players, spreadsheets and the internet are all quite incidental byproducts of humanities quest to invert ever larger matrices, in less time. Though just about any half way sophisticated piece of software will invert a matrix at some point.

      The reason for this is as follows: When human beings want to solve any difficult problem, they approximate it with a linear model and solve the associated linear system. Hence the ability to solve linear systems quickly and accurately is of fundamental importance. This goes double in the modern world as we increasingly rely on the ability of computers to handle ever larger linear system--that is, to invert ever larger matrices.

      The biggest problem with matrices, say nxn matrices, is that the time taken for solving them by Gauss elimination goes up as 0(n^3). So while your desktop could probably invert a 1000x1000 matrix in a few seconds, it would take a year invert a million x million matrix, and would take around a million years to invert a billion x billion matrix. (Not that it could store either in memory). While Gauss elimination is a pretty poor algorithm efficiency-wise, this issues are unavoidable for general matrices.

      However, most matrices we actually want to invert in practice are "sparse" or "diagonally dominant". The first property means that most of the elements are zero. So in a billion x billion matrix, instead of storing 10^18 numbers, you'd only have to store a few billion. Diagonally dominant means that largest entries are along the diagonal. Both of these mean you can take a lot of--often hueristic--shortcuts in your inversion algorithims to cut down on time.

      These researchers claim O(s*log(s)^2) complexity for such systems. I suspect there are probably a lot of O(s^2*log(s)) system or the like anyway, but even still this is a nice improvement. I doubt it's as big a breakthrough--I suspect this is hyped anyway--but if it is an improvement you can kind of compare this to something like the Fast Fourier Transform speedup. Again, I doubt it's that large of an improvement.

      I'll finish by mentioning that this all falls under the umbrella of Linear Algebra, which is an absolutely essential skill of higher mathematics, and computational mathematics. Any geeks who prides themselves on their mathematical ability, but doesn't know their linear algebra (linear systems, the four fundamental subspaces, eigenvectors/values, rotation/transformation matrices, etc) shouldn't be holding their skills in such high regard. If you don't know your LA, or have forgotten, one of the best places to start is to watch Gilbert Strang's online lecture series provided by MIT. These lectures are indispensable to anyone working with linear systems. After this, those who need in depth analysis of matrix algorithms should turn to something like "Matrix Algorithms" by G. W. Stewart which goes into more detail and shows the more canonical algorithms. A little knowledge of linear algebra goes a long way in mathematics.

      ...Or failing all that, you could just open up MATLAB... or Octave. I recommend the educational route first though.

      --
      May the Maths Be with you!
  4. Sounds like multigrid by azaris · · Score: 4, Interesting

    Multigrid is theoretically O(s), so I don't immediately see how this is such a huge leap. Of course the actual complexity also depends on the problem and the implementation. Maybe their method.is applicaple to a wider variety of problems.

    Also, the "iterated sparsifying" sounds a lot like algebraic multigrid.

    1. Re:Sounds like multigrid by HighFlyer · · Score: 4, Interesting

      I had the same thought but I guess multigrid is limited to specific matrices while the new algorithm seems to be more generic. Not sure though, my last contact with multigrid lies 14 years ago (when algebraic multigrid was a hot topic in science).

      --

      -- Truth suffers from too much analysis.
    2. Re:Sounds like multigrid by EdZ · · Score: 2, Informative

      Maybe their method.is applicaple to a wider variety of problems.

      From TFA, that's exactly what this is.

    3. Re:Sounds like multigrid by TrekkieGod · · Score: 2, Interesting

      Multigrid is theoretically O(s), so I don't immediately see how this is such a huge leap. Of course the actual complexity also depends on the problem and the implementation. Maybe their method.is applicaple to a wider variety of problems.

      Also, the "iterated sparsifying" sounds a lot like algebraic multigrid.

      I think the wider variety of problems is exactly the major advantage. A symmetrically diagonally dominant matrix is not necessarily sparse, but it does come up a lot. I know from experience that nodal-analysis based circuit simulators will end up like that most of the time, since each matrix cell represents a node connection, and when you have a circuit element between node i and j, it's obviously also between j and i (exceptions made when modeling things like transistors, because you need to handle the gate differently). The diagonal values consist of the sum of the entire row plus whatever's connected to ground, so it's always dominant.

      That said, circuit simulators also tend to come up with sparse matrices most of the time, since you rarely have every node being connected to every other node...

      --

      Warning: Opinions known to be heavily biased.

    4. Re:Sounds like multigrid by DriedClexler · · Score: 4, Funny

      I know an O(s) algorithm for solving linear systems, but it only works on diagonal matrices ...

      --
      Information theory is life. The rest is just the KL divergence.
  5. Grain of salt by l00sr · · Score: 4, Informative

    Though the result sounds genuinely interesting, I'm not sure the comparison to Gaussian elimination is fair. The summary gives the O(s^3) asymptotic run time of Gaussian elimination for dense matrices, but there are much better alternatives for a sparse matrix, which is what the paper applies to. For example, if your matrix has the sparsity pattern of a planar graph, it has been known for 30 years that you can do Gaussian elimination in O(n^1.5). This result, however, seems to have the potential to be more widely applicable while producing a better asymptotic bound. So, sounds like great work, but not quite as amazing as the hype in the summary.

    1. Re:Grain of salt by blackcoot · · Score: 2, Informative

      not really.

      the method applies to the _general_ (i.e. dense) case of diagonally dominant (i.e. |A_i,i| > |A_i,j| for all i,j) symmetric systems that show up all the time (grammian matrices, for example), not just the sparse case.

    2. Re:Grain of salt by ObsessiveMathsFreak · · Score: 2, Interesting

      For example, if your matrix has the sparsity pattern of a planar graph, it has been known for 30 years that you can do Gaussian elimination in O(n^1.5).

      This algorithm is supposed to run in O(n log(n)^2) time, which is actually better than O(n^1.5). Not a lot better mind you, but if you make n very large and don't have a lot of overheads, you should see improvements.

      --
      May the Maths Be with you!
  6. WTF, Over? by toygeek · · Score: 4, Funny

    Who knew that when I got up to check my daily's (Incl /.) that I'd end up with scrambled brains for breakfast.

  7. Take a "peak"? by jcwren · · Score: 5, Funny

    Take a Mt. McKinley at the paper? Or a K2?

    Spell checkers are not a replacement for actually reading what you've written.

  8. 2,000 year-old problem for developers by digitaldc · · Score: 3, Funny

    "Solving these linear systems can be time consuming on even the fastest computers and is an enduring computational problem that mathematicians have sweated for 2,000 years."

    I know what you mean. I remember Pythagoras, Euclid and Aristotle writing about sweating over their laptops while trying to smooth-out their proofs and algorthims.

    --
    He who knows best knows how little he knows. - Thomas Jefferson
  9. This is exactly what I want from Slashdot, too by G3ckoG33k · · Score: 2, Insightful

    I mean the article "In Florida, a Cell Phone Network With No Need For a Spectrum License"...

    What is that?! Not news for nerds... Possibly news for techies.

  10. Why use a direct solver? by ponraul · · Score: 3, Informative

    Comparing the solver's complexity to Gaussian-Elimination isn't useful. No one in their right mind uses direct solvers on large linear systems.

    Anyway, if the system is symmetric and dominant diagonal, SOR is the standard choice in iterative solvers.

  11. Not worthy of the front page. by mcg1969 · · Score: 4, Informative

    I agree with a previous poster who said it is unfair to compare this algorithm to Gaussian Elimination. Frankly, it seems to me that the poster has taken enough numerical analysis to know that GE is O(n^3), but is not familiar with the much wider body of research into efficient methods for solving structured linear systems.

    Symmetric diagonally dominant linear systems are among the best conditioned systems you could possibly construct, which means that it is a rare case that you would ever use GE. Instead, you would use an iterative method, such as conjugate gradients or a stationary method like the Chebyshev method discussed in the paper. While it does seem that they are proposing a novel way to construct an efficient iterative method, the truth is that once you've entered the realm of iterative methods it's not likely there is going to be a single approach that works best in every instance. Even the paper's author agree that this is a "conceptually simple and possibly practical iterative solver." They rightly recognize that what works well on paper may not always prove useful in practice. So I think we should take the authors' own advice and wait for further research into this approach.

  12. Gilbert Strang is awesome. by nten · · Score: 2, Interesting

    If I had had Gilbert Strang as an instructor for linear algebra instead of who I did have, maybe I would understand what the article is talking about. Having watched those videos I repeatedly said to myself "oh thats what we were doing!" Are covariance matrices SDDs? If so could this be used to speed up principle component analysis?

    --
    refactor the law, its bloated, confusing and unmaintainable.
  13. Applications by goodmanj · · Score: 2, Insightful

    Just to give people an idea of how useful this is, here are a couple examples of real-world problems that this may help with:

    Aerodynamics simulations
    Weather and ocean models
    Electric and magnetic field models
    Earthquake and geophysics models

    It may also be useful for modeling wave processes (light, sound, etc) depending on how they're handled. As a general rule, any time you use a computer to solve problems involving electricity and magnetism or the pressures and stresses on solid or fluid materials, you're going to be encountering linear symmetric diagonally-dominant matrices.

    In many applications, approximate solutions are faster and more useful than the exact solution described here, but it's still a big deal.

  14. Really cool by frank_adrian314159 · · Score: 2, Informative

    The nice thing about this is that things like electrical circuit simulations, FEA matrices, etc. tend to be SDD. This may speed things up a bit.

    --
    That is all.
  15. Re:Simplex by TerranFury · · Score: 2, Informative

    No, this is just Ax=b, without inequality constraints.