5
$\begingroup$

Can you provide some intuition as to why Newton's method is faster than gradient descent?

Often we are in a scenario where we want to minimize a function f(x) where x is a vector of parameters. To do that the main algorithms are gradient descent and Newton's method. For gradient descent we need just the gradient, and for Newton's method we also need the hessian. Each iteration of Newton's method needs to do a linear solve on the hessian:

$$x \leftarrow x - \textrm{hess}(f,x) \backslash \textrm{grad}(f,x)$$

Where \ indicates doing a linear solve (like in matlab). In many cases the hessian is sparse, and in that case we would use an iterative method like conjugate gradient descent to do the linear solve. So what we're actually doing is this:

  1. Compute a quadratic approximation of f around x.
  2. Minimize that quadratic approximation with conjugate gradient descent.
  3. Make a step in the direction of that minimum.

Compare this to normal gradient descent, where we just run (conjugate) gradient descent directly on the unapproximated original function f.

My question is: why is it faster to repeatedly do a quadratic approximation, then minimize that approximation with gradient descent, and then do a step in that direction, than to simply run gradient descent on the original function?

$\endgroup$
  • 1
    $\begingroup$ My immediate intuition: the one that requires more information carries more information and thus computational power. $\endgroup$ – zibadawa timmy Nov 9 '14 at 12:52
4
$\begingroup$

The quick answer would be, because the Newton method is an higher order method, and thus builds better approximation of your function. But that is not all.


Newton method typically exactly minimizes the second order approximation of a function $f$. That is, iteratively sets $$ x \gets x - \left[ \nabla^2 f(x) \right]^{-1} \nabla f(x). $$

Gradient has access only to first order approximation, and makes update $$ x \gets x - h \nabla f(x), $$ for some step-size $h$.


Practical difference is that Newton method assumes you have much more information available, makes much better updates, and thus converges in less iterations.

If you don't have any further information about your function, and you are able to use Newton method, just use it.

But number of iterations needed is not all you want to know. The update of Newton method scales poorly with problem size. If $x \in \mathbb{R}^d$, then to compute $ \left[ \nabla^2 f(x) \right]^{-1} $ you need $\mathcal{O}(d^3)$ operations. On the other hand, cost of update for gradient descent is linear in $d$.

In many large-scale applications, very often arising in machine learning for example, $d$ is so large (can be a billion) that you are way beyond being able to make even a single Newton update.

$\endgroup$
  • $\begingroup$ actually, in some of the situations you mention, you can't even afford O(d) so you'd go for stochastic methods $\endgroup$ – Surb Jul 28 '17 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.