Adaptive online gradient descent (AdaGrad) #
Self-tuning, data-dependent online gradient descent [Hazan2022, Orabona2019]: instead of tuning a
step size using an a priori gradient norm bound G and horizon T, AdaGrad accumulates the
squared gradient norms seen so far and scales the step size inversely by their square root. All
regret bounds below are derived from the adaptive local-norm OMD framework in
CslibFrontier.MachineLearning.OnlineLearning.OnlineMirrorDescent.
- Scalar
AdaGrad-Norm(adaGradNorm) on any real inner product spaceEwith a Pythagorean projectionprojontoK: tracksS (t + 1) = ε + ∑ s ≤ t, ‖grad s (x s)‖ ^ 2and steps withη t = γ / √(S (t + 1)). With optimal scaleγ = D / √2, its regret overTrounds is at most√2 * D * √(ε + ∑ t < T, ‖grad t (x t)‖ ^ 2) - (D / √2) * √ε(withε = 0permitted via Lean's0 / 0 = 0convention when an initial prefix of subgradients vanishes). In the worst case‖g t‖ ≤ Gwithε = 0, this gives√2 * G * D * √T, tightening3 / 2 * G * D * √Twithout knowingGorT. - General diagonal
AdaGrad(adaGradDiag_regret_le,adaGradDiag_regret_le_optimal) on anyℓ∞-bounded (or coordinate-bounded) subsetK ⊆ EuclideanSpace ℝ ιvia adaptive OMD with time-varying diagonal mirror mapψ_t(z) = (1 / (2 * γ)) * ∑ i, √(ε + ∑ k ≤ t, (g_k i) ^ 2) * (z i) ^ 2(with existence of each step on any nonempty complete convexKwhen weights are positive viaexists_isAdaptiveOMDStep_diag). - Coordinate-wise diagonal
AdaGradon a box (adaGradBox) on an axis-aligned box∏ i, [l i, r i] ⊆ (ι → ℝ): runs per-coordinate clampingclampProj (l i) (r i)with an independent adaptive step sizeγ / √(ε + ∑ s ≤ t, (grad s (x s) i) ^ 2)on each coordinatei : ι. Because clamping satisfies the diagonalIsAdaptiveOMDStepoptimality condition,adaGradBox_regret_lefollows directly fromadaGradDiag_regret_le, yielding∑ i, ((r i - l i) ^ 2 / (2 * γ) + γ) * √(ε + ∑ t < T, (grad t (x t) i) ^ 2) - γ * card ι * √ε.
Main definitions #
Cslib.MachineLearning.OnlineLearning.OCO.AdaGradState: named state(point, sqGradSum)of scalarAdaGrad-Norm.Cslib.MachineLearning.OnlineLearning.OCO.adaGradNorm,Cslib.MachineLearning.OnlineLearning.OCO.adaGradNormSqSum: iterates and accumulated squared gradient norm of scalarAdaGrad-Norm.Cslib.MachineLearning.OnlineLearning.OCO.clampProj: 1D projection onto[a, b].Cslib.MachineLearning.OnlineLearning.OCO.adaGradBox: coordinate-wise diagonalAdaGradon an axis-aligned box∏ i, [l i, r i].
Main results #
Cslib.MachineLearning.OnlineLearning.OCO.sum_div_sqrt_cumsum_le: elementary telescoping bound∑ t < T, a t / √(ε + ∑ s ≤ t, a s) ≤ 2 * (√(ε + ∑ t < T, a t) - √ε).Cslib.MachineLearning.OnlineLearning.OCO.adaGradNorm_dynamic_regret_le: data-dependent dynamic regret bound against any comparator sequenceu : ℕ → EinK.Cslib.MachineLearning.OnlineLearning.OCO.adaGradNorm_regret_le,Cslib.MachineLearning.OnlineLearning.OCO.adaGradNorm_regret_le_optimal: staticAdaGrad-Normregret bounds (√2 * D * √(ε + ∑ ‖g t‖ ^ 2)).Cslib.MachineLearning.OnlineLearning.OCO.exists_isAdaptiveOMDStep_diag,Cslib.MachineLearning.OnlineLearning.OCO.adaGradDiag_regret_le,Cslib.MachineLearning.OnlineLearning.OCO.adaGradDiag_regret_le_optimal: general diagonalAdaGradregret bounds on arbitraryℓ∞-bounded convex domains via adaptive OMD.Cslib.MachineLearning.OnlineLearning.OCO.adaGradBox_regret_le,Cslib.MachineLearning.OnlineLearning.OCO.adaGradBox_regret_le_optimal: diagonalAdaGradregret bounds on a finite-dimensional box, derived fromadaGradDiag_regret_le.
References #
Exact section, theorem, and page locators below are unverified against primary PDFs (pending an outside-fleet source check).
- E. Hazan, Introduction to Online Convex Optimization, 2nd ed. (locator unverified)
- F. Orabona, A Modern Introduction to Online Learning (locator unverified)
Telescoping square-root lemma for adaptive gradient methods: for any nonnegative sequence
a : ℕ → ℝ and ε ≥ 0,
∑ t ∈ range T, a t / √(ε + ∑ s ∈ range (t + 1), a s) ≤ 2 * (√(ε + ∑ t ∈ range T, a t) - √ε).
Works even at ε = 0 when an initial prefix of a vanishes (using 0 / 0 = 0).
Named state of scalar AdaGrad-Norm: current iterate and accumulated squared gradient norm.
- point : E
Current decision point in
E. - sqGradSum : ℝ
Accumulated sum
ε + ∑ s < t, ‖grad s (point s)‖ ^ 2.
Full causal state sequence of scalar AdaGrad-Norm starting at (x₀, ε) with scale γ.
Decision point sequence of scalar AdaGrad-Norm.
Accumulated squared gradient norm ε + ∑ s < t, ‖grad s (x s)‖ ^ 2 of scalar
AdaGrad-Norm.
Linearized dynamic regret bound for scalar AdaGrad-Norm against any sequence of comparators
u : ℕ → E in K.
Dynamic regret of AdaGrad-Norm: without knowing a gradient bound G or horizon T,
scalar AdaGrad-Norm incurs data-dependent regret against any sequence u in K.
Static regret of AdaGrad-Norm [Ora19]: for any scale γ > 0 and offset
ε ≥ 0, regret against every comparator u ∈ K is at most
(D ^ 2 / (2 * γ) + γ) * √(ε + ∑ t < T, ‖grad t (x t)‖ ^ 2) - γ * √ε.
Optimally scaled AdaGrad-Norm: choosing γ = D / √2 minimizes D ^ 2 / (2 * γ) + γ to
√2 * D, giving data-dependent regret at most
√2 * D * √(ε + ∑ t < T, ‖grad t (x t)‖ ^ 2) - (D / √2) * √ε without prior knowledge of G or
T.
Worst-case O(G * D * √T) bound for AdaGrad-Norm: when ‖grad t x‖ ≤ G on K and
ε = 0, AdaGrad-Norm with γ = D / √2 guarantees regret at most √2 * G * D * √T.
On any nonempty complete convex set K ⊆ EuclideanSpace ℝ ι, an adaptive diagonal OMD step
exists for every strictly positive coordinate weight vector w : ι → ℝ.
General diagonal AdaGrad regret on an arbitrary coordinate-bounded convex set
[Hazan2022, Orabona2019] (locators unverified): for any K ⊆ EuclideanSpace ℝ ι whose
coordinate widths satisfy |a i - b i| ≤ D i on K, any γ > 0, ε ≥ 0, and any iterate
sequence x satisfying the diagonal adaptive OMD step with weights
√(ε + ∑ k ≤ t, (grad k (x k) i) ^ 2) / γ, the regret against every u ∈ K is at most
∑ i, ((D i) ^ 2 / (2 * γ) + γ) * √(ε + ∑ t < T, (grad t (x t) i) ^ 2) - γ * card ι * √ε.
Unlike adaGradBox_regret_le, K need not be an axis-aligned box.
Optimally scaled general diagonal AdaGrad on an ℓ∞-bounded convex domain: whenever
|a i - b i| ≤ D for all a, b ∈ K and i : ι with D > 0, choosing γ = D / √2 gives
√2 * D * ∑ i, √(ε + ∑ t < T, (grad t (x t) i) ^ 2) - D / √2 * card ι * √ε.
One-dimensional projection clamping a real number into [a, b].
clampProj a b is a Pythagorean projection onto Set.Icc a b whenever a ≤ b.
Diagonal AdaGrad regret on an axis-aligned box [Haz22]: each coordinate runs an
independent adaptive step size γ / √(ε + ∑ s ≤ t, (grad s (x s) i) ^ 2). With no prior bound
on the gradient norms, the regret decomposes per coordinate as
∑ i, ((r i - l i) ^ 2 / (2 * γ) + γ) * √(ε + ∑ t < T, (grad t (x t) i) ^ 2) - γ * card ι * √ε.
Optimally scaled diagonal AdaGrad on an ℓ∞-bounded box: when r i - l i ≤ D for
every coordinate i : ι with D > 0, choosing γ = D / √2 gives
√2 * D * ∑ i, √(ε + ∑ t < T, (grad t (x t) i) ^ 2) - D / √2 * card ι * √ε.