NLA-lib Explorer

Filtered RSVD

Apply a polynomial filter before constructing a randomized range approximation. Subspace iteration is the monomial case. The bound for a general filter is also the comparison through which the gapped block Krylov bounds are proved: singular value by singular value, the error of randomized block Krylov iteration with q blocks is at most that of the range finder at the test matrix f(\mathbf{A}^{\mathsf{H}}\mathbf{A})\mathbf\Omega, for every polynomial f of degree less than q.

Definition

Definition (Filtered range-finder approximation). Choose a spectral filter g and a test matrix \mathbf\Omega. Form \mathbf{Y}=\mathbf{A} g(\mathbf{A}^{\mathsf{H}}\mathbf{A})\mathbf\Omega and return \mathbf{P}_{\mathbf{Y}}\mathbf{A}=\mathsf{rsvd}\bigl(\mathbf{A},g(\mathbf{A}^{\mathsf{H}}\mathbf{A})\mathbf\Omega\bigr). Polynomial filters can be evaluated through matrix applications; the mathematical analysis also permits more general spectral filters. Power iteration is the special choice g(\lambda)=\lambda^p. Final rank truncation is a further choice.

Copy link

Components

Mathematical guarantees

Theorem (Expected spectral error for a polynomial filter). Let \mathbf{A} be a real matrix with n columns and singular values \sigma_0\ge\sigma_1\ge\cdots, let \mathbf{X} be an n\times\ell matrix with independent standard normal entries, and let r\le t with t+2\le\ell. Let f be a real polynomial and c>0, a real numbers with

|f(\sigma_i^2)|\ge c\quad\text{for } i<r,\qquad|f(\lambda)|\le a\quad\text{for } \lambda\in[0,\sigma_t^2].

Then

\mathbb{E}\bigl\|\mathbf{A}-\mathsf{rsvd}\bigl(\mathbf{A},f(\mathbf{A}^{\mathsf{H}}\mathbf{A})\mathbf{X}\bigr)\bigr\|_2^2\le\sigma_r^2+\Bigl(\frac{a}{c}\Bigr)^2\frac{t}{\ell-t-1}\,\|\mathbf{A}-[\mathbf{A}]_t\|_{\mathrm{F}}^2.

The bound is small when the filter is large on the head singular values and small on the tail interval. The deterministic bound for a general spectral filter, the Frobenius form, and the form in every unitarily invariant norm are listed below.

Lean statement and details

General form: sizes are index types

NLAlib.integral_specNorm_sub_rsvd_aeval_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] [DecidableEq n] {X : Ω → Matrix n l ℝ}
  (A : Matrix m n ℝ) (hX : HasLaw X (gaussianMatrix n l) μ) (f : Polynomial ℝ) {r t : ℕ}
  (hrt : r ≤ t) (ht : t + 2 ≤ Fintype.card l) {c a : ℝ} (hc : 0 < c)
  (hhead : ∀ i < r, c ≤ |Polynomial.eval (singularValues A i ^ 2) f|)
  (htail : ∀ x ∈ Set.Icc 0 (singularValues A t ^ 2), |Polynomial.eval x f| ≤ a) :
  ∫ (ω : Ω), specNorm (A - rsvd A ((Polynomial.aeval (Aᴴ * A)) f * X ω)) ^ 2 ∂μ ≤
    singularValues A r ^ 2 +
      (a / c) ^ 2 * (↑t / (↑(Fintype.card l) - ↑t - 1)) * frobNorm (A - truncatedSVD A t) ^ 2

Full source on GitHub

Copy link

Further results

Theorem (Filtered range finder: expected error).

for a real function g, an orthonormal frame \mathbf{W} invariant under \mathbf{A}^{\mathsf{H}}\mathbf{A}, \mathbf{A}^{\mathsf{H}}\mathbf{A}\mathbf{W} = \mathbf{W}\operatorname{diag}(\mathbf{d}), with \lvert g(\mathbf{d}_i) \rvert \ge c > 0 for every i, and an orthonormal frame \mathbf{Z} whose range contains that of \mathbf{W} and with \mathbf{Z}^{\mathsf{H}}\mathbf{\Omega} of full row rank, \|\mathbf{A} - \mathsf{rsvd}(\mathbf{A}, g(\mathbf{A}^{\mathsf{H}}\mathbf{A})\mathbf{\Omega})\|_{\mathsf{F}}^2 \le \|\mathbf{A} - \mathbf{A}\mathbf{W}\mathbf{W}^{\mathsf{H}}\|_{\mathsf{F}}^2 + c^{-2}\|\mathbf{M}\|_{\mathsf{F}}^2\,, with \mathbf{B} = \mathbf{A}g(\mathbf{A}^{\mathsf{H}}\mathbf{A}) and the sketch residual \mathbf{M} = (\mathbf{B} - \mathbf{B}\mathbf{Z}\mathbf{Z}^{\mathsf{H}})\mathbf{\Omega} (\mathbf{Z}^{\mathsf{H}}\mathbf{\Omega})^{+}. The Gram form, in every unitarily invariant norm, is NLAlib.SymmetricGauge.matrixNorm_conjTranspose_mul_self_sub_rsvd_cfc_le. [TroppWebber2023, Lemma 9.5], at p = 2.

Lean statement and details
NLAlib.HasOrthonormalCols.frobNorm_sub_rsvd_cfc_sq_le.{u_1, u_2, u_3, u_4, u_5, u_6} {𝕜 : Type u_1}
  [RCLike 𝕜] {l : Type u_2} {m : Type u_3} {n : Type u_4} {r : Type u_5} {s : Type u_6} [Fintype l]
  [Fintype m] [Fintype n] [Fintype r] [Fintype s] [DecidableEq n] [DecidableEq r] [DecidableEq s]
  {A : Matrix m n 𝕜} {Ω : Matrix n l 𝕜} (g : ℝ → ℝ) {W : Matrix n r 𝕜} (hW : HasOrthonormalCols W)
  {d : r → ℝ} (hAW : Aᴴ * A * W = W * diagonal fun i ↦ ↑(d i)) {Z : Matrix n s 𝕜}
  (hZ : HasOrthonormalCols Z) (hΩ : (Ωᴴ * Z).rank = Z.rank)
  (hWZ : W.mulVecLin.range ≤ Z.mulVecLin.range) {c : ℝ} (hc : 0 < c)
  (hg : ∀ (i : r), c ≤ |g (d i)|) :
  frobNorm (A - rsvd A (cfc g (Aᴴ * A) * Ω)) ^ 2 ≤
    frobNorm (A - A * W * Wᴴ) ^ 2 +
      c⁻¹ ^ 2 *
        frobNorm ((A * cfc g (Aᴴ * A) - A * cfc g (Aᴴ * A) * Z * Zᴴ) * Ω * pinv (Zᴴ * Ω)) ^ 2

Full source on GitHub

Copy link

Mathematical background

Family

Appears under these tasks