Gradient Descent in an Ill-Conditioned Valley
A narrated live film: the zigzag of gradient descent on the book's valley, which you can pause and turn in 3D.
Narration
Here is the loss surface from this chapter, f equals one half x one squared plus five halves x two squared.
Its Hessian is the diagonal matrix with entries one and five, so the condition number kappa is five.
Gradient descent starts at the point minus four, minus two and a half, and takes its first step against the gradient.
With the best step size, one third, the steep coordinate flips its sign at every step, while the flat coordinate only creeps.
Both coordinates shrink by the same factor, two thirds per step, which is kappa minus one over kappa plus one.
Pause the film and drag the surface: the valley is long along x one and steep along x two, exactly what the eigenvalues say.
More from Chapter 12
Preview1:28The Descent Lemma: A Bowl That Bounds Every StepChapter 12
Preview1:33Heavy-Ball Momentum: Zig-Zags Cancel, the Valley Floor Adds UpChapter 12
Preview1:43A Large Step Selects a Flatter MinimumChapter 12
Preview2:12Sophia: Newton Steps with a ClipChapter 12
Preview2:14Adam and AdamW: A Step Size for Every CoordinateChapter 12
Preview1:50Proximal Gradient and Soft-Thresholding: Exact ZerosChapter 12
Preview1:53KKT Conditions: the Saddle Point of the LagrangianChapter 12
Preview1:52Mirror Descent Stays Inside the SimplexChapter 12
Preview1:55The Polyak-Łojasiewicz ConditionChapter 12