News for hackers. Stuff that matters.
Re:Understanding gradient descent by jordigh on Friday August 05, 2016 @11:09AM (#12232874)
I need to write something about conjugate gradients. The first thing we did in my optimisation class at CIMAT was gradient descent and showed how it was so slow compared to everything else. In practical applications, there's way too much magic in choosing the so-called "learning rate" (known as "step size" in numerical optimisation). Even choosing an optimal step size per iteration (by doing a line search), gradient descent is still slow. Conjugate gradients are a bit more difficult to understand, but they're not that hard to implement if you just blindly copy a few formulae, and they are a dramatic speedup.

All of these blog posts about gradient descent feel like everyone keeps going on about what a great algorithm bubblesort is because it's so easy to understand and implement.

Re:Understanding gradient descent by eliben on Friday August 05, 2016 @11:47AM (#12233195)
Claiming that gradient descent is a great algorithm certainly wasn't the goal of this article. But GD is the basis from which most other iterative algorithms stem, and it's worthwhile having a good understanding of its inner workings as a prerequisite for more advanced algorithms.

Personally I found http://sebastianruder.com/optimizing-gradient-descent/ interesting - it goes into the advanced variants like nesterov, adadelta, etc

Re:Understanding gradient descent by jordigh on Friday August 05, 2016 @11:55AM (#12233278)
I realise, but since a lot more gets written about steepest descent than everything else, it also gets implemented and used a lot more often, even when other alternatives are readily available and already implemented. For example, the trainscg method of Matlab is relatively obscure thus unused and not frequently re-implemented.

There's an implicit endorsement in these blog posts. People wouldn't be spilling all this ink nowadays on plain adalines, even if they're building blocks for backprop networks, right? So by writing so much about it, people get the impression that it has to be studied and implemented very carefully, to the exclusion of better methods.

Re:Understanding gradient descent by maxerize on Friday August 05, 2016 @01:00PM (#12233925)
As the above poster said, if you can introduce people to a topic by explaining a simplified or 'naive' solution/algorithm, then that could be a good springboard to learn more about the topic. Which is why there should be more comments presenting improvements and alternatives, rather than criticising what is obviously meant as a primer on optimisation. From the intro:

Gradient descent is a standard tool for optimizing complex functions iteratively within a computer program. Its goal is: given some arbitrary function, find a minima.

For some small subset of functions - those that are convex - there's just a single minima which also happens to be global. For most realistic functions, there may be many minima, so most minima are local.

Making sure the optimization finds the "best" minima and doesn't get stuck in sub-optimial minima is out of the scope of this article.

Here we'll just be dealing with the core gradient descent algorithm for finding some minima from a given starting point.

Re:Understanding gradient descent by theoh on Friday August 05, 2016 @07:25PM (#12236351)
The way the author uses the word "minima" as if it was both singular and plural is a really discouraging sign.
Re:Understanding gradient descent by dharmon on Friday August 05, 2016 @11:12AM (#12232897)
This was the "standard" text we used for new grad students to understand CG. It's not perfect but covers the ideas and algorithms pretty well:

http://www.cs.cmu.edu/%7Equake-papers/painless-conjugate-gra...

Re:Understanding gradient descent by theoh on Friday August 05, 2016 @07:27PM (#12236357)
Presumably you are aware of Jonathan Shewchuk's "An Introduction to the Conjugate Gradient Method Without the Agonizing Pain": https://www.cs.cmu.edu/~quake-papers/painless-conjugate-grad...
Re:Understanding gradient descent by nkurz on Friday August 05, 2016 @09:13PM (#12236603)
Ilya Kuzovkin did nice companion article in the form of a Python Notebook to accompany Shewchuk's classic:

"The Concept of Conjugate Gradient Descent in Python"

http://ikuz.eu/2015/04/15/the-concept-of-conjugate-gradient-...

And for those with more math and less patience for explanation, Robert Gower also offers:

"Conjugate Gradients: The short and painful explanation with oblique projections"

http://www.maths.ed.ac.uk/~s1065527/pdf/GowerR_Painful_PCG_p...