Source: Lecture PDF. Page references use PDF page numbers.
Overview
- Stochastic gradient descent (SGD) trades exact gradients for cheaper, noisy updates.
- Newton’s method uses curvature to choose a step, with fast local convergence but greater cost and weaker guarantees far from a minimum.
- Quasi-Newton methods and coordinate rescaling aim to improve the geometry without computing an exact inverse Hessian each iteration.
The opening recap builds on L3 Line Search and Momentum. On p. 5, random restarts change the starting point of independent runs; momentum uses history within a run. Accumulated velocity may carry a trajectory through flat regions or shallow minima, but escape is not guaranteed. p. 6 motivates looking beyond local minima to saddle points in high-dimensional landscapes.
Why full gradients become expensive
Many training objectives average losses over examples:
Every full-gradient update requires all component gradients. When is large, this can dominate the cost. See p. 9.
Logistic regression: the label convention changes
Unlike L2’s binary labels, L4 uses :
The margin is positive when the score agrees with the label; increasing it reduces the loss. This is the same binary logistic loss after recoding . Source: loss, p. 7 and gradient, p. 8.
Stochastic and mini-batch gradient descent
At iteration , sample a uniform random index , or a random mini-batch :
For uniform sampling from the fixed dataset, conditional on the current iterate,
Thus , with zero-mean sampling noise. The equality is exact for this sampling scheme; the lecture also discusses the population intuition of independent training examples. An individual sampled direction need not decrease the full objective. Source: mini-batches, p. 12 and average-direction intuition, p. 13.
Key takeaway: the noisy path may need more iterations, but each costs much less. Randomness can help move through some difficult regions, and a chosen learning-rate schedule avoids an expensive full-objective line search at every update. Compare total computation, not iteration counts alone.
Stopping with noisy gradients
A tiny gradient from one small batch does not reliably establish stationarity. p. 15 suggests estimating the gradient using a much larger sample and considering changes in parameters or objective values:
These are diagnostics rather than interchangeable guarantees: tiny learning rates also produce tiny updates, and evaluating the full loss can be costly. Combine sustained evidence of little progress with a computational limit.
Newton’s method: root finding versus optimisation
For a scalar equation , replace by its tangent line and solve that line for its root:
Key takeaway: the tangent’s horizontal-axis intercept becomes the next iterate. To optimise , apply root finding to , giving . Solving and minimising are different tasks.
Worked example: computing
For the example introduced on p. 17, set . Then
Starting from gives and . Each step solves a local linear approximation to , without needing a symbolic square-root formula.
Newton optimisation: minimise a local quadratic model
Let and . Taylor’s approximation gives
Setting its gradient to zero yields
When , this stationary point is the quadratic model’s unique minimiser. The pure Newton step uses along . In computation, solve the linear system rather than explicitly forming the inverse.
Key takeaway: the Hessian adjusts movement for curvature in different directions. Newton minimises a local quadratic model, which need not match the true function well far from the current point. This extends L1’s Taylor approximation.
Fast convergence is local
Near a minimiser with positive definite Hessian, Newton can converge quadratically under suitable smoothness assumptions (including a locally Lipschitz Hessian) and a sufficiently close starting point:
This describes how quickly a small error shrinks; it is not a guarantee of reaching a minimum from any initial point.
Why Newton can fail
- Cost: a dense Hessian requires storage; a general dense factorisation/solve costs . See p. 24.
- Undefined step: the required second derivatives may not exist, or the Hessian may be singular.
- Wrong direction: an indefinite Hessian can produce an ascent direction.
- Poor initialisation: the local model may give unhelpful steps or cycling.
Key takeaway: the left example concerns root finding for . Starting at , Newton cycles . The right diagram shows an optimisation step following an unsuitable quadratic model. Both illustrate why fast local behaviour does not imply global convergence.
When is Newton’s direction descent?
For and ,
Positive definiteness makes the inverse positive definite too. Without it, the sign is not assured. Source: p. 26.
Qualification to the slide: a twice-differentiable local minimum need only have a positive semidefinite Hessian. Positive definiteness is an additional condition, not automatic; at is a simple counterexample.
Quasi-Newton methods and rescaling
p. 28 motivates an intermediate update:
Here approximates the inverse Hessian. The goal is a more useful direction than at lower cost than an exact Newton step. If and , then is descent. This lecture introduces the motivation; it does not yet derive a quasi-Newton update rule.
Key takeaway: elongated contours can make steepest descent zigzag. Rescaling coordinates can make the contours rounder and the optimisation easier, even though the underlying minimum is unchanged.
On p. 30, set with invertible and define . Then and .
Short derivation of the connection: the chain rule gives . A gradient step in , converted back to , becomes
So rescaling induces a matrix-scaled gradient step. Equivalent optimisation problems can have very different steepest-descent trajectories.
Important results
- Uniformly sampled component/mini-batch gradients are unbiased estimates of the full empirical gradient.
- SGD makes each update cheaper; a noisy gradient changes how we assess convergence.
- Newton root finding uses ; Newton optimisation uses or solves .
- Positive definite curvature ensures Newton’s direction is descent; quadratic convergence needs local assumptions.
- Quasi-Newton methods seek useful curvature scaling at lower cost; rescaling explains why the geometry matters.