Newton's method

The update rule in Newton's method is $$ \begin{align*} \v x_{t+1} = \v x_t - (\nabla^2 f(\v x_t))\inv \nabla f(\v x_t) \end{align*} $$

Motivation for Newton's method open_in_new

We approximate using the second-order Taylor expansion $$ \begin{align*} f(\v y) \approx f(\v x_t) + \nabla f(\v x_t)^T (\v y - \v x_t) + \frac{1}{2} (\v y - \v x_t)^T \nabla^2 f(\v x_t) (\v y - \v x_t) \end{align*} $$ and set $\v x_{t+1}$ to minimise the right hand side $$ \begin{align*} \v x_{t+1} = \arg\min_{\v y} \left[f(\v x_t) + \nabla f(\v x_t)^T (\v y - \v x_t) + \frac{1}{2} (\v y - \v x_t)^T \nabla^2 f(\v x_t) (\v y - \v x_t)\right]. \end{align*} $$ Since the second-order approximation is convex, we set the derivative to zero: $$ \begin{align*} 0 &= \nabla f(\v x_t) + \nabla^2 f(\v x_t) (\v y - \v x_t) \\ \v y &= \v x_t - (\nabla^2 f(\v x_t))\inv \nabla f(\v x_t). \end{align*} $$

For $f: \R \to \R$, this is the same as trying to find the root of $f'$ using a linear approximation: $$ \begin{align*} x_{t+1} = x_t - \frac{f'(x_t)}{f''(x_t)}. \end{align*} $$

Definition (matrix norm) open_in_new

For some $n\times n$ real matrix $A$, denote $\|A\|$ as the smallest $a\geq 0$ such that $|A\v z| \leq a|\v z|$ for all $\v z\in\R^n$.

For positive semidefinite matrix, $\|A\|$ is the largest eigenvalue.

Theorem (convergence of gradient descent using Newton's method) open_in_new

Suppose $f$ is a twice-differentiable $\alpha$-strongly convex function for $\alpha>0$, minimised at $x^\ast$.

Suppose further that the Hessian of $f$ is $l$-Lipschitz, i.e. for all $\v x,\v y\in\R^n$, $\|\nabla^2 f(\v x) - \nabla^2 f(\v y)\| \leq l|\v x - \v y|$.

Then Newton's method satisfies $$ \begin{align*} f(x_t) - f(x^\ast) \leq \frac{2\alpha^3}{l^2}\left(\frac{l}{2\alpha^2}|\nabla f(\v x_0)|\right)^{2^{t+1}} \end{align*} $$

Proof (non-examinable)

If $\v x_0$ is close to optimal ($|\nabla f(\v x_0)| < 2\alpha^2/l$), then Newton's method is guaranteed to converge faster than exponentially fast. Otherwise it may fail to converge.

You can first do normal gradient descent, and then Newton's method when it is close enough.

Barrier method open_in_new

Let $f: \R^n\to\R$ be a convex objective function and $f_i: \R^n \to \R$ be linear for $1\leq i\leq m$, i.e. $f_i(\v x) = \v a_i^T \v x - b_i$.

Problem

$$ \begin{align*} \text{Minimise } & f(\v x) \\ \text{over } & \v x\in\R^n \\ \text{subject to } & f_i(\v x) \leq 0 \quad\text{for } 1\leq i\leq m. \end{align*} $$

We convert this to an unconstrained problem

Problem

$$ \begin{align*} \text{Minimise } & f(\v x) + \sum_{i=1}^{m} \phi(f_i(\v x)) \\ \text{over } & \v x\in\R^n. \end{align*} $$

Often we pick $\phi(x) = -\log(-x)$, the logarithmic barrier function, leading to

Problem

$$ \begin{align*} \text{Minimise } & t f(\v x) + \Phi(\v x) \\ \text{over } & \v x\in\R^n \\ \text{where } &\Phi(\v x) = -\sum_{i=1}^{m} \log(-f_i(\v x)). \end{align*} $$

$t>0$ is a parameter to trade-off the relative importance of $f$ and $\Phi$.

This is a convex optimisation problem (Derivation).

Algorithm of the barrier method open_in_new
  1. Find a feasible solution $\v x$ (i.e. satisfying $f_i(\v x)\leq 0$for all $i$) and choose some $t>0$ and $\alpha>1$.

  2. Repeat until $t$ is large enough:

    1. Compute the minimiser $x^\ast(t)$ of $tf(\v x) + \Phi(\v x)$ using Newton's method with initial point $\v x$.

    2. Update $x := x^\ast(t)$ and $t:=\alpha t$.

At each $t$ update, the problem is not changed too much, so Newton's method is expected to converge quickly.