Documentation

CslibFrontier.MachineLearning.LossMinimization.Smooth

Stability of regularized loss minimization for smooth losses #

For losses that are convex, nonnegative and β-smooth (differentiable with a β-Lipschitz derivative) the RLM rule with a σ-strongly convex regularizer is stable relative to its own fit: for 4β ≤ σ m, the expected replace-one gap is at most 10β / (σ m) times the expected empirical risk of the output [ShalevShwartzBenDavid2014, Section 13.3.2]. Unlike the Lipschitz case (Cslib.MachineLearning.IsRLM.isReplaceOneStable), the loss need not be Lipschitz; the rate shrinks with the fit of the rule.

With Tikhonov regularization r‖w‖² (the source writes λ for r) and 2β ≤ r m, the factor is 5β / (r m), which proves [ShalevShwartzBenDavid2014, Corollary 13.7] with 5 in place of the source's 48. The source bounds the distance between the two minimizers through the quadratic growth of one objective and then uses (a + b)² ≤ 3(a² + b²); here both growth terms enter (Cslib.MachineLearning.IsRLM.mul_norm_sub_sq_le) and the final estimate is a positive-definite quadratic form. The smaller constant matters for [ShalevShwartzBenDavid2014, Corollary 13.11], whose parameters m ≥ 150 β B² / ε² and r = ε / (3 B²) give an excess of about ε / 3 + 0.96 ε with the factor 48 but ε / 3 + ε / 10 with 5.

Smoothness is stated as differentiability of every loss together with a β-Lipschitz fderiv, on the whole space: self-boundedness (norm_sq_le_of_lipschitzWith_hasFDerivAt) evaluates the loss off the set the rule minimizes over.

Main results #

References #

