Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Online gradient descent has regret at most DGTDG\sqrt TDGT​ for linear losses

Proved
ApproachRegret.Calibration.ogd_regret_bound

by mikedeng1 · Oct 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

online-gradient-descentonline-learningp2o-batch-pfp1ap2o-gran-per-chapterp2o-plan-paperp2o-v1regret

Let K⊆Rn\mathcal K\subseteq\mathbb R^nK⊆Rn be nonempty, closed and convex, let T≥1T\ge1T≥1, and let D,G>0D,G>0D,G>0. Let θ1∈K\theta_1\in\mathcal Kθ1​∈K with ∥θ−θ1∥2≤D\|\theta-\theta_1\|_2\le D∥θ−θ1​∥2​≤D for every θ∈K\theta\in\mathcal Kθ∈K, and let g1,…,gTg_1,\dots,g_Tg1​,…,gT​ be loss vectors with ∥gt∥2≤G\|g_t\|_2\le G∥gt​∥2​≤G. If θ2,…,θT+1\theta_2,\dots,\theta_{T+1}θ2​,…,θT+1​ are produced by online gradient descent with step size η=D/(GT)\eta=D/(G\sqrt T)η=D/(GT​), θt+1=ΠK(θt−ηgt)\theta_{t+1}=\Pi_{\mathcal K}(\theta_t-\eta g_t)θt+1​=ΠK​(θt​−ηgt​), then

∑t=1T⟨gt,θt⟩−min⁡θ∈K∑t=1T⟨gt,θ⟩ ≤ D G T.\sum_{t=1}^T\langle g_t,\theta_t\rangle-\min_{\theta\in\mathcal K}\sum_{t=1}^T\langle g_t,\theta\rangle\ \le\ D\,G\,\sqrt T .t=1∑T​⟨gt​,θt​⟩−θ∈Kmin​t=1∑T​⟨gt​,θ⟩ ≤ DGT​.

This is Zinkevich's regret bound for online gradient descent, which the proof of Theorem 22 invokes for the cube B∞(1)B_\infty(1)B∞​(1) and the losses −u(wt,yt)-u(w_t,y_t)−u(wt​,yt​).

Formalization Note The page states the bound with DDD "the ℓ₂ diameter of the set". The statement assumes only ∥θ−θ1∥2≤D\|\theta-\theta_1\|_2\le D∥θ−θ1​∥2​≤D on K\mathcal KK, which the diameter implies because θ1∈K\theta_1\in\mathcal Kθ1​∈K; this is the form Theorem 22 needs, with D=m+1D=\sqrt{m+1}D=m+1​ about θ1=0\theta_1=0θ1​=0. The step size is pinned to η=D/(GT)\eta=D/(G\sqrt T)η=D/(GT​), the tuning under which the bound holds; the page's Algorithm 4 says only η=O(T−1/2)\eta=O(T^{-1/2})η=O(T−1/2). The minimum is sInf of the image of K\mathcal KK, which is bounded.

Preamble
import Mathlib
import Definitions.Def_ApproachRegret_Calibration_Game
import Definitions.Def_ApproachRegret_Calibration_Algorithms
Formal statement
namespace ApproachRegret.Calibration

/-- Proof of Theorem 22 (p. 44): Online Gradient Descent guarantees regret at most `D G √T`.
For a nonempty closed convex `K ⊆ ℝⁿ`, a start `θ₁ ∈ K` with `‖θ − θ₁‖ ≤ D` on `K`, linear
losses with `‖g_t‖ ≤ G`, and step size `η = D / (G √T)`, the OGD iterates satisfy
`∑_{t=1}^T ⟨g_t, θ_t⟩ − min_{θ ∈ K} ∑_{t=1}^T ⟨g_t, θ⟩ ≤ D G √T`. -/
theorem ogd_regret_bound {n : ℕ} (K : Set (ApproachRegret.ToOLO.E n)) (hKne : K.Nonempty) (hKc : IsClosed K)
    (hKcvx : Convex ℝ K) (T : ℕ) (hT : 1 ≤ T) (D G : ℝ) (hD : 0 < D) (hG : 0 < G)
    (g θ : ℕ → ApproachRegret.ToOLO.E n) (hθ1 : θ 1 ∈ K) (hdiam : ∀ x ∈ K, ‖x - θ 1‖ ≤ D)
    (hg : ∀ t, 1 ≤ t → t ≤ T → ‖g t‖ ≤ G)
    (hrun : IsOGDRun K (D / (G * Real.sqrt T)) T g θ) :
    linRegret K T g θ ≤ D * G * Real.sqrt T := by sorry

end ApproachRegret.Calibration
Source
Abernethy, Bartlett, Hazan (COLT 2011, JMLR W&CP 19), Algorithm 4 and proof of Theorem 22, p. 44
Human review
  • Endorsed by Shuze Chen · Oct 4, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 4, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me