Concepts / Mistake Bounds

Mistake Bounds

SOA begins with V_1 = H and maintains the hypotheses consistent with observed labels.

  • Programming

Why Mistakes Need a Bound

An online learner receives examples one at a time and predicts a label before seeing the true label. Some predictions may be wrong. The important evaluation question is not only how many mistakes occur on one particular sequence, but how many mistakes the algorithm could make over every allowed sequence. Mistake bounds give a precise way to express that worst-case guarantee.

The realizable case assumes that the labels in the online sequence come from a hypothesis h⋆ in a known hypothesis class H. The Standard Optimal Algorithm, or SOA, uses the hypotheses in H that remain consistent with the labels observed so far.

Realizable means that the observed labels do not contradict the assumption that at least one hypothesis in the original class H generated them.

The SOA State at Each Round

SOA begins with V_1 = H. At round t, V_t is the current version space: the hypotheses that agree with all labels observed before the current example. When the input x_t arrives, SOA divides V_t according to the label that each hypothesis assigns to x_t. The two candidate classes are V_t^(0) and V_t^(1).

receive x_tcompare Ldimpredict p_tupdate with y_tV_tcurrent consistenthypothesesSplit on x_tV_t^(0), V_t^(1)Choose p_tlarger Ldimy_ttrue labelV_(t+1)hypotheses agreeing withy_t
How does SOA use the current version space to predict a label, receive the true label, and update the version space for the next example?

Keep prediction and update as separate events. SOA first chooses p_t from the two candidate classes. Only after the true label y_t arrives does it construct V_(t+1).

Choosing a Label with Ldim

SOA compares the Ldim of V_t^(0) and V_t^(1). It predicts the label whose candidate class has the larger Ldim. In this procedure, Ldim determines which side is selected for the prediction, while the true observed label determines which hypotheses survive the update.

if a > bif b > aif a = bif a = bV_t^(0)Ldim = ap_tlarger LdimV_t^(1)Ldim = bp_t = 1equal Ldim
How does SOA compare the two candidate classes, and what happens when their Ldim values are equal?

Selecting Between Two Candidate Classes

Suppose the current split has Ldim(V_t^(0)) = 2 and Ldim(V_t^(1)) = 4.

Compare: The candidate class associated with label 1 has the larger Ldim.

Predict: SOA predicts p_t = 1.

Update: After the true label y_t arrives, SOA keeps only the hypotheses in V_t that agree with y_t. It does not automatically keep the hypotheses supporting the prediction.

The prediction is selected from Ldim, but the next version space is selected from the true label.

Tracing a Mistake Correctly

What do you think happens?

SOA predicts p_t = 1 because V_t^(1) has the larger Ldim. The true label is y_t = 0. Which hypotheses form V_(t+1)?

  • The hypotheses in V_t^(1), because they supported the prediction
  • The hypotheses in V_t^(0), because they agree with the true label
  • All hypotheses in V_t, because a mistake prevents an update
Reveal answer

Answer: The hypotheses in V_t^(0), because they agree with the true label.

The update uses y_t, not p_t. A wrong prediction does not cause SOA to preserve the hypotheses that supported that prediction.

compare Ldimreceive labelSOA uses y_ttrace incorrectly uses p_tV_tcurrent version spacep_t = 1selected by Ldimy_t = 0prediction is wrongV_(t+1) = V_t^(0)agrees with y_tV_(t+1) = V_t^(1)incorrect trace update
At which event does a trace diverge from SOA, and how does the true label determine the next version space?

A prediction trace diverges from SOA when it updates with the prediction instead of the true label. If p_t is wrong, this error is especially visible: SOA discards the hypotheses that disagree with y_t, even though those hypotheses may have supported p_t. An incorrect update changes the next version space and can therefore change every later prediction.

  • Updating with p_t instead of y_t

    The next version space must contain hypotheses that agree with the true observed label.

    Fix: Use y_t to form V_(t+1), whether the prediction was correct or incorrect.

  • Choosing the smaller Ldim

    SOA predicts using the candidate class with larger Ldim.

    Fix: Compare both values and choose label 0 in this example.

  • Ignoring an Ldim tie

    SOA has a specified tie-breaking rule.

    Fix: Predict 1 when the two Ldim values are equal.

