100 Learning Theory — Hedge
100.1 Overview
This module formalizes the Hedge (Multiplicative Weights) algorithm in the expert setting with \(N\) experts and \(T\) rounds. It establishes the standard regret bound \((\ln N)/\eta + \eta T/2\) (and the tighter \((\ln N)/\eta + \eta T/8\) variant via Hoeffding’s lemma), together with the no-regret corollary that average regret vanishes as \(T \to \infty \) when \(\eta = \sqrt{2 \ln N / T}\).
100.2 Declarations
A loss sequence \(\ell \) for \(N\) experts over \(T\) rounds is a function \(\ell : \mathrm{Fin}\, T \to \mathrm{Fin}\, N \to \mathbb {R}\), i.e., at each round \(t \lt T\) the adversary reveals a loss vector \(\ell _t : \mathrm{Fin}\, N \to \mathbb {R}\) whose values are intended to lie in \([0,1]\).
A loss sequence \(\ell \) is valid if all individual losses are in \([0,1]\): \(\forall t\, i,\; 0 \le \ell _t(i) \le 1\).
The cumulative loss of expert \(i\) through the first \(t\) rounds is
where the sum ranges over all rounds \(s \in \mathrm{Fin}\, T\) with \(s \lt t\).
The unnormalized Hedge weight of expert \(i\) at time \(t\) with learning rate \(\eta \) is
Experts with smaller cumulative loss receive larger weight.
The potential (sum of unnormalized weights) at time \(t\) is
The potential telescopes to relate the learner’s cumulative loss to the best expert’s loss.
The Hedge distribution at round \(t\) is the normalization of the weight vector:
The expected loss of the learner at round \(t\) under the Hedge distribution is
The cumulative loss of the Hedge algorithm over all \(T\) rounds is
The best expert loss in hindsight is the minimum cumulative loss achieved by any single expert:
The regret of the Hedge algorithm is the excess cumulative loss over the best expert in hindsight:
At time \(0\), all cumulative losses are zero, so every weight equals \(1\), and the potential equals the number of experts: \(W_0 = N\).
For any \(\eta \), loss sequence \(\ell \), time \(t\), and expert \(i\), the weight \(w_t(i) = \exp (-\eta \cdot L_t(i))\) is strictly positive.
For any \(\eta \), loss sequence \(\ell \), and time \(t\), the potential \(W_t \gt 0\). This follows because \(W_t\) is a finite sum of positive terms over the nonempty set of \(N \ge 1\) experts.
For \(\eta \gt 0\) and \(x \in [0,1]\),
This follows from convexity of the exponential: \(e^{x \cdot (-\eta )} \le x\, e^{-\eta } + (1-x)\, e^{0}\).
The cumulative loss satisfies the recurrence
for every \(t \lt T\) and expert \(i\).
At the final horizon, \(L_T(i) = \sum _{t : \mathrm{Fin}\, T} \ell _t(i)\), i.e., the cumulative loss through \(T\) equals the full sum over all rounds.
The weight factorizes across rounds:
For any \(\eta \), valid loss sequence \(\ell \), and time \(t\), \(\sum _{i=1}^{N} p_t(i) = 1\), so the Hedge distribution is a proper probability distribution.
For a valid loss sequence and \(\eta \gt 0\), the ratio of consecutive potentials satisfies
where \(\widehat{\ell }_t = \sum _i p_t(i)\, \ell _t(i)\) is the expected loss at round \(t\). This is the key potential-ratio lemma of Cesa-Bianchi and Lugosi.
For a valid loss sequence, \(\eta \gt 0\), and \(t \lt T\),
which follows from \(\ln (1-x) \le -x\) applied to the potential ratio bound.
For \(t \ge 0\),
For \(\eta \gt 0\),
This follows directly from the quadratic bound \(e^{-\eta } \le 1 - \eta + \eta ^2/2\).
The final potential is at least the weight of the best expert:
where \(L^* = \min _i L_T(i)\) is the best expert’s cumulative loss.
For any \(\eta \), loss sequence \(\ell \), time \(t\), and expert \(i\), the Hedge distribution satisfies \(p_t(i) \ge 0\).
For a valid loss sequence, the expected loss at each round satisfies \(\widehat{\ell }_t \le 1\), since individual losses are at most \(1\) and the Hedge distribution is a probability measure.
For a valid loss sequence, the expected loss at each round satisfies \(\widehat{\ell }_t \ge 0\), since individual losses are nonnegative and the Hedge distribution is nonnegative.
Hedge Regret Bound (Cesa-Bianchi & Lugosi, Theorem 2.2). For any valid loss sequence with \(N\) experts, \(T\) rounds, and \(\eta \in (0,1]\),
The optimal learning rate balancing the two terms of the Hedge regret bound is
If \(T \ge 2\ln N\) (so that \(\eta ^* \le 1\)), then for any valid loss sequence,
If \(T \ge 2\ln N\), then for any valid loss sequence the average regret satisfies
which tends to \(0\) as \(T \to \infty \) with \(N\) fixed, confirming that Hedge is a no-regret algorithm.
For \(p \in [0,1]\) and any \(h \in \mathbb {R}\),
This specializes the Bernoulli moment-generating-function bound from bernoulli_mgf_bound by substituting \(\eta = -h\).
For a valid loss sequence and \(\eta \gt 0\), applying Hoeffding’s lemma gives the tighter per-step bound
Tight Hedge Regret Bound (Cesa-Bianchi & Lugosi). For any valid loss sequence with \(N\) experts, \(T\) rounds, and \(\eta \gt 0\),
The learning rate that optimizes the tight Hedge bound is
For any valid loss sequence with \(N \gt 1\) experts, \(T \ge 1\) rounds, using \(\eta _{\mathrm{tight}} = \sqrt{8\ln N / T}\),