NLA-lib Explorer

Stochastic Lanczos quadrature

Library · Source module

Stochastic Lanczos quadrature

For a square \mathbf{A}, a function f : \mathbb{R} \to \mathbb{R} and a test matrix \mathbf{\Omega} whose m columns \boldsymbol{\omega}_1, \dots, \boldsymbol{\omega}_m are the probes, the stochastic Lanczos quadrature estimate of \operatorname{tr} f(\mathbf{A}) replaces each single-probe Girard–Hutchinson term \boldsymbol{\omega}_j^{\mathsf{H}}f(\mathbf{A})\boldsymbol{\omega}_j = \int f\,d\mu_j by its q-point Gauss rule, \mu_j = \mu_{\mathbf{A},\boldsymbol{\omega}_j} the probe's spectral measure, and averages over the probes. For Hermitian \mathbf{A} this is what q Lanczos steps per probe compute. Its error is the Girard–Hutchinson error plus the averaged Gauss error, so every Girard–Hutchinson result (unbiasedness, variance, tails) composes with every Gauss-rule error bound (uniform approximation, Lipschitz, analytic). Exact arithmetic throughout. [UbaruChenSaad2017]; [MartinssonTropp2020].

The error splits into the Girard–Hutchinson error of f(\mathbf{A}) plus the averaged per-probe Gauss error 2\varepsilon\|\mathbf{\Omega}\|_{\mathsf{F}}^2/m, \varepsilon the uniform distance from f to polynomials of degree less than 2q on an interval containing the spectrum, with the Lipschitz (Jackson) and analytic (Bernstein ellipse) rates; composing with the Hanson–Wright tail of Girard–Hutchinson gives the tails with independent sub-Gaussian entries, the quadrature term random inside the event. [CortinovisKressner2022].

For every test matrix, SLQ with q Lanczos steps is below the Girard–Hutchinson estimate when f^{(2q)} \ge 0 on an interval containing the spectrum, and above it when f^{(2q)} \le 0: the Gauss error has a sign probe by probe, so the SLQ bias is one-signed.

Main definitions

* NLAlib.slq: the stochastic Lanczos quadrature estimate.

Main results

* Matrix.IsHermitian.norm_trace_cfc_sub_slq_le_of_continuousOn: the deterministic split. * NLAlib.measureReal_abs_trace_cfc_sub_slq_ge_le_of_continuousOn: the tail. * NLAlib.re_slq_le_re_girardHutchinson_cfc_of_iteratedDeriv_nonneg, NLAlib.re_girardHutchinson_cfc_le_re_slq_of_iteratedDeriv_nonpos: the sign of the SLQ bias.

Declarations