NLA-lib Explorer

Randomized subspace iteration (RSI)

Apply power iterations to the sketch, then project the matrix onto its range. This page concerns the untruncated projection. Its rank-r truncation is a different output with its own statements, on the late-truncated RSI page.

Definition

Definition (Randomized subspace iteration). Choose a test matrix \mathbf\Omega with \ell columns and a nonnegative power count p. Form

\mathbf{Y}=\mathbf{A}(\mathbf{A}^{\mathsf{H}}\mathbf{A})^p\mathbf\Omega,\qquad\mathsf{rsi}(\mathbf{A},\mathbf\Omega,p)=\mathbf{P}_{\mathbf{Y}}\mathbf{A}=\mathsf{rsvd}\bigl(\mathbf{A},(\mathbf{A}^{\mathsf{H}}\mathbf{A})^p\mathbf\Omega\bigr).

Here \mathbf{P}_{\mathbf{Y}} is the orthogonal projector onto the sampled range. With p=0 this is the ordinary range-finder approximation. Only the last power is kept; block Krylov iteration keeps all of them. Intermediate orthogonalization controls the numerical loss of directions and belongs to an implementation. For Hermitian positive-semidefinite matrices, the range also approximates a dominant invariant subspace.

Copy link

The library states its results for the range finder applied to the powered test matrix; \mathsf{rsi} is this page's name for that matrix. Singular values are indexed from zero, \sigma_0\ge\sigma_1\ge\cdots, so the best rank-r spectral error is \sigma_r, and [\mathbf{A}]_r denotes the rank-r truncated singular-value decomposition. 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.

Components

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.

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)\|_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}.

No positivity of the gap is assumed. At p=0 this is the range-finder bound at rank t with \sigma_t replaced by the larger \sigma_r.

Lean statement and details

General form: sizes are index types

NLAlib.integral_specNorm_sub_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 - rsvd A ((Aᴴ * A) ^ p * X ω)) ^ 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)\|_{\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_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 - rsvd A ((Aᴴ * A) ^ p * X ω)) ^ 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 a target rank with r+2\le\ell and \sigma_r>0. Then

\mathbb{E}\|\mathbf{A}-\mathsf{rsi}(\mathbf{A},\mathbf{X},p)\|_2^2\le\sigma_r^2\Bigl(1+\frac{r}{\ell-r-1}\,\frac{\|\mathbf{A}-[\mathbf{A}]_r\|_{\mathrm{F}}^2}{\sigma_r^2}\Bigr)^{1/(2p+1)}.

No gap between singular values is assumed. At p=0 the right side is the range-finder bound.

Lean statement and details

General form: sizes are index types

NLAlib.integral_specNorm_sub_rsvd_pow_mul_sq_le_mul_rpow_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 < singularValues A r) :
  ∫ (ω : Ω), specNorm (A - rsvd A ((Aᴴ * A) ^ p * X ω)) ^ 2 ∂μ ≤
    singularValues A r ^ 2 * rangeFinderTailRatio A r (Fintype.card l) ^ (1 / (2 * ↑p + 1))

Full source on GitHub

Copy link

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

\mathbb{E}\|\mathbf{A}-\mathsf{rsi}(\mathbf{A},\mathbf{X},p)\|_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 is assumed and \sigma_r>0 is not required. This bound and the preceding one are alternative regimes for the same error.

Lean statement and details

General form: sizes are index types

NLAlib.integral_specNorm_sub_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 - rsvd A ((Aᴴ * A) ^ p * X ω)) ^ 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

The same result groups contain a form in every unitarily invariant norm for the Gram residual and forms that give a sufficient number of power steps for a relative accuracy \varepsilon; they are in the Library. The gapped bounds are proved through the filtered range finder with the monomial filter \lambda^p.

Used by other algorithms

Mathematical background

Family

Appears under these tasks