Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§B.9 — recursion for α_l(θ), β_l(θ), and β_{L+1}(θ) = √2β_L(θ) + α_L(θ)² for a softmax output layer

Proved
CertDRO.NNSmooth.alpha_beta_recursion

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

lipschitzneural-networksp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1smoothness

Let αl(θ)\alpha_l(\theta)αl​(θ) and βl(θ)\beta_l(\theta)βl​(θ) be the constants (21) of a network with layer constants Ll0,Ll1L^0_l, L^1_lLl0​,Ll1​. Then:

  1. α0(θ)=1\alpha_0(\theta)=1α0​(θ)=1 and β0(θ)=0\beta_0(\theta)=0β0​(θ)=0;
  2. for every l≥0l\ge0l≥0,
αl+1(θ)=Ll+10∥θl+1∥op αl(θ);\alpha_{l+1}(\theta)=L^0_{l+1}\|\theta_{l+1}\|_{\mathrm{op}}\,\alpha_l(\theta);αl+1​(θ)=Ll+10​∥θl+1​∥op​αl​(θ);
  1. for every l≥0l\ge0l≥0,
βl+1(θ)=Ll+10∥θl+1∥op βl(θ)+Ll+11(Ll+10)2 αl+1(θ)2;\beta_{l+1}(\theta)=L^0_{l+1}\|\theta_{l+1}\|_{\mathrm{op}}\,\beta_l(\theta)+\frac{L^1_{l+1}}{(L^0_{l+1})^2}\,\alpha_{l+1}(\theta)^2 ;βl+1​(θ)=Ll+10​∥θl+1​∥op​βl​(θ)+(Ll+10​)2Ll+11​​αl+1​(θ)2;
  1. whenever αl(θ)≠0\alpha_l(\theta)\ne0αl​(θ)=0, equivalently
βl+1(θ)=αl+1(θ)αl(θ) βl(θ)+Ll+11(Ll+10)2 αl+1(θ)2;\beta_{l+1}(\theta)=\frac{\alpha_{l+1}(\theta)}{\alpha_l(\theta)}\,\beta_l(\theta)+\frac{L^1_{l+1}}{(L^0_{l+1})^2}\,\alpha_{l+1}(\theta)^2 ;βl+1​(θ)=αl​(θ)αl+1​(θ)​βl​(θ)+(Ll+10​)2Ll+11​​αl+1​(θ)2;
  1. if an (L+1)(L+1)(L+1)-st layer has ∥θL+1∥op=1\|\theta_{L+1}\|_{\mathrm{op}}=1∥θL+1​∥op​=1 (for instance θL+1=I\theta_{L+1}=IθL+1​=I), LL+10=2L^0_{L+1}=\sqrt2LL+10​=2​ and LL+11=1L^1_{L+1}=1LL+11​=1 (the softmax loss), then
βL+1(θ)=2 βL(θ)+αL(θ)2.\beta_{L+1}(\theta)=\sqrt2\,\beta_L(\theta)+\alpha_L(\theta)^2 .βL+1​(θ)=2​βL​(θ)+αL​(θ)2.

Part 5 is how the paper reads off the constant of Corollary 4: the softmax loss is treated as one more layer of the network.

Formalization Note The paper writes "with β0(θ)=α0(θ)=1\beta_0(\theta)=\alpha_0(\theta)=1β0​(θ)=α0​(θ)=1"; that is a misprint, since (21) gives β0=0\beta_0=0β0​=0 (empty sum) and α0=1\alpha_0=1α0​=1, and the formalization follows (21). The paper's ratio αl+1/αl\alpha_{l+1}/\alpha_lαl+1​/αl​ is undefined when some θj=0\theta_j=0θj​=0; part 3 states what the ratio means without dividing, and part 4 is the paper's form under αl≠0\alpha_l\ne0αl​=0. In Lean layers are 0-based (θ l, L0 l, L1 l are the paper's θl+1\theta_{l+1}θl+1​, Ll+10L^0_{l+1}Ll+10​, Ll+11L^1_{l+1}Ll+11​), and in part 5 the identity layer enters only through ∥θL+1∥op=1\|\theta_{L+1}\|_{\mathrm{op}}=1∥θL+1​∥op​=1.

Preamble
import Mathlib
import Definitions.Def_CertDRO_NNSmooth_Network
Formal statement
namespace CertDRO.NNSmooth

open Network

/-- §B.9 (p. 46), the recursive form of the constants (21) (0-based: `L0 l = L⁰_{l+1}`,
`L1 l = L¹_{l+1}`, `θ l = θ_{l+1}`):
`α_0 = 1`, `β_0 = 0`, `α_{l+1} = L⁰_{l+1} ‖θ_{l+1}‖_op α_l`,
`β_{l+1} = L⁰_{l+1} ‖θ_{l+1}‖_op β_l + (L¹_{l+1}/(L⁰_{l+1})²) α_{l+1}²`, which is the paper's
`β_{l+1} = (α_{l+1}/α_l) β_l + (L¹_{l+1}/(L⁰_{l+1})²) α_{l+1}²` whenever `α_l ≠ 0`; and for an
`(L+1)`-st layer with `‖θ_{L+1}‖_op = 1`, `L⁰_{L+1} = √2` and `L¹_{L+1} = 1` (the softmax layer),
`β_{L+1} = √2 β_L + α_L²`. -/
theorem alpha_beta_recursion (N : Network) (L0 L1 : ℕ → ℝ) :
    N.α L0 0 = 1 ∧ N.β L0 L1 0 = 0 ∧
    (∀ l, N.α L0 (l + 1) = L0 l * ‖N.θ l‖ * N.α L0 l) ∧
    (∀ l, N.β L0 L1 (l + 1) =
      L0 l * ‖N.θ l‖ * N.β L0 L1 l + (L1 l / (L0 l) ^ 2) * N.α L0 (l + 1) ^ 2) ∧
    (∀ l, N.α L0 l ≠ 0 → N.β L0 L1 (l + 1) =
      (N.α L0 (l + 1) / N.α L0 l) * N.β L0 L1 l + (L1 l / (L0 l) ^ 2) * N.α L0 (l + 1) ^ 2) ∧
    (∀ L, ‖N.θ L‖ = 1 → L0 L = Real.sqrt 2 → L1 L = 1 →
      N.β L0 L1 (L + 1) = Real.sqrt 2 * N.β L0 L1 L + N.α L0 L ^ 2) := by sorry

end CertDRO.NNSmooth
Source
Sinha, Namkoong, Volpi, Duchi, Certifying Some Distributional Robustness with Principled Adversarial Training, arXiv:1710.10571v5, p. 46, §B.9 (recursive form of (21) and β_{L+1})
Human review
  • Endorsed by Shuze Chen · Oct 9, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 9, 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