97 Learning Theory — Hedge
97.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}\).
97.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:
Fix \(N \ge 1\) experts, a horizon \(T\), and a loss sequence \(\ell \) over these experts and rounds, and let \(\eta \in \mathbb {R}\) be a learning rate. At time \(0\) every expert has zero cumulative loss, so each unnormalized Hedge weight equals \(1\), and the potential is
Fix a learning rate \(\eta \in \mathbb {R}\), a loss sequence \(\ell \) for \(N\) experts over \(T\) rounds, a time \(t\), and an expert \(i\). Then the unnormalized Hedge weight \(w_t(i) = \exp \! \bigl(-\eta \cdot L_t(i)\bigr)\), where \(L_t(i) = \sum _{s \lt t} \ell _s(i)\) is the cumulative loss of expert \(i\) through the first \(t\) rounds, is strictly positive.
Fix a learning rate \(\eta \in \mathbb {R}\), a loss sequence \(\ell \) for \(N \ge 1\) experts over \(T\) rounds, and a time \(t\). Then the potential at time \(t\) is strictly positive:
where \(L_t(i) = \sum _{s \lt t} \ell _s(i)\) is the cumulative loss of expert \(i\) through the first \(t\) rounds.
For every \(\eta \gt 0\) and every \(x \in [0,1]\), the value \(e^{-\eta x}\) lies below the chord joining the endpoints of the graph of \(t \mapsto e^{-\eta t}\) over \([0,1]\); that is, the inequality
holds, the right-hand side being the affine function equal to \(1\) at \(x = 0\) and to \(e^{-\eta }\) at \(x = 1\).
Let \(\ell \) be a loss sequence for \(N\) experts over \(T\) rounds, and write \(L_t(i) = \sum _{s \lt t} \ell _s(i)\) for the cumulative loss of expert \(i\) through the first \(t\) rounds. Then for every round \(t \lt T\) and every expert \(i\),
Fix \(N\) experts and a horizon \(T\), and let \(\ell \) be a loss sequence assigning to each round \(t\) and expert \(i\) a real loss \(\ell _t(i)\). For every expert \(i\), the cumulative loss through the first \(T\) rounds equals the total loss over all rounds: \(L_T(i) = \sum _{t} \ell _t(i)\), where \(t\) ranges over all \(T\) rounds.
Fix a learning rate \(\eta \in \mathbb {R}\) and a loss sequence \(\ell \) for \(N\) experts over \(T\) rounds. For every round \(t \in \mathrm{Fin}\, T\) and every expert \(i \in \mathrm{Fin}\, N\), the unnormalized Hedge weights satisfy
Fix a number of experts \(N \ge 1\), a horizon \(T\), a learning rate \(\eta \in \mathbb {R}\), a loss sequence \(\ell \) for \(N\) experts over \(T\) rounds, and a round \(t\). Then the Hedge distribution at round \(t\) sums to one over all experts,
so it is a probability distribution on the \(N\) experts.
Fix \(N \ge 1\) experts, a horizon of \(T\) rounds, a learning rate \(\eta \gt 0\), and a valid loss sequence \(\ell \). Then for every round \(t\) with \(t \lt T\), the consecutive potentials satisfy
where \(\widehat{\ell }_t = \sum _{i=1}^{N} p_t(i)\, \ell _t(i)\) is the expected loss of the learner under the Hedge distribution at round \(t\).
Fix \(N \ge 1\) experts and \(T\) rounds, a learning rate \(\eta \gt 0\), and a valid loss sequence \(\ell \), so that \(0 \le \ell _t(i) \le 1\) for every round \(t\) and expert \(i\). Writing \(W_t = \sum _{i=1}^N \exp \! \bigl(-\eta L_t(i)\bigr)\) for the Hedge potential and \(\widehat{\ell }_t = \sum _{i=1}^N p_t(i)\, \ell _t(i)\) for the expected loss under the Hedge distribution, the one-round change in log-potential is controlled by the expected loss: for each round \(t\),
For every real number \(t \ge 0\), the value \(e^{-t}\) is at most the second-order Taylor polynomial \(1 - t + t^2/2\); that is,
For every real number \(\eta \gt 0\), the quantity \(1 - e^{-\eta }\) is bounded below by its second-order Taylor expansion at the origin:
Fix \(N \ge 1\) experts and \(T\) rounds, a loss sequence \(\ell \), and a learning rate \(\eta \gt 0\). Then the final potential is at least the unnormalized Hedge weight of the best expert in hindsight:
where \(L^* = \min _{i} L_T(i)\) is the smallest cumulative loss over the full horizon \(T\).
Fix \(N \ge 1\) experts and \(T\) rounds, a learning rate \(\eta \in \mathbb {R}\), and a loss sequence \(\ell \). For every time \(t\) and every expert \(i\), the Hedge distribution is nonnegative, that is, \(p_t(i) \ge 0\).
Fix a learning rate \(\eta \in \mathbb {R}\), and let \(\ell \) be a valid loss sequence for \(N \ge 1\) experts over \(T\) rounds, so that \(0 \le \ell _t(i) \le 1\) for every round \(t\) and expert \(i\). Then at each round \(t\) the expected loss of the learner under the Hedge distribution satisfies \(\widehat{\ell }_t \le 1\).
Let \(\ell \) be a valid loss sequence for \(N \ge 1\) experts over \(T\) rounds, fix any learning rate \(\eta \in \mathbb {R}\), and let \(t\) be one of the rounds. Then the learner’s expected loss \(\widehat{\ell }_t = \sum _{i=1}^{N} p_t(i)\, \ell _t(i)\) under the Hedge distribution is nonnegative, \(\widehat{\ell }_t \ge 0\).
Fix \(N \ge 1\) experts and \(T\) rounds, and let \(\ell \) be a valid loss sequence, so that \(0 \le \ell _t(i) \le 1\) for every round \(t\) and expert \(i\). Then for any learning rate \(\eta \) with \(0 \lt \eta \le 1\), the regret of the Hedge algorithm satisfies
The optimal learning rate balancing the two terms of the Hedge regret bound is
Consider the Hedge algorithm run on \(N \gt 1\) experts over \(T \gt 0\) rounds against a valid loss sequence \(\ell \), that is, one with \(0 \le \ell _t(i) \le 1\) for every round \(t\) and expert \(i\). Suppose \(2\ln N \le T\), and run Hedge with the learning rate \(\eta ^* = \sqrt{2\ln N / T}\). Then the regret—the learner’s total expected loss minus the loss of the best single expert in hindsight—satisfies
Fix \(N \gt 1\) experts and \(T\) rounds with \(T \gt 0\), and suppose \(2\ln N \le T\). Let \(\ell \) be a valid loss sequence for \(N\) experts over \(T\) rounds, so that every individual loss satisfies \(0 \le \ell _t(i) \le 1\). Running the Hedge algorithm with the optimal learning rate \(\eta ^* = \sqrt{2\ln N / T}\), the average regret against the best expert in hindsight is bounded by
Let \(p \in [0,1]\) and let \(h \in \mathbb {R}\) be arbitrary. Then
Fix \(N \ge 1\) experts and a learning rate \(\eta \gt 0\), and let \(\ell \) be a valid loss sequence over \(T\) rounds, so that every individual loss satisfies \(0 \le \ell _t(i) \le 1\). Write \(W_t = \sum _{i=1}^{N} \exp (-\eta L_t(i))\) for the Hedge potential after \(t\) rounds, and \(\widehat{\ell }_t\) for the expected loss of the learner at round \(t\) under the Hedge distribution. Then for every round \(t\) (with \(0 \le t \lt T\)),
Fix \(N \ge 1\) experts and a horizon of \(T\) rounds, and run the Hedge algorithm with a learning rate \(\eta \gt 0\). For every valid loss sequence \(\ell \) — one whose losses satisfy \(0 \le \ell _t(i) \le 1\) for all rounds \(t\) and experts \(i\) — the regret of Hedge is bounded by
The learning rate that optimizes the tight Hedge bound is
Consider the Hedge algorithm run against a valid loss sequence for \(N \gt 1\) experts over \(T \ge 1\) rounds, so that every individual loss lies in \([0,1]\). If the learning rate is set to the tight optimal value \(\eta _{\mathrm{tight}} = \sqrt{8\ln N / T}\), then the regret against the best expert in hindsight satisfies