NLA-lib Explorer

Late-truncated RBKI

Definition (Late-truncated RBKI). First form the block Krylov approximation \mathbf{B}=\mathsf{rbki}(\mathbf{A},\mathbf\Omega,q). Return [\mathbf{B}]_r, a best rank-at-most-r approximation to \mathbf{B}; here [\cdot]_r denotes the rank-r truncated singular-value decomposition. For a start block of \ell columns the rank of \mathbf{B} is at most q\ell; the truncated output has rank at most r.

Copy link

Singular values are indexed from zero, \sigma_0\ge\sigma_1\ge\cdots, so the best rank-r spectral error is \sigma_r. For a head index h and a tail index t, the relative gap is \gamma=(\sigma_h-\sigma_t)/(\sigma_h+\sigma_t), with \gamma=0 when both singular values vanish. Statements about the untruncated projection are on the randomized block Krylov iteration page.

Mathematical guarantees

These are upper bounds for a real matrix \mathbf{A} with n columns and a start block with independent standard normal entries. Where the library also states a bound for the untruncated projection, the truncated output satisfies it with the same right side.

Blocks wider than the target rank

Here \mathbf{X} is n\times\ell with t+2\le\ell or r+2\le\ell, and the bounds are in expectation.

Theorem (Expected spectral error with a gap). Let q\ge1, let r=h+1 be the number of head singular values, and let t\ge r be a tail index with t+2\le\ell. Then

\mathbb{E}\|\mathbf{A}-[\mathsf{rbki}(\mathbf{A},\mathbf{X},q)]_r\|_2^2\le\sigma_r^2+4e^{-8(q-1)\sqrt{\gamma}}\,\frac{t}{\ell-t-1}\,\|\mathbf{A}-[\mathbf{A}]_t\|_{\mathrm{F}}^2,\qquad\gamma=\frac{\sigma_h-\sigma_t}{\sigma_h+\sigma_t}.

Lean statement and details

General form: sizes are index types

NLAlib.integral_specNorm_sub_truncatedSVD_rbki_sq_le_singularGapRatio_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] [DecidableEq n] {X : Ω → Matrix n l ℝ}
  (A : Matrix m n ℝ) (hX : HasLaw X (gaussianMatrix n l) μ) {h r t q : ℕ} (hr : h + 1 = r)
  (hrt : r ≤ t) (ht : t + 2 ≤ Fintype.card l) (hq : 1 ≤ q) :
  ∫ (ω : Ω), specNorm (A - truncatedSVD (rbki A (X ω) q) r) ^ 2 ∂μ ≤
    singularValues A r ^ 2 +
      4 * rexp (-8 * (↑q - 1) * √(singularGapRatio A h t)) * (↑t / (↑(Fintype.card l) - ↑t - 1)) *
        frobNorm (A - truncatedSVD A t) ^ 2

Full source on GitHub

Copy link

Theorem (Expected Frobenius error with a gap). Under the same hypotheses (q\ge1, r=h+1\le t, t+2\le\ell),

\mathbb{E}\|\mathbf{A}-[\mathsf{rbki}(\mathbf{A},\mathbf{X},q)]_r\|_{\mathrm{F}}^2\le\|\mathbf{A}-[\mathbf{A}]_r\|_{\mathrm{F}}^2+4e^{-8(q-1)\sqrt{\gamma}}\,\frac{t}{\ell-t-1}\,\|\mathbf{A}-[\mathbf{A}]_t\|_{\mathrm{F}}^2.

Lean statement and details

General form: sizes are index types

NLAlib.integral_frobNorm_sub_truncatedSVD_rbki_sq_le_singularGapRatio_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] [DecidableEq n] {X : Ω → Matrix n l ℝ}
  (A : Matrix m n ℝ) (hX : HasLaw X (gaussianMatrix n l) μ) {h r t q : ℕ} (hr : h + 1 = r)
  (hrt : r ≤ t) (ht : t + 2 ≤ Fintype.card l) (hq : 1 ≤ q) :
  ∫ (ω : Ω), frobNorm (A - truncatedSVD (rbki A (X ω) q) r) ^ 2 ∂μ ≤
    frobNorm (A - truncatedSVD A r) ^ 2 +
      4 * rexp (-8 * (↑q - 1) * √(singularGapRatio A h t)) * (↑t / (↑(Fintype.card l) - ↑t - 1)) *
        frobNorm (A - truncatedSVD A t) ^ 2

