Documentation

ReflectiveSubsystems.LaggedTwoParty

A learner split across a lagged cut: the mistake count of a two-party model #

An online learner over candidates sees at each step a vector of the candidates' predictions and then the outcome; it is billed by its mistake count over the streams some candidate realizes (the model of ReflectiveSubsystems/FiniteLearner.lean, FiniteLearner.Realizable and FiniteLearner.missCount). Here the learner is split in two. An outside party sees every vector but learns each outcome only L steps late, and sends the inside party one message from a finite alphabet M per step; the inside party sees only the messages and the outcomes, each outcome at once, and predicts.

Main results #

The method #

The steps fall into W windows of L steps, and a candidate's prediction at a step of window w is its coordinate w, looked up in a bit vector chosen for that step. Over all pairs of a candidate and a choice of the bit vectors, a step's right answers number at most those of one guesser of the averaged index bound: every message before the step, and the step's own message as a function of that step's bit vector alone, are fixed once the other coordinates and the other steps' vectors are, since the outcomes the outside has seen by then lie in earlier windows. Averaging over the pairs gives a pair on which the inside is right on few steps, whose stream is realizable by construction. All counting is finite.

The averaged index bound. A message φ z about P uniform bits z lets a guesser of one coordinate h, uniform and known to the guesser, be right on at most 2 ^ P * (P + √(P (|M| - 1))) / 2 of the P * 2 ^ P pairs (h, z).

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    The averaged index bound. A message φ z about P uniform bits z lets a guesser of one coordinate, uniform and known to the guesser, be right on at most 2 ^ P * (P + √(P (|M| - 1))) / 2 of the P * 2 ^ P pairs of a coordinate and a choice of the bits. Given its message, the guesser is right on at most half the sum of the message's fiber size and the absolute value of the fiber's sum of the coordinate's signs, which is 2 ^ P times a degree-one Fourier coefficient of the fiber's indicator; the degree-one coefficients of all the fibers have total absolute value at most √(P (|M| - 1)), by Cslib.BitString.sq_sum_sum_abs_fourierCoeff_fiber_le.

    A learner split across a lagged cut. The outside party sees every vector of the candidates' predictions at once but learns the outcome of step s only at step s + L; the inside party never sees a vector, only the outside's messages, one at each step, and the outcomes, each at the end of its step. The lag L is what the outside has not yet seen: at step t it has the outcomes of the steps 0 … t - L, and none while t < L.

    • speak (t : ℕ) : (Fin (t + 1) → H → Bool) → (Fin (t + 1 - L) → Bool) → M

      The outside's message at step t, from the vectors at steps 0 … t and the outcomes at steps 0 … t - L (none while t < L).

    • predict (t : ℕ) : (Fin (t + 1) → M) → (Fin t → Bool) → Bool

      The inside's prediction at step t, from the messages at steps 0 … t and the outcomes at steps 0 … t - 1.

    Instances For

      A realizable stream. Prediction vectors v and outcomes y are realizable when some candidate h predicts the outcome at every step.

      Equations
      Instances For
        def ReflectiveSubsystems.LaggedTwoPartyLearner.message {H M : Type} {L : ℕ} (A : LaggedTwoPartyLearner H M L) (v : ℕ → H → Bool) (y : ℕ → Bool) (t : ℕ) :
        M

        The message at a step. What the outside sends at step t on the stream (v, y): its function speak of the vectors up to t and the outcomes up to the lag.

        Equations
        Instances For
          def ReflectiveSubsystems.LaggedTwoPartyLearner.prediction {H M : Type} {L : ℕ} (A : LaggedTwoPartyLearner H M L) (v : ℕ → H → Bool) (y : ℕ → Bool) (t : ℕ) :

          The prediction at a step. What the inside predicts at step t on the stream (v, y): its function predict of the messages up to t and the outcomes before t.

          Equations
          Instances For
            def ReflectiveSubsystems.LaggedTwoPartyLearner.missCount {H M : Type} {L : ℕ} (A : LaggedTwoPartyLearner H M L) (v : ℕ → H → Bool) (y : ℕ → Bool) (n : ℕ) :

            The count. The number of steps t < n at which the inside's prediction differs from the outcome.

            Equations
            Instances For
              theorem ReflectiveSubsystems.LaggedTwoPartyLearner.exists_missCount_ge_of_indexGuessBound (hcore : IndexGuessBound) {M : Type} [Fintype M] {P W L : ℕ} (hP : 0 < P) (A : LaggedTwoPartyLearner (Fin W → Fin P) M L) :
              ∃ (v : ℕ → (Fin W → Fin P) → Bool) (y : ℕ → Bool), Realizable v y ∧ ↑(W * L) * (↑P - √(↑P * (↑(Fintype.card M) - 1))) ≤ 2 * ↑P * ↑(A.missCount v y (W * L))

              The lower bound on a lagged two-party learner's mistake count, from the averaged index bound. Over the P ^ W candidates Fin W → Fin P, every lagged two-party learner with message alphabet M misses, on some realizable stream of W * L steps, at least W * L * (1 / 2 - √((|M| - 1) / P) / 2) times; the inequality is stated with the denominator 2 * P cleared. The hypothesis is the averaged index bound IndexGuessBound, the one place a message about the bits of a step is weighed against a guess of one coordinate.

              theorem ReflectiveSubsystems.LaggedTwoPartyLearner.exists_missCount_ge {M : Type} [Fintype M] {P W L : ℕ} (hP : 0 < P) (A : LaggedTwoPartyLearner (Fin W → Fin P) M L) :
              ∃ (v : ℕ → (Fin W → Fin P) → Bool) (y : ℕ → Bool), Realizable v y ∧ ↑(W * L) * (↑P - √(↑P * (↑(Fintype.card M) - 1))) ≤ 2 * ↑P * ↑(A.missCount v y (W * L))

              The lower bound on a lagged two-party learner's mistake count. Over the P ^ W candidates Fin W → Fin P, every lagged two-party learner with message alphabet M misses, on some realizable stream of W * L steps, at least W * L * (1 / 2 - √((|M| - 1) / P) / 2) times; the inequality is stated with the denominator 2 * P cleared.

              The bound is not vacuous at a fixed instance. Over the 4 candidates Fin 1 → Fin 4, with one message bit and a lag of one step, every learner misses at the one step of some realizable stream: the bound reads 4 - √4 = 2 > 0 there.