NLA-lib Explorer

Late-truncated RSI

Definition (Late-truncated RSI). First form the subspace-iteration approximation \mathbf{B}=\mathsf{rsi}(\mathbf{A},\mathbf\Omega,p)=\mathsf{rsvd}\bigl(\mathbf{A},(\mathbf{A}^{\mathsf{H}}\mathbf{A})^p\mathbf\Omega\bigr). 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 test matrix of \ell columns the rank of \mathbf{B} is at most \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 subspace iteration page.

Mathematical guarantees

These are upper bounds on the expected squared error for a real matrix \mathbf{A} with n columns, an n\times\ell test matrix \mathbf{X} with independent standard normal entries, and every number of power steps p\ge0. The truncated output satisfies each bound with the same right side as the untruncated projection.

Theorem (Expected spectral error with a gap). 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{rsi}(\mathbf{A},\mathbf{X},p)]_r\|_2^2\le\sigma_r^2+e^{-8p\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_rsvd_pow_mul_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 : ℕ} (hr : h + 1 = r)
  (hrt : r ≤ t) (ht : t + 2 ≤ Fintype.card l) (p : ℕ) :
  ∫ (ω : Ω), specNorm (A - truncatedSVD (rsvd A ((Aᴴ * A) ^ p * X ω)) r) ^ 2 ∂μ ≤
    singularValues A r ^ 2 +
      rexp (-8 * ↑p * 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 (r=h+1\le t, t+2\le\ell),

\mathbb{E}\|\mathbf{A}-[\mathsf{rsi}(\mathbf{A},\mathbf{X},p)]_r\|_{\mathrm{F}}^2\le\|\mathbf{A}-[\mathbf{A}]_r\|_{\mathrm{F}}^2+e^{-8p\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_rsvd_pow_mul_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 : ℕ} (hr : h + 1 = r)
  (hrt : r ≤ t) (ht : t + 2 ≤ Fintype.card l) (p : ℕ) :
  ∫ (ω : Ω), frobNorm (A - truncatedSVD (rsvd A ((Aᴴ * A) ^ p * X ω)) r) ^ 2 ∂μ ≤
    frobNorm (A - truncatedSVD A r) ^ 2 +
      rexp (-8 * ↑p * 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 r be the target rank with r+2\le\ell and let \varepsilon>0. Then

\mathbb{E}\|\mathbf{A}-[\mathsf{rsi}(\mathbf{A},\mathbf{X},p)]_r\|_2^2\le(1+\varepsilon)^2\sigma_r^2+e^{-8p\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_rsvd_pow_mul_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 : ℕ} (hr : r + 2 ≤ Fintype.card l)
  (p : ℕ) {ε : ℝ} (hε : 0 < ε) :
  ∫ (ω : Ω), specNorm (A - truncatedSVD (rsvd A ((Aᴴ * A) ^ p * X ω)) r) ^ 2 ∂μ ≤
    (1 + ε) ^ 2 * singularValues A r ^ 2 +
      rexp (-8 * ↑p * (ε / (2 + ε))) * (↑r / (↑(Fintype.card l) - ↑r - 1)) *
        frobNorm (A - truncatedSVD A r) ^ 2

Full source on GitHub

Copy link

Theorem (Sufficient number of power steps 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 number of power steps

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

the truncated output satisfies

\mathbb{E}\|\mathbf{A}-[\mathsf{rsi}(\mathbf{A},\mathbf{X},p)]_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 p\ge C\log(n/\varepsilon)/\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_rsvd_pow_mul_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 p : ℕ) (ε : ℝ),
          HasLaw X (gaussianMatrix n l) μ →
            r + 2 ≤ Fintype.card l →
              0 < ε →
                ε ≤ ε₀ →
                  C * Real.log (↑(Fintype.card n) / ε) / ε ≤ ↑p →
                    ∫ (ω : Ω), specNorm (A - truncatedSVD (rsvd A ((Aᴴ * A) ^ p * X ω)) r) ^ 2 ∂μ ≤
                      (1 + ε) * singularValues A r ^ 2

Full source on GitHub

Copy link

Components

Mathematical background

Appears under these tasks

Family