Full source on GitHub

Copy link

Theorem (Expected spectral error without a gap). Let q\ge1, let r be the target rank with r+2\le\ell, and let \varepsilon>0. Then

\mathbb{E}\|\mathbf{A}-[\mathsf{rbki}(\mathbf{A},\mathbf{X},q)]_r\|_2^2\le(1+\varepsilon)^2\sigma_r^2+4e^{-8(q-1)\sqrt{\varepsilon/(2+\varepsilon)}}\,\frac{r}{\ell-r-1}\,\|\mathbf{A}-[\mathbf{A}]_r\|_{\mathrm{F}}^2.

No gap between singular values is assumed.

Lean statement and details

General form: sizes are index types

NLAlib.integral_specNorm_sub_truncatedSVD_rbki_sq_le_one_add_sq_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] [DecidableEq n] {X : Ω → Matrix n l ℝ}
  (A : Matrix m n ℝ) (hX : HasLaw X (gaussianMatrix n l) μ) {r q : ℕ} (hr : r + 2 ≤ Fintype.card l)
  (hq : 1 ≤ q) {ε : ℝ} (hε : 0 < ε) :
  ∫ (ω : Ω), specNorm (A - truncatedSVD (rbki A (X ω) q) r) ^ 2 ∂μ ≤
    (1 + ε) ^ 2 * singularValues A r ^ 2 +
      4 * rexp (-8 * (↑q - 1) * √(ε / (2 + ε))) * (↑r / (↑(Fintype.card l) - ↑r - 1)) *
        frobNorm (A - truncatedSVD A r) ^ 2

Full source on GitHub

Copy link

Theorem (Sufficient depth without a gap). There are absolute constants C>0 and \varepsilon_0>0 such that, for every real matrix \mathbf{A} with n columns, every target rank r with r+2\le\ell, every 0<\varepsilon\le\varepsilon_0, and every depth

q\ge\frac{C\log(n/\varepsilon)}{\sqrt{\varepsilon}},

the truncated output satisfies

\mathbb{E}\|\mathbf{A}-[\mathsf{rbki}(\mathbf{A},\mathbf{X},q)]_r\|_2^2\le(1+\varepsilon)\,\sigma_r^2.

The statement asserts the existence of the constants. With a positive gap \gamma, the same result group as the gapped bounds contains the corresponding forms with q\ge C\log(n/\varepsilon)/\sqrt{\gamma}, in the spectral and Frobenius norms; they are in the Library.

Lean statement and details

General form: sizes are index types

NLAlib.exists_forall_integral_specNorm_sub_truncatedSVD_rbki_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 : DecidableEq n] [inst_4 : Fintype l] (μ : Measure Ω) (A : Matrix m n ℝ)
          (X : Ω → Matrix n l ℝ) (r q : ℕ) (ε : ℝ),
          HasLaw X (gaussianMatrix n l) μ →
            r + 2 ≤ Fintype.card l →
              0 < ε →
                ε ≤ ε₀ →
                  C * Real.log (↑(Fintype.card n) / ε) / √ε ≤ ↑q →
                    ∫ (ω : Ω), specNorm (A - truncatedSVD (rbki A (X ω) q) r) ^ 2 ∂μ ≤
                      (1 + ε) * singularValues A r ^ 2

Full source on GitHub

Copy link

Block sizes below the target rank

These are tail bounds for narrow start blocks, down to a single start vector. They assume a relative gap \Delta among the leading singular values and a depth at least the number of those singular values.

Theorem (Single start vector with a gap). Let \mathbf{x}\in\mathbb{R}^n have independent standard normal entries. Fix a head of r=h+1 singular values, a tail index t\ge r, a depth q\ge t, and \delta>0. Suppose there is \Delta>0 with \sigma_{i+1}^2\le(1-\Delta)\sigma_i^2 whenever i+1<t, and let \gamma=(\sigma_h-\sigma_t)/(\sigma_h+\sigma_t). Then

