Unknown-horizon doubling trick for online experts algorithms #
This module formalizes the generic "guess and double" (doubling trick) reduction converting any
family of horizon-indexed online experts algorithms H m with O(√m) external regret into a
single horizon-free causal online algorithm doublingPlay H achieving O(√T) external regret for
every horizon T : ℕ simultaneously ([BlumMansour2007AGT, §4.3.2 note after Theorem 4.5, p. 85,
and §4.3.3 footnote 1, p. 87]).
Construction #
Rounds t : ℕ are partitioned into geometric epochs k = 0, 1, 2, … of length 2 ^ k, where
epoch k covers [2 ^ k - 1, 2 ^ (k + 1) - 1). Thus round t lies in epoch
k = Nat.log 2 (t + 1) at in-epoch offset t - (2 ^ k - 1) < 2 ^ k, and doublingPlay H runs a
fresh instance of H (2 ^ k) on the shifted epoch losses s ↦ ℓ (2 ^ k - 1 + s).
- Causality (
isOnlineAlgorithm_doublingPlay): if everyH mis a causal online algorithm (IsOnlineAlgorithm), thendoublingPlay His a single horizon-freeIsOnlineAlgorithm. - Generic
√Tblack-box regret bound (doublingPlay_regret_le_sqrt): if eachH mincurs external regret at mostC * √mon[0, 1]losses (C ≥ 0), zero-padding the final partial epochK = Nat.log 2 Tand summing the geometric series∑ k ≤ K, √(2 ^ k) ≤ (2 + √2) * √(2 ^ K)gives external regret at most(2 + √2) * C * √Tfor everyT : ℕ. - Horizon-free Polynomial Weights (
doublingMW,isOnlineAlgorithm_doublingMW,doublingMW_regret_le_sqrt): instantiatingdoublingPlaywith capped Polynomial Weights (mw_regret_le_sqrt_of_mem_Icc) yields a single horizon-free algorithm with external regret at most(4 + 2 * √2) * √(T * ln N)for everyT : ℕon[0, 1]losses.
Main definitions #
Cslib.MachineLearning.OnlineLearning.Experts.doublingPlay: generic geometric-epoch doubling wrapper for a familyH : ℕ → (ℕ → ι → ℝ) → ℕ → ι → ℝof horizon-indexed learners.Cslib.MachineLearning.OnlineLearning.Experts.doublingMW: horizon-free Polynomial Weights (doublingPlayinstantiated with cappedmwFactor).
Main results #
Cslib.MachineLearning.OnlineLearning.Experts.isOnlineAlgorithm_doublingPlay: causality ofdoublingPlay H.Cslib.MachineLearning.OnlineLearning.Experts.doublingPlay_regret_le_sqrt: black-box(2 + √2) * C * √Thorizon-free regret bound ([BlumMansour2007AGT, §4.3.2 note, p. 85, and §4.3.3 footnote 1, p. 87]).Cslib.MachineLearning.OnlineLearning.Experts.isOnlineAlgorithm_doublingMW,Cslib.MachineLearning.OnlineLearning.Experts.doublingMW_regret_le_sqrt: horizon-free Polynomial Weights achieving(4 + 2 * √2) * √(T * ln N)for allT : ℕ.
References #
Generic geometric-epoch doubling wrapper #
Doubling-trick wrapper [BlumMansour2007AGT, §4.3.2 note, p. 85, and §4.3.3 footnote 1,
p. 87]: partitions rounds into geometric epochs k = 0, 1, 2, … of length 2 ^ k covering
[2 ^ k - 1, 2 ^ (k + 1) - 1), running a fresh instance of H (2 ^ k) in epoch k.
If every horizon-indexed learner H m is a causal online algorithm, then doublingPlay H is
a single horizon-free causal online algorithm.
Generic horizon-free √T doubling-trick regret bound
[BlumMansour2007AGT, §4.3.2 note, p. 85, and §4.3.3 footnote 1, p. 87]: if every horizon-indexed
causal online algorithm H m achieves external regret at most C * √m (0 ≤ C) on [0, 1]
losses, then the single horizon-free algorithm doublingPlay H achieves external regret at most
(2 + √2) * C * √T for every horizon T : ℕ.
Horizon-free Polynomial Weights (doublingMW) #
Horizon-free Polynomial Weights (doublingPlay instantiated with capped mwFactor),
achieving O(√(T ln N)) external regret for every horizon T without knowing T in advance
[BlumMansour2007AGT, §4.3.2 note, p. 85, and §4.3.3 footnote 1, p. 87].
doublingMW is a causal horizon-free online experts algorithm.
Horizon-free external regret bound for doublingMW: for every horizon T : ℕ, every
[0, 1]-valued loss sequence ℓ, and every expert i,
∑ t < T, ⟨p t, ℓ t⟩ ≤ ∑ t < T, ℓ t i + (4 + 2 * √2) * √(T * ln N).