NLA-lib Explorer

Low-rank approximation

Approximate a matrix by a small-rank factorization or structured surrogate.

RSVD-type methods

Choose a sketched range, with separate choices for truncating the sketch and the final approximation.

Subspace iteration methods

Multiply the test matrix by a power, or another polynomial filter, of the operator before taking its range; only the last block is kept.

Block Krylov methods

Project onto a block Krylov space that keeps every power applied to the start block, with a separate choice for truncating the final approximation.

Nyström methods for PSD matrices

Approximate a positive-semidefinite matrix from sampled or sketched columns; the test matrix can be a plain sketch, a powered sketch, or a block Krylov matrix.

Generalized Nyström (GN)

Use two-sided sketches for a general rectangular matrix, with distinct early and late truncation choices.

Singular-value truncation

Use singular values to define a best low-rank approximation and a deterministic reference for randomized methods.

Lower bounds

These bounds constrain every admissible algorithm within a stated access model: exact range recovery, fixed-batch approximation, and one- or two-pass approximation. Each statement specifies its query model and accuracy assumptions. Lower bounds for a particular algorithm appear on that algorithm's page.

Theorem (Chebyshev fixed-batch Frobenius query lower bound).

, integer sizes: let k \ge 1, m, r and q be natural numbers and n = k + (r + 1)m, with 0 < \varepsilon \le \varepsilon_r and m = \lfloor k/(16\varepsilon(r+1)^3) \rfloor. Let (\mathcal{A}_s) be a randomized algorithm, that is, a measurable family of algorithms with seed s drawn from a probability measure \rho, where every \mathcal{A}_s makes q matrix–vector products with its input \mathbf{A} in at most r batches (the products of a batch are chosen before any response of that batch is seen) and returns \mathbf{W} \in \mathbb{R}^{n \times k} and \mathbf{M} \in \mathbb{R}^{k \times n}. If for every symmetric positive semidefinite \mathbf{A} \in \mathbb{R}^{n \times n} \mathbb{P}_{s \sim \rho}\bigl[\|\mathbf{A} - \mathbf{W}\mathbf{M}\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket \mathbf{A} \rrbracket_k\|_{\mathsf{F}}^2\bigr] \ge \frac{1}{2} \,, then q > \frac{k}{C_r\,\varepsilon} \,. Here C_r = 12544(r+1)^3 and \varepsilon_r = 1/(25088(r+1)^3(r+2)). No printed source.

Notes

C_r is chebyshevQueryFactor r (chebyshevQueryFactor_le) and \varepsilon_r is chebyshevAccuracyBound r (le_chebyshevAccuracyBound). The n coordinates are indexed by Fin k ⊕ (Fin (r + 1) × Fin m): a head of k coordinates and r + 1 tail levels of m each. General form, with finite index types in place of k and m: div_chebyshevQueryFactor_mul_lt_of_forall_le_measureReal_frobNorm_sub_mul_sq_le_of_pass_lt. The hard spectrum has its head at 1+1/(8(r+1)^2) and Chebyshev tail levels in [1/2,1] (chebyshevLevelSpectrum). The dependence on the batch count is polynomial; its optimal exponent is not asserted. Asymptotic form: exists_forall_natCast_div_chebyshevQueryFactor_mul_lt_of_forall_le_measureReal_frobNorm_sub_mul_sq_le_of_pass_lt.

