What is the difference between empirical risk and true (generalization) risk?

Last updated 14 November 2026

  • True risk is expected loss over the full (unknown) data distribution. Empirical risk is average loss on a finite sample, and the difference is the generalization gap.

  • Training error is optimistically biased because the model was fit to that same data. The gap grows with model complexity and shrinks with more data.

  • Estimate true risk on held-out data or with cross-validation, without reusing the test set for tuning.

  • https://www.geeksforgeeks.org/machine-learning/empirical-risk-minimization/
  • https://medium.com/@Olagold-hackxx/empirical-risk-minimization-from-intuition-to-a-proof-that-finite-classes-dont-overfit-b4acc2eca68c
  • https://www.informit.com/articles/article.aspx?p=3222332&seqNum=4
All Supervised Learning interview questions