Counting Mistakes at Two Scales

Let S be one particular realizable sequence. M_A(S) is the number of mistakes made by algorithm A on that sequence. This count depends on the chosen examples and labels. The worst-case quantity M_A(H) considers all realizable sequences allowed by H, so it asks for the largest number of mistakes the algorithm could make across those sequences.

count on one Sconsider every allowed SSone realizable sequenceM_A(S)mistakes on SHall allowed realizablesequencesM_A(H)worst-case mistakes
How does the mistake count on one particular sequence differ from the maximum over all allowed realizable sequences?
QuantityWhat it measuresScope
M_A(S)The mistakes made by AOne particular realizable sequence S
M_A(H)The worst-case mistake countAll realizable sequences associated with H
Mistake boundA finite upper bound on the worst-case countThe algorithm's guaranteed maximum over allowed sequences

Mistake counts become worst-case guarantees when the scope expands from one sequence to all allowed realizable sequences.

A mistake bound is a finite upper bound on M_A(H), the worst-case number of mistakes made by an online algorithm over all realizable sequences considered for H.

The SOA Guarantee

The Standard Optimal Algorithm makes at most Ldim(H) mistakes on hypothesis class H. Thus, Ldim has two roles in the SOA analysis: it selects the predicted label at each round, and it supplies the stated upper bound on the total number of mistakes.

The guarantee is a worst-case statement. It does not claim that SOA makes exactly Ldim(H) mistakes on every sequence. A particular realizable sequence may produce fewer mistakes. The bound says that, across the allowed realizable sequences, the number of mistakes does not exceed Ldim(H).

has dimensionSOA operates onsets upper boundachievesfiniteHhypothesis classLdim(H)finite valueM_SOA(H)at most Ldim(H)Online learnablefinite mistake guaranteeSOAonline algorithm
How does a finite mistake bound connect the hypothesis class, SOA, and online learning?

Practice the Procedure

EASY

A round begins with current class V_t. The two candidate classes have Ldim(V_t^(0)) = 3 and Ldim(V_t^(1)) = 3. SOA receives the true label y_t = 0. State the prediction and describe the next version space.

Hints
  • Use the specified tie-breaking rule.
  • The update uses the true label rather than the prediction.

Practice Solution

The candidate classes have equal Ldim, and the true label is 0.

Prediction: The Ldim values are tied, so SOA predicts 1.

Mistake status: Because y_t = 0, the prediction is incorrect.

Update: The next version space contains the hypotheses in V_t^(0), because those hypotheses agree with the true label.

SOA predicts 1, then updates to the hypotheses consistent with y_t = 0.

Key Takeaways

  1. SOA starts with V_1 = H and maintains the hypotheses consistent with observed true labels.
  2. At each round, SOA splits V_t into V_t^(0) and V_t^(1), then predicts using the side with larger Ldim.
  3. If the two Ldim values are equal, SOA predicts 1.
  4. The update uses y_t, the true label, not p_t, the prediction.
  5. SOA makes at most Ldim(H) mistakes; a finite worst-case bound provides the online learning guarantee.

Key Takeaways

  • SOA predicts from the candidate class with larger Ldim and resolves ties by predicting 1.
  • The version space is updated with the true label, even when the prediction is wrong.
  • M_A(S) counts mistakes on one sequence, while M_A(H) is the worst-case count over all allowed realizable sequences.
  • A mistake bound is a finite upper bound on the worst-case number of mistakes.
  • For SOA, the stated bound is Ldim(H), so a finite Ldim gives a finite online mistake guarantee.