Optimisation
Resources:
- Numerical Methods I - CS 357 @ UIUC Textbook
- EE364a: Convex Optimization I, EE364b - Convex Optimization II
- EE227BT: Convex Optimization, EE 227C (Spring 2018) Convex Optimization and Approximation
First-order Methods
Momentum: Instead of just using past gradient, create a weighted average of all the past gradients.
- , where is the momentum and is the gradient of the objective function at step t, and .
-
Why does using past gradients reach convergence faster?
- Problem with simple momentum is that it not slow down enough at the bottom of the valley.
Nesterov Momentum:
- For each step, Nesterov’s momentum uses gradient at new location instead of current location.
Second order Methods
Newton’s method: , where .
- when Hessian is convex, the descent direction is chosen as
- Can be derived using taylor approximation of around , and finding the minimum.
- BFGS
- Trust region: Do the opposite of line search, i.e. instead of determining the direction and then travelling optimally. Determine the distance first, and then solve for optimal direction.
- around parameter determine a Region , where objective function can be approximated as locally as a quadratic using taylor approximation.
- At each step, we solve: , where .
- If is taken as a ball of radius r, then adding a Lagrange multiplier to M, .
- Solve this using , i.e. can be taken such that all eigenvalues are non-negative, and convex optimization methods like Momentum can be applied.
SGD
Lagrange Multipliers: Calculus III - Lagrange Multipliers
Steepest Descent: Done using different norms: Lp norms.
derive dual norm of subject to arbitrary norm .
Dual formulation of steepest descent
- From the definition of dual norm, which implies, for any unit vector ,
- Flipping the sign and adding the extra term:
- Our goal is to find to minimise . Let , taking the gradient, we get .
- Now, from dual norm, . This becomes an equality when .
- Thus
For based norm, dual norm = standard norm and , then . This is the standard Gradient descent formula.
For based norm, dual norm = norm and , then . Note that, this is equivalent to Adam update when setting the parameters . So, direction depends only on the sign and not the magnitude.