Repository navigation
feat: Gaussian thresholding, minimum threshold and Any Low Arm with arm-dependent variances - #285
Merged
lmlexplore-automation[bot] merged 3 commits intoNov 12, 2026
Conversation
…rm-dependent variances Co-Authored-By: Claude Code <noreply@github.com>
RemyDegenne
commented
Nov 12, 2026
RemyDegenne
commented
Nov 12, 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 |
…ces and share the divergence to max x γ Move klDiv_eq_ofReal_expFamilyDiv_gaussianReal from Identification/Task/ExpFamily.lean (namespace LMLExplore.Identification) to Bandits/Instances.lean (namespace LMLExplore.Bandits), next to its common-variance counterpart. Add expFamilyDiv_gaussianReal_max_of_lt, expFamilyDiv_gaussianReal_max_of_le and expFamilyDiv_gaussianReal_max_pos in Threshold/Basic.lean, used by the minimum-threshold and Any Low Arm proofs. Co-Authored-By: Claude Code <noreply@github.com>
RemyDegenne
commented
Nov 12, 2026
expFamilyDiv_gaussianReal_max_of_le never used Gaussianity: its proof is max_eq_left followed by Measure.expFamilyDiv_self. Inline those two rewrites at its three call sites and remove the helper. Co-Authored-By: Claude Code <noreply@github.com>
Merged
via the queue into
LeanMachineLearning:main
with commit Nov 12, 2026
469c4c5
19 of 21 checks passed
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 restates the Gaussian closed forms of thresholding, minimum threshold and Any Low Arm for Gaussian arms with arm-dependent known variances
v a, the arm lawsν μ a = 𝒩(μ a, v a)(for instanceBandits.gaussianMeanVarBandit fun a ↦ (μ a, v a)), and derives the common-variance statements from them as the case of a constantv.Roadmap: Generalization
Target: Generalization 1.8, "Gaussian thresholding, minimum threshold and Any Low Arm with arm-dependent variances" (after 1.6, merged in #278). This PR meets the target. Next on that path is Identification 3.6, which this target unblocks. Target 1.9 (half-spaces and best arm identification with arm-dependent variances) is a separate target.
The arm-dependent forms use the convention that
Task/HalfSpace.lean(Identification 3.6) andIdentTask.cost_gaussianRealalready use: a hypothesishν : ∀ μ a, ν μ a = gaussianReal (μ a) (v a)withhv : ∀ a, v a ≠ 0, and the suffix_gaussianReal. The Gaussian bandits with means and variances satisfyhνbygaussianMeanVarBandit_apply.gaussianBandit · σ2satisfies it bygaussianBandit_apply, which is how the common-variance statements are derived. So the bridgegaussianBandit_eq_gaussianMeanVarBanditis not needed.New statements:
altCost_thresholdingTask_gaussianReal:D(μ, w, ¬s) = min_a w a (μ a - γ)² / (2 v a).charTime_thresholdingTask_gaussianReal,charTime_minThresholdTask_gaussianReal_false:T*(μ) = ∑ a, 2 v a / (μ a - γ)².charTime_minThresholdTask_gaussianReal_true:T*(μ) = 2 v a₀ / (μ a₀ - γ)²for an arma₀belowγthat maximizes(μ a - γ)² / v aamong the arms belowγ. With arm-dependent variances, this arm is no longer an arm of smallest mean.oracleAlloc_anyLowArmTask_gaussianReal: the oracle allocations are the vertices of the arms belowγthat maximize(μ a - γ)² / v a.klDiv_eq_ofReal_expFamilyDiv_gaussianReal(Task/ExpFamily.lean): such arms have the divergences of the exponential families of the𝒩(0, v a). All five proofs feed this to theIsDivergenceOnlemmas of target 1.6.Restated statements. They keep their names and their signatures, and are now one-line corollaries:
altCost_thresholdingTask_gaussianBandit,charTime_thresholdingTask_gaussianBandit,charTime_minThresholdTask_gaussianBandit_false,charTime_minThresholdTask_gaussianBandit_trueandoracleAlloc_anyLowArmTask_gaussianBandit(the last one keeps a short set computation that identifies the maximizing arms with the arms of smallest mean). As the roadmap asks,not_convex_oracleAlloc_anyLowArmTask_gaussianBanditkeeps a common variance.IdentTask.cost_gaussianBanditwas already derived onmainfromIdentTask.cost_gaussianReal, which takes arm-dependent variances, so this PR leaves it unchanged. In both files the Gaussian statements now sit in one finalsection Gaussian, because they needν : (α → ℝ) → Kernel α ℝinstead of the sections' explicitνvalued in𝓨.Generalized declaration (same name, no removals):
LMLExplore.setOf_forall_mem_expFamilyMeans_gaussianRealnow takes per-index variances{v : ι → ℝ≥0} (hv : ∀ i, v i ≠ 0). Callers with a common variance pass(fun _ ↦ hσ2)(Task/BestArm/Basic.lean,Task/BestArm/StaticProportions.lean,Task/Threshold/StaticProportions.lean). No public declaration is removed or renamed.🤖 Prepared with Claude Code