Provedunbiased-attentionend-to-endsoftmaxlower-bound
Unbiased two-point bound: unbiased z₁, z₂ (variance ≤ V) agreeing outside an event of mass q satisfy |o₁ − o₂|(1 − q) ≤ 2√(qV)
For all , , and , if , , , , , , and (given and ), then
What the notation means · or point at any symbol
- Type
- Type: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Type) - Fintype
- Fintype: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Fintype) - f(x)Function application
- Fintype applied to Ω. Lean writes f x; papers write f(x). (
Fintype Ω) - ⟹Implies
- If Ω, then ℝ. (Between types, A → B is the type of functions from A to B.) (
Ω → ℝ) - x : TVariables
- w, z₁, z₂ range over Ω → ℝ: the statement must hold for every choice. (
(w z₁ z₂ : Ω → ℝ)) - DecidablePred
- DecidablePred: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
DecidablePred) - x ∈ TVariables
- o₁, o₂, q, V range over real numbers: the statement must hold for every choice. (
(o₁ o₂ q V : ℝ)) - ∀For all
- The statement after the comma holds for every ω. (
∀ ω, 0 ≤ w ω) - ∑Summation
- Add up w(ω) for every ω. (
∑ ω, w ω) - =Equality
- ∑ ω, w(ω) and 1 are the same. (
∑ ω, w ω = 1) - |x|Absolute value
- The size of o₁ − o₂ without its sign. (
|o₁ - o₂|) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - Prop
- Prop: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Prop) - ≤At most
- 0 is less than or equal to w(ω). (
0 ≤ w ω) - ·Multiplication
- w(ω) times z₁(ω). (
w ω * z₁ ω) - ¬Not
- It is not the case that A(ω). (
¬ A ω) - filter
- Finset.univ.filter: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Finset.univ.filter) - aᵇPower
- z₁(ω) − o₁ raised to the power 2. (
(z₁ ω - o₁) ^ 2) - -Subtraction
- z₁(ω) minus o₁. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
z₁ ω - o₁) - √Square root
- The non-negative number whose square is q · V. (
Real.sqrt (q * V))
theorem ua-unbiased-two-point {Ω : Type} [Fintype Ω] (w z₁ z₂ : Ω → ℝ) (A : Ω → Prop) [DecidablePred A] (o₁ o₂ q V : ℝ) (hw : ∀ ω, 0 ≤ w ω) (hsum : ∑ ω, w ω = 1) (hq : ∑ ω ∈ Finset.univ.filter A, w ω = q) (h1 : ∑ ω, w ω * z₁ ω = o₁) (h2 : ∑ ω, w ω * z₂ ω = o₂) (hV1 : ∑ ω, w ω * (z₁ ω - o₁) ^ 2 ≤ V) (hV2 : ∑ ω, w ω * (z₂ ω - o₂) ^ 2 ≤ V) (hsame : ∀ ω, ¬ A ω → z₁ ω = z₂ ω) :
|o₁ - o₂| * (1 - q) ≤ 2 * Real.sqrt (q * V)Suggested by the external reviewer; strengthens ua-two-point-lower-bound from worst-case MSE to any pair of unbiased estimators. Consequence: an exactly unbiased attention estimator must read a key that changes the output by Δ with probability ≥ Δ²(1−q)²/(4V) — exact unbiasedness forces positive read probability on every influential key, so with the random-plant hitting bound the Ω(min(n, e^R)) draws-per-row floor applies to unbiased samplers. Part of 'Unbiased randomized attention: cost x variance thresholds' (end-to-end composition round).
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
- 64 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.