Optimization for Machine Learning
Gradient methods, stochastic optimization and the training dynamics of large models.
AI-310 Year 3 3 credits 12 lessons · 5 h 50 min
Offered by HSM University · Artificial Intelligence
What you'll learn
- Analyze gradient descent using smoothness, strong convexity and the condition number, and choose step sizes and preconditioning
- Test convexity, compute smoothness and strong convexity constants from data, use subgradients and apply optimality conditions including soft thresholding
- Explain stochastic gradient noise, batch size and learning rate schedules, and apply the linear scaling rule and its limits
- Apply Newton, BFGS, L-BFGS, Gauss-Newton and Levenberg-Marquardt methods, and explain Hessian-vector products and structured curvature such as K-FAC and Shampoo
- Implement and compare momentum, Nesterov acceleration, Adam and AdamW, and manage clipping and optimizer memory
- Explain forward- and reverse-mode automatic differentiation, gradient checkpointing, mixed-precision gradients and gradient checking
- Formulate convex problems, apply duality and the KKT conditions, and solve constrained and sparse problems with projected and proximal methods
- Relate optimization to generalization through regularization, early stopping, implicit bias, step size, flat minima and sharpness-aware minimization
- Describe non-convex landscapes, curvature dynamics, initialization, precision and scaling behavior in deep network training
- Tune hyperparameters with random search, Bayesian optimization and successive halving, and set learning rates and transfer them across scale
- Solve black-box and combinatorial problems with direct search, SPSA, CMA-ES, simulated annealing and mixed-integer programming
- Plan distributed and federated training, accounting for memory, sharding, communication and large-batch effects, and diagnose a training run
Course content
12 lessons · 5 h 50 min total · final exam
- 1 Gradient descent and convergence 28 min · quiz
- 2 Convexity, subgradients and optimality 29 min · quiz
- 3 Stochastic gradient methods 29 min · quiz
- 4 Newton, quasi-Newton and second-order methods 31 min · quiz
- 5 Momentum, Adam and adaptive methods 31 min · quiz
- 6 Automatic differentiation and computing gradients 29 min · quiz
- 7 Constrained and convex optimization 31 min · quiz
- 8 Optimization and generalization 28 min · quiz
- 9 Non-convex landscapes and training dynamics 32 min · quiz
- 10 Hyperparameter optimization 28 min · quiz
- 11 Derivative-free, evolutionary and discrete optimization 27 min · quiz
- 12 Distributed optimization and a training project 27 min · quiz
- E Final exam 20 questions
Requirements
Recommended background. You can start any course at any time.
Description
Gradient methods, stochastic optimization and the training dynamics of large models.
Part of the Science stream, typically taken in year 3.