Provedsecond-order-bias-lawstochastic-attentiondepthlaw
Second-order bias: mean-zero noise and a Taylor remainder bound give |E f(x+ξ) − f(x)| ≤ (M/2) E[ξ²]
For all , , and , if , , and , then
What the notation means · or point at any symbol
- NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
ℕ) - 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 m. Lean writes f x; papers write f(x). (
Fin m) - ⟹Implies
- If Fin(m), then ℝ. (Between types, A → B is the type of functions from A to B.) (
Fin m → ℝ) - x : TVariables
- w, ξ range over Fin m → ℝ: the statement must hold for every choice. (
(w ξ : Fin m → ℝ)) - x ∈ TVariables
- x, f1, M range over real numbers: the statement must hold for every choice. (
(x f1 M : ℝ)) - ∀For all
- The statement after the comma holds for every i. (
∀ i, 0 ≤ w i) - ∑Summation
- Add up w(i) for every i. (
∑ i, w i) - =Equality
- ∑ i, w(i) and 1 are the same. (
∑ i, w i = 1) - ≤At most
- 0 is less than or equal to w(i). (
0 ≤ w i) - ·Multiplication
- w(i) times ξ(i). (
w i * ξ i) - |x|Absolute value
- The size of f(x + t) − f(x) − f1 · t without its sign. (
|f (x + t) - f x - f1 * t|) - -Subtraction
- f(x + t) minus f(x). On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
f (x + t) - f x) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - +Addition
- x plus t. (
x + t) - a/bDivision
- M divided by 2. In Lean, dividing by 0 gives 0. (
M / 2) - aᵇPower
- t raised to the power 2. (
t ^ 2)
theorem sob-jensen-gap-bound {m : ℕ} (w ξ : Fin m → ℝ) (f : ℝ → ℝ) (x f1 M : ℝ) (hw : ∀ i, 0 ≤ w i) (hsum : ∑ i, w i = 1) (hmean : ∑ i, w i * ξ i = 0) (hR : ∀ t, |f (x + t) - f x - f1 * t| ≤ M / 2 * t ^ 2) :
|∑ i, w i * f (x + ξ i) - f x| ≤ M / 2 * ∑ i, w i * ξ i ^ 2Per layer, an unbiased stochastic attention estimate with variance V induces bias at most (M/2)V downstream of a smooth map (delta method). Part of 'Second-Order Bias Law: unbiased stochastic attention stays (almost) unbiased through smooth depth'.
How it was proved
- Proved
- 4 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
- 21 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.