NLA-lib Explorer

NLAlib.integral_frobNorm_conjTranspose_mul_sub_sq_of_hasLaw_countSketch

Library · theorem

General form: sizes are index types

AMM with a CountSketch, exact second moment: \mathbb{E}\|\mathbf{A}^{\mathsf{H}}\mathbf{S}^{\mathsf{H}}\mathbf{S}\mathbf{B} - \mathbf{A}^{\mathsf{H}}\mathbf{B}\|_{\mathsf{F}}^2 = \frac{\|\mathbf{A}\|_{\mathsf{F}}^2\|\mathbf{B}\|_{\mathsf{F}}^2 + \|\mathbf{A}^{\mathsf{T}}\mathbf{B}\|_{\mathsf{F}}^2 - 2\sum_i \|\mathbf{a}_i\|^2 \|\mathbf{b}_i\|^2}{\lvert k \rvert} for the rows \mathbf{a}_i, \mathbf{b}_i of \mathbf{A}, \mathbf{B}. [Woodruff2014, proof of Theorem 14] computes its case \mathbf{A} = \mathbf{B} = \mathbf{x} over \mathbb{R} (there as \mathbb{E}\|\mathbf{S}\mathbf{x}\|^4, then bounded); the general case is proved here without a literature source. Entry (a, \mathbf{b}) of the error is \operatorname{tr}(\mathbf{M}_{a\mathbf{b}}(\mathbf{S}^{\mathsf{H}}\mathbf{S} - \mathbf{I})) for the rank-one \mathbf{M}_{a\mathbf{b}} with entries \mathbf{B}_{j,\mathbf{b}}\overline{\mathbf{A}_{i,a}}, and the exact second moment is summed over (a, \mathbf{b}). Result: amm-countsketch

NLAlib.integral_frobNorm_conjTranspose_mul_sub_sq_of_hasLaw_countSketch.{u_1, u_2, u_3, u_4, u_5,
    u_6}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3}
  {n : Type u_4} {q : Type u_5} {r : Type u_6} [Fintype k] [Fintype n] [DecidableEq k]
  {S : Ω → Matrix k n 𝕜} [Fintype q] [Fintype r] (hS : HasLaw S (countSketch k n) μ)
  (A : Matrix n q 𝕜) (B : Matrix n r 𝕜) :
  ∫ (ω : Ω), frobNorm (Aᴴ * (S ω)ᴴ * S ω * B - Aᴴ * B) ^ 2 ∂μ =
    (frobNorm A ^ 2 * frobNorm B ^ 2 + frobNorm (Aᵀ * B) ^ 2 -
        2 * ∑ i, ‖WithLp.toLp 2 (A i)‖ ^ 2 * ‖WithLp.toLp 2 (B i)‖ ^ 2) /
      ↑(Fintype.card k)

Full source on GitHub

Import NLAlib.Sketching.Sparse.CountSketch.

General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k ≥ 1.