Finite-state learners: the error count is bounded exactly when the states number the candidates #
[Discovery] §3 Proposition 3.5 is the valve of one architecture: at the floored mixture the error count is bounded over every realizable task exactly when the floor condition holds. This file states the valve over every deterministic finite-state learner reading the candidates' predictions, with the capacity counted as the number of states: a learner has a bounded count on every realizable stream only if it has at least as many states as candidates, and that many states suffice.
The model #
A learner over C candidates (FiniteLearner C) is a finite type of states with a start state, a
prediction pred from the state and the vector of the candidates' predictions, and a transition
step on the outcome. A stream is a sequence of prediction vectors v with a sequence of
outcomes y; it is realizable (FiniteLearner.Realizable) when some candidate p has
v t p = y t at every t. The run (FiniteLearner.state) is the state sequence from the start,
and the count to horizon n (FiniteLearner.missCount) is the number of t < n at which the
prediction pred (state t) (v t) differs from y t. A state dictates a candidate
(FiniteLearner.Dictates) when its prediction is that candidate's at every vector.
Main results #
FiniteLearner.card_le_of_boundedCount— the necessity: a learner whose count is bounded on every realizable stream has at leastCstates. Every candidate has a state dictating it, by the adversary below, and a state dictates at most one candidate.FiniteLearner.exists_adversary— against a candidate no state dictates, a realizable stream on which the learner misses at every step: at each step a vector on which the current state disagrees with the candidate, and the candidate's own value as the outcome.FiniteLearner.dictates_unique— a state dictates at most one candidate.FiniteLearner.indexLearner_missCount_le— the sufficiency: the index learnerFiniteLearner.indexLearner, onCstates, stands on a candidate and moves to the next when that candidate misses; on every realizable stream its count is at mostC - 1.FiniteLearner.exists_boundedCount_iff— the valve: atC > 0candidates, a learner with exactlySstates and a bounded count on every realizable stream exists if and only ifC ≤ S; states beyond the firstCare never reached byFiniteLearner.padded.FiniteLearner.indexLearner_missCount_unbounded_of_not_realizable— realizability is load-bearing: on the constant stream whose vectors are all false and whose outcomes are all true, which no candidate fits, the index learner misses at every step.FiniteLearner.majority_not_boundedCount— the states must dictate, not merely be many: the majority learnerFiniteLearner.majorityon3candidates has3states (FiniteLearner.card_majority) and no bounded count.FiniteLearner.exists_missCount_ge_of_card_le— the exact count atCstates, the lower bound: a learner with at mostCstates has, over some realizable stream, a count of at leastC - 1at some horizon, whether or not its count is bounded.FiniteLearner.exists_missCount_le_iff— the exact count atCstates: atC > 0candidates, a learner with exactlyCstates and a count at mostMon every realizable stream exists if and only ifC - 1 ≤ M.FiniteLearner.trioChain_missCount_le— the count falls with the states: the trio chainFiniteLearner.trioChain, onC + tstates for3 * t ≤ C(FiniteLearner.trioChain_card), has on every realizable stream a count of at mostC - 1 - t; it uses the states beyond the firstCas heads, each deciding among three candidates by their majority before any is followed.FiniteLearner.exists_card_eq_missCount_le— the trio chain's two statements as one: for3 * t ≤ C, a learner with exactlyC + tstates and a count at mostC - 1 - texists.FiniteLearner.ReadsAtMost— a learner reads at mostkcandidates when each state's prediction depends on the predictions of at mostkcandidates; the transitions are unrestricted.FiniteLearner.exists_missCount_ge_of_readsAtMost— the lower bound among learners reading at most four candidates: atC > 0candidates, a learner whose states each read at most four candidates has, over some realizable stream and at some horizon, a countmwith2 * C ≤ m + S + 1forSits number of states, that is, a count of at least2 * C - 1 - S.FiniteLearner.trioChain_readsAtMost— the trio chain's states each read at most three candidates.FiniteLearner.exists_readsAtMost_missCount_le_iff— the trio chain is exact among learners reading at most four candidates: for3 * t ≤ C, a learner with exactlyC + tstates, each reading at most four candidates, and a count at mostMon every realizable stream exists if and only ifC - 1 - t ≤ M.FiniteLearner.exists_missCount_ge_of_card_le_succ— one state pastCbuys exactly one miss, over every learner: atC > 0candidates, a learner with at mostC + 1states has, over some realizable stream and at some horizon, a countmwithC ≤ m + 2, that is, a count of at leastC - 2, whatever the predictions and the transitions.FiniteLearner.exists_card_succ_missCount_le_iff— the exact count atC + 1states: for3 ≤ C, a learner with exactlyC + 1states and a count at mostMon every realizable stream exists if and only ifC - 2 ≤ M; the trio chain with one trio meets the bound.FiniteLearner.exists_missCount_ge_of_card_le_succ_nonvacuous— the lower bound atC + 1states applies beyond the learners reading at most four candidates: at five candidates there is a learner with six states and a bounded count whose head reads all five.
The count and the states trade as follows ([Discovery] §3 Proposition 3.9): at exactly C states
the least bound on the count over every realizable stream is C - 1, and each head, covering one
trio of candidates, lowers the bound by one at the price of one more state. Among learners whose
states each read at most four candidates the trio chain's bound is the least one at C + t states,
for 3 * t ≤ C (FiniteLearner.exists_readsAtMost_missCount_le_iff); over every learner, the
count is priced exactly at C and at C + 1 states
(FiniteLearner.exists_card_succ_missCount_le_iff), and at no more states here.
The class is of bit predictors reading a vector of bits; the floored mixture of Proposition 3.5 is a mass predictor, and no statement here relates the two.
A deterministic finite-state learner over C candidates. A finite type of states with a
start state, a prediction from the state and the vector of the candidates' predictions, and a
transition from the state, that vector and the outcome.
- S : Type
The type of states.
The states are finitely many.
- start : self.S
The state a run starts in.
The prediction of a state on the vector of the candidates' predictions.
The transition on the vector of the candidates' predictions and the outcome.
Instances For
A realizable stream. Prediction vectors v and outcomes y are realizable when some
candidate p predicts the outcome at every time.
Equations
- ReflectiveSubsystems.FiniteLearner.Realizable v y = ∃ (p : Fin C), ∀ (t : ℕ), v t p = y t
Instances For
The run. The state sequence from the start: the transition applied, at each time, to the current state, that time's prediction vector and that time's outcome.
Instances For
The count. The number of times t < n at which the learner's prediction, from its state
at time t and that time's prediction vector, differs from the outcome.
Instances For
A bounded count. One bound on the count to every horizon, over every realizable stream.
Equations
Instances For
A state dictates at most one candidate. At two distinct candidates the vector set at the first and clear at the second separates their values.
The adversary. Against a candidate no state dictates there is a realizable stream on
which the learner misses at every step: along the run, at each state a vector on which the state
disagrees with the candidate, and the candidate's own value as the outcome. It is the instance of
DualHelly.exists_stream_mistakes_eq at the learner read as an online learner of the vectors, the
hypotheses its states' predictions and the concept class the candidates' coordinates.
The necessity. A learner whose count is bounded on every realizable stream has at least as many states as candidates: every candidate has a state dictating it, and a state dictates at most one candidate, so choosing one dictating state per candidate is injective into the states.
The index learner. On C states, standing on a candidate: it predicts that candidate's
value, stays while that candidate is right and moves to the next candidate, up to the last, when
that candidate is wrong.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The index learner's sufficiency. On every realizable stream the index learner's count, to
every horizon, is at most C - 1: along the run the state's index never falls, rises by one at
each miss and never passes the index of a candidate that never misses, since the learner standing
on that candidate does not miss.
The index learner has a bounded count.
The bound is attained. A learner with a bounded count exists, with exactly as many states as the necessity requires: the index learner at two candidates has a bounded count and two states.
The index learner on more states. The index learner on the first C of S states, the
others never reached: states from C on predict false and stay where they are.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The padded learner has exactly the stated number of states.
The padded index learner has a bounded count. Its run is the index learner's run carried
into the first C states, with the same predictions, so it has the same count.
The valve. With C > 0 candidates, a deterministic finite-state learner with exactly S
states and a count bounded on every realizable stream exists if and only if C ≤ S. The forward
direction is the necessity; the converse is the padded index learner.
Realizability is load-bearing. On the constant stream whose vectors are all false and
whose outcomes are all true, which no candidate fits, the index learner misses at every step, so
no bound of the form C - 1 holds off the realizable streams.
The majority learner on three candidates. Three states, cycled by the transition, predicting the majority of the three candidates' predictions whatever the state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The majority learner has three states, as many as candidates.
The states must dictate, not merely be many. The majority learner has as many states as
candidates (card_majority) and no bounded count: no state dictates the first candidate, since
the vector with the first candidate true and the others false has majority false.
The exact count at C states: the lower bound ([Discovery] §3 Proposition 3.9). At
0 < C candidates a learner with at most C states has, over some realizable stream, a count of
at least C - 1 at some horizon. When its count is not bounded this is immediate. When it is
bounded, the necessity makes the choice of one dictating state per candidate a bijection onto the
states, so every state dictates a candidate; the stream then sets, at each of the first C - 1
steps, every candidate true except the one the current state dictates, with outcome true, so the
learner misses at each of those steps, while some candidate is never set false.
The exact count at C states ([Discovery] §3 Proposition 3.9). With C > 0 candidates and
a bound M, a learner with
exactly C states whose count is at most M on every realizable stream, at every horizon, exists
if and only if C - 1 ≤ M. The forward direction is the lower bound at C states; the converse
is the index learner, which has C states and count at most C - 1
(indexLearner_missCount_le).
The lower bound is attained. A learner with at most C states and a bounded count
exists, so the lower bound's hypothesis Fintype.card L.S ≤ C is met at once with a bounded
count: the index learner at two candidates.
The trio chain ([Discovery] §3 Proposition 3.9). A learner on t + C states whose
candidates fall into blocks: for each
i < t the trio of candidates 3 * i, 3 * i + 1, 3 * i + 2, and then each candidate
p with 3 * t ≤ p a block of its own. The states are the heads, one per trio, and the
dictators, one per candidate. The entry of a block is the head of a trio and the dictator of a
single candidate. The head of a trio predicts the majority of the trio's three predictions and
stays while right; when wrong it moves to the dictator of a member of the trio whose prediction
was the outcome if there is one, and to the entry of the next block otherwise. A dictator predicts
its candidate's value and stays while right; when wrong, a dictator of a trio's member moves to the
entry of the block after that trio, and a dictator of a single candidate moves to the next
candidate, up to the last, as the index learner does. It starts at the first block's entry, so at
t = 0 it is the index learner.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The trio chain's count ([Discovery] §3 Proposition 3.9). On every realizable stream the
trio chain's count, to every
horizon, is at most C - 1 - t: along the run the state's position rises by at least one at each
miss and the state never passes a candidate that never misses, so the position is at most that of
the dictator of that candidate, which is 2 * i + 1 ≤ 2 * t - 1 for a member of trio i and
r - t for a single candidate r.
The count against the number of states ([Discovery] §3 Proposition 3.9). For 3 * t ≤ C
a learner with exactly C + t
states whose count is at most C - 1 - t on every realizable stream, at every horizon, exists:
the trio chain. At t = 0 it is the index learner on C states, so with the lower bound at C
states the least count at C + t states is at most C - 1 - t and at t = 0 equal to C - 1.
The bound is attained. At three candidates and one trio, the trio chain's count C - 1 - t
is reached: on a realizable stream, candidate 2 predicts the outcome throughout while the head's
majority at time 0 is wrong, so the count to horizon one is one.
A learner whose states each read at most k candidates. For every state there is a set of
at most k candidates such that two prediction vectors agreeing on that set get the same
prediction from the state. The transitions are unrestricted; only the prediction is local.
Equations
Instances For
The lower bound among learners whose states each read at most four candidates
([Discovery] §3 Proposition 3.9). At 0 < C candidates, a learner whose states each read at most
four candidates has, over some realizable stream, at some horizon, a count m with
2 * C ≤ m + S + 1, where S is its number of states; that is, a count of at least
2 * C - 1 - S, stated additively so that no truncated subtraction enters. The transitions are
unrestricted.
The adversary keeps a set of candidates consistent with the outcomes so far, at first all of them.
A state is live for the set when it is right at every vector on which the set agrees with the
outcome, and free otherwise; a free state has a miss that removes no candidate. For a live state
reading at most four candidates there is a miss removing one candidate or two, found by moving the
indicator vector of a subset of the state's candidates one member at a time from the all-false
vector, at which the state is right, to the vector at which it predicts true. A miss removing one
candidate leaves the state free for the smaller set, and one removing two leaves it and the two
dictators of the removed candidates free, so the live states fall by one or by three, while an
absent dictator lets the adversary force a miss at every step. The set shrinks by one candidate
for a drop of one live state and by two for a drop of three, so with |A| candidates left the
adversary forces n misses with 2 * |A| ≤ n + (live states) + 1, and the live states number at
most S.
What is not claimed: the bound over every learner. The argument stops at a state predicting the majority of five live candidates, at which every miss removes three.
The trio chain's states each read at most three candidates ([Discovery] §3 Proposition 3.9): a head reads the three members of its trio, a dictator its one candidate.
The trio chain is exact among learners whose states each read at most four candidates
([Discovery] §3 Proposition 3.9). For 0 < C candidates and 3 * t ≤ C, a learner with exactly
C + t states, each reading at most four candidates, whose count is at most M on every
realizable stream at every horizon, exists if and only if C - 1 - t ≤ M. The forward direction is
the lower bound exists_missCount_ge_of_readsAtMost, 2 * C ≤ M + (C + t) + 1; the converse is the
trio chain, which has C + t states (trioChain_card), reads at most three candidates at each
(trioChain_readsAtMost) and has count at most C - 1 - t (trioChain_missCount_le).
Both statements apply to one learner. At three candidates the trio chain with one trio has
four states, each reading at most three candidates and so at most four, and a count at most one
on every realizable stream; its count is one on a realizable stream
(trioChain_missCount_le_nonvacuous), which is the lower bound 2 * 3 - 1 - 4 = 1 of
exists_missCount_ge_of_readsAtMost attained. It is the case C = 3, t = 1, M = 1 of
exists_readsAtMost_missCount_le_iff.
One state past C buys one miss ([Discovery] §3 Proposition 3.10). At 0 < C candidates,
a learner with at most C + 1 states has, over some realizable stream, a count m with
C ≤ m + 2 at some horizon, that is, a count of at least C - 2, stated additively so that no
truncated subtraction enters. At most C states is the lower bound at C states
(exists_missCount_ge_of_card_le), and an unbounded count is immediate. A bounded count gives an
injective choice of a dictating state for each candidate, so with C + 1 states exactly one state
h dictates no candidate. The adversary keeps the set of candidates that have agreed with every
outcome so far. At a dictator of a live candidate it presents the vector false at that candidate
alone, with outcome true, a miss removing that candidate. At a state free for the set it takes a
miss removing nothing. At h, with m live candidates, a miss that splits the set into two parts,
chosen so that the walk of the dictators from the state the learner moves to never meets the
dictators of all of either part, leaves a part the following m - 3 misses do not exhaust:
m - 2 misses in all. The transitions are unrestricted and the predictions need not be local.
The exact count at C + 1 states ([Discovery] §3 Proposition 3.10). With 3 ≤ C
candidates and a bound M, a learner with exactly C + 1 states whose count is at most M on
every realizable stream, at every horizon, exists if and only if C - 2 ≤ M. The forward direction
is the lower bound at C + 1 states (exists_missCount_ge_of_card_le_succ); the converse is the
trio chain with one trio, which has C + 1 states (trioChain_card) and count at most
C - 1 - 1 (trioChain_missCount_le).
A learner beyond the four-local class meets the bound. At five candidates, a learner with
six states and a bounded count that does not read at most four candidates per state: its head
predicts the majority of all five candidates, so no four of them determine its prediction, and
the lower bound at one state past the candidates (exists_missCount_ge_of_card_le_succ) applies
to it though the lower bound among learners reading at most four candidates
(exists_missCount_ge_of_readsAtMost) does not.