News for hackers. Stuff that matters.
Re:Understanding gradient descent by pmarreck on Friday August 05, 2016 @10:38AM (#12232637)
If only there was a faster known way to get the inverse of a matrix... Gradient descent seems like an ugly hack compared to that (having taken an ML class)

It reminds me of taking the derivative by manually measuring the slope between 2 points on the curve, instead of, you know, directly getting the derivative

Re:Understanding gradient descent by plg on Friday August 05, 2016 @11:34AM (#12233080)
Re:Understanding gradient descent by Sherlock on Friday August 05, 2016 @12:07PM (#12233394)
This is the clearest signal to tell apart people who have studied applied math and people that haven't.
Re:Understanding gradient descent by xaedes on Friday August 05, 2016 @11:11AM (#12232885)
Taking the inverse of a matrix only solves problems which can be described in a specific way. There are situations where you want to optimize an arbitrary function. Also taking the inverse of a matrix isn't always easy. For example for very large matrices. The are also problems where the optimal solution changes over time (e.g. trajectory following control). This gives a good guess for the solution at each timestep(t>0) and improving that with gradient descent can be more performant than completely solving for a matrix inverse each time.
Re:Understanding gradient descent by pmarreck on Friday August 05, 2016 @11:48AM (#12233211)
> Also taking the inverse of a matrix isn't always easy. For example for very large matrices.

Yeah, I know. I am saying that I think there is probably an undiscovered solution to doing faster inverse matrices, based on occam's razor (which I'm taking to mean that "complex and ugly" suggests there is probably undiscovered "simpler and more elegant"... which I've seen over and over again in other areas... gradient descent being the "complex and ugly" here)

> This gives a good guess for the solution at each timestep(t>0) and improving that with gradient descent can be more performant than completely solving for a matrix inverse each time.

That's a good point, but perhaps the hypothetical matrix inversion I'm assuming exists also allows you to do computationally efficient differential inversions based on small changes to the matrix.

I admit this was just a "gut feeling," but when I first learned about gradient descent vs. matrix inversion I had a very strong gut feeling that there was a better way out there.

My career is programming (where I have followed this "gut feeling" many times, usually to success) and I did papers on matrices and determinants in high school, this may be informing my "gut".

Not sure if any mathy people are reading this, but I think there's gold to be had here, if you look hard enough

Re:Understanding gradient descent by RBerenguel on Friday August 05, 2016 @12:46PM (#12233766)
Golub/van Loan (Matrix Computations) is a thick book talking only on methods to work with matrices, old... And not "much" has changed in the basics. If there is gold to be had there, is damn deep, and won't be an easy algorithm at all
Re:Understanding gradient descent by maxerize on Friday August 05, 2016 @12:47PM (#12233780)
Gradient descent is neither complex nor ugly, it's the most immediate and straightforward way of searching for extrema. Iterative methods in general might be your only shot if the problem is not linear and linearisation is not an option. From a practical point of view, iterative methods in general allow you to terminate on your own terms, whereas many direct methods don't have a useful representation at hand to return prematurely.
Re:Understanding gradient descent by math_and_stuff on Friday August 05, 2016 @12:48PM (#12233797)
Many, many, very smart people have worked on exactly this problem and the result is a large, somewhat disjoint, family of techniques for forming/applying approximate inverses in subquadratic time for delicate families of matrices (e.g., discretizations of elliptic partial differential equations).

Keep in mind that many linear systems can be solved in near linear time despite the inverse being dense.

Re:Understanding gradient descent by pmarreck on Friday August 05, 2016 @09:30PM (#12236641)
> Many, many, very smart people have worked on exactly this problem

If I applied this logic to anything genuinely new that was ever discovered, then nothing genuinely new would ever be discovered. I don't know what the fallacy there is, but it must be one.

Modern example: Many, many, MANY people worked on globally disparate data synchronization (consensus) problems (Raft, Paxos were some solutions), while ensuring their security, and then Bitcoin came along. Bitcoin hasn't been hacked (although its exchanges have).

I'm just saying my gut says there's more to discover there.

Re:Understanding gradient descent by GFK_of_xmaspast on Friday August 05, 2016 @08:12PM (#12236467)
I think your gut feeling needs some serious recalibration. Please consider "the Hilbert matrix" (http://blogs.mathworks.com/cleve/2013/02/02/hilbert-matrices...) and more generally condition numbers (https://en.wikipedia.org/wiki/Condition_number), and in regards to "computationally efficient differential inversions based on small changes to the matrix", consider what happens to a polynomial's roots when you make small changes in the coefficients.
Re:Understanding gradient descent by jofer on Friday August 05, 2016 @11:05AM (#12232851)
Gradient descent is for non-linear problems where you can't directly invert or somehow linearize the problem.
Re:Understanding gradient descent by pmarreck on Friday August 05, 2016 @11:47AM (#12233197)
Often you can directly invert, but with current methods it would just be prohibitively expensive computationally.

What I'm trying to say is that occam's razor seems to suggest that there is a better way to do matrix inversions which we simply haven't discovered yet.

Re:Understanding gradient descent by dragonwriter on Friday August 05, 2016 @11:59AM (#12233308)
> What I'm trying to say is that occam's razor seems to suggest that there is a better way to do matrix inversions which we simply haven't discovered yet.

Occam's razor doesn't suggest that. Such a method is an additional assumed entity that adds nothing to our ability to explain what is observed, and is thus the kind of thing Occam's razor calls one to reject, rather than suggests.

Now, belief in the existence of such a method might be a means of satisfying an aesthetic preference for a computationally convenient universe, but that's something very different than Occam's razor.

Re:Understanding gradient descent by pmarreck on Friday August 05, 2016 @02:13PM (#12234582)
Fair enough, you got at what I was getting at in your last paragraph
Re:Understanding gradient descent by thatsadude on Friday August 05, 2016 @11:37AM (#12233109)
Check out Nesterov's Accelerate gradient. Its convergence rate is O(1/t^2).
Re:Understanding gradient descent by pmarreck on Friday August 05, 2016 @02:16PM (#12234611)