What is uniform stability of a learning algorithm A, and how do you prove that a β-uniformly stable algorithm has expected generalisation gap at most β? What is an example of a stable algorithm with its β?

Learning theory, Algorithmic stability
Level L4 Advanced. Length Long. Nature Th+Mat Both.

What's being asked

Whether you can use the replace-one trick to relate training and true error.

Key idea

E[LD(A(S))−LS(A(S))]=1m∑iE[ℓ(A(S(i)),zi)−ℓ(A(S),zi)]≤β by the replace-one trick.

Steps

  1. Definition: A is β-uniformly stable if for every sample S of size m, every index i, and every replacement zi′, the sample S(i) (with zi replaced by zi′) satisfies ∣ℓ(A(S),z)−ℓ(A(S(i)),z)∣≤β for all z.
  2. Training term: ES[LS(A(S))]=1m∑iE ℓ(A(S),zi).
  3. True-error term: ES[LD(A(S))]=ES,z′ ℓ(A(S),z′). Here z′ is a fresh example. For any fixed i, swap the names of zi and z′ (they are identically distributed). Then this equals E ℓ(A(S(i)),zi).
  4. Average this over i and subtract: E[LD(A(S))−LS(A(S))]=1m∑iE[ℓ(A(S(i)),zi)−ℓ(A(S),zi)].
  5. Each term in the sum is at most β by stability, so the gap is at most β.
  6. Example: regularised ERM, that is, minimise LS(w)+λ∥w∥2 (average loss plus penalty), with a convex loss that is L-Lipschitz in w. It has β≤2L2λm. For L=1, λ=0.1, m=104 this is 0.002. Stronger regularisation gives more stability, but a larger approximation error.

Common mistakes

How long your answer should be

One page; 6 minutes.

Last checked on 4 December 2026.

Read this

Previous in Learning theory: How do you derive the regret bound for the Hedge (exponential weights) algorithm, with N experts, losses in [0,1] and learning rate η, so that RegretT≤ln⁡Nη+ηT8, and what is the best η?
Next in Learning theory: How do you state and prove the representer theorem: for a kernel k with RKHS H, every minimiser of ∑i=1mℓ(f(xi),yi)+g(∥f∥H) with g strictly increasing has the form f=∑iαik(xi,⋅)?