theorem Cslib.MachineLearning.IsRLM.mul_sub_le_of_lipschitzWith_fderiv {E : Type u_1} {Z : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] {ℓ : E → Z → ℝ} {R : E → ℝ} {K : Set E} {m : ℕ} {A : (Fin m → Z) → E} (hA : IsRLM ℓ R K A) {σ : ℝ} (hR : StrongConvexOn K σ R) (hconv : ∀ (z : Z), ConvexOn ℝ K fun (w : E) => ℓ w z) (hdiff : ∀ (z : Z), Differentiable ℝ fun (w : E) => ℓ w z) {β : NNReal} (hsmooth : ∀ (z : Z), LipschitzWith β (fderiv ℝ fun (w : E) => ℓ w z)) (hnonneg : ∀ (w : E) (z : Z), 0 ≤ ℓ w z) (hβ : 4 * ↑β ≤ σ * ↑m) (S : Fin m → Z) (i : Fin m) (z' : Z) :
σ * ↑m * (ℓ (A (Function.update S i z')) (S i) - ℓ (A S) (S i)) ≤ 5 * ↑β * (ℓ (A S) (S i) + ℓ (A (Function.update S i z')) z')

Per-sample stability of RLM for smooth losses, multiplied form (compare [ShalevShwartzBenDavid2014, Section 13.3.2]): if R is σ-strongly convex on K, every loss is convex on K, nonnegative and differentiable with a β-Lipschitz derivative, and 4β ≤ σ m, then σ m (ℓ(A S⁽ⁱ⁾, z_i) - ℓ(A S, z_i)) ≤ 5β (ℓ(A S, z_i) + ℓ(A S⁽ⁱ⁾, z')).

theorem Cslib.MachineLearning.IsRLM.sub_le_of_lipschitzWith_fderiv {E : Type u_1} {Z : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] {ℓ : E → Z → ℝ} {R : E → ℝ} {K : Set E} {m : ℕ} {A : (Fin m → Z) → E} (hA : IsRLM ℓ R K A) {σ : ℝ} (hσ : 0 < σ) (hR : StrongConvexOn K σ R) (hconv : ∀ (z : Z), ConvexOn ℝ K fun (w : E) => ℓ w z) (hdiff : ∀ (z : Z), Differentiable ℝ fun (w : E) => ℓ w z) {β : NNReal} (hsmooth : ∀ (z : Z), LipschitzWith β (fderiv ℝ fun (w : E) => ℓ w z)) (hnonneg : ∀ (w : E) (z : Z), 0 ≤ ℓ w z) (hβ : 4 * ↑β ≤ σ * ↑m) (S : Fin m → Z) (i : Fin m) (z' : Z) :
ℓ (A (Function.update S i z')) (S i) - ℓ (A S) (S i) ≤ 5 * ↑β / (σ * ↑m) * (ℓ (A S) (S i) + ℓ (A (Function.update S i z')) z')

Per-sample stability of RLM for smooth losses (compare [ShalevShwartzBenDavid2014, Section 13.3.2]): under the hypotheses of Cslib.MachineLearning.IsRLM.mul_sub_le_of_lipschitzWith_fderiv with σ > 0, ℓ(A S⁽ⁱ⁾, z_i) - ℓ(A S, z_i) ≤ 5β / (σ m) (ℓ(A S, z_i) + ℓ(A S⁽ⁱ⁾, z')).

theorem Cslib.MachineLearning.IsRLM.replaceOneGap_le_of_lipschitzWith_fderiv {E : Type u_1} {Z : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [MeasurableSpace Z] {ℓ : E → Z → ℝ} {R : E → ℝ} {K : Set E} {m : ℕ} {A : (Fin m → Z) → E} (hA : IsRLM ℓ R K A) {σ : ℝ} (hσ : 0 < σ) (hR : StrongConvexOn K σ R) (hconv : ∀ (z : Z), ConvexOn ℝ K fun (w : E) => ℓ w z) (hdiff : ∀ (z : Z), Differentiable ℝ fun (w : E) => ℓ w z) {β : NNReal} (hsmooth : ∀ (z : Z), LipschitzWith β (fderiv ℝ fun (w : E) => ℓ w z)) (hnonneg : ∀ (w : E) (z : Z), 0 ≤ ℓ w z) (hβ : 4 * ↑β ≤ σ * ↑m) (D : MeasureTheory.Measure Z) [MeasureTheory.IsProbabilityMeasure D] (hint' : ∀ (i : Fin m), MeasureTheory.Integrable (fun (S : Fin m → Z) => ℓ (A S) (S i)) (MeasureTheory.Measure.pi fun (x : Fin m) => D)) :
replaceOneGap ℓ D A ≤ 10 * ↑β / (σ * ↑m) * ∫ (S : Fin m → Z), empiricalRisk ℓ S (A S) ∂MeasureTheory.Measure.pi fun (x : Fin m) => D

Expected stability of RLM for smooth losses (compare [ShalevShwartzBenDavid2014, Corollary 13.7]): if R is σ-strongly convex on K with σ > 0, every loss is convex on K, nonnegative and differentiable with a β-Lipschitz derivative, and 4β ≤ σ m, then for i.i.d. examples from D whose losses at the outputs are integrable, the expected replace-one gap is at most 10β / (σ m) 𝔼_S [L_S(A S)].

theorem Cslib.MachineLearning.IsRLM.replaceOneGap_le_tikhonov_of_lipschitzWith_fderiv {E : Type u_1} {Z : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [MeasurableSpace Z] {ℓ : E → Z → ℝ} {K : Set E} {m : ℕ} {r : ℝ} {A : (Fin m → Z) → E} (hA : IsRLM ℓ (fun (w : E) => r * ‖w‖ ^ 2) K A) (hK : Convex ℝ K) (hr : 0 < r) (hconv : ∀ (z : Z), ConvexOn ℝ K fun (w : E) => ℓ w z) (hdiff : ∀ (z : Z), Differentiable ℝ fun (w : E) => ℓ w z) {β : NNReal} (hsmooth : ∀ (z : Z), LipschitzWith β (fderiv ℝ fun (w : E) => ℓ w z)) (hnonneg : ∀ (w : E) (z : Z), 0 ≤ ℓ w z) (hβ : 2 * ↑β ≤ r * ↑m) (D : MeasureTheory.Measure Z) [MeasureTheory.IsProbabilityMeasure D] (hint' : ∀ (i : Fin m), MeasureTheory.Integrable (fun (S : Fin m → Z) => ℓ (A S) (S i)) (MeasureTheory.Measure.pi fun (x : Fin m) => D)) :
replaceOneGap ℓ D A ≤ 5 * ↑β / (r * ↑m) * ∫ (S : Fin m → Z), empiricalRisk ℓ S (A S) ∂MeasureTheory.Measure.pi fun (x : Fin m) => D

Stability of Tikhonov RLM for smooth losses [ShalevShwartzBenDavid2014, Corollary 13.7]: for the regularizer r‖w‖² on a convex set K, losses that are convex on K, nonnegative and differentiable with a β-Lipschitz derivative, and 2β ≤ r m (the source's r ≥ 2β / m), the expected replace-one gap under D is at most 5β / (r m) 𝔼_S [L_S(A S)]. The source's factor is 48β / (r m).

theorem Cslib.MachineLearning.IsRLM.integral_trueRisk_le_tikhonov_of_lipschitzWith_fderiv {E : Type u_1} {Z : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [MeasurableSpace Z] {ℓ : E → Z → ℝ} {K : Set E} {m : ℕ} {r : ℝ} {A : (Fin m → Z) → E} (hA : IsRLM ℓ (fun (w : E) => r * ‖w‖ ^ 2) K A) (hK : Convex ℝ K) (hr : 0 < r) (hconv : ∀ (z : Z), ConvexOn ℝ K fun (w : E) => ℓ w z) (hdiff : ∀ (z : Z), Differentiable ℝ fun (w : E) => ℓ w z) {β : NNReal} (hsmooth : ∀ (z : Z), LipschitzWith β (fderiv ℝ fun (w : E) => ℓ w z)) (hnonneg : ∀ (w : E) (z : Z), 0 ≤ ℓ w z) (hβ : 2 * ↑β ≤ r * ↑m) (D : MeasureTheory.Measure Z) [MeasureTheory.IsProbabilityMeasure D] (hm : 0 < m) (hint : MeasureTheory.Integrable (fun (p : (Fin m → Z) × Z) => ℓ (A p.1) p.2) ((MeasureTheory.Measure.pi fun (x : Fin m) => D).prod D)) (hint' : ∀ (i : Fin m), MeasureTheory.Integrable (fun (S : Fin m → Z) => ℓ (A S) (S i)) (MeasureTheory.Measure.pi fun (x : Fin m) => D)) {w : E} (hw : w ∈ K) (hwint : MeasureTheory.Integrable (ℓ w) D) :
((∫ (S : Fin m → Z), trueRisk ℓ D (A S) ∂MeasureTheory.Measure.pi fun (x : Fin m) => D) ≤ (1 + 5 * ↑β / (r * ↑m)) * ∫ (S : Fin m → Z), empiricalRisk ℓ S (A S) ∂MeasureTheory.Measure.pi fun (x : Fin m) => D) ∧ ((1 + 5 * ↑β / (r * ↑m)) * ∫ (S : Fin m → Z), empiricalRisk ℓ S (A S) ∂MeasureTheory.Measure.pi fun (x : Fin m) => D) ≤ (1 + 5 * ↑β / (r * ↑m)) * (trueRisk ℓ D w + r * ‖w‖ ^ 2)

The oracle inequality for Tikhonov RLM with smooth losses [ShalevShwartzBenDavid2014, Corollary 13.10]: under the hypotheses of Cslib.MachineLearning.IsRLM.replaceOneGap_le_tikhonov_of_lipschitzWith_fderiv, for m > 0 i.i.d. examples from D and every w ∈ K with D-integrable loss, 𝔼_S [L_D(A S)] ≤ (1 + 5β / (r m)) 𝔼_S [L_S(A S)] ≤ (1 + 5β / (r m)) (L_D(w) + r‖w‖²). The source states both inequalities with 48β / (r m) in place of 5β / (r m); they follow, since the expected empirical risk is nonnegative.

theorem Cslib.MachineLearning.IsRLM.integral_trueRisk_le_add_of_lipschitzWith_fderiv {E : Type u_1} {Z : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [MeasurableSpace Z] {ℓ : E → Z → ℝ} {K : Set E} {m : ℕ} {r : ℝ} {A : (Fin m → Z) → E} (hA : IsRLM ℓ (fun (w : E) => r * ‖w‖ ^ 2) K A) (hK : Convex ℝ K) (h0 : 0 ∈ K) (hconv : ∀ (z : Z), ConvexOn ℝ K fun (w : E) => ℓ w z) (hdiff : ∀ (z : Z), Differentiable ℝ fun (w : E) => ℓ w z) {β : NNReal} (hsmooth : ∀ (z : Z), LipschitzWith β (fderiv ℝ fun (w : E) => ℓ w z)) (hnonneg : ∀ (w : E) (z : Z), 0 ≤ ℓ w z) (hle : ∀ (z : Z), ℓ 0 z ≤ 1) {ε B : ℝ} (hε : 0 < ε) (hε1 : ε < 1) (hB : 0 < B) (hm : 0 < m) (hmε : 150 * ↑β * B ^ 2 / ε ^ 2 ≤ ↑m) (hr : r = ε / (3 * B ^ 2)) (D : MeasureTheory.Measure Z) [MeasureTheory.IsProbabilityMeasure D] (hint : MeasureTheory.Integrable (fun (p : (Fin m → Z) × Z) => ℓ (A p.1) p.2) ((MeasureTheory.Measure.pi fun (x : Fin m) => D).prod D)) (hint' : ∀ (i : Fin m), MeasureTheory.Integrable (fun (S : Fin m → Z) => ℓ (A S) (S i)) (MeasureTheory.Measure.pi fun (x : Fin m) => D)) {w : E} (hw : w ∈ K) (hwB : ‖w‖ ≤ B) (hwint : MeasureTheory.Integrable (ℓ w) D) :
(∫ (S : Fin m → Z), trueRisk ℓ D (A S) ∂MeasureTheory.Measure.pi fun (x : Fin m) => D) ≤ trueRisk ℓ D w + ε

Convex-smooth-bounded problems [ShalevShwartzBenDavid2014, Corollary 13.11]: for losses that are convex on a convex set K ∋ 0, nonnegative, differentiable with a β-Lipschitz derivative and satisfy ℓ(0, z) ≤ 1, ε ∈ (0, 1), B > 0, m ≥ 150 β B² / ε² (with m > 0) and r = ε / (3 B²), Tikhonov RLM satisfies 𝔼_S [L_D(A S)] ≤ L_D(w) + ε for every w ∈ K with ‖w‖ ≤ B and integrable loss. The source states this against min_{w ∈ H} L_D(w); the form here holds for every comparator. The parameters do not close with the source's factor 48β / (r m) from Corollary 13.10, which leaves an excess of about ε / 3 + 0.96 ε; the proof uses the factor 5β / (r m) of Cslib.MachineLearning.IsRLM.replaceOneGap_le_tikhonov_of_lipschitzWith_fderiv, which leaves ε / 3 + ε / 10.