Repository navigation
feat: transport of means and variances under a KL constraint [MDJKLV21, Lemmas 10–12] - #291
Open
RemyDegenne wants to merge 1 commit into
Conversation
…1, Lemmas 10–12] Co-Authored-By: Claude Code <noreply@github.com>
This was referenced Nov 12, 2026
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 adds the transport of means and variances under a Kullback–Leibler constraint, the tools "the KL-to-Bernstein transport" and "the variance transfers [MDJKLV21, Lemmas 10–12]" of RF-Express: if
KL(μ ‖ ν) ≤ aandfhas values in[c, d], then|∫ f ∂μ - ∫ f ∂ν| ≤ √(2 Var_ν(f) a) + (d - c) a / 3,Var_ν(f) ≤ 2 Var_μ(f) + (8/3)(d - c)² aandVar_μ(f) ≤ 2 Var_ν(f) + (5/6)(d - c)² a. It also adds the two variance transports of [MDJKLV21, Lemma 12] that use no KL constraint.Roadmap: ReinforcementLearning
The target is ReinforcementLearning Layer 19.2 (RF-Express [MDJKLV21, Theorem 1]), whose list of tools includes "the KL-to-Bernstein transport: if KL(p,q) ≤ α and f ∈ [0,b], then |pf − qf| ≤ √(2Var_q(f)α) + (2/3)bα" and "the variance transfers [MDJKLV21, Lemmas 10–12]". The case
c = 0,d = bofabs_integral_sub_integral_le_of_klDiv_legives the roadmap's bound withb α / 3in place of2 b α / 3. After this PR, Layer 19.2 still needs counts versus pseudo-counts, Lemma 9 (∑_t u_{t+1}/max(1, U_t) ≤ 4 log(U_{T+1} + 1)), the inversion of Lemma 13 (open in #287), and then the algorithm with its PAC and sample-complexity theorem.The constants are sharper than in the sources, and I checked them by hand. [MDJKLV21, Lemma 10] (after [TM18]) bounds the positive root of
2α(V + D/3) − D² ≥ 0by√(2Vα) + 2α/3. Here, Chernoff's choicet = r / (v + b r / 3), withr = √(2 v a), in the sub-gamma boundexp x − 1 − x ≤ x² / (2(1 − x/3))gives√(2 v a) + b a / 3directly. This is the inversion from the high-probability Bernstein inequality [BLM13, Theorem 2.10] that LMLExplore already has inProbability/Moments/Bernstein.lean. The variance transports follow from it with(8/3)and(5/6)in place of4[MDJKLV21, Lemma 11], and the finite-space transport has the factor1/2in place of3[MDJKLV21, Lemma 12], because the constant(d − c)²/2can be subtracted under∑ (ν{x} − μ{x}) = 0. The one-sided transport only needsf ≤ ∫ f ∂ν + bν-a.e.,MemLp f 2 νandIntegrable f μ. The boundb ≥ 0follows from these, andb = 0is handled as a limit. The two-sided statements takefin any interval[c, d], not just[0, b].New declarations:
LMLExplore/InformationTheory/KullbackLeibler/Bernstein.lean(new file, namespaceLMLExplore):integral_sub_integral_le_of_klDiv_le(one-sided)abs_integral_sub_integral_le_of_klDiv_le[TM18], [MDJKLV21, Lemma 10]variance_le_two_mul_variance_add_of_klDiv_leandvariance_le_two_mul_variance_add_of_klDiv_le'[MDJKLV21, Lemma 11]t ≥ 0, the caseb > 0, and the specialisation tog ∈ [0, B]withVar_ν(g) ≤ B ∫ g ∂νLMLExplore/Probability/Moments/Variance.lean(namespaceProbabilityTheory):variance_le_integral_sub_sq:Var[X] ≤ ∫ (X − c)²variance_le_mul_integral_sub:X ∈ [c, d]givesVar[X] ≤ (d − c)(𝔼X − c), a weakening of Mathlib's Bhatia–Davisvariance_le_sub_mul_subvariance_le_two_mul_variance_add_mul_integral_abs_sub:|X − Y| ≤ DgivesVar[X] ≤ 2Var[Y] + 2D𝔼|X − Y|variance_le_variance_add_mul_sum_abs_sub: on a finite space,Var_ν(f) ≤ Var_μ(f) + (d − c)²/2 ∑|μ{x} − ν{x}|The proofs reuse:
TauCeti.ofReal_integral_sub_log_integral_exp_le_klDivMeasureTheory.MemLp.mgf_le_exp_mul_exp_sub_one_sub_of_ae_leandReal.exp_sub_one_sub_id_le_sq_divvariance_le_expectation_sq,variance_le_sub_mul_sub,Convex.integral_memandklDiv_eq_zero_iffNo declaration is removed or renamed.
Source: this PR ports item R23 of the paper project RemyDegenne/Essakine2026Tight, at commit 520dd39a55fa4e9a62a4a2d51f48163926176a5d (Apache-2.0). The source files are
Essakine2026Tight/ForLMLExplore/InformationTheory/KLBernstein.leanandEssakine2026Tight/ForLMLExplore/Probability/Moments/VarianceTransport.lean. Changes from the source:Real.poissonCramer,Real.expSubOneSub, item R26, which is not a ReinforcementLearning target), nor the AM–GM helpers ofAnalysis/Real/Sqrt.lean.[0, b]to[c, d], and the one-sided transport to functions bounded above.integral_mem_Icc_of_ae_mem_Icc(item R8) is not ported; its uses are inlined as Mathlib'sConvex.integral_mem.Probability/Moments/Variance.leanrather than a new file.Local checks (not CI):
lake build --iofailis green.Paper: RemyDegenne/Essakine2026Tight
Item: R23
🤖 Prepared with Claude Code