Lecture 12: Newton's method
Overview
Newton's method improves on steepest descent by minimizing a second-order Taylor approximation at each iteration, using the gradient and Hessian to choose an update. Burton Ma explains why this can converge in one step for a quadratic yet behave erratically when the Hessian is indefinite or ill-conditioned, then covers backtracking and the Levenberg-Marquardt modification, which shifts Hessian eigenvalues to make updates safer.
Key takeaways
- Newton's update, w_(k+1) = w_k - H(w_k)^(-1)∇f(w_k), minimizes the local second-order Taylor model and can reach the exact minimum of a quadratic in one iteration.
- A Newton direction is guaranteed to be a descent direction only when the Hessian is positive definite; an indefinite Hessian can point uphill even if backtracking reduces the step size.
- Near-zero curvature can make Newton steps extremely large, while singular or ill-conditioned Hessians make the update undefined or numerically unreliable.
- On the lecture's Rosenbrock example, undamped Newton converges in five iterations despite erratic steps and an objective increase; backtracking smooths the path but cannot repair an uphill direction caused by an indefinite Hessian.
- Levenberg-Marquardt shifts Hessian eigenvalues by adding λI: small λ gives Newton-like behavior, while large λ produces a small steepest-descent-like step.
- Dense Newton iterations require O(n²) Hessian storage and an O(n³) linear-system solve, so their rapid convergence must be weighed against computational cost in high dimensions.
Chapters
- Steepest descent uses the negative gradient, but can zigzag around a minimizer; smaller steps reduce zigzagging at the cost of slower convergence.
- A first-order Taylor approximation treats the function as locally linear, while Newton's method uses a second-order approximation that includes curvature.
- The one-dimensional Taylor model is a parabola, whose minimum provides the next estimate of the function's minimizer.
- Differentiating the Taylor parabola around the current point t_k and setting the derivative to zero gives t_(k+1) = t_k - f'(t_k)/f''(t_k).
- The update is equivalent to derivative-based line search with direction -f'(t_k) and step size 1/f''(t_k).
- Unlike a fixed-step gradient method, Newton's step size changes with the local second derivative.
- If f''(t_k) is zero, the update is undefined; if it is near zero, the step can become enormous and cause divergence.
- A negative second derivative makes the local Taylor parabola concave, so its stationary point is a maximum rather than a minimum.
- Newton's method can converge unusually quickly in a bowl-shaped region, but a small change in the starting point can lead to divergence or oscillation.
- For a vector w, the second-order Taylor model uses the gradient transpose and the Hessian matrix H(w_k).
- Setting the Taylor model's gradient to zero yields the multidimensional Newton update w_(k+1) = w_k - H(w_k)^(-1)∇f(w_k), when the Hessian is invertible.
- The Newton direction is a descent direction when the Hessian is positive definite; positive definite matrices preserve the sign of the gradient's directional alignment.
- A negative definite Hessian points toward a local maximum, while an indefinite Hessian can produce either an ascent or descent direction.
- A singular Hessian cannot be inverted, and an ill-conditioned Hessian can make the computed update numerically unreliable.
- For implementation, solve H d = -∇f rather than explicitly computing H^(-1) and multiplying it by the gradient.
- For the convex quadratic f(w) = w1²/4 + w2², the second-order Taylor model is exact, so Newton's method reaches the minimum in one step from any starting point.
- On the inverted Gaussian example, Newton's method reaches the minimum in about three iterations, with some oscillation.
- On Rosenbrock's function, Newton's method takes large, erratic steps before entering the shallow valley, then converges in five iterations; one step increases the objective, unlike a guaranteed descent method.
- Armijo backtracking can reduce the Newton step when the full update is too large, producing damped or relaxed Newton's method.
- For the inverted Gaussian, damping reduces zigzagging and gives convergence in three iterations.
- On Rosenbrock's function, backtracking produces a smoother path, but cannot fix a direction that is not a descent direction when the Hessian is indefinite.
- In n dimensions, storing the Hessian requires O(n²) space, and computing its entries takes O(n²) operations.
- Solving the Hessian linear system costs O(n³) with standard dense methods, making Newton's method expensive as n grows.
- Indefinite or noninvertible Hessians motivate modifying the curvature matrix so that Newton-like updates remain usable.
- The Levenberg-Marquardt modification replaces H with H + λI, choosing λ large enough to make the modified matrix positive definite.
- Adding λI shifts every Hessian eigenvalue by λ; as λ approaches zero, the update approaches Newton's method.
- For large λ, the update approaches a small negative-gradient step, so intermediate values blend Newton's curvature information with steepest descent.
- Levenberg proposed the approach in 1944; Marquardt reformulated and popularized it in 1963, especially for nonlinear least-squares optimization.
Transcript excerpt
0:04 Okay, good morning everybody. Um, so the last lecture we uh saw the steepest descent algorithm um where the steepest uh descent direction is given by the negative of the gradient. Uh also in the last lecture we saw that the gradient or the negative of the gradient doesn't always point uh in the direction of the minimizer. So if you use the steepest descent direction u in a minimization algorithm it tends to zigzag around the search space uh until it finally homes in on the minimizer. Um if you reduce the step size you can decrease the amount of zigzagging that happens but of course you end up with slow convergence. Okay so also remember where the steepest descent algorithm came from right it basically came from the first order tailaylor series approximation of the
0:50 function. First order tailor series approximation says that around a point every function is approximately linear. Uh so in multiple dimensions you can use the gradient uh to approximate that linear uh to approximate a linear function. Sorry to use a linear approximation of the function. It's not surprising though that you can also consider a higher order tailaylor series approximation. So you can use a second order tailor series approximation and then you can approximate the function as though it were quadratic locally right and that might actually help things uh that might improve things um for your minimization algorithm might also cause problems which we'll see right and so in multivariate case if you um need the second derivative we now need the hessen matrix and uh the
1:40 algorithm that uses the hessen matrix to guide a minimization process uh is called Newton's method. Oh, wrong way. Okay, so remember way back in lecture two um we did approximate a function as a quadratic,
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Burton Ma.