NLA-lib Explorer

Early-truncated randomized SVD

Library · Result group

Theorem (integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_one_add_mul_of_hasLaw_gaussianMatrix). The early-truncated randomized SVD reaches relative error 1 + \varepsilon with \ell \ge 900k/\varepsilon^2 standard Gaussian samples, 0 < \varepsilon \le 1: \mathbb{E}\|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k) \|_{\mathsf{F}}^2 \le (1+\varepsilon)\|\mathbf{A}-\llbracket\mathbf{A}\rrbracket_k \|_{\mathsf{F}}^2\,, with \ell products with \mathbf{A}, at most k with \mathbf{A}^{\mathsf{H}}, and output rank at most k. Asymptotic form: NLAlib.exists_forall_integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_of_hasLaw_gaussianMatrix. Proved without a literature source; the algorithm is [TroppYurtseverUdellCevher2017, §7.3.1].

Headline General form: sizes are index types

Lean statement and details
NLAlib.integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_one_add_mul_of_hasLaw_gaussianMatrix.{u_1,
    u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k : ℕ} {ε : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1)
  (hl : 900 * ↑k ≤ ε ^ 2 * ↑(Fintype.card l)) :
  ∫ (ω : Ω), frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2 ∂μ ≤
    (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2

Full source on GitHub

Copy link

Other forms

Theorem (HasJLMoment.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le). The early-truncated randomized SVD from an injection and the JL moment property: if the real sketch \mathbf{\Omega}^{\mathsf{H}} injects \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} with constant 0 < a \le 1 except with probability \delta and has the (\varepsilon, \delta', q) JL moment property, \varepsilon > 0, q \ge 2, \delta' \ge 0, then for 0 < \theta < 1 \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le \Bigl(\frac{1 + \sqrt{k}\,\varepsilon}{(1-\theta)a} + \frac{k\varepsilon^2}{\theta(1-\theta)a^2}\Bigr) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + 2\delta'; with \varepsilon of order \varepsilon_0/\sqrt{k} this is 1 + O(\varepsilon_0) at \ell = O(k/(\varepsilon_0^2\delta')) for the dense families. Its Gaussian expectation twin is NLAlib.integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_one_add_mul_of_hasLaw_gaussianMatrix. Proved without a literature source (the deterministic core of the early-truncation bound); [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3]; [Woodruff2014, Theorem 61] is the full-row-space form.

Lean statement and details
NLAlib.HasJLMoment.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le.{u_1, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_3} {n : Type u_4}
  {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} [IsFiniteMeasure μ]
  {A : Matrix m n ℝ} {k : ℕ} {a θ δ ε δ' q : ℝ} (hJL : HasJLMoment (fun ω ↦ (X ω)ᴴ) ε δ' q μ)
  (h : HasSubspaceInjection (fun ω ↦ (X ω)ᴴ) (truncatedSVD A k)ᴴ a δ μ) (hX : AEMeasurable X μ)
  (ha : 0 < a) (ha1 : a ≤ 1) (hθ : 0 < θ) (hθ1 : θ < 1) (hε : 0 < ε) (hq : 2 ≤ q) (hδ' : 0 ≤ δ') :
  μ.real
      {ω |
        ((1 + √↑k * ε) / ((1 - θ) * a) + ↑k * ε ^ 2 / (θ * (1 - θ) * a ^ 2)) *
            frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
    δ + 2 * δ'

Full source on GitHub

Copy link

Theorem (HasJLMoment.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_one_add_mul_le). The early-truncated randomized SVD to relative error from an injection and the JL moment property: for a real test matrix \mathbf{\Omega} and a scale c \in \mathbb{R}, if the sketch (c\,\mathbf{\Omega})^{\mathsf{H}} injects \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} with constant 1 - \varepsilon/6 except with probability \delta and has the (\varepsilon/(6\sqrt{k}), \delta', q) JL moment property, 0 < \varepsilon \le 1, q \ge 2, \delta' \ge 0, then \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + 2\delta' (k = 0 is trivial). The output is computed at the raw \mathbf{\Omega}, the analysis runs at the rescaled sketch (the families' normalisation c). It is NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_mul_sq_gt_one_add_mul_le with the two multiplication tails from the JL moment, each failing with probability \delta'; every dense and SRHT family statement of early truncation instantiates it. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3]; there for dense random sign matrices, with unspecified constants.

