Generalization

Generalization is the ability of a learned model to perform well on examples that were not used to fit its parameters. It is the central claim behind most machine learning results: the model should not merely memorize the training set.

For a data distribution and loss , the population risk is:

Training only observes a finite dataset, so it minimizes empirical risk:

The generalization gap compares observed training performance with performance on unseen data:

Here is the learned predictor, are training examples, is the training-set size, and is an estimate on held-out data.

What Must Be Specified

A generalization claim should state:

  • Example unit: what counts as one prediction example.
  • Split unit: what must not cross train, validation, and test.
  • Training distribution and target evaluation distribution.
  • Model-selection rule, including validation data and checkpoint choice.
  • Primary metric and uncertainty estimate.
  • Known leakage channels and dataset-shift risks.

Without these pieces, “the model generalizes” is too vague to audit.

IID and OOD

IID generalization assumes train and test examples are drawn from the same distribution:

OOD generalization evaluates a changed distribution:

Most public benchmark results are easier to interpret when they report both in-distribution performance and the drop under OOD generalization.

Failure Modes

  • Low train and low test performance: underfitting, optimization failure, weak features, or label mismatch.
  • Low train error but high validation/test error: overfitting, leakage-free split difficulty, or distribution shift.
  • High validation performance but weak test performance: validation overuse, test-shift mismatch, or model-selection leakage.
  • High benchmark performance but weak deployment behavior: benchmark does not represent deployment.

Checks

  • Is the test set held out until the final claim?
  • Does validation select hyperparameters without seeing test labels?
  • Is preprocessing fit only on training data?
  • Does the split unit match the intended deployment claim?
  • Are repeated tuning cycles counted as part of model selection?
  • Are performance estimates reported with confidence intervals or split/seed variation?