Repository navigation
feat: online subgradient descent on unbounded sets and on strongly convex losses - #381
RemyDegenne wants to merge 1 commit into
Conversation
…nvex losses Co-Authored-By: Claude Code <noreply@github.com>
There was a problem hiding this comment.
🟡 reuse — request_changes claude/claude-opus-5-5
The new OSD bounds (projected one-step inequality, constant and antitone rate bounds, strongly convex and logarithmic regret) add material I could not find elsewhere, but the guessing-game proof copies the strong-convexity and subgradient facts already proved in FTRL/Quadratic.lean, and one membership proof redoes mem_of_isMirrorDescentStep.
LMLExplore/OnlineLearning/SubgradientDescent.lean:428— In onlineSubgradientDescent_regret_sq_sub_le_one_add_log,hf(2-strong convexity of(a - y t)^2on [0,1]) copieshℓin regret_sq_sub_le_one_add_log verbatim, andhg(line 432) repeats that theorem's subgradient proof with innerSL instead of toSpanSingleton. Fix: Factor public lemmas next to regret_sq_sub_le_one_add_log in FTRL/Quadratic.lean, e.g.strongConvexOn_sq_sub (y : ℝ) : StrongConvexOn (Set.Icc 0 1) 2 fun a ↦ (a - y) ^ 2and the subgradient2 * (x - y)at x, and use them in both theorems.LMLExplore/OnlineLearning/SubgradientDescent.lean:362— In onlineSubgradientDescent_regret_le_of_strongConvexOn,h_memrepeats the pattern-match proof of mem_of_isMirrorDescentStep (| 0, _ => ha0 | t + 1, ht => ...). Fix: Usemem_of_isMirrorDescentStep ha0 (fun t ht ↦ isMirrorDescentStep_norm_sq_div_two_iff.mpr (ha t ht)) t ht.le, as onlineSubgradientDescent_regret_le already does at line 223.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5-5 · 40s · 203.1k in (160.9k cache read, 42.2k cache write) / 3.6k out tokens · reviewing this diff · rubric ·
There was a problem hiding this comment.
🟡 proof-quality — request_changes claude/claude-opus-5-5
The proofs are well structured, commented and mostly robust. The stability bound for the potential ‖·‖²/2 is proved inline twice with ad hoc coercion and mul_one patches instead of being factored or taken from the existing quadratic helper.
LMLExplore/OnlineLearning/SubgradientDescent.lean:133—inner_sub_le_of_isMinOn_norm_sub(L133) andonlineSubgradientDescent_regret_le_of_antitone(L195) both rebuild the bound⟪g, a - b⟫ - ‖b - a‖²/2/η ≤ η/2 * ‖g‖²inline. Each callsapply_sub_sub_div_le_of_mul_norm_sq_le one_pos …with ale_of_eq (by ring)hypothesis, and the first also patchesη / (2 * 1)withh_eq' … rw [mul_one]. Fix: Factor one lemma, e.g.inner_sub_sub_norm_sq_div_le (hη : 0 < η) : ⟪g, a - b⟫ - ‖b - a‖ ^ 2 / 2 / η ≤ η / 2 * ‖g‖ ^ 2, derived fromapply_sub_sub_mul_norm_sq_le, and use it at both sites so thath_eq'and thele_of_eq (by ring)casts disappear.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5-5 · 43s · 136k in (123.5k cache read, 12.5k cache write) / 3.9k out tokens · reviewing this diff · rubric ·
AI review — changes requestedEach 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 |
This PR completes OnlineLearning Layer 2.1 (constant rates on unbounded sets [Ora, Theorem 2.13, Lemmas 2.12 and 2.31]) and Layer 2.2 (strongly convex losses [Ora, Theorem 4.7, Corollary 4.8, Example 4.11]) of the milestone "Layer 2: Online subgradient descent beyond √n". It also passes the guessing-game completion check that the roadmap sets for item 2.
Roadmap: OnlineLearning
In
OnlineLearning/SubgradientDescent.lean(real inner product space, subgradients withinKas LML'sHasSubgradientWithinAt, plays given by nearest-point hypotheses like the existingonlineSubgradientDescent_regret_le, new bounds stated with Layer 0.1'sregret):inner_sub_le_of_isMinOn_norm_subis Lemma 2.12/2.31, one projected step:⟪g, a - u⟫ ≤ (‖u - a‖² - ‖u - x‖²)/(2η) + η/2 ‖g‖²forxa nearest point ofKtoa - η • g. It is proved from the mirror-descent one-step inequalityIsMirrorDescentStep.apply_sub_lewith the potential‖·‖²/2, together withapply_sub_sub_div_le_of_mul_norm_sq_le.onlineSubgradientDescent_regret_le_norm_sub_sq_divis Theorem 2.13 with a constant rate:(‖u - a 0‖² - ‖u - a n‖²)/(2η) + η/2 ∑ ‖g t‖². It needs no diameter and noa 0 ∈ K.onlineSubgradientDescent_regret_le_of_antitoneis Theorem 2.13 with nonincreasing rates. It keeps-‖u - a n‖²/(2η (n-1))and assumes only‖u - a t‖ ≤ Dfort < n, not a diameter. It takes0 < n, without which it would claim‖u - a 0‖ ≤ D.onlineSubgradientDescent_regret_le_sum_norm_sq_divis Theorem 4.7, under strong convexity at the plays (f t (a t) + ⟪g t, v - a t⟫ + μ t/2 ‖v - a t‖² ≤ f t vonK) with rates(∑ s ≤ t, μ s)⁻¹. The bound is∑ ‖g t‖²/(2 ∑ s ≤ t, μ s). Only the partial sums must be positive; the individualμ tmay be negative. The proof telescopes the potential(∑ s < t, μ s)/2 ‖u - a t‖².onlineSubgradientDescent_regret_le_of_strongConvexOnis the same bound forμ t-strongly convex losses with subgradients at the plays, throughStrongConvexOn.add_add_le_of_hasSubgradientWithinAt(Layer 1.1).onlineSubgradientDescent_regret_le_mul_one_add_logis Corollary 4.8:L²/(2μ) (1 + log n)forμ-strongly convex losses with‖g t‖ ≤ Lat the plays, fromReal.sum_range_inv_add_one_le.onlineSubgradientDescent_regret_sq_sub_le_one_add_logis Example 4.11 and the Layer 2 completion check. Corollary 4.8 withμ = 2,L = 2gives regret at most1 + log non the guessing game(a - y t)²on[0, 1], for the explicit playsx (t+1) = x t - (x t - y t)/(t+1). These are OSD steps that never leave[0, 1]. The follow-the-leader versionregret_sq_sub_le_one_add_log(Layer 5.3) instead takes its plays as minimizers. This one comes from the OSD bound, as the roadmap's check asks.In
OnlineLearning/MirrorDescent.lean:sum_apply_sub_le_mirrorDescent_of_antitone: the nonincreasing-rate bound(D - D_F(u, a n))/η (n-1) + ∑ stability terms, keeping the last divergence. It needs neither convexity ofFnora 0 ∈ K. The summation-by-parts estimate thatmirrorDescent_regret_le_of_antitonedid inline now lives here, and that theorem is re-derived from it with the same statement.onlineSubgradientDescent_regret_le(diameter form) is likewise re-proved from the newonlineSubgradientDescent_regret_le_of_antitone, with its statement unchanged.No public declaration is removed or renamed.
Reuse: I found no projected-step inequality, OSD bound for strongly convex losses, or logarithmic-regret statement in Mathlib, Tau Ceti, LML or Statlib. I grepped for
onlineSubgradientDescent, nearest-pointIsMinOn (fun b ↦ ‖b - …‖)hypotheses andinner_sub_le_of_isMinOn. Mathlib'snorm_eq_iInf_iff_real_inner_le_zerocharacterizes projections through⨅, not nearest-point minimizers, so the one-step lemma goes through the existing mirror-descent API instead. The proofs reuseisMirrorDescentStep_norm_sq_div_two_iff,bregDiv_norm_sq_div_two,hasFDerivAt_norm_sq_div_two,sum_apply_sub_le_mirrorDescent,sum_sub_le_sum_apply_sub_of_hasSubgradientWithinAt,strongConvexOn_div_two_mul_norm_sub_sqandReal.sum_range_inv_add_one_le. Credit for logarithmic regret goes to [HAK07] in the module docstring, alongside [Ora].What remains on this milestone after this PR: Layer 2.3 (adaptive rates and
L*bounds, which also need the Layer 1.7 numerical lemmas in flight in #379 and Layer 1.3's self-bounded functions) and Layer 2.4 (AdaGrad).Local checks only (CI verifies the pushed PR):
scope: scoped: against 7fc78707241a5393aa85a7751e472cf1cb45fca9.local-axioms: checked 2 changed module(s), 80 declaration(s); 0 violation(s). The whole-librarylake build --iofail, source guards, module-system audit, header check and environment lint (checked 2 changed module(s), 80 declarations; 14 environment linters) passed, and the verify script exited 0.🤖 Prepared with Claude Code