Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2.22 — normalized EG has regret at most log(d)/η + η Σₜ Σᵢ wₜ[i]zₜ[i]² when ηzₜ[i] ≥ −1

Proved
OnlineLearningOCO.NormalizedEG.theorem_2_22

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

exponentiated-gradientonline-convex-optimizationonline-learningp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1regret

Let d≥1d \ge 1d≥1 and η>0\eta > 0η>0. The normalized Exponentiated Gradient algorithm on linear losses ft(w)=⟨w,zt⟩f_t(w) = \langle w, z_t\rangleft​(w)=⟨w,zt​⟩, zt∈Rdz_t \in \mathbb R^dzt​∈Rd, starts from w1=(1/d,…,1/d)w_1 = (1/d, \dots, 1/d)w1​=(1/d,…,1/d) and updates wt+1[i]=wt[i]e−ηzt[i]/∑jwt[j]e−ηzt[j]w_{t+1}[i] = w_t[i] e^{-\eta z_t[i]} / \sum_j w_t[j] e^{-\eta z_t[j]}wt+1​[i]=wt​[i]e−ηzt​[i]/∑j​wt​[j]e−ηzt​[j]; equivalently

wt[i]=e−ηz1:t−1[i]∑je−ηz1:t−1[j],z1:t−1=∑s=1t−1zs.w_t[i] = \frac{e^{-\eta z_{1:t-1}[i]}}{\sum_j e^{-\eta z_{1:t-1}[j]}}, \qquad z_{1:t-1} = \sum_{s=1}^{t-1} z_s .wt​[i]=∑j​e−ηz1:t−1​[j]e−ηz1:t−1​[i]​,z1:t−1​=s=1∑t−1​zs​.

Assume ηzt[i]≥−1\eta z_t[i] \ge -1ηzt​[i]≥−1 for all ttt and iii. Then for every TTT and every uuu in the probability simplex S={u∈Rd:u≥0, ∑iu[i]=1}S = \{u \in \mathbb R^d : u \ge 0,\ \sum_i u[i] = 1\}S={u∈Rd:u≥0, ∑i​u[i]=1},

∑t=1T⟨wt−u,zt⟩≤log⁡dη+η∑t=1T∑i=1dwt[i] zt[i]2.\sum_{t=1}^T \langle w_t - u, z_t\rangle \le \frac{\log d}{\eta} + \eta \sum_{t=1}^T \sum_{i=1}^d w_t[i]\, z_t[i]^2 .t=1∑T​⟨wt​−u,zt​⟩≤ηlogd​+ηt=1∑T​i=1∑d​wt​[i]zt​[i]2.

This is the local-norm refinement of the regret bound of normalized EG: the usual term η∑t∥zt∥∞2\eta\sum_t\|z_t\|_\infty^2η∑t​∥zt​∥∞2​ is replaced by η∑t∥zt∥t2\eta\sum_t \|z_t\|_t^2η∑t​∥zt​∥t2​ with the local norm ∥z∥t2=∑iwt[i]z[i]2≤∥z∥∞2\|z\|_t^2 = \sum_i w_t[i] z[i]^2 \le \|z\|_\infty^2∥z∥t2​=∑i​wt​[i]z[i]2≤∥z∥∞2​. Losses may be negative, down to −1/η-1/\eta−1/η. It is the tool behind the analyses of Hedge-type algorithms in the later sections of the survey.

Formalization Note log⁡\loglog is the natural logarithm. The page leaves the comparator uuu unquantified; it ranges over the probability simplex, the competing set of the normalized-entropy regularizer (the bound is false for uuu outside it). Rounds are numbered from 000: wmWeights η z t (the published weighted-majority weights, which put no restriction on the sign of the losses) is the paper's wt+1w_{t+1}wt+1​, so wmWeights η z 0 is the uniform vector w1w_1w1​, and the sums run over t∈{0,…,T−1}t \in \{0, \dots, T-1\}t∈{0,…,T−1}.

Preamble
import Mathlib
import Definitions.Def_UnderstandingML_Online
Formal statement
namespace OnlineLearningOCO.NormalizedEG

open UnderstandingML

/-- Theorem 2.22, p. 153. Run normalized EG (box on p. 144; closed form (2.10), p. 143) with
parameter `η > 0` on linear losses `f_t(w) = ⟨w, z_t⟩` with `η z_t[i] ≥ −1` for all `t, i`. Then
for every `u` in the probability simplex of `ℝ^d`,
`∑_{t=1}^T ⟨w_t − u, z_t⟩ ≤ log(d)/η + η ∑_{t=1}^T ∑_i w_t[i] z_t[i]²`.
Rounds are 0-based: `wmWeights η z t` is the paper's `w_{t+1}` (`wmWeights η z 0` is uniform). -/
theorem theorem_2_22 {d : ℕ} (hd : 0 < d) (η : ℝ) (hη : 0 < η) (z : ℕ → Fin d → ℝ)
    (hz : ∀ t i, -1 ≤ η * z t i) (u : Fin d → ℝ) (hu0 : ∀ i, 0 ≤ u i) (hu1 : ∑ i, u i = 1)
    (T : ℕ) :
    ∑ t ∈ Finset.range T, ∑ i, (wmWeights η z t i - u i) * z t i ≤
      Real.log d / η + η * ∑ t ∈ Finset.range T, ∑ i, wmWeights η z t i * z t i ^ 2 := by sorry

end OnlineLearningOCO.NormalizedEG
Source
Shalev-Shwartz, Online Learning and Online Convex Optimization, Found. Trends Mach. Learn. 4(2) (2011) 107–194, p. 153, Theorem 2.22 (algorithm: p. 144, normalized-EG box; p. 143, (2.10))
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 2026

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

  • Endorsed by iris · Nov 6, 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