TCSLib

102 Learning Theory — Episode

102.1 Overview

This module develops the adaptive-episode framework for the Hedge algorithm. It introduces the notions of a loss history, learner policy, and adaptive adversary, then constructs the canonical generated episode by running the learner/adversary interaction recursively, and shows that Hedge’s tight regret bound carries over to every such adaptive episode.

102.2 Declarations

Definition 102.1 Loss history
#

\(\texttt{LossHistory}\ N\ t\) is the type of length-\(t\) histories of loss vectors for \(N\) experts: it is the function type \(\mathrm{Fin}\, t \to \mathrm{Fin}\, N \to \mathbb {R}\), recording all loss vectors that have been revealed in the past \(t\) rounds.

Definition 102.2 History to loss sequence
#

Given a history \(h : \texttt{LossHistory}\ N\ t\), \(\text{\texttt{LossHistory.toLossSeq}}\ h\) coerces it to a \(\texttt{LossSeq}\ N\ t\), enabling the reuse of definitions and theorems from the pathwise Hedge formalization that are stated over finite loss sequences.

Definition 102.3 Learner policy
#

A \(\texttt{LearnerPolicy}\ N\) is a deterministic online strategy for a learner interacting with \(N\) experts: it provides a weight function \(\mathrm{weights} : (t : \mathbb {N}) \to \texttt{LossHistory}\ N\ t \to \mathrm{Fin}\, N \to \mathbb {R}\) together with proofs that the weights are nonnegative and sum to one, so that the weight vector at each round forms a valid mixed strategy.

Definition 102.4 Adaptive adversary
#

An \(\texttt{AdaptiveAdversary}\ N\) is an online strategy for the adversary: it provides a loss-selection function \(\mathrm{loss} : (t : \mathbb {N}) \to \texttt{LossHistory}\ N\ t \to (\mathrm{Fin}\, N \to \mathbb {R}) \to \mathrm{Fin}\, N \to \mathbb {R}\) that maps the current round index, the past loss history, and the learner’s current mixed strategy to a loss vector, subject to the validity condition that every coordinate of the chosen loss vector lies in \([0, 1]\).

Definition 102.5 Hedge learner policy

\(\texttt{hedgePolicy}\ N\ \eta \) is the \(\texttt{LearnerPolicy}\) that implements the Hedge algorithm with learning rate \(\eta \gt 0\): at each round \(t\) and for each loss history \(h\), the weights are given by \(\texttt{hedgeDist}\ \eta \ (\text{\texttt{LossHistory.toLossSeq}}\ h)\ t\), the exponential-weights distribution derived from the past realized losses.

Definition 102.6 Episode loss at natural time
#

\(\texttt{episodeLossNat}\ \mathrm{learner}\ \mathrm{adversary}\ t : \mathrm{Fin}\, N \to \mathbb {R}\) is the loss vector produced at round \(t\) when the learner and adversary interact adaptively: the adversary sees the prefix of losses from rounds \(0, \ldots , t-1\) and the learner’s mixed strategy for round \(t\), then returns the loss vector for round \(t\). The definition is well-founded because the recursion only refers to strictly earlier rounds.

Definition 102.7 Episode loss sequence

\(\texttt{episodeLossSeq}\ T\ \mathrm{learner}\ \mathrm{adversary} : \texttt{LossSeq}\ N\ T\) is the finite loss sequence realized over \(T\) rounds by running the learner against the adaptive adversary, obtained by restricting \(\texttt{episodeLossNat}\) to the first \(T\) rounds.

Definition 102.8 Episode

An \(\texttt{Episode}\ N\ T\) packages a learner policy, an adaptive adversary, and a finite loss sequence of length \(T\) for \(N\) experts, together with a consistency proof that the stored loss sequence equals the one generated by running \(\texttt{episodeLossSeq}\ T\ \mathrm{learner}\ \mathrm{adversary}\).

Definition 102.9 Generated episode

\(\texttt{Episode.generated}\ \mathrm{learner}\ \mathrm{adversary}\) is the canonical \(\texttt{Episode}\ N\ T\) constructed by taking the loss sequence to be exactly \(\texttt{episodeLossSeq}\ T\ \mathrm{learner}\ \mathrm{adversary}\); the consistency condition is satisfied by reflexivity.

Theorem 102.10 Validity of generated episode loss sequence

For any learner policy and adaptive adversary, the generated loss sequence \(\texttt{episodeLossSeq}\ T\ \mathrm{learner}\ \mathrm{adversary}\) is valid, meaning every entry lies in \([0, 1]\). Validity is inherited directly from the adversary’s range condition.

Theorem 102.11 Episode losses are valid

For any \(\texttt{Episode}\ N\ T\), the stored loss sequence \(\mathrm{episode.losses}\) is valid, i.e., every loss coordinate lies in \([0, 1]\).

Theorem 102.12 Hedge regret bound for adaptive episodes

For any \(N, T \ge 1\), learning rate \(\eta \gt 0\), and adaptive adversary, the regret of the Hedge policy with rate \(\eta \) on the generated episode satisfies

\[ \mathrm{regret}(\eta ,\; \texttt{episodeLossSeq}\ T\ (\texttt{hedgePolicy}\ N\ \eta )\ \mathrm{adversary}) \; \le \; \frac{\ln N}{\eta } + \frac{\eta T}{8}. \]
Theorem 102.13 Hedge regret bound from a packaged episode

Let \(\mathrm{episode}\) be an \(\texttt{Episode}\ N\ T\) whose learner equals \(\texttt{hedgePolicy}\ N\ \eta \) for some \(\eta \gt 0\). Then

\[ \mathrm{regret}(\eta ,\; \mathrm{episode.losses}) \; \le \; \frac{\ln N}{\eta } + \frac{\eta T}{8}. \]