Proposition 10 — SquareCB regret bound
ProvedFoundationsRL.Contextual.squarecb_regret_boundThis is Proposition 10 (Foster & Rakhlin, Foundations of Reinforcement Learning and Interactive Decision Making, p. 51), the regret bound for the SquareCB algorithm — the main result of this mission.
Consider the contextual bandit protocol over rounds with context sequence (arbitrary, possibly adversarial), action set , and ground-truth reward function . Suppose the decision-maker has access to an online regression oracle (Definition 3) with estimation-error guarantee : at each round it produces from the history so far, with with probability at least . SquareCB samples (Definition 4) at every round, with exploration parameter
Then, on the event that the oracle's guarantee holds, SquareCB's regret satisfies
As a special case, when is finite and the averaged exponential weights algorithm is used as the oracle, , giving : a regret bound with no dependence on the size of the context space, matching the optimal -rate (unlike the -rate of -Greedy, Proposition 8) and depending on the model class only through .
The proof is a near-immediate consequence of the Inverse Gap Weighting inequality (Proposition 9): applying it at every round with and and summing gives , and the stated exactly balances the two terms.
Formalization Note The book states the conclusion as ; the constant here is the exact constant the
proof establishes at the stated optimal (no hidden slack). The model class and
the fact enter only through the abstract bound , since neither
the algorithm nor this proposition's proof otherwise references . The probability-
qualifier of the source is the hypothesis OracleGuarantee ... EstSq (see that definition's
Formalization Note); the conclusion is then a deterministic consequence of that event holding.
import Mathlib import Definitions.Def_FoundationsRL_Contextual_IsIGW import Definitions.Def_FoundationsRL_Contextual_OracleGuarantee import Definitions.Def_FoundationsRL_Contextual_regret
namespace FoundationsRL.Contextual
/-- Proposition 10 (Foster & Rakhlin, *Foundations of Reinforcement Learning and Interactive
Decision Making*, arXiv:2312.16730v1, p. 51): SquareCB's regret bound. Given a context
sequence `x : Fin T → X`, ground-truth reward function `fstar` with optimal policy `pistar`,
an online regression oracle producing estimates `fhat` with cumulative squared-error
guarantee `EstSq` (`OracleGuarantee`), and SquareCB's realized action distributions
`p t = IGW_γ(fhat t (x t))` with `γ = √(TA / EstSq)`, the regret is at most
`2√(A T EstSq)` (the book's `≲ √(AT · EstSq(F,T,δ))`, with the exact constant `2` that the
proof establishes by balancing `TA/γ` against `γ · EstSq`). -/
theorem squarecb_regret_bound {X : Type*} {A T : ℕ} (hT : 0 < T)
(x : Fin T → X) (fstar : X → Fin A → ℝ) (pistar : X → Fin A)
(hpistar : ∀ (x' : X) (π : Fin A), fstar x' π ≤ fstar x' (pistar x'))
(fhat : Fin T → X → Fin A → ℝ) (bstar : Fin T → Fin A)
(EstSq : ℝ) (hEstSq : 0 < EstSq)
(γ : ℝ) (hγ : γ = Real.sqrt ((T : ℝ) * A / EstSq))
(p : Fin T → Fin A → ℝ) (hp : ∀ t, IsIGW A (fhat t (x t)) γ (bstar t) (p t))
(hOracle : OracleGuarantee A T x fhat fstar p EstSq) :
regret A T x fstar pistar p ≤ 2 * Real.sqrt ((A : ℝ) * T * EstSq) := by sorry
end FoundationsRL.Contextual
Read-back
What the Lean code literally says, in plain math · claude-fable-5-1
Let be an arbitrary type (the contexts), and let and be natural numbers, with the hypothesis (no positivity is assumed for ; is permitted, in which case the action type is empty). The theorem fixes the following data:
- a context sequence ;
- a function ;
- a map , together with the hypothesis that for every and every action ,
i.e. maximizes over actions (when this hypothesis is vacuous, but must still exist as a function into an empty type, which forces to be empty);
- a family of functions indexed by round;
- a family of actions indexed by round;
- a real number with ;
- a real number with the hypothesis
where and are cast to reals and is the real square root (which returns on negative inputs; here the argument is nonnegative);
- a family of real-valued functions on actions, one per round. Nothing in the statement itself requires to be nonnegative or to sum to one; any such constraint can only come through the hypotheses below.
Two hypotheses refer to definitions imported from the bundle, which are not unfolded in the given code, so their precise content is not visible here and must be checked against their own declarations:
- for every round , the predicate holds of the tuple — that is, of the action count, the round- estimated reward vector , the parameter , the designated action , and the round- function ;
- the predicate holds of the tuple .
Under all of the above, the conclusion is the real-number inequality
where is likewise an imported definition of the bundle, not unfolded in the given code, taking as arguments the action count , the horizon , the context sequence , the function , the map , and the family ; and are cast to reals inside the square root. The inequality is non-strict. The statement makes no claim about how , or are produced: they are arbitrary data subject only to the and hypotheses. If either of those predicates is unsatisfiable for the given data, the theorem holds vacuously. No probability, expectation, or random variable appears anywhere in the statement; every object is a deterministic function and the bound is a deterministic inequality between real numbers.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.