Optimization

Optimization is the mathematics of choosing the best option from a set of alternatives, usually by finding the inputs that minimise or maximise a function; training a model is an optimisation problem.

Optimisation, spelled optimization in American English, is the branch of mathematics concerned with picking the best element from a set of possibilities according to some criterion. In its usual form an optimisation problem means minimising or maximising a function by systematically choosing input values from an allowed set. Wikipedia divides the field into discrete optimisation, where the choices are separate items such as routes or schedules, and continuous optimisation, where they can vary smoothly.

Training a machine learning model is a continuous optimisation problem. The inputs being chosen are the model's parameters, and the function being minimised is the loss. Gradient descent, the workhorse method, repeatedly adjusts the parameters in whichever direction lowers the loss. Google's machine learning glossary points out that gradient descent is much older than machine learning itself.

A key distinction is between local and global minima. A local minimum is better than everything nearby; a global minimum is better than everything. For convex problems, any local minimum is also the global one, so the best answer can be found reliably. Neural networks are not convex, so training settles on a good solution rather than a provably best one, which works well enough in practice.

The field has a long history. Wikipedia credits Fermat and Lagrange with calculus-based formulas for finding optima, and Newton and Gauss with step-by-step methods for moving towards one. Leonid Kantorovich developed much of the theory of linear programming in 1939, and George Dantzig published the simplex algorithm in 1947. The programming in linear programming has nothing to do with software: it comes from the US military's use of the word for training and logistics schedules, the problems Dantzig was working on.

Beyond training models, optimisation runs through the businesses AI serves: delivery routes, airline schedules, power grids and investment portfolios. In AI news the word is also used loosely, as in a model optimised for speed or a chip optimised for inference, which usually just means tuned for that purpose.

Common questions

What is optimization in machine learning?

It is the process of finding the model parameters that make the loss as small as possible. Training a neural network is an optimisation problem solved step by step, usually with a version of gradient descent. The optimiser is the piece of software that carries out each step.

What is the difference between a local and a global minimum?

A local minimum is a point lower than everything around it; a global minimum is the lowest point of all. Methods such as gradient descent can settle in a local minimum. For convex problems that is not a concern, but neural network training is non-convex, so it finds good solutions rather than guaranteed best ones.

Why is it called linear programming?

The term comes from George Dantzig's work for the US military, which used programme to mean a proposed schedule for training or logistics. It predates and has nothing to do with computer programming. Dantzig published the simplex algorithm for solving such problems in 1947.

Is it spelled optimization or optimisation?

Both are correct. Optimization is the American spelling and the one used in most technical literature and software names; optimisation is the common British spelling. They mean the same thing.

Finding more

Search for "mathematical optimization", "convex optimization" or "optimization in deep learning" to explore the field. Reliable sources include university course notes and textbooks on optimisation, Google's Machine Learning Glossary and encyclopedia articles that cite the literature. When a product is described as optimised, look for what exactly was measured and improved, since the word is often used without a specific criterion.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.