NLA-lib Explorer

Early-truncated GN

Early-truncated generalized Nyström (ETGN) selects the smaller range from the sketch before completing the two-sided approximation.

Definition (Early-truncated GN). Form \mathbf{Y}_k=[\mathbf{A}\mathbf\Omega]_k, then return

\widehat{\mathbf{A}}=\mathbf{Y}_k(\mathbf\Psi^{\mathsf{H}}\mathbf{Y}_k)^{\dagger}\mathbf\Psi^{\mathsf{H}}\mathbf{A}.

The rank-k subspace is selected from the range sketch before the second sketch completes the approximation. The output has rank at most k; the library fixes a choice when singular values are tied.

Lean statement and details
NLAlib.earlyTruncatedGeneralizedNystrom.{u_1, u_2, u_3, u_4, u_5} {𝕜 : Type u_1} [RCLike 𝕜]
  {l : Type u_2} {m : Type u_3} {n : Type u_4} {p : Type u_5} [Fintype l] [Fintype m] [Fintype n]
  [Fintype p] (A : Matrix m n 𝕜) (Ω : Matrix n l 𝕜) (Ψ : Matrix m p 𝕜) (k : ℕ) : Matrix m n 𝕜

Full source on GitHub

Copy link

Mathematical guarantees

Theorem (Gaussian relative-error guarantee). For a real input \mathbf{A}, independent standard Gaussian sketches of widths \ell,p, and 0<\varepsilon\le1, suppose

\ell\ge\frac{1600k}{\varepsilon^2},\qquad p\ge k+1+\frac{(2+\varepsilon)k}{\varepsilon}.

Then the mathematical early-truncated output satisfies

\mathbb{E}\|\mathbf{A}-\widehat{\mathbf{A}}\|_{\mathrm{F}}^2\le(1+\varepsilon)\|\mathbf{A}-[\mathbf{A}]_k\|_{\mathrm{F}}^2.

Thus the expected squared error is within a factor 1+\varepsilon of the optimal rank-k squared Frobenius error. The two sketch sizes have different accuracy dependence.

Lean statement and details

General form: sizes are index types

NLAlib.integral_frobNorm_sub_earlyTruncatedGeneralizedNystrom_sq_le_one_add_mul_of_hasLaw_gaussianMatrix.{u_1,
    u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {m : Type u_2} {n : Type u_3}
  {l : Type u_4} {p : Type u_5} [Fintype m] [Fintype n] [Fintype l] [Fintype p]
  {X : Ω → Matrix n l ℝ} {Ψ : Ω → Matrix m p ℝ} (A : Matrix m n ℝ)
  (hX : HasLaw X (gaussianMatrix n l) μ) (hΨ : HasLaw Ψ (gaussianMatrix m p) μ) (hXΨ : X ⟂ᵢ[μ] Ψ)
  {k : ℕ} {ε : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) (hl : 1600 * ↑k ≤ ε ^ 2 * ↑(Fintype.card l))
  (hp : ↑k + 1 + (2 + ε) * ↑k / ε ≤ ↑(Fintype.card p)) :
  ∫ (ω : Ω), frobNorm (A - earlyTruncatedGeneralizedNystrom A (X ω) (Ψ ω) k) ^ 2 ∂μ ≤
    (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2

Full source on GitHub

Copy link

Mathematical background

Appears under these tasks

Family