The tail of stochastic Lanczos quadrature and the minimax error
Library · Result group
Theorem (measureReal_abs_trace_cfc_sub_slq_ge_le_of_continuousOn).The tail of stochastic Lanczos quadrature and the minimax error. Let the entries of the real n \times m test matrix \mathbf{\Omega} be independent, each satisfying the sub-Gaussian moment generating function bound with variance proxy c (HasSubgaussianMGF) and having second moment 1. Let \mathbf{A} be real symmetric with spectrum in [a, a'] and f continuous on [a, a']. Then for every q and \tau \ge 0, with q + 1 Lanczos steps per probe, <!-- value hansonWrightConstant --> \mathbb{P}\Bigl[\tau + \frac{2E_{2q + 1}(f; [a, a'])\|\mathbf{\Omega}\|_{\mathsf{F}}^2}{m} \le \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{slq}(\mathbf{A}, f, \mathbf{\Omega}, q + 1)\bigr\rvert\Bigr] \le 2\exp\Bigl(-\frac{1}{196}\min\Bigl(\frac{m\tau^2}{c^2\|f(\mathbf{A})\|_{\mathsf{F}}^2}, \frac{m\tau}{c\|f(\mathbf{A})\|_2}\Bigr)\Bigr)\,; the constant is hansonWrightConstant; E_{2q + 1} is the error of the best uniform approximation of f on [a, a'] by polynomials of degree at most 2q + 1 (minimaxError), and the quadrature term is random, inside the event. Gaussian and sign test matrices are the case c = 1. [UbaruChenSaad2017, Theorem 4.1] (locator to check), there for positive definite \mathbf{A} with Rademacher probes and relative error; [CortinovisKressner2022, §4] (locator to check).
Headline (provisional)General form: sizes are index types
Lean statement and details
NLAlib.measureReal_abs_trace_cfc_sub_slq_ge_le_of_continuousOn.{u_2, u_3, u_4} {n : Type u_2}
{m : Type u_3} [Fintype n] [DecidableEq n] [Fintype m] {Ω : Type u_4} {mΩ : MeasurableSpace Ω}
{μ : Measure Ω} {X : Ω → Matrix n m ℝ} {c : ℝ≥0} (hind : iIndepFun (fun p ω ↦ X ω p.1 p.2) μ)
(hsub : ∀ (i : n) (j : m), HasSubgaussianMGF (fun ω ↦ X ω i j) c μ)
(hvar : ∀ (i : n) (j : m), ∫ (ω : Ω), X ω i j ^ 2 ∂μ = 1) {A : Matrix n n ℝ} (hA : A.IsHermitian)
{a a' : ℝ} (hs : spectrum ℝ A ⊆ Set.Icc a a') {f : ℝ → ℝ} (hf : ContinuousOn f (Set.Icc a a'))
(q : ℕ) {τ : ℝ} (hτ : 0 ≤ τ) :
μ.real
{ω |
τ + 2 * minimaxError f (Set.Icc a a') (2 * q + 1) * frobNorm (X ω) ^ 2 / ↑(Fintype.card m) ≤
|(cfc f A).trace - slq A f (X ω) (q + 1)|} ≤
2 *
rexp
(-(hansonWrightConstant *
min (↑(Fintype.card m) * τ ^ 2 / (↑c ^ 2 * frobNorm (cfc f A) ^ 2))
(↑(Fintype.card m) * τ / (↑c * specNorm (cfc f A)))))
Theorem (measureReal_abs_trace_cfc_sub_slq_ge_le_of_differentiableOn).The tail of stochastic Lanczos quadrature for analytic functions, the setting of Ubaru, Chen and Saad for any real symmetric matrix, in absolute error. Let the entries of the real n \times m test matrix \mathbf{\Omega} be independent, each satisfying the sub-Gaussian moment generating function bound with variance proxy c and having second moment 1. Let \mathbf{A} be real symmetric with spectrum in [a, a'], a < a', and let f, transported to [-1, 1] by the affine map onto [a, a'], extend to a function F holomorphic on the open Bernstein ellipse E_\rho, \rho > 1, with \lvert F\rvert \le \mathbf{M} there. Then for every q and \tau \ge 0, with q + 1 Lanczos steps per probe, <!-- value hansonWrightConstant --> \mathbb{P}\Bigl[\tau + \frac{4\mathbf{M}}{\rho^{2q + 1}(\rho - 1)}\cdot \frac{\|\mathbf{\Omega}\|_{\mathsf{F}}^2}{m} \le \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{slq}(\mathbf{A}, f, \mathbf{\Omega}, q + 1)\bigr\rvert\Bigr] \le 2\exp\Bigl(-\frac{1}{196}\min\Bigl(\frac{m\tau^2}{c^2\|f(\mathbf{A})\|_{\mathsf{F}}^2}, \frac{m\tau}{c\|f(\mathbf{A})\|_2}\Bigr)\Bigr)\,; the constant is hansonWrightConstant; the quadrature term is random, inside the event. [UbaruChenSaad2017, Theorem 4.1] (locator to check), there for positive definite \mathbf{A} with Rademacher probes and relative error; [CortinovisKressner2022, §4] (locator to check).
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_abs_trace_cfc_sub_slq_ge_le_of_differentiableOn.{u_2, u_3, u_4} {n : Type u_2}
{m : Type u_3} [Fintype n] [DecidableEq n] [Fintype m] {Ω : Type u_4} {mΩ : MeasurableSpace Ω}
{μ : Measure Ω} {X : Ω → Matrix n m ℝ} {c : ℝ≥0} (hind : iIndepFun (fun p ω ↦ X ω p.1 p.2) μ)
(hsub : ∀ (i : n) (j : m), HasSubgaussianMGF (fun ω ↦ X ω i j) c μ)
(hvar : ∀ (i : n) (j : m), ∫ (ω : Ω), X ω i j ^ 2 ∂μ = 1) {A : Matrix n n ℝ} (hA : A.IsHermitian)
{a a' : ℝ} (haa : a < a') (hs : spectrum ℝ A ⊆ Set.Icc a a') {f : ℝ → ℝ} {F : ℂ → ℂ} {ρ M : ℝ}
(hρ : 1 < ρ) (hFd : DifferentiableOn ℂ F (openBernsteinEllipse ρ))
(hM : Metric.IsUniformApproxOn F (fun x ↦ 0) (openBernsteinEllipse ρ) M)
(hExt : Set.EqOn (fun t ↦ ↑(f (((a' - a) * t + a' + a) / 2))) (fun t ↦ F ↑t) (Set.Icc (-1) 1))
(q : ℕ) {τ : ℝ} (hτ : 0 ≤ τ) :
μ.real
{ω |
τ + 4 * M / (ρ ^ (2 * q + 1) * (ρ - 1)) * (frobNorm (X ω) ^ 2 / ↑(Fintype.card m)) ≤
|(cfc f A).trace - slq A f (X ω) (q + 1)|} ≤
2 *
rexp
(-(hansonWrightConstant *
min (↑(Fintype.card m) * τ ^ 2 / (↑c ^ 2 * frobNorm (cfc f A) ^ 2))
(↑(Fintype.card m) * τ / (↑c * specNorm (cfc f A)))))
Theorem (measureReal_abs_trace_cfc_sub_slq_ge_le_of_isUniformApproxOn).The tail of stochastic Lanczos quadrature with sub-Gaussian probes. Let the entries of the real n \times m test matrix \mathbf{\Omega} be independent, each satisfying the sub-Gaussian moment generating function bound with variance proxy c (HasSubgaussianMGF) and having second moment 1. Let \mathbf{A} be real symmetric with spectrum in [a, a'] and let a real polynomial p of degree less than 2q be within \varepsilon of f on [a, a']. Then for every \tau \ge 0, <!-- value hansonWrightConstant --> \mathbb{P}\Bigl[\tau + \frac{2\varepsilon\|\mathbf{\Omega}\|_{\mathsf{F}}^2}{m} \le \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{slq}(\mathbf{A}, f, \mathbf{\Omega}, q)\bigr\rvert\Bigr] \le 2\exp\Bigl(-\frac{1}{196}\min\Bigl(\frac{m\tau^2}{c^2\|f(\mathbf{A})\|_{\mathsf{F}}^2}, \frac{m\tau}{c\|f(\mathbf{A})\|_2}\Bigr)\Bigr)\,; the constant is hansonWrightConstant; the quadrature term is random, inside the event. No definiteness of f(\mathbf{A}) is needed. Gaussian and sign test matrices are the case c = 1. No measurability of the estimate is needed: the event lies in the Girard–Hutchinson event. [UbaruChenSaad2017, Theorem 4.1] (locator to check), there for positive definite \mathbf{A} with Rademacher probes and relative error; [CortinovisKressner2022, §4] (locator to check), the indefinite case.
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_abs_trace_cfc_sub_slq_ge_le_of_isUniformApproxOn.{u_2, u_3, u_4} {n : Type u_2}
{m : Type u_3} [Fintype n] [DecidableEq n] [Fintype m] {Ω : Type u_4} {mΩ : MeasurableSpace Ω}
{μ : Measure Ω} {X : Ω → Matrix n m ℝ} {c : ℝ≥0} (hind : iIndepFun (fun p ω ↦ X ω p.1 p.2) μ)
(hsub : ∀ (i : n) (j : m), HasSubgaussianMGF (fun ω ↦ X ω i j) c μ)
(hvar : ∀ (i : n) (j : m), ∫ (ω : Ω), X ω i j ^ 2 ∂μ = 1) {A : Matrix n n ℝ} (hA : A.IsHermitian)
{a a' : ℝ} (hs : spectrum ℝ A ⊆ Set.Icc a a') {f : ℝ → ℝ} {q : ℕ} {p : Polynomial ℝ}
(hp : p.degree < 2 * ↑q) {ε : ℝ}
(hε : Metric.IsUniformApproxOn (fun x ↦ Polynomial.eval x p) f (Set.Icc a a') ε) {τ : ℝ}
(hτ : 0 ≤ τ) :
μ.real
{ω |
τ + 2 * ε * frobNorm (X ω) ^ 2 / ↑(Fintype.card m) ≤ |(cfc f A).trace - slq A f (X ω) q|} ≤
2 *
rexp
(-(hansonWrightConstant *
min (↑(Fintype.card m) * τ ^ 2 / (↑c ^ 2 * frobNorm (cfc f A) ^ 2))
(↑(Fintype.card m) * τ / (↑c * specNorm (cfc f A)))))
Theorem (measureReal_abs_trace_cfc_sub_slq_ge_le_of_lipschitzOnWith).The tail of stochastic Lanczos quadrature for Lipschitz functions. Let the entries of the real n \times m test matrix \mathbf{\Omega} be independent, each satisfying the sub-Gaussian moment generating function bound with variance proxy c and having second moment 1. Let \mathbf{A} be real symmetric with spectrum in [a, a'], a < a', and fL-Lipschitz on [a, a']. Then for every q and \tau \ge 0, with q + 1 Lanczos steps per probe and quadrature term <!-- value jacksonApproximationConstant -->\pi L(a' - a)/(2q + 3) per unit of mass, <!-- value hansonWrightConstant --> \mathbb{P}\Bigl[\tau + \frac{\pi L(a' - a)}{2q + 3}\cdot \frac{\|\mathbf{\Omega}\|_{\mathsf{F}}^2}{m} \le \bigl\lvert\operatorname{tr} f(\mathbf{A}) - \mathsf{slq}(\mathbf{A}, f, \mathbf{\Omega}, q + 1)\bigr\rvert\Bigr] \le 2\exp\Bigl(-\frac{1}{196}\min\Bigl( \frac{m\tau^2}{c^2\|f(\mathbf{A})\|_{\mathsf{F}}^2}, \frac{m\tau}{c\|f(\mathbf{A})\|_2}\Bigr)\Bigr)\,; the constants are hansonWrightConstant and jacksonApproximationConstant; the quadrature term is random, inside the event. Gaussian and sign test matrices are the case c = 1. [UbaruChenSaad2017, Theorem 4.1] (locator to check), there for analytic f; [CortinovisKressner2022, §4] (locator to check).
General form: sizes are index types
Lean statement and details
NLAlib.measureReal_abs_trace_cfc_sub_slq_ge_le_of_lipschitzOnWith.{u_2, u_3, u_4} {n : Type u_2}
{m : Type u_3} [Fintype n] [DecidableEq n] [Fintype m] {Ω : Type u_4} {mΩ : MeasurableSpace Ω}
{μ : Measure Ω} {X : Ω → Matrix n m ℝ} {c : ℝ≥0} (hind : iIndepFun (fun p ω ↦ X ω p.1 p.2) μ)
(hsub : ∀ (i : n) (j : m), HasSubgaussianMGF (fun ω ↦ X ω i j) c μ)
(hvar : ∀ (i : n) (j : m), ∫ (ω : Ω), X ω i j ^ 2 ∂μ = 1) {A : Matrix n n ℝ} (hA : A.IsHermitian)
{a a' : ℝ} (haa : a < a') (hs : spectrum ℝ A ⊆ Set.Icc a a') {f : ℝ → ℝ} {L : ℝ≥0}
(hf : LipschitzOnWith L f (Set.Icc a a')) (q : ℕ) {τ : ℝ} (hτ : 0 ≤ τ) :
μ.real
{ω |
τ +
jacksonApproximationConstant * ↑L * (a' - a) / (2 * ↑q + 3) *
(frobNorm (X ω) ^ 2 / ↑(Fintype.card m)) ≤
|(cfc f A).trace - slq A f (X ω) (q + 1)|} ≤
2 *
rexp
(-(hansonWrightConstant *
min (↑(Fintype.card m) * τ ^ 2 / (↑c ^ 2 * frobNorm (cfc f A) ^ 2))
(↑(Fintype.card m) * τ / (↑c * specNorm (cfc f A)))))
General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k ≥ 1.