TCSLib

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

Definition 97.1 Loss sequence
✓
#

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]\).

Definition 97.2 Valid loss sequence
✓
#

A loss sequence \(\ell \) is valid if all individual losses are in \([0,1]\): \(\forall t\, i,\; 0 \le \ell _t(i) \le 1\).

Definition 97.3 Cumulative loss
✓
#

The cumulative loss of expert \(i\) through the first \(t\) rounds is

\[ L_t(i) \; =\; \sum _{s \lt t} \ell _s(i), \]

where the sum ranges over all rounds \(s \in \mathrm{Fin}\, T\) with \(s \lt t\).

Definition 97.4 Hedge weight
✓
#

The unnormalized Hedge weight of expert \(i\) at time \(t\) with learning rate \(\eta \) is

\[ w_t(i) \; =\; \exp \! \bigl(-\eta \cdot L_t(i)\bigr). \]

Experts with smaller cumulative loss receive larger weight.

Definition 97.5 Potential
✓
#

The potential (sum of unnormalized weights) at time \(t\) is

\[ W_t \; =\; \sum _{i=1}^{N} w_t(i). \]

The potential telescopes to relate the learner’s cumulative loss to the best expert’s loss.

Definition 97.6 Hedge distribution
✓
#

The Hedge distribution at round \(t\) is the normalization of the weight vector:

\[ p_t(i) \; =\; \frac{w_t(i)}{W_t}. \]
Definition 97.7 Expected loss of Hedge
✓
#

The expected loss of the learner at round \(t\) under the Hedge distribution is

\[ \widehat{\ell }_t \; =\; \sum _{i=1}^{N} p_t(i)\, \ell _t(i). \]
Definition 97.8 Cumulative loss of Hedge
✓
#

The cumulative loss of the Hedge algorithm over all \(T\) rounds is

\[ \widehat{L}_T \; =\; \sum _{t=0}^{T-1} \widehat{\ell }_t. \]
Definition 97.9 Best expert loss
✓
#

The best expert loss in hindsight is the minimum cumulative loss achieved by any single expert:

\[ L^* \; =\; \min _{i \in [N]} L_T(i) \; =\; \inf _{i : \mathrm{Fin}\, N} \, L_T(i). \]
Definition 97.10 Regret
✓
#

The regret of the Hedge algorithm is the excess cumulative loss over the best expert in hindsight:

\[ R_T(\eta ) \; =\; \widehat{L}_T - L^*. \]
Lemma 97.11 Initial value of the potential
✓

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

\[ W_0 \; =\; \sum _{i=1}^{N} \exp \! \bigl(-\eta \cdot L_0(i)\bigr) \; =\; N . \]
Lemma 97.12 Positivity of Hedge weights
✓
#

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.

Lemma 97.13 Positivity of the Hedge potential
✓
#

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:

\[ W_t \; =\; \sum _{i=1}^{N} \exp \! \bigl(-\eta \cdot L_t(i)\bigr) \; \gt \; 0, \]

where \(L_t(i) = \sum _{s \lt t} \ell _s(i)\) is the cumulative loss of expert \(i\) through the first \(t\) rounds.

Lemma 97.14 Chord bound for the exponential on the unit interval
✓
#

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

\[ e^{-\eta x} \; \le \; 1 - \bigl(1 - e^{-\eta }\bigr)\, x \]

holds, the right-hand side being the affine function equal to \(1\) at \(x = 0\) and to \(e^{-\eta }\) at \(x = 1\).

Lemma 97.15 Cumulative loss recurrence
✓
#

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\),

\[ L_{t+1}(i) \; =\; L_t(i) + \ell _t(i). \]
Lemma 97.16 Cumulative loss at the horizon
✓
#

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.

Lemma 97.17 Recursion for the Hedge weight
✓

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

\[ w_{t+1}(i) \; =\; w_t(i)\cdot \exp \! \bigl(-\eta \, \ell _t(i)\bigr). \]
Lemma 97.18 The Hedge distribution sums to one
✓
#

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,

\[ \sum _{i=1}^{N} p_t(i) = 1, \]

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

\[ \frac{W_{t+1}}{W_t} \; \le \; 1 - \bigl(1 - e^{-\eta }\bigr)\, \widehat{\ell }_t, \]

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\).

Lemma 97.20 One-step logarithmic potential bound for Hedge
✓

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\),

\[ \ln W_{t+1} - \ln W_t \; \le \; -\bigl(1 - e^{-\eta }\bigr)\, \widehat{\ell }_t. \]
Lemma 97.21 Quadratic upper bound on \(e^{-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,

\[ e^{-t} \; \le \; 1 - t + \frac{t^2}{2}. \]
Lemma 97.22 Lower bound on \(1 - e^{-\eta }\)
✓
#

For every real number \(\eta \gt 0\), the quantity \(1 - e^{-\eta }\) is bounded below by its second-order Taylor expansion at the origin:

\[ 1 - e^{-\eta } \; \ge \; \eta - \frac{\eta ^{2}}{2}. \]
Lemma 97.23 Potential lower bound via the best expert
✓

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:

\[ W_T \; \ge \; \exp \! \bigl(-\eta \, L^*\bigr), \]

where \(L^* = \min _{i} L_T(i)\) is the smallest cumulative loss over the full horizon \(T\).

Lemma 97.24 Nonnegativity of the Hedge distribution
✓

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\).

Lemma 97.25 Hedge’s expected loss is at most one
✓

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\).

Lemma 97.26 Nonnegativity of Hedge’s expected loss
✓

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

\[ R_T(\eta ) \; \le \; \frac{\ln N}{\eta } + \frac{\eta \, T}{2}. \]
Definition 97.28 Optimal learning rate
✓
#

The optimal learning rate balancing the two terms of the Hedge regret bound is

\[ \eta ^* \; =\; \sqrt{\frac{2\ln N}{T}}. \]
Theorem 97.29 Optimal-rate regret bound for Hedge
✓

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

\[ R_T(\eta ^*) \; \le \; \sqrt{2\, T\ln N}. \]
Theorem 97.30 Hedge achieves vanishing average regret
✓

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

\[ \frac{R_T(\eta ^*)}{T} \; \le \; \sqrt{\frac{2\ln N}{T}}. \]
Lemma 97.31 Hoeffding’s lemma
✓
#

Let \(p \in [0,1]\) and let \(h \in \mathbb {R}\) be arbitrary. Then

\[ \log \! \bigl((1-p) + p\, e^{h}\bigr) \; \le \; p\, h + \frac{h^{2}}{8}. \]
Lemma 97.32 Tight per-step logarithmic potential bound for Hedge
✓

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\)),

\[ \log W_{t+1} - \log W_t \; \le \; -\eta \, \widehat{\ell }_t + \frac{\eta ^2}{8}. \]

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

\[ R_T(\eta ) \; \le \; \frac{\log N}{\eta } + \frac{\eta \, T}{8}. \]
Definition 97.34 Tight optimal learning rate
✓
#

The learning rate that optimizes the tight Hedge bound is

\[ \eta _{\mathrm{tight}} \; =\; \sqrt{\frac{8\ln N}{T}}. \]
Theorem 97.35 Optimal-rate regret bound for Hedge
✓

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

\[ R_T(\eta _{\mathrm{tight}}) \; \le \; \sqrt{\tfrac {T}{2}\, \ln N}. \]