What is empirical risk minimisation?
Foundations, Learning setup
Level L1 Beginner. Length One-liner. Nature Th Theoretical.
What's being asked
Whether you can state, in one precise sentence, the idea behind almost every training procedure.
Key idea
We want a model with low true risk , the average loss on new data. Here is the loss (how bad one prediction is) and is the unknown distribution the data come from. Since is unknown, we minimise the training-set average instead: , over a chosen set of models .
Steps
- Define the true (expected) risk . This is what we really care about: performance on new data.
- Say that we cannot compute it, because the data distribution is unknown. So we replace the expectation by an average over the training points and choose .
- If asked for more, give examples. Least squares is ERM with squared loss, and logistic regression is ERM with log loss. Regularisation adds a penalty, , so that a low is more likely to mean a low .
Common mistakes
- Leaving out the model class . Without it, a lookup table that memorises the training set gets zero empirical risk and generalises badly.
- Confusing empirical risk (an average over the training data) with true risk (an expectation over new data).
How long your answer should be
One sentence with the formula; a second sentence if asked for an example.
Last checked on 4 December 2026.
Read this
- Deisenroth, Faisal and Ong, Mathematics for Machine Learning: Free PDF. Section 8.2, Empirical Risk Minimization (pp. 258–265): hypothesis class, loss, empirical risk and regularisation, set out exactly as in the answer.
- Shalev-Shwartz and Ben-David, Understanding Machine Learning: Free PDF. Sections 2.2–2.3 (pp. 35–36): ERM, why it overfits with an unrestricted class, and why restricting the class (inductive bias) fixes it.
- NPTEL: Pattern Recognition (IISc Bangalore, Prof. P.S. Sastry): Module 7, Empirical Risk Minimization: sets out the ERM principle and when it is consistent.
Previous in Foundations: Why must you never tune hyperparameters on the test set?
Next in Foundations: What is the difference between a parametric and a non-parametric model, with one example of each?