TCSLib

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

Definition 100.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 100.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 100.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 100.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 100.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 100.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 100.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 100.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 100.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 100.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 100.11 Potential at time zero

At time \(0\), all cumulative losses are zero, so every weight equals \(1\), and the potential equals the number of experts: \(W_0 = N\).

Lemma 100.12 Positivity of weights
#

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.

Lemma 100.13 Positivity of the potential

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.

Lemma 100.14 Exponential convexity bound
#

For \(\eta \gt 0\) and \(x \in [0,1]\),

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

This follows from convexity of the exponential: \(e^{x \cdot (-\eta )} \le x\, e^{-\eta } + (1-x)\, e^{0}\).

Lemma 100.15 Cumulative loss successor step
#

The cumulative loss satisfies the recurrence

\[ L_{t+1}(i) \; =\; L_t(i) + \ell _t(i) \]

for every \(t \lt T\) and expert \(i\).

Lemma 100.16 Cumulative loss at the horizon
#

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.

Lemma 100.17 Weight successor factorization

The weight factorizes across rounds:

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

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

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

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.

Lemma 100.20 Logarithmic potential step bound

For a valid loss sequence, \(\eta \gt 0\), and \(t \lt T\),

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

which follows from \(\ln (1-x) \le -x\) applied to the potential ratio bound.

Lemma 100.21 Quadratic upper bound on \(e^{-t}\)
#

For \(t \ge 0\),

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

For \(\eta \gt 0\),

\[ 1 - e^{-\eta } \; \ge \; \eta - \frac{\eta ^2}{2}. \]

This follows directly from the quadratic bound \(e^{-\eta } \le 1 - \eta + \eta ^2/2\).

Lemma 100.23 Lower bound on potential via best expert

The final potential is at least the weight of the best expert:

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

where \(L^* = \min _i L_T(i)\) is the best expert’s cumulative loss.

Lemma 100.24 Hedge distribution is nonnegative

For any \(\eta \), loss sequence \(\ell \), time \(t\), and expert \(i\), the Hedge distribution satisfies \(p_t(i) \ge 0\).

Lemma 100.25 Expected loss at most one

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.

Lemma 100.26 Expected loss nonnegative

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

\[ R_T(\eta ) \; \le \; \frac{\ln N}{\eta } + \frac{\eta T}{2}. \]
Definition 100.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 100.29 Hedge with optimal learning rate

If \(T \ge 2\ln N\) (so that \(\eta ^* \le 1\)), then for any valid loss sequence,

\[ R_T(\eta ^*) \; \le \; \sqrt{2\, T\ln N}. \]
Theorem 100.30 Hedge is no-regret

If \(T \ge 2\ln N\), then for any valid loss sequence the average regret satisfies

\[ \frac{R_T(\eta ^*)}{T} \; \le \; \sqrt{\frac{2\ln N}{T}}, \]

which tends to \(0\) as \(T \to \infty \) with \(N\) fixed, confirming that Hedge is a no-regret algorithm.

Lemma 100.31 Hoeffding’s lemma
#

For \(p \in [0,1]\) and any \(h \in \mathbb {R}\),

\[ \ln \! \bigl((1-p) + p\, e^h\bigr) \; \le \; p\, h + \frac{h^2}{8}. \]

This specializes the Bernoulli moment-generating-function bound from bernoulli_mgf_bound by substituting \(\eta = -h\).

Lemma 100.32 Tight per-step logarithmic potential bound

For a valid loss sequence and \(\eta \gt 0\), applying Hoeffding’s lemma gives the tighter per-step bound

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

Tight Hedge Regret Bound (Cesa-Bianchi & Lugosi). For any valid loss sequence with \(N\) experts, \(T\) rounds, and \(\eta \gt 0\),

\[ R_T(\eta ) \; \le \; \frac{\ln N}{\eta } + \frac{\eta T}{8}. \]
Definition 100.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 100.35 Tight Hedge with optimal learning rate

For any valid loss sequence with \(N \gt 1\) experts, \(T \ge 1\) rounds, using \(\eta _{\mathrm{tight}} = \sqrt{8\ln N / T}\),

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