2.3 Second-Order Methods
Newton, Levenberg–Marquardt, and BFGS.
These notes walk through the lecture slides. The original deck is unchanged; use (slides) on the course hub if you want that PDF.
The notes follow Deisenroth, Faisal, and Ong, Mathematics for Machine Learning.
1. Newton’s method
Second-order methods replace by a local quadratic that is easy to minimize. Newton uses the second-order Taylor expansion at the current point :
where is the Hessian and . Minimize that quadratic by solving the linear system
then . On a convex quadratic, one Newton step is exact.
2. When Newton breaks
If is not positive definite, the local quadratic is not a bowl. The step can go uphill or blow up.
A cheap fix is to solve (Levenberg–Marquardt). Large looks like gradient descent. Small looks like Newton.
Analytical second derivatives are often unpleasant. Finite differences are possible and do not guarantee an SPD Hessian.
3. Quasi-Newton and BFGS
Do not form . Keep a symmetric positive-definite stand-in for , and iterate:
- Set .
- Line-search along to get .
- Update to .
BFGS (Broyden–Fletcher–Goldfarb–Shanno) is the update you should be able to name. Rank-two updates of the inverse-Hessian approximation, stays SPD, no explicit second derivatives. Often faster and more stable than raw Newton on medium-scale problems. Still heavier than SGD on a million-example net.
4. Practice
-
On a convex quadratic, why can one Newton step finish the job that steepest descent crawls?
-
What goes wrong if the Hessian is not positive definite, and what does Levenberg–Marquardt change in the linear system?
-
What does BFGS store and update instead of , and why is that cheaper than Newton when analytical second derivatives are painful?