What is an optimiser?
An optimiser is the algorithm that uses gradients of the loss function during training to decide in which direction and by how much parameters are updated at each step; stochastic gradient descent, momentum methods, Adam and AdamW are common examples.
Unlike gradient descent, the principle of stepping against the slope of the loss surface, an optimiser is a concrete algorithm applying it, shaping updates with additions such as momentum, per-parameter adaptive steps or weight decay. The learning rate is its most important hyperparameter.
- Topic
- Machine learning, models and training
- Also known as
- Optimizer
How an optimiser works
- At each step, loss is computed for a batch and gradients are found by backpropagation.
- The optimiser combines the gradient with the learning rate and its own state to compute the update.
- Momentum methods keep an average of past gradients; adaptive methods also track average gradient magnitude.
- Regularisation such as weight decay joins the update; AdamW applies it separately from the gradient update.
In more detail
Memory-efficient and matrix-based optimisers
To overcome AdamW's memory overhead and improve convergence on billion-parameter models, modern pipelines adopt memory-efficient or matrix-aware optimisers such as 8-bit AdamW, Adafactor, Lion, GaLore (low-rank gradient projection) and Muon (orthogonalised momentum updates for 2D weight matrices, used in some LLM pre-training runs).
Commonly confused terms
| Term | How it differs |
|---|---|
| Learning rate schedule | A learning rate schedule adjusts the global step size across training epochs or steps (e.g. warmup followed by cosine decay), whereas the optimiser determines how gradients and past moments are transformed into per-parameter updates given that learning rate. |
| Loss function | A loss function defines the objective surface measuring how wrong the model's predictions are; the optimiser consumes the gradients of that loss function to update the model weights. |
Why an optimiser matters for on-premises AI
Optimiser choice governs training speed, stability and memory needs. The paper introducing Adam notes it is computationally efficient, needs less memory than second-order methods and its hyperparameters usually need little tuning. Another study showed L2 regularisation and weight decay differ in adaptive methods such as Adam and that decoupling weight decay markedly improves generalisation. Adam keeps two extra values per parameter, so optimiser state is a significant memory item for large models.
A telecom operator's data science team trains its churn prediction model with AdamW; it picks learning rate and weight decay with a small search and tunes the schedule by watching training loss.
Common questions
How does Adam differ from AdamW?
AdamW applies weight decay separately from the gradient update, so regularisation works as intended and generalisation often improves.
Does the optimiser affect training memory?
Yes. Methods such as Adam keep extra state per parameter, a significant memory item for large models.
Related terms
- Gradient descent
- Stochastic gradient descent
- Adam optimiser
- Adam with decoupled weight decay
- Learning rate
- Weight decay
Sources
- Kingma and Ba, Adam: A Method for Stochastic Optimization, 2014
- Loshchilov and Hutter, Decoupled Weight Decay Regularization, 2017
- Ruder, An overview of gradient descent optimization algorithms, 2016
In the glossary: Glossary, M to Q