The realizable mistake-bound model #
This file sets up Littlestone's model of online learning in the realizable case
[Littlestone1988, §3] [ShalevShwartzBenDavid2014, §21.1]. Learning proceeds in rounds. In each
round an adversary presents an instance x, the learner predicts a label in Bool, and then the
adversary reveals the true label y. The learner errs when its prediction differs from y. The
labels must stay consistent with some target concept c of a known concept class
C : ConceptClass α Bool. The quantity of interest is the worst-case number of mistakes.
A deterministic learner is a function OnlineLearner α := List (α × Bool) → α → Bool. It sees the
labelled history of the previous rounds and the current instance. mistakes A S counts the rounds
of the labelled sequence S on which A errs. S is realizable by C when its version space
versionSpace C S, the set of concepts of C that agree with every example of S, is nonempty.
The mistake bound of A on C is the supremum of mistakes A S over all finite realizable S,
in ℕ∞. The optimal mistake bound of C is the infimum of the mistake bounds over all
deterministic learners. Littlestone writes these as M_A(C), defined just before Definition 1,
and opt(C), Definition 1 [Littlestone1988, §3]. The supremum ranges over all finite sequences,
so mistakeBound A C ≤ m says that A makes at most m mistakes on every realizable sequence of
every length, matching Littlestone's quantification over all sequences. Littlestone sets
M_A(∅) = -1; here the empty class has no realizable sequence, so its mistake bound is 0
(mistakeBound_empty).
Since the learner is deterministic, adaptivity gives the adversary nothing more. An Adversary
chooses each instance and each label as a function of the history and of the learner's
prediction. mistakeBound_eq_iSup_adversary shows that the mistake bound is also the supremum over
adversaries and horizons of the mistakes on the realizable transcripts.
mistakeBound_eq_iSup_concept restates the bound in Littlestone's form: the target concept c ∈ C
is fixed and the adversary chooses only the instances.
Relation to other models. The library's PACLearning.VersionSpace and PACLearning.Realizable
(cslib) are the batch analogues of versionSpace and Realizable, indexed by Fin m. The list
form here follows the online history directly. This model differs from prediction with expert
advice, which compares the learner with the best of a set of experts on arbitrary outcomes and
measures regret. Here a single learner competes with the requirement of realizability and pays
for each mistake absolutely; there are no experts and no losses beyond the mistake count. The
non-realizable extension, with randomized learners, Hedge over deterministic experts and regret
against the best concept, is in MistakeBound.Randomized and MistakeBound.Agnostic.
Main definitions #
Cslib.MachineLearning.OnlineLearning.MistakeBound.OnlineLearner: deterministic online learners.Cslib.MachineLearning.OnlineLearning.MistakeBound.mistakes: the number of mistakes on a labelled sequence.Cslib.MachineLearning.OnlineLearning.MistakeBound.versionSpace: the concepts consistent with a labelled sequence.Cslib.MachineLearning.OnlineLearning.MistakeBound.Realizable: realizability by a concept class.Cslib.MachineLearning.OnlineLearning.MistakeBound.mistakeBound: the worst-case number of mistakes,M_A(C).Cslib.MachineLearning.OnlineLearning.MistakeBound.optimalMistakeBound: the optimal mistake bound,opt(C).Cslib.MachineLearning.OnlineLearning.MistakeBound.Adversary: adaptive adversaries and their transcripts.
Main results #
Cslib.MachineLearning.OnlineLearning.MistakeBound.mistakes_eq_card: the mistake count as the number of roundston which the prediction from the firsttexamples is wrong.Cslib.MachineLearning.OnlineLearning.MistakeBound.mistakeBound_eq_iSup_concept: the mistake bound with a fixed target concept and chosen instances.Cslib.MachineLearning.OnlineLearning.MistakeBound.mistakeBound_eq_iSup_adversary: adaptive adversaries are no stronger than realizable sequences.
References #
- [N. Littlestone, Learning quickly when irrelevant attributes abound: a new linear-threshold algorithm][Littlestone1988]
- [S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning: From Theory to Algorithms][ShalevShwartzBenDavid2014]
A deterministic online learner: from the labelled history of the previous rounds and the current instance, it predicts a label.
Equations
Instances For
mistakesFrom A h S: the number of mistakes of A on the rounds S, after the history h.
Each round predicts from the history so far and then appends its example to it.
Equations
- One or more equations did not get rendered due to their size.
- Cslib.MachineLearning.OnlineLearning.MistakeBound.mistakesFrom A x✝ [] = 0
Instances For
The number of mistakes of the learner A on the labelled sequence S, started from the empty
history.
Equations
Instances For
The version space: the concepts of C that agree with every example of S.
Equations
Instances For
A labelled sequence is realizable by C if some concept of C agrees with all of it.
Equations
Instances For
The mistake bound M_A(C) of the learner A on the class C [Littlestone1988, §3]: the
supremum of the mistakes of A over all finite sequences realizable by C. For the empty class
this is 0, where Littlestone sets M_A(∅) = -1.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The optimal mistake bound opt(C) [Littlestone1988, §3, Definition 1]: the least mistake
bound of a deterministic learner on C.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Mistake counts #
The mistakes on S ++ S' are those on S, then those on S' after the history h ++ S.
The mistakes of a fixed classifier c, as a learner that ignores its history, are the
examples it labels wrongly.
After the history h, the mistakes on S are the rounds t on which the prediction from
h and the first t examples of S is wrong.
The mistakes of A on S are the rounds t on which the prediction from the first t
examples is wrong.
Version spaces #
Realizability #
A sequence labelled by a concept of C is realizable by C.
Mistake bounds #
The empty class has no realizable sequence, so every learner has mistake bound 0 on it.
Littlestone's convention M_A(∅) = -1 is not used.
The mistake bound in Littlestone's form [Littlestone1988, §3]: the target c ∈ C is fixed and
the adversary chooses the instances, each labelled by c.
Adaptive adversaries #
The labelled history after t rounds of the learner A against the adversary B.
Equations
- B.transcript A 0 = []
- B.transcript A t.succ = B.transcript A t ++ [(B.next (B.transcript A t), B.label (B.transcript A t) (A (B.transcript A t) (B.next (B.transcript A t))))]
Instances For
Adaptive adversaries are no stronger than realizable sequences: the mistake bound of a
deterministic learner is the supremum, over adversaries B and horizons t, of its mistakes on
the transcripts that are realizable by C.