Tutorials › Statistical Learning (Graduate) › Sequential Prediction Protocols and Filtrations

Online Regret and Batch Conversion · Tutorial 371 of 989

Sequential Prediction Protocols and Filtrations

Learn to formalize what a sequential learner knows before each prediction and how deterministic and randomized decisions fit into that information structure.

Advanced 10 min read

What You'll Learn

  • Specify the order of prediction, outcome generation, and feedback in an online protocol
  • Define public history and decision filtrations for sequential observations
  • State precisely when a deterministic decision is predictable
  • Describe randomized strategies by conditional action distributions and private randomization
  • Distinguish outcomes chosen before a prediction from outcomes that respond to the action
  • Calculate conditional expected loss under both timing conventions

Why Timing and Information Matter

A sequential prediction problem is not described only by the actions available to a learner and the losses eventually recorded. It also matters when each quantity becomes known. A prediction based on yesterday’s feedback is different from one that uses today’s outcome, even if both produce the same numerical action in a particular data set. Filtrations provide a precise language for this information boundary.

We use rounds \(t=1,\ldots,T\). On each round the learner first chooses an action, then an outcome or loss is generated, and then the learner receives feedback. The feedback may be the outcome itself, the learner’s loss, or additional information such as the losses of all available actions. These distinctions determine which decisions are admissible and how randomized actions should be analyzed.

Protocol and Filtrations

Definition: Let \(A\) be the action space. Before round \(t\), let \(H_t\) denote the public history available to the learner, including any initial information and the feedback from rounds \(1,\ldots,t-1\). After the learner chooses \(A_t\), an outcome \(Y_t\) and feedback \(Z_t\) are generated and revealed according to the protocol. The next history \(H_{t+1}\) contains \(H_t\), the action and the feedback revealed on round \(t\). The learner’s loss is \(L_t\), often of the form \(\ell(A_t,Y_t)\).

The information sets \(\mathcal H_t=\sigma(H_t)\) form a filtration: \(\mathcal H_t\subseteq\mathcal H_{t+1}\). A filtration is an increasing sequence of sigma-fields, each representing information available at a specified time. In this convention \(\mathcal H_t\) is the public information before prediction \(t\); the feedback from round \(t\) enters \(\mathcal H_{t+1}\). This indexing makes it explicit that the learner cannot use feedback that has not arrived yet.

The protocol must also say what the environment can use. In an outcome-first or non-anticipating protocol, the outcome or loss information for round \(t\) is fixed before the current action is drawn, though it may depend on the past. In an action-responsive protocol, the environment may choose \(Y_t\) after observing \(A_t\). The latter is common when a learner’s action affects what happens next. Neither convention is implied by the word “online”; it must be specified.

Definition: A deterministic strategy is predictable with respect to the public history if \(A_t\) is \(\mathcal H_t\)-measurable for every \(t\). Equivalently, the action is a function of the information available before that round’s outcome and feedback. In a filtration indexed after each round, this is the usual condition that the decision on round \(t\) is measurable with respect to the preceding information field.

For a history-based strategy, the condition means that there is a measurable rule \(g_t\) such that \(A_t=g_t(H_t)\). If the action space and history space are standard Borel spaces, the Doob–Dynkin lemma gives this representation for any \(\mathcal H_t\)-measurable action. Predictability is a timing condition, not a claim that the action is accurate or optimal.

Worked Examples: What Counts as Past Information?

Worked Example: Forecasting From Previously Revealed Outcomes

Suppose \(Y_t\in\{0,1\}\) is revealed after each prediction, and the learner predicts a probability \(A_t\in[0,1]\). Consider the rule \(A_t=(1+\sum_{s=1}^{t-1}Y_s)/(2+t-1)\). At \(t=3\), the public history contains \(Y_1,Y_2\), so the prediction is \((1+Y_1+Y_2)/4\). If \(Y_1=1\) and \(Y_2=0\), then \(A_3=2/4=0.5\).

The rule is predictable because it uses only outcomes revealed before round 3. The value \(Y_3\) is not in \(H_3\), so a rule that replaced the numerator by \(1+Y_1+Y_2+Y_3\) would not be a valid prediction rule under this protocol.

Worked Example: Loss Feedback Versus Full Information

There are two actions, \(a\) and \(b\). On round 1 the learner chooses \(a\), incurs loss \(0.2\), and is told only that loss. Then \(H_2\) contains the first action and its loss, but not the loss that action \(b\) would have incurred. If instead the protocol reveals the entire loss vector \((0.2,0.8)\), then \(H_2\) contains both values.

A deterministic round-2 rule can use only what its feedback protocol places in \(H_2\). Under loss-only feedback, choosing the action with the smaller round-1 loss is not justified by comparing \(a\) and \(b\), because the loss for \(b\) was not observed. Under full information, that comparison is available. The action spaces are identical; the filtrations differ.

Worked Example: An Outcome That Responds to the Action

Let \(A_t\in\{0,1\}\), let the outcome be \(Y_t=A_t\), and let the loss be \(L_t=\mathbf 1\{A_t\ne Y_t\}\). If the environment chooses the outcome after seeing the action, then \(L_t=0\) for either action. This is an action-responsive protocol: the outcome is not fixed independently of the current prediction.

If one instead declares the outcome to be \(Y_t=1\) before the learner acts, the losses are \(1\) for action \(0\) and \(0\) for action \(1\). Treating these two protocols as interchangeable would change the loss calculation. The order of events is part of the statistical model.

Randomized Strategies

