Repository navigation
feat: joint continuity of the cost of the alternatives on product models and for compact alternatives [DK19, Lemmas 24–27] - #283
Merged
lmlexplore-automation[bot] merged 3 commits intoNov 12, 2026
Conversation
…els and for compact alternatives [DK19, Lemmas 24–27] Co-Authored-By: Claude Code <noreply@github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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 |
…e product-model overview Co-Authored-By: Claude Code <noreply@github.com>
RemyDegenne
commented
Nov 12, 2026
Specialise continuousOn_biInf_cost_pi and continuousOn_altCost_pi to tasks with task.ν = productBandit κ, with the hypotheses phrased on the per-arm divergences klDiv (κ a x) (κ a y) in ℝ≥0∞, as in the roadmap's continuousOn_iInf_cost_productBandit. Co-Authored-By: Claude Code <noreply@github.com>
Merged
via the queue into
LeanMachineLearning:main
with commit Nov 12, 2026
7923333
26 of 27 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 proves the joint continuity of the cost
(θ, w) ↦ inf_{θ' ∈ A} cost_θ(w, θ')of a set of alternatives in the model and the allocation, in the two settings of [DK19, Appendix F]: alternatives inside a compact set (Lemma 24), and any set of alternatives, compact or not, on a product model with locally relatively compact sublevel sets of the per-arm divergences (Lemmas 25–27, the non-compact setting of [FKV14]). It also proves the upper semicontinuity of this cost, and its measurability, under weaker hypotheses. The general theorems go intoLMLExplore/Identification/Task/Continuity.lean, and theirproductBanditspecialisation intoTask/ProductModel.lean, which imports it. That file already derives the continuity ofD(θ, ¬i),D(θ),T*(θ)and the upper hemicontinuity ofw*(θ, ¬i)from this joint continuity, which so far had been proved only for best arm identification in a single exponential family (continuousOn_altCost_baiTask_restrict).Roadmap: Identification
Milestones:
(θ, w) ↦ D(θ, w, A)on∏_a S_a × [0, ∞)^α, for every setA ⊆ ∏_a S_aof alternatives, compact or not, for a product model …" and "Prove also the joint continuity … when the closure of¬iinMis compact".(θ, w) ↦ D(θ, w, ¬i)is upper semicontinuous, hence measurable, on every topological space of models on whichθ ↦ KL(ν_a(θ), ν_a(λ))is real-valued and continuous". The roadmap names this as the upper half of the Layer 3.3 continuity.After this PR, the third part of that Layer 3.3 bullet remains: checking the per-arm hypotheses for exponential families in the mean parametrization (divergence tending to
+∞at the endpoints of the means) and for the two-parameter Gaussian model. The next bullet then applies these theorems to the oracle answers and allocations, whichTask/Oracle.leantakes as hypotheses.New public declarations, all in
LMLExplore.Identification.IdentTask:upperSemicontinuousOn_biInf_cost: if everyθ ↦ KL(ν_a(θ), ν_a(θ')), forθ' ∈ A, is finite and continuous ons, the cost ofAis upper semicontinuous ons ×ˢ univ.upperSemicontinuous_altCostis the global form forD(θ, w, ¬i), andmeasurable_altCostfollows from it through Mathlib'sUpperSemicontinuous.measurable.continuousOn_biInf_cost_of_isCompact,continuousOn_altCost_of_isCompact: forA ⊆ KwithKcompact, and real divergencesKL(ν_a(θ), ν_a(θ')) = k a θ θ'continuous ons ×ˢ K, the cost is continuous ons ×ˢ univ. The roadmap states this for divergences continuous onM × Mwith compact closure of¬iinM. That is the cases = M, withKthat closure.continuousOn_biInf_cost_pi,continuousOn_altCost_pi: for modelsθ : α → Θ₀whose divergences on∏ a, S aare real per-arm divergencesk a (θ a) (θ' a)continuous onS a ×ˢ S a, with the relative-compactness hypothesis of the roadmap (everyx ∈ S ahas a neighbourhoodUinS asuch that{y ∈ S a | ∃ x' ∈ U, k a x' y ≤ r}lies in a compact subset ofS afor everyr), the cost of everyA ⊆ ∏ a, S ais continuous on(∏ a, S a) ×ˢ univ.continuousOn_biInf_cost_productBandit,continuousOn_altCost_productBandit(inTask/ProductModel.lean): the specialisation totask.ν = productBandit κ, with the hypotheses onklDiv (κ a x) (κ a y)inℝ≥0∞as in the roadmap'scontinuousOn_iInf_cost_productBandit(finite, continuous onS a ×ˢ S a, sublevel sets for finiterlocally in compact subsets ofS a). They instantiatek a x y = (klDiv (κ a x) (κ a y)).toReal.continuousOn_gameValue_pi,continuousOn_charTime_pi: with finitely many answers andtask.M ⊆ ∏ a, S a,D(θ)andT*(θ)are continuous ontask.M. These show the product theorem discharging the hypothesis of the existingcontinuousWithinAt_gameValueandcontinuousWithinAt_charTime.Design notes:
hν : ∀ θ ∈ univ.pi S, ∀ θ' ∈ univ.pi S, ∀ a, klDiv (task.ν θ a) (task.ν θ' a) = ENNReal.ofReal (k a (θ a) (θ' a))), not astask.ν = productBandit κ. This coversproductBandit κ(withk a x y = (klDiv (κ a x) (κ a y)).toReal), and also the vectors of means of per-arm exponential families in the style ofIsDivergenceOnfromTask/ExpFamily.lean. It also avoids importingTask/ProductModel.lean, which imports this file throughTask/BestArm/Basic.lean.w : α → ℝ, not only[0, ∞)^α, becausecostcounts a negative weight as0throughENNReal.ofReal.Topology/Semicontinuity/Berge.lean, because Berge's theorem takes the infimum over a compact set, andAneed not be compact. The lower semicontinuity is a direct argument. Near(θ, w), an alternative of cost at mostrhas its coordinates of positive weight in the compact sets given by the hypothesis. On those sets the per-arm costs converge uniformly, by Mathlib'sIsCompact.mem_uniformity_of_prod. The coordinates of zero weight only add a nonnegative term. The two lower semicontinuity lemmas and the per-arm step are private, since the public continuity theorems subsume them.References: [DK19] R. Degenne and W. M. Koolen, Pure exploration with multiple correct answers, NeurIPS 2019, supplementary material, Appendix F (Theorems 22–23, Lemmas 24–27). [FKV14] E. A. Feinberg, P. O. Kasyanov and M. Voorneveld, Berge's maximum theorem for noncompact image sets, J. Math. Anal. Appl. 413 (2014). Both are cited in the file. No Mathlib material is vendored. The PR removes or renames no public declaration.
🤖 Prepared with Claude Code