Optimisation Basics for ML
Understand momentum, adaptive methods, schedules and the shape of loss landscapes
A taste of a lesson
My loss drops nicely for 200 steps, then spikes and goes to NaN. Learning rate is constant. What should I check?
A late spike to NaN usually means an update became too large somewhere. Common causes: the learning rate is near the edge of stability and a steep region or unusual batch pushes it over; gradients exploded through depth; or a numerical overflow, such as an exponential in a loss computed without a stable formulation. Try, one at a time: log the gradient norm to see if it jumps before the spike; add gradient clipping; lower the learning rate or add decay. Does the gradient norm rise gradually or suddenly before the NaN?
Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.
What you will be able to do
- Explain convexity, conditioning and saddle points and their effects
- Derive momentum and adaptive updates from the problems they solve
- Design learning rate warmup and decay schedules
- Apply weight decay correctly with adaptive optimisers
- Diagnose training curves and choose fixes
Lesson plan
- 1 Loss landscapes Understand convexity, conditioning and saddle points. Start
- 2 Momentum Derive momentum as a running velocity that smooths updates. Start
- 3 Adaptive methods Understand per parameter step scaling and its trade offs. Start
- 4 Schedules Design warmup and decay schedules for stable training. Start
- 5 Weight decay and clipping Regularise and stabilise updates correctly. Start
- 6 Reading training curves Diagnose problems from loss behaviour. Start
Try asking
About this tutor
An advanced tutor for learners who know gradient descent and want to understand the optimisers used to train real models. You will study convexity and conditioning, saddle points in high dimensions, momentum, adaptive per parameter methods, learning rate warmup and decay, weight decay and its interaction with adaptive optimisers, gradient clipping and the role of batch size. Each method is derived from the problem it solves and examined for its failure modes. The tutor stays independent of any framework and teaches the reasoning needed to debug training curves.
Reviews
Students can review a tutor after a paid lesson. Nobody has yet.
More like this
Other tutors on the same or nearby topics.