A randomized strategy does not commit to a single action as a function of the public history. Instead, at each history it specifies a probability distribution over actions. For a finite action set \(A\), write this conditional distribution as \(\pi_t(a\mid H_t)\), where \(\pi_t(a\mid H_t)\geq 0\) and \(\sum_{a\in A}\pi_t(a\mid H_t)=1\). The learner draws \(A_t\) from this distribution after observing \(H_t\).

Definition: A randomized strategy is a sequence of probability kernels \(\pi_t(\cdot\mid H_t)\) from public histories to actions. Its action satisfies \(P(A_t=a\mid\mathcal H_t)=\pi_t(a\mid H_t)\) for each \(a\in A\). A realization can be represented using private random variables, independent of the past and of any external randomness not specified as dependent on them.

For example, on a finite action set the learner can use a fresh uniform random variable \(U_t\) on \([0,1]\) to sample from the probabilities in \(\pi_t(\cdot\mid H_t)\), by partitioning \([0,1]\) into intervals of those lengths. The private draw is available when the action is selected, but it is not part of the public history before the draw. Once the action is made, it may become visible to the environment, depending on the protocol.

A randomized action is not generally measurable with respect to the public-history sigma-field alone: the same public history can lead to different actions on different draws. Conditional on the history, however, its distribution is specified. This is the useful sense in which the strategy is non-anticipating: its distribution depends on past information, not on future feedback.

Conditional Expected Loss and Timing

The following calculation makes the role of timing precise. Assume a finite action set, a bounded loss, and a randomized strategy with conditional probabilities \(\pi_t(a\mid H_t)\). In an outcome-first protocol, suppose the round-\(t\) outcome \(Y_t\) is fixed given the past before the action is drawn, and the loss is \(\ell_t(A_t,Y_t)\).

Result: Under these conditions, \(E[L_t\mid\mathcal H_t,Y_t]=\sum_{a\in A}\pi_t(a\mid H_t)\ell_t(a,Y_t)\).

Proof. Conditional on \(\mathcal H_t\) and \(Y_t\), the loss equals \(\ell_t(a,Y_t)\) on the event \(A_t=a\). Since the action has conditional probability \(\pi_t(a\mid H_t)\), the conditional expectation over the finite partition \(\{A_t=a:a\in A\}\) is

$$ E[L_t\mid\mathcal H_t,Y_t] =\sum_{a\in A}\ell_t(a,Y_t)P(A_t=a\mid\mathcal H_t,Y_t) =\sum_{a\in A}\pi_t(a\mid H_t)\ell_t(a,Y_t). $$

The last equality uses the outcome-first condition: once the past is given, \(Y_t\) is fixed before the learner’s fresh action draw, so conditioning on \(Y_t\) does not change the action probabilities. Boundedness ensures the conditional expectations exist. \(\square\)

If the outcome can respond to the action, the appropriate calculation instead conditions on the action-specific outcome distribution. For finite \(A\), with integrable losses, the tower property gives

$$ E[L_t\mid\mathcal H_t] =\sum_{a\in A}\pi_t(a\mid H_t) E[\ell_t(a,Y_t)\mid\mathcal H_t,A_t=a]. $$

To derive this identity, partition according to \(A_t=a\), apply conditional expectation on each event, and use \(P(A_t=a\mid\mathcal H_t)=\pi_t(a\mid H_t)\). Unlike the outcome-first formula, the conditional outcome law may vary with \(a\). One cannot generally replace every conditional loss in this expression by a loss against a single outcome fixed before prediction.

Worked Example: Computing a Randomized Prediction

Worked Example: Expected Loss With a Fixed Outcome

Suppose the actions are \(0\) and \(1\), and the public history assigns probabilities \(\pi_t(0\mid H_t)=0.7\) and \(\pi_t(1\mid H_t)=0.3\). The outcome \(Y_t=1\) is fixed before the draw, and the loss is \(\ell(a,y)=\mathbf 1\{a\ne y\}\). Action 0 has loss 1 and action 1 has loss 0. Therefore,

$$ E[L_t\mid\mathcal H_t,Y_t=1] =0.7(1)+0.3(0)=0.7. $$

If instead the environment sets \(Y_t=A_t\) after seeing the drawn action, then both possible actions have loss 0, and the expected loss is \(0.7(0)+0.3(0)=0\). The probability distribution over actions stayed the same; the outcome timing changed the conditional losses.

Common Pitfall: Treating “Past” as All Recorded Data

A data file may contain actions, outcomes, and losses for every round, but the completed file is not the information available when the earlier actions were chosen. It is incorrect to call a strategy predictable merely because its action can be written as a function of the full completed data set. Predictability requires measurability with respect to the information available at the decision time.

A second mistake is to assume that randomization makes a strategy anticipative. It does not: a draw from \(\pi_t(\cdot\mid H_t)\) uses a new private random variable, but the distribution itself is determined by the past. Conversely, calling an environment “adversarial” does not specify whether it sees the current action before choosing the outcome. That timing must be included in the protocol.

Key takeaway: State what is known before each prediction, what the learner chooses, how the outcome is generated, and what feedback is revealed afterward. Deterministic predictability is measurability with respect to past information; randomized predictability means the action distribution is determined by that information.

Check Your Understanding

Use the timing convention and definitions in this tutorial to answer the following.

  1. If \(\mathcal H_t\) contains feedback only through round \(t-1\), can a deterministic predictable action on round \(t\) depend on \(Y_t\)? Explain.
  2. What information distinguishes loss-only feedback from full-information feedback?
  3. For a randomized strategy on three actions with probabilities \(0.2,0.5,0.3\), describe how a uniform random variable can generate the action.
  4. Why can the fixed-outcome expected-loss formula fail when the environment chooses its outcome after observing the action?
  5. Give one example of private information available to a randomized learner that is not part of the public history before its prediction.
Clinical Biostats