Lean statement and details
NLAlib.natCast_div_chebyshevQueryFactor_mul_lt_of_forall_le_measureReal_frobNorm_sub_mul_sq_le_of_pass_lt.{u_3}
  {k m r q : ℕ} {ε : ℝ} (hk : 0 < k) (hε : 0 < ε) (hεr : ε ≤ chebyshevAccuracyBound r)
  (hm : m = ⌊↑k / (16 * ε * (↑r + 1) ^ 3)⌋₊) {S : Type u_3} [MeasurableSpace S]
  {alg :
    S →
      QueryAlgorithm (Fin k ⊕ Fin (r + 1) × Fin m → ℝ) (Fin k ⊕ Fin (r + 1) × Fin m → ℝ) q
        (Matrix (Fin k ⊕ Fin (r + 1) × Fin m) (Fin k) ℝ ×
          Matrix (Fin k) (Fin k ⊕ Fin (r + 1) × Fin m) ℝ)}
  (halg : QueryAlgorithm.IsMeasurableFamily alg) {pass : S → ℕ → ℕ}
  (hpass : ∀ (s : S), (alg s).IsPassStructured (pass s)) (hp : ∀ (s : S), ∀ i < q, pass s i < r)
  (ρ : Measure S) [IsProbabilityMeasure ρ]
  (hsucc :
    ∀ (A : Matrix (Fin k ⊕ Fin (r + 1) × Fin m) (Fin k ⊕ Fin (r + 1) × Fin m) ℝ),
      A.PosSemidef →
        1 / 2 ≤
          ρ.real
            {s |
              frobNorm (A - ((alg s).run A.mulVec).1 * ((alg s).run A.mulVec).2) ^ 2 ≤
                (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2}) :
  ↑k / (chebyshevQueryFactor r * ε) < ↑q

Full source on GitHub

Copy link

Theorem (Chebyshev fixed-batch nuclear-norm query lower bound).

, integer sizes: let k \ge 1, m, r and q be natural numbers and n = k + (r + 1)m, with 0 < \varepsilon \le \varepsilon_r and m = \lfloor k/(16\varepsilon(r+1)^3) \rfloor. Let (\mathcal{A}_s) be a randomized algorithm, that is, a measurable family of algorithms with seed s drawn from a probability measure \rho, where every \mathcal{A}_s makes q matrix–vector products with its input \mathbf{A} in at most r batches (the products of a batch are chosen before any response of that batch is seen) and returns \mathbf{W} \in \mathbb{R}^{n \times k} and \mathbf{M} \in \mathbb{R}^{k \times n}. If for every symmetric positive semidefinite \mathbf{A} \in \mathbb{R}^{n \times n} \mathbb{P}_{s \sim \rho}\bigl[\|\mathbf{A} - \mathbf{W}\mathbf{M}\|_* \le (1 + \varepsilon)\|\mathbf{A} - \llbracket \mathbf{A} \rrbracket_k\|_*\bigr] \ge \frac{1}{2} \,, then q > \frac{k}{C_r\,\varepsilon} \,. Here C_r = 12544(r+1)^3 and \varepsilon_r = 1/(25088(r+1)^3(r+2)). No printed source.

Notes

C_r is chebyshevQueryFactor r (chebyshevQueryFactor_le) and \varepsilon_r is chebyshevAccuracyBound r (le_chebyshevAccuracyBound). The n coordinates are indexed by Fin k ⊕ (Fin (r + 1) × Fin m): a head of k coordinates and r + 1 tail levels of m each. General form, with finite index types in place of k and m: div_chebyshevQueryFactor_mul_lt_of_forall_le_measureReal_nuclearNorm_sub_mul_le_of_pass_lt. The hard spectrum has its head at 1+1/(8(r+1)^2) and Chebyshev tail levels in [1/2,1] (chebyshevLevelSpectrum). The dependence on the batch count is polynomial; its optimal exponent is not asserted. Asymptotic form: exists_forall_natCast_div_chebyshevQueryFactor_mul_lt_of_forall_le_measureReal_nuclearNorm_sub_mul_le_of_pass_lt.

Lean statement and details
NLAlib.natCast_div_chebyshevQueryFactor_mul_lt_of_forall_le_measureReal_nuclearNorm_sub_mul_le_of_pass_lt.{u_3}
  {k m r q : ℕ} {ε : ℝ} (hk : 0 < k) (hε : 0 < ε) (hεr : ε ≤ chebyshevAccuracyBound r)
  (hm : m = ⌊↑k / (16 * ε * (↑r + 1) ^ 3)⌋₊) {S : Type u_3} [MeasurableSpace S]
  {alg :
    S →
      QueryAlgorithm (Fin k ⊕ Fin (r + 1) × Fin m → ℝ) (Fin k ⊕ Fin (r + 1) × Fin m → ℝ) q
        (Matrix (Fin k ⊕ Fin (r + 1) × Fin m) (Fin k) ℝ ×
          Matrix (Fin k) (Fin k ⊕ Fin (r + 1) × Fin m) ℝ)}
  (halg : QueryAlgorithm.IsMeasurableFamily alg) {pass : S → ℕ → ℕ}
  (hpass : ∀ (s : S), (alg s).IsPassStructured (pass s)) (hp : ∀ (s : S), ∀ i < q, pass s i < r)
  (ρ : Measure S) [IsProbabilityMeasure ρ]
  (hsucc :
    ∀ (A : Matrix (Fin k ⊕ Fin (r + 1) × Fin m) (Fin k ⊕ Fin (r + 1) × Fin m) ℝ),
      A.PosSemidef →
        1 / 2 ≤
          ρ.real
            {s |
              nuclearNorm (A - ((alg s).run A.mulVec).1 * ((alg s).run A.mulVec).2) ≤
                (1 + ε) * nuclearNorm (A - truncatedSVD A k)}) :
  ↑k / (chebyshevQueryFactor r * ε) < ↑q

Full source on GitHub

Copy link

Theorem (One-pass low-rank approximation needs \Omega(k/\varepsilon) matrix–vector products).

, integer sizes: let k, m and q be natural numbers and n = k + 3m, with 0 < \varepsilon \le \varepsilon_0, \varepsilon \le k/C_1 and m = \lfloor k/(8\varepsilon) \rfloor. Let (\mathcal{A}_s) be a randomized algorithm, that is, a measurable family of algorithms with seed s drawn from a probability measure \rho, where every \mathcal{A}_s makes q matrix–vector products with its input \mathbf{A} in one pass (all products are chosen before any response is seen) and returns \mathbf{W} \in \mathbb{R}^{n \times k} and \mathbf{M} \in \mathbb{R}^{k \times n}. If for every symmetric \mathbf{A} \in \mathbb{R}^{n \times n} \mathbb{P}_{s \sim \rho}\bigl[\|\mathbf{A} - \mathbf{W}\mathbf{M}\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket \mathbf{A} \rrbracket_k\|_{\mathsf{F}}^2\bigr] \ge \frac{1}{2} \,, then q > \frac{k}{C\varepsilon} \,. Here C = 6400, \varepsilon_0 = 1/6500 and C_1 = 14000. No printed source.

Notes

the hypotheses force k \ge 1. The n coordinates are indexed by Fin k ⊕ (Fin 3 × Fin m): a head of k coordinates and three tail levels of m each. General form, with finite index types in place of k and m: NLAlib.div_lt_of_forall_le_measureReal_frobNorm_sub_mul_sq_le_of_lt_one. Truncated generalized Nyström attains the error in expectation with O(k/\varepsilon) one-pass products (LowRank/Gaussian/TruncatedGeneralizedNystromRate), so the bound is tight up to constants. Asymptotic form: NLAlib.exists_forall_natCast_div_lt_of_forall_le_measureReal_frobNorm_sub_mul_sq_le_of_lt_one.

Lean statement and details
NLAlib.natCast_div_lt_of_forall_le_measureReal_frobNorm_sub_mul_sq_le_of_lt_one.{u_4} {k m q : ℕ}
  {ε : ℝ} (hε : 0 < ε) (hε₁ : ε ≤ 1 / 6500) (hεk : ε ≤ ↑k / 14000) (hm : m = ⌊↑k / (8 * ε)⌋₊)
  {S : Type u_4} [MeasurableSpace S]
  {alg :
    S →
      QueryAlgorithm (Fin k ⊕ Fin 3 × Fin m → ℝ) (Fin k ⊕ Fin 3 × Fin m → ℝ) q
        (Matrix (Fin k ⊕ Fin 3 × Fin m) (Fin k) ℝ × Matrix (Fin k) (Fin k ⊕ Fin 3 × Fin m) ℝ)}
  (halg : QueryAlgorithm.IsMeasurableFamily alg) {pass : S → ℕ → ℕ}
  (hpass : ∀ (s : S), (alg s).IsPassStructured (pass s)) (hp : ∀ (s : S), ∀ i < q, pass s i < 1)
  (ρ : Measure S) [IsProbabilityMeasure ρ]
  (hsucc :
    ∀ (A : Matrix (Fin k ⊕ Fin 3 × Fin m) (Fin k ⊕ Fin 3 × Fin m) ℝ),
      A.IsHermitian →
        1 / 2 ≤
          ρ.real
            {s |
              frobNorm (A - ((alg s).run A.mulVec).1 * ((alg s).run A.mulVec).2) ^ 2 ≤
                (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2}) :
  ↑k / (6400 * ε) < ↑q

Full source on GitHub

Copy link

Theorem (Exact range recovery needs k queries).

let \mathbf{X} be a standard Gaussian d \times k matrix and \mathbf{A} = \mathbf{X}\mathbf{X}^{\mathsf{H}}. A randomized algorithm (a measurable family of algorithms indexed by a seed s independent of \mathbf{X}) making q < k adaptive queries \mathbf{x} \mapsto \mathbf{A}\mathbf{x} and outputting \mathbf{V} \in \mathbb{R}^{d \times p} satisfies \mathbb{P}\bigl[\operatorname{range}\mathbf{A} \subseteq \operatorname{range}\mathbf{V} \text{ and } \operatorname{rank}\mathbf{V} < d\bigr] = 0\,. So exact recovery of the range of a rank-k positive semidefinite matrix by a rank-k projector (k < d) needs at least k matrix–vector products, for every success probability > 0. [ZhangEtAl2026, Lemma 4.2]; there for rank-k projector outputs.

General form: sizes are index types

Lean statement and details
NLAlib.QueryAlgorithm.IsMeasurableFamily.measure_range_le_range_run_eq_zero_of_hasLaw_gaussianMatrix.{u_1,
    u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {d : Type u_2} {k : Type u_3} [Fintype d]
  [Fintype k] {q : ℕ} {S : Type u_4} {p : Type u_5} [MeasurableSpace S] [Fintype p]
  {alg : S → QueryAlgorithm (d → ℝ) (d → ℝ) q (Matrix d p ℝ)}
  (halg : QueryAlgorithm.IsMeasurableFamily alg) {s : Ω → S} (hs : AEMeasurable s μ)
  {X : Ω → Matrix d k ℝ} (hX : HasLaw X (gaussianMatrix d k) μ) (hsX : s ⟂ᵢ[μ] X)
  (hq : q < Fintype.card k) :
  μ
      {ω |
        (X ω * (X ω)ᴴ).mulVecLin.range ≤ ((alg (s ω)).run (X ω * (X ω)ᴴ).mulVec).mulVecLin.range ∧
          ((alg (s ω)).run (X ω * (X ω)ᴴ).mulVec).rank < Fintype.card d} =
    0

Full source on GitHub

Copy link

Theorem (Two-pass low-rank approximation needs \Omega(k/\varepsilon) matrix–vector products).

, integer sizes: let k, m and q be natural numbers and n = k + 3m, with 0 < \varepsilon \le \varepsilon_0, \varepsilon \le k/C_1 and m = \lfloor k/(8\varepsilon) \rfloor. Let (\mathcal{A}_s) be a randomized algorithm, that is, a measurable family of algorithms with seed s drawn from a probability measure \rho, where every \mathcal{A}_s makes q matrix–vector products with its input \mathbf{A} in at most two passes (the products of a pass are chosen before any response of that pass is seen) and returns \mathbf{W} \in \mathbb{R}^{n \times k} and \mathbf{M} \in \mathbb{R}^{k \times n}. If for every symmetric \mathbf{A} \in \mathbb{R}^{n \times n} \mathbb{P}_{s \sim \rho}\bigl[\|\mathbf{A} - \mathbf{W}\mathbf{M}\|_{\mathsf{F}}^2 \le (1 + \varepsilon)\|\mathbf{A} - \llbracket \mathbf{A} \rrbracket_k\|_{\mathsf{F}}^2\bigr] \ge \frac{1}{2} \,, then q > \frac{k}{C\varepsilon} \,. Here C = 6400, \varepsilon_0 = 1/6500 and C_1 = 14000. No printed source.

Notes

the hypotheses force k \ge 1. The n coordinates are indexed by Fin k ⊕ (Fin 3 × Fin m): a head of k coordinates and three tail levels of m each. General form, with finite index types in place of k and m: NLAlib.div_lt_of_forall_le_measureReal_frobNorm_sub_mul_sq_le. Two passes of randomized SVD with O(k/\varepsilon) products achieve this accuracy in expectation, so the rate k/\varepsilon is optimal for two-pass algorithms. Asymptotic form: NLAlib.exists_forall_natCast_div_lt_of_forall_le_measureReal_frobNorm_sub_mul_sq_le.

Lean statement and details
NLAlib.natCast_div_lt_of_forall_le_measureReal_frobNorm_sub_mul_sq_le.{u_4} {k m q : ℕ} {ε : ℝ}
  (hε : 0 < ε) (hε₁ : ε ≤ 1 / 6500) (hεk : ε ≤ ↑k / 14000) (hm : m = ⌊↑k / (8 * ε)⌋₊) {S : Type u_4}
  [MeasurableSpace S]
  {alg :
    S →
      QueryAlgorithm (Fin k ⊕ Fin 3 × Fin m → ℝ) (Fin k ⊕ Fin 3 × Fin m → ℝ) q
        (Matrix (Fin k ⊕ Fin 3 × Fin m) (Fin k) ℝ × Matrix (Fin k) (Fin k ⊕ Fin 3 × Fin m) ℝ)}
  (halg : QueryAlgorithm.IsMeasurableFamily alg) {pass : S → ℕ → ℕ}
  (hpass : ∀ (s : S), (alg s).IsPassStructured (pass s)) (hp : ∀ (s : S), ∀ i < q, pass s i < 2)
  (ρ : Measure S) [IsProbabilityMeasure ρ]
  (hsucc :
    ∀ (A : Matrix (Fin k ⊕ Fin 3 × Fin m) (Fin k ⊕ Fin 3 × Fin m) ℝ),
      A.IsHermitian →
        1 / 2 ≤
          ρ.real
            {s |
              frobNorm (A - ((alg s).run A.mulVec).1 * ((alg s).run A.mulVec).2) ^ 2 ≤
                (1 + ε) * frobNorm (A - truncatedSVD A k) ^ 2}) :
  ↑k / (6400 * ε) < ↑q

Full source on GitHub

Copy link

Mathematical background