The Hedge algorithm #
The Hedge algorithm of Freund and Schapire [FS97] with learning rate η
multiplies the weight of an expert with loss x by exp (-η x) (hedgeFactor)
[AroraHazanKale2012, §2.1, (2.6)]. For losses in [-1, 1] and 0 < η ≤ 1, its total expected
loss exceeds the total loss of every expert i by at most η ∑ t, ⟨p t, ℓ t ^ 2⟩ + ln n / η
(hedge_regret_le, [AroraHazanKale2012, Theorem 2.3]). Here the second-order term is the
learner's expected squared loss, not the expert's.
[AHK12] states Theorem 2.3 without proof, indicating only that the analysis follows
that of Theorem 2.1 with the estimate exp (-η x) ≤ 1 - η x + η ^ 2 x ^ 2 for |η x| ≤ 1. The
proof here is that argument, carried out from the potential inequality sum_log_le_log_card_add.
The factor of expert i contributes exactly -η ℓ t i to the logarithm. The expected update
factor is at most 1 - η ⟨p t, ℓ t⟩ + η ^ 2 ⟨p t, ℓ t ^ 2⟩ by
Real.exp_neg_le_one_sub_add_sq (which needs only η x ≥ -1), and log (1 + x) ≤ x. The
hypothesis is thus one-sided (hedge_regret_le_of_neg_one_le).
Since the learner's expected squared loss is at most 1 for losses in [-1, 1], the learning
rate η = √(ln n / T) gives regret at most 2 √(T ln n) once T ≥ ln n
(hedge_regret_le_sqrt), by the balancing identity sqrt_div_mul_add_div_sqrt_div.
Main definitions #
Cslib.MachineLearning.OnlineLearning.Experts.hedgeFactor: the update factorexp (-η x).
Main results #
Cslib.MachineLearning.OnlineLearning.Experts.hedge_regret_le_of_nonneg: the sharperη / 2second-order regret bound for nonnegative losses.Cslib.MachineLearning.OnlineLearning.Experts.hedge_regret_le_of_neg_one_le: the regret bound for losses withη ℓ ≥ -1.Cslib.MachineLearning.OnlineLearning.Experts.hedge_regret_le: [AroraHazanKale2012, Theorem 2.3].Cslib.MachineLearning.OnlineLearning.Experts.hedge_regret_le_sqrt: regret2 √(T ln n)with the tuned learning rate.
References #
- S. Arora, E. Hazan, S. Kale, The Multiplicative Weights Update Method: a Meta-Algorithm and Applications
- S. Bubeck, N. Cesa-Bianchi, Regret Analysis of Stochastic and Nonstochastic Multi-Armed Bandit Problems
- Y. Freund, R. E. Schapire, A decision-theoretic generalization of on-line learning and an application to boosting
The update factor exp (-η x) of the Hedge algorithm with learning rate η
[AroraHazanKale2012, (2.6)].
Regret of Hedge for nonnegative losses: for 0 < η, losses ℓ ≥ 0, and every expert i,
∑ t, ⟨p t, ℓ t⟩ ≤ ∑ t, ℓ t i + (η / 2) ∑ t, ⟨p t, ℓ t ^ 2⟩ + ln n / η. Using
exp (-x) ≤ 1 - x + x ^ 2 / 2 for x ≥ 0 (Real.exp_neg_le_one_sub_add_sq_div_two) saves a
factor of 2 on the variance term without upper-bounding η ℓ (compare the potential step of
[BubeckCesaBianchi2012, Theorem 3.1], locator not re-verified against primary PDF).
Regret of Hedge for losses with η ℓ ≥ -1: for 0 < η and every expert i,
∑ t, ⟨p t, ℓ t⟩ ≤ ∑ t, ℓ t i + η ∑ t, ⟨p t, ℓ t ^ 2⟩ + ln n / η.
Regret of Hedge [AroraHazanKale2012, Theorem 2.3]: for losses in [-1, 1] and
0 < η ≤ 1, for every expert i,
∑ t, ⟨p t, ℓ t⟩ ≤ ∑ t, ℓ t i + η ∑ t, ⟨p t, ℓ t ^ 2⟩ + ln n / η.
Tuned regret of Hedge: for n ≥ 2 experts, losses in [-1, 1] and T ≥ ln n rounds,
Hedge with learning rate η = √(ln n / T) has regret at most 2 √(T ln n) against every expert.
The condition T ≥ ln n is η ≤ 1, and the learner's expected squared loss is at most 1 in
every round.