Repository navigation
feat: FTRL with bandit feedback on the unit ball [LS, Theorem 28.11] - #164
Merged
lmlexplore-automation[bot] merged 2 commits intoNov 5, 2026
Merged
Conversation
Define the sampling rule, the action and the loss estimate (28.12) of [LS, Algorithm 17], prove that its rounds are unbiased and compute the expected variance term, and deduce the regret bound 2 √(3 n d log n) of FTRL with the potential -log (1 - ‖a‖) - ‖a‖ against an adaptive adversary. Co-Authored-By: Claude Code <noreply@github.com>
RemyDegenne
commented
Nov 5, 2026
RemyDegenne
commented
Nov 5, 2026
Contributor
Author
AI review — approvedEach rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.
♻️ = approved on an earlier commit, re-run before merge. Reviewing this diff at head |
Drop the redundant hr0 : 0 ≤ r from the unit-ball FTRL regret theorems, deriving it from hftrl, and state in the module docstring that the plays are FTRL plays almost surely. Co-Authored-By: Claude Code <noreply@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proves [LS, Theorem 28.11], the regret bound
2 √(3 n d log n)of follow the regularized leader with bandit feedback on the unit ball, against an adaptive adversary. It defines the ingredients of [LS, Algorithm 17] on a real inner product space with an orthonormal basisb : OrthonormalBasis ι ℝ E. The randomness of a round is an outcome inOption (ι × Bool), wherenonemeans the round does not explore andsome (i, s)means it explores in directionb ior-b i. The new definitions areunitBallProb a(the law of the outcome:‖a‖fornone,(1 - ‖a‖) / (2 d)for each direction),unitBallAction b a o(a / ‖a‖when not exploring,± b iwhen exploring) andunitBallEstimate b a y o, the estimate (28.12)d / (1 - ‖a‖) * y A * ⟪A, ·⟫, which uses only the observed lossy A.It targets Bandits Layer 10.2 (mirror descent with bandit feedback): "prove [LS, Theorem 28.11] for the unit ball: with ‖y_t‖ ≤ 1, r = 1 - 2ηd and η = √(log(n)/(3dn)), R_n ≤ 2√(3nd log n). The exploration direction U_t is uniform on {±e_1,…,±e_d}". This builds on the Layer 6.5 interface
IsUnbiasedRound/integral_sum_apply_sub_le_of_ae_le(#147, #159) and on the full-information boundftrl_regret_le_of_unitBallPotential(#153).Main results, in
LMLExplore/Bandits/UnitBallFTRL.lean:sum_unitBallProb_smul_unitBallAction,sum_unitBallProb_smul_unitBallEstimate: the mean action is the play, and the estimate is unbiased.sum_unitBallProb_mul_one_sub_norm_mul_norm_unitBallEstimate_sq: the mean of(1 - ‖a‖) ‖Ŷ‖²is exactlyd ‖y‖², throughOrthonormalBasis.norm_dual.isUnbiasedRound_unitBall: let the play and the loss bem-measurable with‖a‖ ≤ r < 1, and let the outcome have conditional lawunitBallProb agivenm. Then the round is anIsUnbiasedRound.integral_one_sub_norm_mul_norm_unitBallEstimate_sqgives the expected variance termd E‖y‖².ftrl_integral_regret_le_of_unitBallEstimate: for0 ≤ r < 1andη > 0, the expected regret against everyuwith‖u‖ ≤ 1is at most(1 - r) n - log (1 - r) / η + η d n / 2. The stability term is bounded at the base point, as in feat: FTRL on the unit ball with the potential -log(1 - ‖a‖) - ‖a‖ [LS, Section 28.4] #153, so the last term is half of [LS]'s.ftrl_integral_regret_le_two_mul_sqrt_of_unitBallEstimate: the book's tuningη = √(log n / (3 d n)),r = 1 - 2 η dgives≤ 2 √(3 n d log n)forn ≥ 2. The book's statement fails forn = 1, where its bound is0. The hypothesis0 ≤ ris needed for the algorithm to be defined; when it fails, the bound exceeds the trivial2n.As in
Bandits/StochasticMirrorDescent.lean, the interaction is stated round by round relative to σ-algebrasm t. The adaptive adversary's lossy tism t-measurable, and the plays are almost surely FTRL plays on the estimated losses. [LS]'s pseudocode omits the signs of the exploration direction; this PR uses± b ias the README and the book's text require.Two general lemmas get their own homes:
LMLExplore/MeasureTheory/Function/ConditionalExpectation/FiniteValued.leancontainscondExp_apply_ae_eq_sum_smulandintegral_apply_eq_integral_sum_smul. ForXfinite-valued with conditional lawq o = P⟦X = o | m⟧andm-measurableg · o, they giveP[g(X) | m] = ∑ o, q o • g · o. They also containintegrable_apply_of_measurableSet_preimage.LMLExplore/Analysis/InnerProductSpace/Dual.leancontainsOrthonormalBasis.sum_apply_smul_innerSL:∑ i, y (b i) • innerSL 𝕜 (b i) = y. It is the continuous form of Mathlib'sBasis.sum_dual_apply_smul_coord, from which it is proved.With this PR, Theorem 28.11 and Layer 10.2 are complete. Layer 10.1 (Exp3 with exploration, [LS, Theorem 27.1]) is what remains in Layer 10.
Roadmap: Bandits
🤖 Prepared with Claude Code