Online-to-batch conversion for convex losses #
Run an online learner on an i.i.d. sample S = (z₀, …, z_{T-1}) from D. In round t it plays a
point w t S of a convex set K and then suffers the loss ℓ (w t S) (S t). Since the learner
picks w t S before seeing S t, the online loss ℓ (w t S) (S t) is an unbiased estimate of the
true risk L_D (w t S). By Jensen's inequality the average point w̄ S = (1 / T) ∑ t, w t S
then has expected true risk at most the expected average online loss; with a regret bound
∑ t, (ℓ (w t S) (S t) - ℓ u (S t)) ≤ R against u ∈ K this gives
𝔼_S L_D (w̄ S) ≤ L_D u + R / T. This is the in-expectation form of the conversion of
[CBCG04] and the argument of [ShalevShwartzBenDavid2014, Theorem 14.8]
(locator unverified).
The only property of the learner that is used is that w t S does not depend on S t
(hfresh), which holds when w t S depends only on the examples before round t. Without it the
bound fails: for the absolute loss |w - z| on ℝ, playing the current example has online loss
0, while every point has positive true risk under a nondegenerate D. The conditional step is
MeasureTheory.integral_apply_eval_eq_integral_integral: it integrates out S t under the
product measure, with no conditional expectations. Integrability comes from a single integrable
b that dominates |ℓ w z| for all w ∈ K.
The bounds are in expectation. High-probability versions (via martingale concentration), the faster rates for strongly convex losses, and running time are not treated here.
Main results #
Cslib.MachineLearning.OnlineLearning.integral_trueRisk_average_le: the expected true risk of the average point is at most the average expected online loss.Cslib.MachineLearning.OnlineLearning.integral_trueRisk_average_le_add: with a regret boundRagainstu ∈ K, the expected true risk of the average point is at mostL_D u + R / T.
References #
Online-to-batch conversion for convex losses. Let ℓ · z be convex on a convex set K
and dominated there by an integrable b, and let w t S ∈ K be measurable in the sample S and
independent of the example S t. Then the expected true risk of the average
(1 / T) ∑ t, w t S is at most the average over t of the expected online loss
ℓ (w t S) (S t).
Online-to-batch conversion for convex losses, regret form (in expectation;
[CBCG04]). Under the hypotheses of
integral_trueRisk_average_le, if the learner's regret against u ∈ K is at most R on every
sample, then the expected true risk of the average point is at most L_D u + R / T.