Lean statement and details
NLAlib.HasJLMoment.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_one_add_mul_le.{u_1, u_3, u_4,
    u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_3} {n : Type u_4}
  {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} [IsFiniteMeasure μ]
  {A : Matrix m n ℝ} {k : ℕ} {c ε δ δ' q : ℝ}
  (hJL : HasJLMoment (fun ω ↦ (c • X ω)ᴴ) (ε / (6 * √↑k)) δ' q μ)
  (h : HasSubspaceInjection (fun ω ↦ (c • X ω)ᴴ) (truncatedSVD A k)ᴴ (1 - ε / 6) δ μ)
  (hX : AEMeasurable (fun ω ↦ c • X ω) μ) (hε : 0 < ε) (hε1 : ε ≤ 1) (hq : 2 ≤ q) (hδ' : 0 ≤ δ') :
  μ.real
      {ω |
        (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
    δ + 2 * δ'

Full source on GitHub

Copy link

Theorem (HasSubspaceInjection.measureReal_frobNorm_sub_mul_sq_gt_le). Early truncation from a head injection and approximate-multiplication tails, any optimal projector: if \mathbf{\Omega}^{\mathsf{H}} injects \operatorname{range}\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}} with constant 0 < a \le 1 except with probability \delta, the tail–tail error \|\mathbf{E}\mathbf{\Omega}\mathbf{\Omega}^{\mathsf{H}}\mathbf{E}^{\mathsf{H}} - \mathbf{E}\mathbf{E}^{\mathsf{H}}\|_{\mathsf{F}} exceeds \eta_w with probability at most \delta_w and the tail–head error \|\mathbf{E}\mathbf{\Omega}\mathbf{\Omega}^{\mathsf{H}} \mathbf{P}_{\llbracket\mathbf{A}\rrbracket_k^{\mathsf{H}}}\|_{\mathsf{F}} exceeds \eta_\chi with probability at most \delta_\chi, \mathbf{E} = \mathbf{A} - \llbracket\mathbf{A}\rrbracket_k, then for every random orthogonal projector \mathbf{P} of rank at most k with \|\mathbf{A}\mathbf{\Omega} - \mathbf{P}\mathbf{A}\mathbf{\Omega}\|_{\mathsf{F}} \le \|\mathbf{E}\mathbf{\Omega}\|_{\mathsf{F}} and 0 < \theta < 1, \|\mathbf{A} - \mathbf{P}\mathbf{A}\|_{\mathsf{F}}^2 \le \frac{\|\mathbf{E}\|_{\mathsf{F}}^2 + \sqrt{k}\,\eta_w}{(1-\theta)a} + \frac{\eta_\chi^2}{\theta(1-\theta)a^2} except with probability \delta + \delta_w + \delta_\chi. The projector of \llbracket\mathbf{A}\mathbf{\Omega}\rrbracket_k qualifies (Eckart–Young), and so does the projector of the output at c^{-1}\mathbf{\Omega} when the analysis runs at \mathbf{\Omega}. Proved without a literature source (the deterministic core of the early-truncation bound); the sketch conditions are those of [CohenElderMuscoMuscoPersu2015, proof of Theorem 12].

Lean statement and details
NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_mul_sq_gt_le.{u_1, u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l 𝕜}
  [IsFiniteMeasure μ] {A : Matrix m n 𝕜} {k : ℕ} {a θ δ ηw δw ηχ δχ : ℝ}
  (h : HasSubspaceInjection (fun ω ↦ (X ω)ᴴ) (truncatedSVD A k)ᴴ a δ μ) (ha : 0 < a) (ha1 : a ≤ 1)
  (hθ : 0 < θ) (hθ1 : θ < 1) {P : Ω → Matrix m m 𝕜} (hP : ∀ (ω : Ω), IsStarProjection (P ω))
  (hPk : ∀ (ω : Ω), (P ω).rank ≤ k)
  (hopt : ∀ (ω : Ω), frobNorm (A * X ω - P ω * (A * X ω)) ≤ frobNorm ((A - truncatedSVD A k) * X ω))
  (hw :
    μ.real
        {ω |
          ηw <
            frobNorm
              ((A - truncatedSVD A k) * X ω * (X ω)ᴴ * (A - truncatedSVD A k)ᴴ -
                (A - truncatedSVD A k) * (A - truncatedSVD A k)ᴴ)} ≤
      δw)
  (hχ :
    μ.real
        {ω |
          ηχ <
            frobNorm ((A - truncatedSVD A k) * X ω * (X ω)ᴴ * rangeProjector (truncatedSVD A k)ᴴ)} ≤
      δχ) :
  μ.real
      {ω |
        (frobNorm (A - truncatedSVD A k) ^ 2 + √↑k * ηw) / ((1 - θ) * a) +
            ηχ ^ 2 / (θ * (1 - θ) * a ^ 2) <
          frobNorm (A - P ω * A) ^ 2} ≤
    δ + δw + δχ

Full source on GitHub

Copy link

Theorem (HasSubspaceInjection.measureReal_frobNorm_sub_mul_sq_gt_one_add_mul_le). Early truncation to relative error, any optimal projector: with injection constant 1 - \varepsilon/6 and 0 < \varepsilon \le 1, if the tail–tail error exceeds (\varepsilon/(6\sqrt{k}))\|\mathbf{E}\|_{\mathsf{F}}^2 with probability at most \delta_w and the tail–head error exceeds (\varepsilon/6)\|\mathbf{E}\|_{\mathsf{F}} with probability at most \delta_\chi, \mathbf{E} = \mathbf{A} - \llbracket\mathbf{A}\rrbracket_k, then for every random orthogonal projector \mathbf{P} of rank at most k with \|\mathbf{A}\mathbf{\Omega} - \mathbf{P}\mathbf{A}\mathbf{\Omega}\|_{\mathsf{F}} \le \|\mathbf{E}\mathbf{\Omega}\|_{\mathsf{F}} \|\mathbf{A} - \mathbf{P}\mathbf{A}\|_{\mathsf{F}}^2 \le (1 + \varepsilon) \|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta + \delta_w + \delta_\chi: the core tail NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_mul_sq_gt_le at \theta = \varepsilon/(6 + \varepsilon), the minimiser of its right side, which solves the quadratic \lambda s^2 \le c + 2\chi s of the structural bound exactly: with \mathbf{x} = \varepsilon/6 it gives ((1 + \mathbf{x})/(1 - \mathbf{x}))^2\|\mathbf{E}\|_{\mathsf{F}}^2, at most (1 + \varepsilon)\|\mathbf{E}\|_{\mathsf{F}}^2. The form every family statement instantiates. Proved without a literature source; [CohenElderMuscoMuscoPersu2015, proof of Theorem 12] for the sketch conditions.

Lean statement and details
NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_mul_sq_gt_one_add_mul_le.{u_1, u_2, u_3, u_4,
    u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l 𝕜}
  [IsFiniteMeasure μ] {A : Matrix m n 𝕜} {k : ℕ} {ε δ δw δχ : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1)
  (h : HasSubspaceInjection (fun ω ↦ (X ω)ᴴ) (truncatedSVD A k)ᴴ (1 - ε / 6) δ μ)
  {P : Ω → Matrix m m 𝕜} (hP : ∀ (ω : Ω), IsStarProjection (P ω)) (hPk : ∀ (ω : Ω), (P ω).rank ≤ k)
  (hopt : ∀ (ω : Ω), frobNorm (A * X ω - P ω * (A * X ω)) ≤ frobNorm ((A - truncatedSVD A k) * X ω))
  (hw :
    μ.real
        {ω |
          ε / (6 * √↑k) * frobNorm (A - truncatedSVD A k) ^ 2 <
            frobNorm
              ((A - truncatedSVD A k) * X ω * (X ω)ᴴ * (A - truncatedSVD A k)ᴴ -
                (A - truncatedSVD A k) * (A - truncatedSVD A k)ᴴ)} ≤
      δw)
  (hχ :
    μ.real
        {ω |
          ε / 6 * frobNorm (A - truncatedSVD A k) <
            frobNorm ((A - truncatedSVD A k) * X ω * (X ω)ᴴ * rangeProjector (truncatedSVD A k)ᴴ)} ≤
      δχ) :
  μ.real {ω | (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 < frobNorm (A - P ω * A) ^ 2} ≤
    δ + δw + δχ

Full source on GitHub

Copy link

Theorem (exists_forall_integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_of_hasLaw_gaussianMatrix). O(k/\varepsilon^2) samples suffice for the early-truncated randomized SVD: there are absolute constants C, \varepsilon_0 > 0 such that for a standard Gaussian n \times \ell test matrix \mathbf{\Omega}, 0 < \varepsilon \le \varepsilon_0 and \ell \ge Ck/\varepsilon^2, \mathbb{E}\|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k) \|_{\mathsf{F}}^2 \le (1+\varepsilon)\|\mathbf{A}-\llbracket\mathbf{A}\rrbracket_k \|_{\mathsf{F}}^2\,. The asymptotic form of NLAlib.integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_one_add_mul_of_hasLaw_gaussianMatrix; the proof takes C = 900 and \varepsilon_0 = 1.

General form: sizes are index types

Lean statement and details
NLAlib.exists_forall_integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_of_hasLaw_gaussianMatrix :
  ∃ C ε₀,
    0 < C ∧
      0 < ε₀ ∧
        ∀ {Ω m n l : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype m] [inst_2 : Fintype n]
          [inst_3 : Fintype l] (μ : Measure Ω) (A : Matrix m n ℝ) (X : Ω → Matrix n l ℝ) (k : ℕ)
          (ε : ℝ),
          HasLaw X (gaussianMatrix n l) μ →
            0 < ε →
              ε ≤ ε₀ →
                C * (↑k / ε ^ 2) ≤ ↑(Fintype.card l) →
                  ∫ (ω : Ω), frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2 ∂μ ≤
                    (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2

Full source on GitHub

Copy link

Theorem (exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_countSketch). O(k^2/(\varepsilon^2\delta)) CountSketch columns suffice for early truncation: there are absolute constants C, \varepsilon_0 > 0 such that if the sketch \mathbf{\Omega}^{\mathsf{H}} of an n \times \ell test matrix \mathbf{\Omega} is a CountSketch, 0 < \varepsilon \le \varepsilon_0, \delta > 0 and \ell \ge C(k^2 + k)/(\varepsilon^2\delta), then \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta, over any RCLike field. The asymptotic form of NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_countSketch, proved from it with C = 216 and \varepsilon_0 = 1. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3]; there \mathbf{A}\mathbf{\Omega} is a projection-cost-preserving sketch with error O(\varepsilon) for the fully sparse embedding of Lemma 11 (family 2) with O(k^2/(\varepsilon^2\delta)) rows, and Lemma 3 carries the sketch's best rank-k projection over to \mathbf{A}; real.

General form: sizes are index types

Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_countSketch :
  ∃ C ε₀,
    0 < C ∧
      0 < ε₀ ∧
        ∀ {Ω 𝕜 m n l : Type} [inst : MeasurableSpace Ω] [inst_1 : RCLike 𝕜] [inst_2 : Fintype m]
          [inst_3 : Fintype n] [inst_4 : Fintype l] [inst_5 : DecidableEq l] (μ : Measure Ω)
          (A : Matrix m n 𝕜) (X : Ω → Matrix n l 𝕜) (k : ℕ) (ε δ : ℝ),
          HasLaw (fun ω ↦ (X ω)ᴴ) (countSketch l n) μ →
            0 < ε →
              ε ≤ ε₀ →
                0 < δ →
                  C * ((↑k ^ 2 + ↑k) / (ε ^ 2 * δ)) ≤ ↑(Fintype.card l) →
                    μ.real
                        {ω |
                          (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
                            frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
                      δ

Full source on GitHub

Copy link

Theorem (exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix). O(k\log(1/\delta)/\varepsilon^2) Gaussian columns suffice for early truncation: there are absolute constants C, \varepsilon_0 > 0 such that for a standard Gaussian n \times \ell test matrix \mathbf{\Omega}, 0 < \varepsilon \le \varepsilon_0, 0 < \delta \le 1/2 and \ell \ge Ck\log(1/\delta)/\varepsilon^2, \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta (k = 0 is trivial). The asymptotic form of measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix_of_jlMomentDim_le, proved from it with \varepsilon_0 = 1; the injection size O((k + \log(1/\delta))/\varepsilon^2) is dominated by the multiplication size for k \ge 1.

General form: sizes are index types

Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix :
  ∃ C ε₀,
    0 < C ∧
      0 < ε₀ ∧
        ∀ {Ω m n l : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype m] [inst_2 : Fintype n]
          [inst_3 : Fintype l] (μ : Measure Ω) (A : Matrix m n ℝ) (X : Ω → Matrix n l ℝ) (k : ℕ)
          (ε δ : ℝ),
          HasLaw X (gaussianMatrix n l) μ →
            0 < ε →
              ε ≤ ε₀ →
                0 < δ →
                  δ ≤ 1 / 2 →
                    C * (↑k * Real.log (1 / δ) / ε ^ 2) ≤ ↑(Fintype.card l) →
                      μ.real
                          {ω |
                            (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
                              frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
                        δ

Full source on GitHub

Copy link

Theorem (exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_haarFrame). O(k\log(1/\delta)/\varepsilon^2) Haar columns suffice for early truncation: there are absolute constants C, \varepsilon_0 > 0 such that for an n \times \ell Haar frame \mathbf{\Omega}, \ell \le \lvert n\rvert, 0 < \varepsilon \le \varepsilon_0, 0 < \delta \le 1/2 and \ell \ge Ck\log(1/\delta)/\varepsilon^2, \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta (k = 0 is trivial). The asymptotic form of NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_haarFrame, proved from it with \varepsilon_0 = 1; the injection size O((k + \log(1/\delta))/\varepsilon^2) is dominated by the multiplication size for k \ge 1. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3].

General form: sizes are index types

Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_haarFrame :
  ∃ C ε₀,
    0 < C ∧
      0 < ε₀ ∧
        ∀ {Ω m n l : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype m] [inst_2 : Fintype n]
          [inst_3 : Fintype l] [inst_4 : DecidableEq l] (μ : Measure Ω) (A : Matrix m n ℝ)
          (Q : Ω → Matrix n l ℝ) (k : ℕ) (ε δ : ℝ),
          HasLaw Q (haarFrame n l) μ →
            Fintype.card l ≤ Fintype.card n →
              0 < ε →
                ε ≤ ε₀ →
                  0 < δ →
                    δ ≤ 1 / 2 →
                      C * (↑k * Real.log (1 / δ) / ε ^ 2) ≤ ↑(Fintype.card l) →
                        μ.real
                            {ω |
                              (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
                                frobNorm (A - earlyTruncatedRSVD A (Q ω) k) ^ 2} ≤
                          δ

Full source on GitHub

Copy link

Theorem (exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_srht). O(\beta(k + \log(n/\delta))\log(k/\delta)/\varepsilon^2 + \beta^2k/(\varepsilon^2\delta)) SRHT columns suffice for early truncation: there are absolute constants C, \varepsilon_0 > 0 such that for a real bounded orthonormal \mathbf{F} with constant \beta and a test matrix \mathbf{\Omega} whose sketch \mathbf{\Omega}^{\mathsf{H}} is its SRHT without replacement, \ell nonempty, \ell \le n, 0 < \varepsilon \le \varepsilon_0, 0 < \delta \le 1/2 and \ell at least C times that threshold, \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta; the constants come before every dimension and before \beta. Proved from NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_srht with \varepsilon_0 = 1. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3].

General form: sizes are index types

Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_srht :
  ∃ C ε₀,
    0 < C ∧
      0 < ε₀ ∧
        ∀ {Ω m n l : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype m] [inst_2 : Fintype n]
          [inst_3 : Fintype l] [inst_4 : DecidableEq n] [Nonempty l] (μ : Measure Ω)
          (A : Matrix m n ℝ) (X : Ω → Matrix n l ℝ) (F : Matrix n n ℝ) (β : ℝ) (k : ℕ) (ε δ : ℝ),
          IsBoundedOrthonormal F β →
            HasLaw (fun ω ↦ (X ω)ᴴ) (srht l F) μ →
              Fintype.card l ≤ Fintype.card n →
                0 < ε →
                  ε ≤ ε₀ →
                    0 < δ →
                      δ ≤ 1 / 2 →
                        C *
                              (β * (↑k + Real.log (↑(Fintype.card n) / δ)) * Real.log (↑k / δ) /
                                  ε ^ 2 +
                                β ^ 2 * ↑k / (ε ^ 2 * δ)) ≤
                            ↑(Fintype.card l) →
                          μ.real
                              {ω |
                                (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
                                  frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
                            δ

Full source on GitHub

Copy link

Theorem (exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_isSubgaussianVector). O(c^2k\log(1/\delta)/\varepsilon^2) sub-Gaussian columns suffice for early truncation: there are absolute constants C, \varepsilon_0 > 0 such that if the sketch \mathbf{\Omega}^{\mathsf{H}} of an n \times \ell test matrix \mathbf{\Omega} has independent, isotropic, sub-Gaussian rows with proxy c, 0 < \varepsilon \le \varepsilon_0, 0 < \delta \le 1/2 and \ell \ge Cc^2k\log(1/\delta)/\varepsilon^2, then \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta (k = 0 is trivial). The asymptotic form of measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_isSubgaussianVector_of_subgaussianJLMomentDim_le, proved from it with \varepsilon_0 = 1. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3]; there \mathbf{A}\mathbf{\Omega} is a projection-cost-preserving sketch with error O(\varepsilon) for the dense sign matrices of Lemma 11 (family 1) with O((k + \log(1/\delta))/\varepsilon^2) rows; here any isotropic sub-Gaussian rows, with the product k\log(1/\delta) from the route through JL moments.

General form: sizes are index types

Lean statement and details
NLAlib.exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_isSubgaussianVector :
  ∃ C ε₀,
    0 < C ∧
      0 < ε₀ ∧
        ∀ {Ω m n l : Type} [inst : MeasurableSpace Ω] [inst_1 : Fintype m] [inst_2 : Fintype n]
          [inst_3 : Fintype l] [inst_4 : DecidableEq n] [Nonempty l] (μ : Measure Ω)
          (A : Matrix m n ℝ) (X : Ω → Matrix n l ℝ) (c : ℝ≥0) (k : ℕ) (ε δ : ℝ),
          iIndepFun (fun i ω ↦ (X ω)ᴴ i) μ →
            (∀ (i : l), IsSubgaussianVector (fun ω ↦ (X ω)ᴴ i) c μ) →
              (∀ (i : l), IsIsotropic (fun ω ↦ (X ω)ᴴ i) μ) →
                0 < ε →
                  ε ≤ ε₀ →
                    0 < δ →
                      δ ≤ 1 / 2 →
                        C * (↑c ^ 2 * ↑k * Real.log (1 / δ) / ε ^ 2) ≤ ↑(Fintype.card l) →
                          μ.real
                              {ω |
                                (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
                                  frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
                            δ

Full source on GitHub

Copy link

Theorem (integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_of_hasLaw_gaussianMatrix). The expected error of early-truncated randomized SVD: let \mathbf{\Omega} be a standard Gaussian n\times\ell matrix, 100k\le\ell and \ell\ge900. Writing T=\|\mathbf{A}-\llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2, its optimized error bound is at present <!-- value earlyTruncatedRSVDFactor k \ell --> \mathbb{ E} \|\mathbf{ A} -\mathsf{earlyTruncatedRSVD} ( \mathbf{ A} ,\mathbf{ \Omega} ,k) \|_{ \mathsf{ F} } ^2\le\bigl( ( ( 1+ \sqrt{ 2k/\ell} ) ( ( 1-\sqrt{ k/\ell} ) ^{ -2} + 10/\sqrt{ \ell} ) ) + 2( ( k/\ell) \sqrt{ 1+ 2/( k\ell) } \sqrt{ ( 1-\sqrt{ k/\ell} ) ^{ -8} + 263/\sqrt{ \ell} } ) + \sqrt{ 4( ( k/\ell) \sqrt{ 1+ 2/( k\ell) } \sqrt{ ( 1-\sqrt{ k/\ell} ) ^{ -8} + 263/\sqrt{ \ell} } ) ( ( ( 1+ \sqrt{ 2k/\ell} ) ( ( 1-\sqrt{ k/\ell} ) ^{ -2} + 10/\sqrt{ \ell} ) ) + ( ( k/\ell) \sqrt{ 1+ 2/( k\ell) } \sqrt{ ( 1-\sqrt{ k/\ell} ) ^{ -8} + 263/\sqrt{ \ell} } ) ) }\bigr) T\,. Every rank and shape is allowed, including a zero optimal residual. No printed source. The free Young-parameter Gaussian estimate is optimized by scalar algebra.

General form: sizes are index types

Lean statement and details
NLAlib.integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_of_hasLaw_gaussianMatrix.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k : ℕ} (hkl : 100 * k ≤ Fintype.card l)
  (hl : 900 ≤ Fintype.card l) :
  ∫ (ω : Ω), frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2 ∂μ ≤
    earlyTruncatedRSVDFactor k (Fintype.card l) * frobNorm (A - truncatedSVD A k) ^ 2

Full source on GitHub

Copy link

Theorem (integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_one_add_mul_of_hasLaw_gaussianMatrix_of_earlyTruncatedRSVDRelativeErrorDim_le). Early-truncated randomized SVD reaches relative error with standard Gaussian samples: for 0<\varepsilon\le1 and \ell\ge\max\{900,400k/\varepsilon^2\}, the expected squared Frobenius error is at most (1+\varepsilon) times the optimal squared error. \mathbb{E}\|\mathbf{A}-\mathsf{earlyTruncatedRSVD}(\mathbf{A},\mathbf\Omega,k) \|_{\mathsf{F}}^2\le(1+\varepsilon) \|\mathbf{A}-\llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2\,. No printed source.

General form: sizes are index types

Lean statement and details
NLAlib.integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_one_add_mul_of_hasLaw_gaussianMatrix_of_earlyTruncatedRSVDRelativeErrorDim_le.{u_1,
    u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k : ℕ} {ε : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1)
  (hl : earlyTruncatedRSVDRelativeErrorDim k ε ≤ ↑(Fintype.card l)) :
  ∫ (ω : Ω), frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2 ∂μ ≤
    (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_countSketch). Early-truncated randomized SVD with a CountSketch test matrix, tail: if the sketch \mathbf{\Omega}^{\mathsf{H}} is a CountSketch, 0 < \varepsilon \le 1, \delta > 0, \ell is at least <!-- value countSketchEmbeddingDim k (\varepsilon/6) (\delta/3) --> (k^2 + k)/((\delta/3)(\varepsilon/6)^2) (countSketchEmbeddingDim k (ε / 6) (δ / 3)) and \ell \ge 216k/(\varepsilon^2\delta), then \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta, over any RCLike field. The route: the OSI at constant 1 - \varepsilon/6 and failure \delta/3, the two multiplication tails of the CountSketch at accuracy \varepsilon/(6\sqrt{k}), and NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_mul_sq_gt_one_add_mul_le. Asymptotic form: exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_countSketch. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3]; there for sparse sketches with unspecified constants, real.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_countSketch.{u_1, u_2, u_3,
    u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {m : Type u_3}
  {n : Type u_4} {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq l]
  {X : Ω → Matrix n l 𝕜} (A : Matrix m n 𝕜) (hX : HasLaw (fun ω ↦ (X ω)ᴴ) (countSketch l n) μ)
  {k : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) (hδ : 0 < δ)
  (hl : countSketchEmbeddingDim k (ε / 6) (δ / 3) ≤ ↑(Fintype.card l))
  (hl' : 216 * ↑k ≤ ε ^ 2 * δ * ↑(Fintype.card l)) :
  μ.real
      {ω |
        (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
    δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix). Early-truncated randomized SVD with a Gaussian test matrix, tail: for a standard Gaussian n \times \ell test matrix \mathbf{\Omega}, 0 < \varepsilon \le 1, \delta > 0, at least <!-- value gaussianInjectionDim k (\varepsilon/6) (\delta/3) --> \ell \ge 4 (\sqrt{k} + \sqrt{2 \log(1/(\delta/3))})^2/(\varepsilon/6)^2 and \ell \ge 216k/(\varepsilon^2\delta), \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta; the first size is gaussianInjectionDim k (ε / 6) (δ / 3). The route: the OSI at constant 1 - \varepsilon/6 and failure \delta/3, the JL moment property at \varepsilon/(6\sqrt{k}) for the two multiplication tails, and NLAlib.HasSubspaceInjection.measureReal_frobNorm_sub_mul_sq_gt_one_add_mul_le. Its expectation twin, at \ell \ge 900k/\varepsilon^2, is NLAlib.integral_frobNorm_sub_earlyTruncatedRSVD_sq_le_one_add_mul_of_hasLaw_gaussianMatrix; a tail from that by Markov's inequality needs \ell of order k/(\varepsilon\delta)^2. Incomparable with its \log(1/\delta) twin measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix_of_jlMomentDim_le (rule 4): this one needs fewer columns at constant \delta, the twin for small \delta; the asymptotic form exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix is proved from the twin. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3]; there for dense random sign matrices, with unspecified constants.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix.{u_1, u_2, u_3,
    u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) (hδ : 0 < δ)
  (hl : gaussianInjectionDim k (ε / 6) (δ / 3) ≤ ↑(Fintype.card l))
  (hl' : 216 * ↑k ≤ ε ^ 2 * δ * ↑(Fintype.card l)) :
  μ.real
      {ω |
        (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
    δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix_of_jlMomentDim_le). Early-truncated randomized SVD with a Gaussian test matrix, tail, \log(1/\delta) size form: for a standard Gaussian n \times \ell test matrix \mathbf{\Omega}, 0 < \varepsilon \le 1, \delta > 0, at least <!-- value gaussianInjectionDim k (\varepsilon/6) (\delta/3) --> \ell \ge 4 (\sqrt{k} + \sqrt{2 \log(1/(\delta/3))})^2/(\varepsilon/6)^2 and at least <!-- value jlMomentDim (\varepsilon/(6\sqrt{k})) (\delta/3) --> \ell \ge 128\max(2, \log(1/(\delta/3)))/(\varepsilon/(6\sqrt{k}))^2, \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta; the sizes are gaussianInjectionDim k (ε / 6) (δ / 3) and jlMomentDim (ε / (6 * √k)) (δ / 3), the second 4608k\max(2, \log(3/\delta))/\varepsilon^2. The route of NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix, with the JL moment at p = \max(2, \log(3/\delta)) (NLAlib.hasJLMoment_of_hasLaw_gaussianMatrix_of_jlMomentDim_le) in place of the second moment, each multiplication tail failing with probability \delta/3; incomparable with it (rule 4). Asymptotic form: exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3]; there for dense random sign matrices, with unspecified constants.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix_of_jlMomentDim_le.{u_1,
    u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] {X : Ω → Matrix n l ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) {k : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) (hδ : 0 < δ)
  (hl : gaussianInjectionDim k (ε / 6) (δ / 3) ≤ ↑(Fintype.card l))
  (hl' : jlMomentDim (ε / (6 * √↑k)) (δ / 3) ≤ ↑(Fintype.card l)) :
  μ.real
      {ω |
        (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
    δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_haarFrame). Early-truncated randomized SVD with a Haar test matrix, tail: for an n \times \ell Haar frame \mathbf{\Omega}, \ell \le \lvert n\rvert, 0 < \varepsilon \le 1, \delta > 0, at least <!-- value jlDim (2\varepsilon/15) (\delta/3/21^k) --> \ell \ge \log(2/(\delta/3/21^k))/((2\varepsilon/15)^2/4 - (2\varepsilon/15)^3/6) and at least <!-- value jlMomentDim (\varepsilon/(6\sqrt{k})) (\delta/3) --> \ell \ge 128\max(2, \log(1/(\delta/3)))/(\varepsilon/(6\sqrt{k}))^2, \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta; the sizes are jlDim (2 * ε / 15) (δ / 3 / 21 ^ k) (the OSI at constant 1 - \varepsilon/6 and failure \delta/3) and jlMomentDim (ε / (6 * √k)) (δ / 3) (the JL moment for each multiplication tail, failure \delta/3). The route of NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix, through NLAlib.HasJLMoment.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_one_add_mul_le. Asymptotic form: exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_haarFrame. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3]; there for dense random sign matrices, with unspecified constants; the Haar instance is not stated there.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_haarFrame.{u_1, u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] [DecidableEq l] {Q : Ω → Matrix n l ℝ}
  (A : Matrix m n ℝ) (hQ : HasLaw Q (haarFrame n l) μ) (hl : Fintype.card l ≤ Fintype.card n)
  {k : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) (hδ : 0 < δ)
  (hl₁ : jlDim (2 * ε / 15) (δ / 3 / 21 ^ k) ≤ ↑(Fintype.card l))
  (hl₂ : jlMomentDim (ε / (6 * √↑k)) (δ / 3) ≤ ↑(Fintype.card l)) :
  μ.real
      {ω |
        (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - earlyTruncatedRSVD A (Q ω) k) ^ 2} ≤
    δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_srht). Early-truncated randomized SVD with an SRHT test matrix, tail: for a real bounded orthonormal \mathbf{F} with constant \beta, a test matrix \mathbf{\Omega} whose sketch \mathbf{\Omega}^{\mathsf{H}} is the SRHT of \mathbf{F} without replacement, \ell nonempty, \ell \le n, 0 < \varepsilon \le 1, \delta > 0, at least <!-- value samplingInjectionDim k L (\varepsilon/6) (\delta/6) --> \ell \ge \frac{2 L \log(k/(\delta/6))}{(\varepsilon/6)^2}\,, where the flattened coherence <!-- value srhtRowBound {\lvert n \rvert} k (\delta/6) --> L = \beta\,\bigl(k + 2\sqrt{k \log(\lvert n \rvert/(\delta/6))} + 2 \log(\lvert n \rvert/(\delta/6))\bigr) is \beta times srhtRowBound (Fintype.card n) k (δ / 6) (the size is samplingInjectionDim k L (ε / 6) (δ / 6), the injection at constant 1 - \varepsilon/6 and failure \delta/3), and \ell \ge 108(3\beta^2 - 1)k/(\varepsilon^2\delta), \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta. The route of NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix, with the SRHT JL moment NLAlib.hasJLMoment_of_hasLaw_srht at \varepsilon/(6\sqrt{k}) for the two multiplication tails. Asymptotic form: NLAlib.exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_srht. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3]; there for dense random sign matrices, with unspecified constants.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_srht.{u_1, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_3} {n : Type u_4}
  {l : Type u_5} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n] [Nonempty l]
  {X : Ω → Matrix n l ℝ} {F : Matrix n n ℝ} {β : ℝ} (hF : IsBoundedOrthonormal F β)
  (A : Matrix m n ℝ) (hX : HasLaw (fun ω ↦ (X ω)ᴴ) (srht l F) μ)
  (hln : Fintype.card l ≤ Fintype.card n) {k : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) (hδ : 0 < δ)
  (hl :
    samplingInjectionDim k (β * srhtRowBound (Fintype.card n) k (δ / 6)) (ε / 6) (δ / 6) ≤
      ↑(Fintype.card l))
  (hl' : 108 * (3 * β ^ 2 - 1) * ↑k ≤ ε ^ 2 * δ * ↑(Fintype.card l)) :
  μ.real
      {ω |
        (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
    δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_isSubgaussianVector). Early-truncated randomized SVD with a sub-Gaussian test matrix, tail: if the sketch \mathbf{\Omega}^{\mathsf{H}} has independent, isotropic, sub-Gaussian rows with proxy c, \ell nonempty, 0 < \varepsilon \le 1, \delta > 0, at least <!-- value subgaussianEmbeddingDim c k (\varepsilon/6) (\delta/3) --> \ell \ge 25 c^2 (k \log 21 + \log(2/(\delta/3)))/(16C (\varepsilon/6)^2), with <!-- value subgaussianJLConstant -->C = 1/36, and \ell \ge 108(16c^2 - 1)k/(\varepsilon^2\delta), then \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta; the first size is subgaussianEmbeddingDim c k (ε / 6) (δ / 3) and C is subgaussianJLConstant. The route of the Gaussian statement NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_hasLaw_gaussianMatrix, with the family's OSI and JL moment property. Incomparable with its \log(1/\delta) twin measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_isSubgaussianVector_of_subgaussianJLMomentDim_le (rule 4); the asymptotic form exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_isSubgaussianVector is proved from the twin. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3]; there for dense random sign matrices, with unspecified constants.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_isSubgaussianVector.{u_1, u_2, u_3,
    u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n] {X : Ω → Matrix n l ℝ}
  [Nonempty l] (A : Matrix m n ℝ) {c : ℝ≥0} (hind : iIndepFun (fun i ω ↦ (X ω)ᴴ i) μ)
  (hsub : ∀ (i : l), IsSubgaussianVector (fun ω ↦ (X ω)ᴴ i) c μ)
  (hiso : ∀ (i : l), IsIsotropic (fun ω ↦ (X ω)ᴴ i) μ) {k : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1)
  (hδ : 0 < δ) (hl : subgaussianEmbeddingDim (↑c) k (ε / 6) (δ / 3) ≤ ↑(Fintype.card l))
  (hl' : 108 * (16 * ↑c ^ 2 - 1) * ↑k ≤ ε ^ 2 * δ * ↑(Fintype.card l)) :
  μ.real
      {ω |
        (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
    δ

Full source on GitHub

Copy link

Theorem (measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_isSubgaussianVector_of_subgaussianJLMomentDim_le). Early-truncated randomized SVD with a sub-Gaussian test matrix, tail, \log(1/\delta) size form: if the sketch \mathbf{\Omega}^{\mathsf{H}} has independent, isotropic, sub-Gaussian rows with proxy c, \ell \ge 1, 0 < \varepsilon \le 1, \delta > 0, at least <!-- value subgaussianEmbeddingDim c k (\varepsilon/6) (\delta/3) --> \ell \ge 25 c^2 (k \log 21 + \log(2/(\delta/3)))/(16C (\varepsilon/6)^2) and at least <!-- value subgaussianJLMomentDim c (\varepsilon/(6\sqrt{k})) (\delta/3) --> \ell \ge 16c^2\max(2, \log(1/(\delta/3)))/(C(\varepsilon/(6\sqrt{k}))^2), with <!-- value subgaussianJLConstant -->C = 1/36, then \|\mathbf{A} - \mathsf{earlyTruncatedRSVD}(\mathbf{A}, \mathbf{\Omega}, k)\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket\mathbf{A}\rrbracket_k\|_{\mathsf{F}}^2 except with probability \delta; the sizes are subgaussianEmbeddingDim c k (ε / 6) (δ / 3) and subgaussianJLMomentDim c (ε / (6 * √k)) (δ / 3), and C is subgaussianJLConstant. The route of NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_isSubgaussianVector, with the JL moment at p = \max(2, \log(3/\delta)) (NLAlib.hasJLMoment_of_isSubgaussianVector_of_subgaussianJLMomentDim_le, budget \varepsilon/(6\sqrt{k}) \le 1 \le c); incomparable with it (rule 4). Asymptotic form: exists_forall_measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_isSubgaussianVector. [CohenElderMuscoMuscoPersu2015, Theorem 12 and Lemma 3]; there for dense random sign matrices, with unspecified constants.

General form: sizes are index types

Lean statement and details
NLAlib.measureReal_frobNorm_sub_earlyTruncatedRSVD_sq_gt_le_of_isSubgaussianVector_of_subgaussianJLMomentDim_le.{u_1,
    u_2, u_3, u_4}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} [Fintype m] [Fintype n] [Fintype l] [DecidableEq n] {X : Ω → Matrix n l ℝ}
  [Nonempty l] (A : Matrix m n ℝ) {c : ℝ≥0} (hind : iIndepFun (fun i ω ↦ (X ω)ᴴ i) μ)
  (hsub : ∀ (i : l), IsSubgaussianVector (fun ω ↦ (X ω)ᴴ i) c μ)
  (hiso : ∀ (i : l), IsIsotropic (fun ω ↦ (X ω)ᴴ i) μ) {k : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1)
  (hδ : 0 < δ) (hl : subgaussianEmbeddingDim (↑c) k (ε / 6) (δ / 3) ≤ ↑(Fintype.card l))
  (hl' : subgaussianJLMomentDim (↑c) (ε / (6 * √↑k)) (δ / 3) ≤ ↑(Fintype.card l)) :
  μ.real
      {ω |
        (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2 <
          frobNorm (A - earlyTruncatedRSVD A (X ω) k) ^ 2} ≤
    δ

Full source on GitHub

Copy link

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.