proofs
Provedalphabaguettebaguette-zv2

RMSNorm's input cotangent is at most 1/√ε times the incoming one: ‖dx‖² ≤ ‖v‖²/ε

For all n∈N\htmlData{mx=1}{n \in \htmlData{mx=0}{\mathbb{N}}}, ε∈R\htmlData{mx=1}{\varepsilon \in \htmlData{mx=0}{\mathbb{R}}} and x,v:Fin⁡ n→R\htmlData{mx=5}{x, v : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}}, if 0<n0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{n} and 0<ε0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{\varepsilon}, then

∑k(1∑jx(j)2n+ε⋅(v(k)−x(k)∑jx(j)2n+ε⋅(∑iv(i)⋅(x(i)∑jx(j)2n+ε)n)))2≤1ε⋅∑kv(k)2\begin{aligned} & \htmlData{mx=54}{\sum_{k} \htmlData{mx=53}{\left(\htmlData{mx=52}{\htmlData{mx=11}{\frac{1}{\htmlData{mx=10}{\sqrt{\htmlData{mx=9}{\htmlData{mx=7}{\frac{\htmlData{mx=5}{\sum_{j} \htmlData{mx=4}{\htmlData{mx=3}{\htmlData{mx=1}{x}(\htmlData{mx=2}{j})}^{2}}}}{\htmlData{mx=6}{n}}} + \htmlData{mx=8}{\varepsilon}}}}}} \cdot \left(\htmlData{mx=51}{\htmlData{mx=14}{\htmlData{mx=12}{v}(\htmlData{mx=13}{k})} - \htmlData{mx=50}{\htmlData{mx=28}{\frac{\htmlData{mx=17}{\htmlData{mx=15}{x}(\htmlData{mx=16}{k})}}{\htmlData{mx=27}{\sqrt{\htmlData{mx=26}{\htmlData{mx=24}{\frac{\htmlData{mx=22}{\sum_{j} \htmlData{mx=21}{\htmlData{mx=20}{\htmlData{mx=18}{x}(\htmlData{mx=19}{j})}^{2}}}}{\htmlData{mx=23}{n}}} + \htmlData{mx=25}{\varepsilon}}}}}} \cdot \left(\htmlData{mx=49}{\frac{\htmlData{mx=47}{\sum_{i} \htmlData{mx=46}{\htmlData{mx=31}{\htmlData{mx=29}{v}(\htmlData{mx=30}{i})} \cdot \left(\htmlData{mx=45}{\frac{\htmlData{mx=34}{\htmlData{mx=32}{x}(\htmlData{mx=33}{i})}}{\htmlData{mx=44}{\sqrt{\htmlData{mx=43}{\htmlData{mx=41}{\frac{\htmlData{mx=39}{\sum_{j} \htmlData{mx=38}{\htmlData{mx=37}{\htmlData{mx=35}{x}(\htmlData{mx=36}{j})}^{2}}}}{\htmlData{mx=40}{n}}} + \htmlData{mx=42}{\varepsilon}}}}}}\right)}}}{\htmlData{mx=48}{n}}}\right)}}\right)}\right)^{2}}} \\ & \quad \htmlData{mx=0}{\leq} \htmlData{mx=62}{\htmlData{mx=56}{\frac{1}{\htmlData{mx=55}{\varepsilon}}} \cdot \htmlData{mx=61}{\sum_{k} \htmlData{mx=60}{\htmlData{mx=59}{\htmlData{mx=57}{v}(\htmlData{mx=58}{k})}^{2}}}} \end{aligned}
What the notation means · or point at any symbol
NNatural numbers
The natural numbers 0, 1, 2, …. In Lean they start at 0. (ℕ)
<Less than
0 is strictly smaller than n. (0 < n)
RReal numbers
The real numbers: every point on the number line. (ℝ)
Fin
Fin: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Fin)
f(x)Function application
Fin applied to n. Lean writes f x; papers write f(x). (Fin n)
⟹Implies
If Fin(n), then ℝ. (Between types, A → B is the type of functions from A to B.) (Fin n → ℝ)
x : TVariables
x, v range over Fin n → ℝ: the statement must hold for every choice. ((x v : Fin n → ℝ))
≤At most
∑ k, (1/√((∑ j, x(j)^2)/n + ε) · (v(k) − x(k)/√((∑ j, x(j)… is less than or equal to 1/ε · (∑ k, v(k)^2). (∑ k, ((1 / Real.sqrt ((∑ j, x j ^ 2) / …)
√Square root
The non-negative number whose square is (∑ j, x(j)^2)/n + ε. (Real.sqrt ((∑ j, x j ^ 2) / n + ε))
a/bDivision
∑ j, x(j)^2 divided by n. In Lean, dividing by 0 gives 0. ((∑ j, x j ^ 2) / n)
+Addition
(∑ j, x(j)^2)/n plus ε. ((∑ j, x j ^ 2) / n + ε)
∑Summation
Add up x(j)^2 for every j. (∑ j, x j ^ 2)
aᵇPower
x(j) raised to the power 2. (x j ^ 2)
-Subtraction
v(k) minus x(k)/√((∑ j, x(j)^2)/n + ε) · ((∑ i, v(i) · (x(i)/√((∑ j, …. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (v k - x k / Real.sqrt ((∑ j, x j ^ 2) /…)
·Multiplication
v(i) times x(i)/√((∑ j, x(j)^2)/n + ε). (v i * (x i / Real.sqrt ((∑ j, x j ^ 2) …)

For Alpha's exact RMSNorm pullback dx = r·(v − z·mean(v⊙z)) with r = (mean(x²)+ε)^(-1/2), ‖dx‖² ≤ r²‖v‖² ≤ ‖v‖²/ε. Rows with a tiny mean square amplify gradients by up to ε^(-1/2) per normalization (Baguette: ≈ 316). This is a certified mechanism for gradient blow-up, the failure Baguette actually recorded. Part of 'Baguette-Z v2' (revision after the hostile review).

How it was proved

Proved
3 October 2026
By
Ajax, with the agent “Baguette math & proofs (Claude Code, 2026-10-03)”
Checked by
Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
Axioms
Classical.choice, Quot.sound, propext
Proof
49 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements