Repository navigation
feat: likelihood ratios of sequential predictors and time-uniform KL concentration by the Laplace mixture [JKMDLV20, Proposition 1] - #296
Open
RemyDegenne wants to merge 1 commit into
Conversation
…concentration by the Laplace mixture [JKMDLV20, Proposition 1] Co-Authored-By: Claude Code <noreply@github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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 the time-uniform concentration of the empirical distribution of independent observations on a finite type by the Laplace mixture [JKMDLV20, Proposition 1]. For
ξ 0, ξ 1, …with lawνon a type withmelements,p̂_nthe empirical distribution of the firstnobservations (Tau Ceti'sempiricalFiniteMeasure) andδ > 0, it showsP(∃ n ≥ 1, log (1/δ) + (m - 1) log (e (1 + n / (m - 1))) ≤ n KL(p̂_n ‖ ν)) ≤ δ. It also proves that the likelihood ratio of every predictable sequential predictor againstνis a nonnegative supermartingale, and a mean-one martingale for a probability predictor whenνcharges every point.Target: ReinforcementLearning, Layer 3 "Concentration", item 4 "Types and categorical KL bounds", second bullet: "the likelihood ratio of every predictable sequential predictor against p is a nonnegative mean-one martingale. Laplace's predictor q_t(i) = (N_i(t)+1)/(t+m) gives, by Ville, P(∃ n ≥ 1, n KL(p̂_n, p) > log(1/δ) + (m-1) log(e(1+n/(m-1)))) ≤ δ". This PR proves that bullet. The event here uses
≤, so it contains the roadmap's event with>. The mean-one martingale statement needsνto charge every point. Otherwise a predictor that puts mass on aν-null point loses that mass, and only the supermartingale property holds, which is what Ville's inequality uses. The first bullet of item 4, the count of types and the(n+1)^m e^{-nε}bound, is the subject of the open PR #290. After this PR and #290, item 4 of Layer 3 is complete.New declarations:
LMLExplore/Probability/Martingale/LikelihoodRatio.lean:LMLExplore.predictorLikelihoodRatio∏_{t<n} q t (ξ t) / ν{ξ t}, with_def,_zero,_succand_nonneg;measurable_predictorLikelihoodRatio,integrable_predictorLikelihoodRatio,supermartingale_predictorLikelihoodRatio,martingale_predictorLikelihoodRatioandintegral_predictorLikelihoodRatio(mean one). The observations are adapted to a filtrationℱ, withξ tℱ (t+1)-measurable, independent ofℱ tand of lawν. The predictor isℱ t-measurable.LMLExplore/InformationTheory/LaplaceMixture.lean:LMLExplore.laplacePredictor(the rule of succession, with counts given by LML'spullCount), with_def,_nonneg,sum_laplacePredictor,measurable_laplacePredictorand the closed formprod_range_laplacePredictor∏_{t<n} q_t(ξ t) = ∏ₐ N_n(a)! / m^{(n)}. It also hasmeasureReal_empiricalFiniteMeasure_singleton_eq_pullCountandexp_mul_toReal_klDiv_empiricalFiniteMeasure(exp (card κ · KL(p̂ ‖ ν)) = ∏ᵢ p̂{x i} / ν{x i}for any finite family of points charged byν). The comparison with the maximum likelihood isexp_mul_toReal_klDiv_le_mul_predictorLikelihoodRatio_laplacePredictor. The time-uniform bound comes in two forms:measure_exists_le_mul_klDiv_empiricalFiniteMeasure_le(filtration form) andProbabilityTheory.iIndepFun.measure_exists_le_mul_klDiv_empiricalFiniteMeasure_le(independent form, reduced to the coordinates ofν^{⊗ℕ}).LMLExplore/Data/Nat/Choose/Bounds.lean:Nat.choose_le_exp_one_mul_div_pow(n.choose k ≤ (e n / k)^k) andNat.multinomial_mul_prod_pow_le_one(a multinomial probability is at most1, in any ordered commutative semiring).LMLExplore/SequentialLearning/FiniteActions.lean:prod_pow_pullCountandprod_comp_pullCount, the multiplicative forms of LML'ssum_pullCount_mulandsum_comp_pullCount, andprod_range_pullCount_action_add_one∏_{s<t} (N_s(A_s) + 1) = ∏ₐ N_t(a)!.Proof of the threshold. Write
N_n(a)for the count ofaamong the firstnobservations andP = ∏_{t<n} ν{ξ t}. The maximum likelihood isexp (n KL(p̂_n ‖ ν)) P = ∏ₐ (N_n(a)/n)^{N_n(a)}. The multinomial bound turns it into at most∏ₐ N_n(a)! / n!. The rule of succession has likelihoodL_n P = ∏ₐ N_n(a)! / m^{(n)}, andm^{(n)} / n! = binom(n+m-1, m-1) ≤ (e (1 + n/(m-1)))^{m-1}. Together these giveexp (n KL) ≤ (e (1 + n/(m-1)))^{m-1} L_n. On the deviation event,L_n ≥ 1/δ, and LMLExplore's Ville inequalityMeasureTheory.Supermartingale.measure_exists_le_leconcludes.Placement and reuse. Tau Ceti's
empiricalFiniteMeasure(withempiricalFiniteMeasure_applyandintegral_empiricalFiniteMeasure_of_measurableSingletonClass) andMeasure.rnDeriv_eq_measure_singleton_divgive the divergence of the empirical distribution. The counts are LML'spullCount, not a new count, so the PR does not depend on thetypeCountof #290.SequentialLearning/LikelihoodRatio.leanhandles mixtures of fixed alternatives along a bandit run, throughexp (∑ log-likelihood ratios)integrated against a prior. A sequential predictor needs no prior, and the Laplace mixture would need the Dirichlet integral there, so the new file sits inProbability/Martingale/, next to Ville's inequality. The strict-past filtration of the coordinates ofν^{⊗ℕ}is built inline in the proof, followingmeasure_exists_sum_div_add_sqrt_add_le_zero_le_of_iIndepFun(Probability/Martingale/SubGaussian.lean). No public declaration is removed or renamed.Source: the time-uniform bound is adapted from the paper project RemyDegenne/Essakine2026Tight at commit 38bbd16fd759008cf5dbad67b88e442df1d116fb (Apache 2.0), file
Essakine2026Tight/ForLMLExplore/InformationTheory/KLTimeUniform.lean. That file proves the supermartingale property for the Laplace ratio only and bounds the mixture with Stirling's formula, which gives the thresholdlog (1/δ) + (m-1) log (n+1) + 1 + log n / 2. Following the note on R21 of itsPAPER_ROADMAP.md, this port proves the property for every predictor and the roadmap's threshold of [JKMDLV20], through the multinomial bound. The source's Stirling helpers and its own threshold are not ported. The module docstring credits the source and the reference.References: [JKMDLV20] A. Jonsson, E. Kaufmann, P. Ménard, O. D. Domingues, E. Leurent and M. Valko, Planning in Markov decision processes with gap-dependent sample complexity, NeurIPS 2020, Proposition 1. [EV26] Y. Essakine and C. Vernade, Tight sample complexity bounds for entropic best policy identification, Lemma 5.
Roadmap: ReinforcementLearning
Paper: RemyDegenne/Essakine2026Tight
Item: R21
🤖 Prepared with Claude Code