Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 16.3: SGD for Soft-SVM with kernels reproduces the feature-space SGD of §15.5: θ⁽ᵗ⁾ = ∑ⱼ βⱼ⁽ᵗ⁾ψ(xⱼ) for all t, and w̄ = ∑ⱼ ᾱⱼψ(xⱼ)

Proved
UnderstandingML.kernel_sgd_equivalence

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

kernel-methodsstochastic-gradient-descentsupport-vector-machines

Lemma 16.3. Let w^\hat ww^ be the output of the SGD procedure described in Section 15.5 when applied on the feature space, and let wˉ=∑j=1mαˉjψ(xj)\bar w = \sum_{j=1}^m \bar\alpha_j\psi(x_j)wˉ=∑j=1m​αˉj​ψ(xj​) be the output of applying SGD with kernels. Then wˉ=w^\bar w = \hat wwˉ=w^.

Formally: for the two procedures driven by the same sequence of chosen indices, θ(t)=∑jβj(t)ψ(xj)\theta^{(t)} = \sum_j \beta^{(t)}_j\psi(x_j)θ(t)=∑j​βj(t)​ψ(xj​) for every ttt (16.6), hence the outputs coincide for every TTT.

Preamble
import Definitions.Def_UnderstandingML_Kernel

open MeasureTheory
open scoped InnerProductSpace
Formal statement
universe u

namespace UnderstandingML

/-- **Lemma 16.3** (p. 223). Let `ŵ` be the output of the SGD procedure of §15.5 applied in the
feature space, and let `w̄ = ∑ⱼ ᾱⱼ ψ(xⱼ)` be the output of SGD with kernels (both driven by the
same sequence of chosen indices). Then `w̄ = ŵ`; indeed `θ⁽ᵗ⁾ = ∑ⱼ βⱼ⁽ᵗ⁾ ψ(xⱼ)` for every `t`
(16.6). -/
theorem kernel_sgd_equivalence {X : Type u} {F : Type*} [NormedAddCommGroup F]
    [InnerProductSpace ℝ F] [CompleteSpace F] {m : ℕ} (ψ : X → F) (K : X → X → ℝ)
    (hK : ∀ a b, K a b = ⟪ψ a, ψ b⟫_ℝ) (x : Fin m → X) (y : Fin m → ℝ) (lam : ℝ)
    (idx : ℕ → Fin m) :
    (∀ t, svmSgdTheta ψ x y lam idx t = ∑ j, kernelSgdBeta K x y lam idx t j • ψ (x j)) ∧
    ∀ T, svmSgdAverage ψ x y lam idx T =
      ∑ j, kernelSgdAlphaBar K x y lam idx T j • ψ (x j) := by sorry

end UnderstandingML
Source
Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, doi:10.1017/CBO9781107298019, §16.3 pp. 223-224, Lemma 16.3 with its proof
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me