\mathbb{P}\Bigl[\|\mathbf{A}-[\mathsf{rbki}(\mathbf{A},\mathbf{x},q)]_r\|_2^2>\sigma_r^2+32\,e^{-8(q-t)\sqrt\gamma}\,\Delta^{-2(t-1)}\,\frac{t^3}{\delta^3}\,\|\mathbf{A}-[\mathbf{A}]_t\|_{\mathrm{F}}^2\Bigr]\le\delta.

The start block is the single column \mathbf{x}. No positivity of \sigma_{t-1} is assumed.

Lean statement and details
NLAlib.measureReal_specNorm_sub_truncatedSVD_rbki_sq_gt_le_of_hasLaw_gaussianVector.{u_1, u_2, u_3}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3} [Fintype m]
  [Fintype n] [DecidableEq n] {x : Ω → n → ℝ} (A : Matrix m n ℝ)
  (hx : HasLaw x (gaussianVector n) μ) {h r t q : ℕ} (hr : h + 1 = r) (hrt : r ≤ t) (hq : t ≤ q)
  {Δ δ : ℝ} (hΔ : 0 < Δ) (hδ : 0 < δ)
  (hgap : ∀ (i : ℕ), i + 1 < t → singularValues A (i + 1) ^ 2 ≤ (1 - Δ) * singularValues A i ^ 2) :
  μ.real
      {ω |
        singularValues A r ^ 2 +
            32 * rexp (-8 * (↑q - ↑t) * √(singularGapRatio A h t)) * Δ⁻¹ ^ (2 * (t - 1)) *
                (↑t ^ 3 / δ ^ 3) *
              frobNorm (A - truncatedSVD A t) ^ 2 <
          specNorm (A - truncatedSVD (rbki A (replicateCol Unit (x ω)) q) r) ^ 2} ≤
    δ

Full source on GitHub

Copy link

Theorem (Single start vector, relative form). Let \mathbf{x}\in\mathbb{R}^n have independent standard normal entries. Fix a target rank r, a depth q\ge r, \delta>0, and \varepsilon>0. Suppose there is \Delta>0 with \sigma_{i+1}^2\le(1-\Delta)\sigma_i^2 whenever i+1<r. Then

\mathbb{P}\Bigl[\|\mathbf{A}-[\mathsf{rbki}(\mathbf{A},\mathbf{x},q)]_r\|_2^2>(1+\varepsilon)^2\sigma_r^2+32\,e^{-8(q-r)\sqrt{\varepsilon/(2+\varepsilon)}}\,\Delta^{-2(r-1)}\,\frac{r^3}{\delta^3}\,\|\mathbf{A}-[\mathbf{A}]_r\|_{\mathrm{F}}^2\Bigr]\le\delta.

No gap between \sigma_{r-1} and \sigma_r is assumed. The gap \Delta among the first r singular values is still required.

Lean statement and details
NLAlib.measureReal_specNorm_sub_truncatedSVD_rbki_sq_gt_one_add_sq_mul_le_of_hasLaw_gaussianVector.{u_1,
    u_2, u_3}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3} [Fintype m]
  [Fintype n] [DecidableEq n] {x : Ω → n → ℝ} (A : Matrix m n ℝ)
  (hx : HasLaw x (gaussianVector n) μ) {r q : ℕ} (hq : r ≤ q) {Δ δ ε : ℝ} (hΔ : 0 < Δ) (hδ : 0 < δ)
  (hε : 0 < ε)
  (hgap : ∀ (i : ℕ), i + 1 < r → singularValues A (i + 1) ^ 2 ≤ (1 - Δ) * singularValues A i ^ 2) :
  μ.real
      {ω |
        (1 + ε) ^ 2 * singularValues A r ^ 2 +
            32 * rexp (-8 * (↑q - ↑r) * √(ε / (2 + ε))) * Δ⁻¹ ^ (2 * (r - 1)) * (↑r ^ 3 / δ ^ 3) *
              frobNorm (A - truncatedSVD A r) ^ 2 <
          specNorm (A - truncatedSVD (rbki A (replicateCol Unit (x ω)) q) r) ^ 2} ≤
    δ

Full source on GitHub

Copy link

Theorem (Any block size with a gap). Let \mathbf{X} be an n\times\ell matrix with independent standard normal entries, \ell\ge1. With r=h+1\le t\le q, \delta>0, \Delta>0 satisfying \sigma_{i+1}^2\le(1-\Delta)\sigma_i^2 whenever i+1<t, and \gamma=(\sigma_h-\sigma_t)/(\sigma_h+\sigma_t),

