§3.7.1, pp. 290–292 — β-smoothness, Nesterov's accelerated gradient descent for κ = β/α, the functions Φ_s (3.17), the centres v_s (3.21)
DefinitionConvexOptAlg_NesterovStrong_DefsThroughout, carries the Euclidean inner product and norm , is a function and is a map standing for its gradient . For put (the condition number).
- β-smoothness. is -smooth if is the gradient of at every and the gradient is -Lipschitz:
- Nesterov's accelerated gradient descent (strongly convex case). A pair of sequences , is a run of the method if (an arbitrary starting point) and, for every ,
- The functions . Given points , define by induction
- The centres . and
- The values . , the value of at its centre.
These are the objects of the estimate-sequence proof of Theorem 3.18; the run is the algorithm, and , , are the auxiliary quantities of its analysis.
Formalization Note is EuclideanSpace ℝ (Fin n). Sequences are indexed by ℕ with the first element at index ; index is unused (Phi … 0 and v … 0 are set to and appear in no statement). The book defines ; here is defined as , and the milestone eq_3_21_form states , which shows that is the minimizer and that the two definitions agree (for ). -strong convexity is the published OnlineConvexOpt.ConvexBasics.StronglyConvexOn Set.univ f g α, which is exactly (3.13) with gradient map .
import Mathlib
import Definitions.Def_OnlineConvexOpt_ConvexBasics_StronglyConvexOn
open scoped InnerProductSpace
namespace ConvexOptAlg.NesterovStrong
/-- Bubeck, §3.4, p. 278: the condition number `κ = β / α`. -/
noncomputable def kappa (α β : ℝ) : ℝ := β / α
/-- Bubeck, §3.2, p. 266: `f` is `β`-smooth with gradient map `g`. The map `g` is the gradient of
`f` at every point (`g x` stands for the book's `∇f(x)`), and it is `β`-Lipschitz:
`‖∇f(x) − ∇f(y)‖ ≤ β‖x − y‖` for all `x, y ∈ ℝⁿ`. -/
def IsBetaSmooth {n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(g : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n)) (β : ℝ) : Prop :=
(∀ x, HasGradientAt f (g x) x) ∧ ∀ x y, ‖g x - g y‖ ≤ β * ‖x - y‖
/-- Bubeck, §3.7.1, p. 290: `(x, y)` is a run of Nesterov's accelerated gradient descent for
a `β`-smooth, `α`-strongly convex function with gradient map `g`. The run starts at an arbitrary
point `x 1 = y 1` (index `0` is unused) and, for every `t ≥ 1`,
`y_{t+1} = x_t − (1/β) ∇f(x_t)` and
`x_{t+1} = (1 + (√κ − 1)/(√κ + 1)) y_{t+1} − ((√κ − 1)/(√κ + 1)) y_t`, with `κ = β/α`. -/
def IsNesterovSCRun {n : ℕ} (g : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n))
(α β : ℝ) (x y : ℕ → EuclideanSpace ℝ (Fin n)) : Prop :=
x 1 = y 1 ∧ ∀ t : ℕ, 1 ≤ t →
y (t + 1) = x t - (1 / β) • g (x t) ∧
x (t + 1) =
(1 + (Real.sqrt (kappa α β) - 1) / (Real.sqrt (kappa α β) + 1)) • y (t + 1) -
((Real.sqrt (kappa α β) - 1) / (Real.sqrt (kappa α β) + 1)) • y t
/-- Bubeck, proof of Theorem 3.18, Eq. (3.17), p. 291: the functions `Φ_s`, `s ≥ 1`, built from
the points `x_s`:
`Φ₁(z) = f(x₁) + (α/2)‖z − x₁‖²` and
`Φ_{s+1}(z) = (1 − 1/√κ) Φ_s(z) + (1/√κ)(f(x_s) + ∇f(x_s)ᵀ(z − x_s) + (α/2)‖z − x_s‖²)`.
`Phi … s` is `Φ_s`; index `0` is unused (set to `0`). -/
noncomputable def Phi {n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(g : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n)) (α β : ℝ)
(x : ℕ → EuclideanSpace ℝ (Fin n)) : ℕ → EuclideanSpace ℝ (Fin n) → ℝ
| 0, _ => 0
| 1, z => f (x 1) + α / 2 * ‖z - x 1‖ ^ 2
| s + 2, z =>
(1 - 1 / Real.sqrt (kappa α β)) * Phi f g α β x (s + 1) z +
1 / Real.sqrt (kappa α β) *
(f (x (s + 1)) + ⟪g (x (s + 1)), z - x (s + 1)⟫_ℝ + α / 2 * ‖z - x (s + 1)‖ ^ 2)
/-- Bubeck, proof of Theorem 3.18, Eq. (3.21), p. 292: the centres `v_s` of the functions
`Φ_s`, `v₁ = x₁` (the minimizer of `Φ₁`) and
`v_{s+1} = (1 − 1/√κ) v_s + (1/√κ) x_s − (1/(α√κ)) ∇f(x_s)`. Index `0` is unused (set to `0`). -/
noncomputable def v {n : ℕ} (g : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n))
(α β : ℝ) (x : ℕ → EuclideanSpace ℝ (Fin n)) : ℕ → EuclideanSpace ℝ (Fin n)
| 0 => 0
| 1 => x 1
| s + 2 =>
(1 - 1 / Real.sqrt (kappa α β)) • v g α β x (s + 1) +
(1 / Real.sqrt (kappa α β)) • x (s + 1) -
(1 / (α * Real.sqrt (kappa α β))) • g (x (s + 1))
/-- Bubeck, proof of Theorem 3.18, p. 291–292: `Φ∗_s`, the value of `Φ_s` at `v_s`. The book
defines `Φ∗_s = min_{x ∈ ℝⁿ} Φ_s(x)`; that the minimum is attained at `v_s` is the milestone
`eq_3_21_form` (`Φ_s(z) = Φ∗_s + (α/2)‖z − v_s‖²`). -/
noncomputable def PhiStar {n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(g : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n)) (α β : ℝ)
(x : ℕ → EuclideanSpace ℝ (Fin n)) (s : ℕ) : ℝ :=
Phi f g α β x s (v g α β x s)
end ConvexOptAlg.NesterovStrong