\mathbb{P}\Bigl[\|\mathbf{A}-[\mathsf{rbki}(\mathbf{A},\mathbf{X},q)]_r\|_2^2>\sigma_r^2+32\,e^{-8(q-t)\sqrt\gamma}\,\Delta^{-2(t-1)}\,\frac{t^3}{\delta^3}\,\|\mathbf{A}-[\mathbf{A}]_t\|_{\mathrm{F}}^2\Bigr]\le\delta.

The right-hand side does not depend on \ell. The truncated error is not monotone in the start block, so this is not obtained by comparing the outputs of two blocks.

Lean statement and details

General form: sizes are index types

NLAlib.measureReal_specNorm_sub_truncatedSVD_rbki_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] [DecidableEq n] {X : Ω → Matrix n l ℝ}
  [Nonempty l] (A : Matrix m n ℝ) (hX : HasLaw X (gaussianMatrix n l) μ) {h r t q : ℕ}
  (hr : h + 1 = r) (hrt : r ≤ t) (hq : t ≤ q) {Δ δ : ℝ} (hΔ : 0 < Δ) (hδ : 0 < δ)
  (hgap : ∀ (i : ℕ), i + 1 < t → singularValues A (i + 1) ^ 2 ≤ (1 - Δ) * singularValues A i ^ 2) :
  μ.real
      {ω |
        singularValues A r ^ 2 +
            32 * rexp (-8 * (↑q - ↑t) * √(singularGapRatio A h t)) * Δ⁻¹ ^ (2 * (t - 1)) *
                (↑t ^ 3 / δ ^ 3) *
              frobNorm (A - truncatedSVD A t) ^ 2 <
          specNorm (A - truncatedSVD (rbki A (X ω) q) r) ^ 2} ≤
    δ

Full source on GitHub

Copy link

Theorem (Any block size, relative form). Let \mathbf{X} be an n\times\ell matrix with independent standard normal entries, \ell\ge1. Fix a target rank r, a depth q\ge r, \delta>0, and \varepsilon>0, and suppose there is \Delta>0 with \sigma_{i+1}^2\le(1-\Delta)\sigma_i^2 whenever i+1<r. Then

\mathbb{P}\Bigl[\|\mathbf{A}-[\mathsf{rbki}(\mathbf{A},\mathbf{X},q)]_r\|_2^2>(1+\varepsilon)^2\sigma_r^2+32\,e^{-8(q-r)\sqrt{\varepsilon/(2+\varepsilon)}}\,\Delta^{-2(r-1)}\,\frac{r^3}{\delta^3}\,\|\mathbf{A}-[\mathbf{A}]_r\|_{\mathrm{F}}^2\Bigr]\le\delta.

The bound does not depend on \ell. For r+2\le\ell the expectation bound above needs no gap \Delta.

Lean statement and details

General form: sizes are index types

NLAlib.measureReal_specNorm_sub_truncatedSVD_rbki_sq_gt_one_add_sq_mul_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] [DecidableEq n] {X : Ω → Matrix n l ℝ}
  [Nonempty l] (A : Matrix m n ℝ) (hX : HasLaw X (gaussianMatrix n l) μ) {r q : ℕ} (hq : r ≤ q)
  {Δ δ ε : ℝ} (hΔ : 0 < Δ) (hδ : 0 < δ) (hε : 0 < ε)
  (hgap : ∀ (i : ℕ), i + 1 < r → singularValues A (i + 1) ^ 2 ≤ (1 - Δ) * singularValues A i ^ 2) :
  μ.real
      {ω |
        (1 + ε) ^ 2 * singularValues A r ^ 2 +
            32 * rexp (-8 * (↑q - ↑r) * √(ε / (2 + ε))) * Δ⁻¹ ^ (2 * (r - 1)) * (↑r ^ 3 / δ ^ 3) *
              frobNorm (A - truncatedSVD A r) ^ 2 <
          specNorm (A - truncatedSVD (rbki A (X ω) q) r) ^ 2} ≤
    δ

Full source on GitHub

Copy link

Components

Mathematical background

Appears under these tasks

Family