Skip to article frontmatterSkip to article content

Recall that using k1k-1 matrix-vector products with A\vec{A}, the Lanczos method for quadratic forms produces an approximation Lan-QFk(f;A,x)\Call{Lan-QF}_k(f;\vec{A},\vec{x}) that is an approximation to xTf(A)x\vec{x}^\T f(\vec{A})\vec{x}. Stochastic Lanczos Quadrature (SLQ) simply combines this method with the Girard-Hutchinson trace estimator.

A simple application of the triangle inequality gives a bound on expected squared error of the SLQ estimator.

Proof

By the triangle inequality and since (x+y)22(x2+y2)(x+y)^2\leq 2(x^2+y^2), we have

tr(f(A))SLQk,m(f;A)22tr(f(A))1mi=1mxiTf(A)xi2+21mi=1mxiTf(A)xiLan-QFk(f;A,xi)2.\begin{aligned} \hspace{1em}&\hspace{-1em}| \tr(f(\vec{A})) - \Call{SLQ}_{k,m}(f;\vec{A}) |^2 \\&\leq 2\left| \tr(f(\vec{A})) - \frac{1}{m}\sum_{i=1}^{m} \vec{x}_i^\T f(\vec{A})\vec{x}_i \right|^2 + 2\left| \frac{1}{m}\sum_{i=1}^{m} \vec{x}_i^\T f(\vec{A})\vec{x}_i - \Call{Lan-QF}_k(f;\vec{A},\vec{x}_i) \right|^2. \end{aligned}

Note that

E[tr(f(A))1mi=1mxiTf(A)xi2]=V[tr^m(f(A))]=2f(A)F2m,\EE\left[ \left| \tr(f(\vec{A})) - \frac{1}{m}\sum_{i=1}^{m} \vec{x}_i^\T f(\vec{A})\vec{x}_i \right|^2 \right] = \VV\left[ \widehat{\tr}_m(f(\vec{A})) \right] = \frac{2 \| f(\vec{A}) \|_\F^2}{m},

where tr^m()\widehat{\tr}_m(\cdot) is the Girard--Hutchinson estimator.

Next, by the triangle inequality and Theorem 6.3,

1mi=1mxiTf(A)xiLan-QFk(f;A,xi)1mi=1mxiTf(A)xiLan-QFk(f;A,xi)1mi=1mxi2mindeg(p)<2k1maxx[λn,λ1]f(x)p(x).\begin{aligned} \hspace{2em}&\hspace{-2em} \left| \frac{1}{m}\sum_{i=1}^{m} \vec{x}_i^\T f(\vec{A})\vec{x}_i - \Call{Lan-QF}_k(f;\vec{A},\vec{x}_i) \right| \\&\leq \frac{1}{m}\sum_{i=1}^{m} \left| \vec{x}_i^\T f(\vec{A})\vec{x}_i - \Call{Lan-QF}_k(f;\vec{A},\vec{x}_i) \right| \\&\leq \frac{1}{m} \sum_{i=1}^{m} \|\vec{x}_i\|^2 \min_{\deg(p)<2k-1} \max_{x\in[\lambda_n,\lambda_1]} | f(x) - p(x) |. \end{aligned}

Hence,

E[1mi=1mxiTf(A)xiLan-QFk(f;A,xi)2]1m2E[(i=1mxi2)2]mindeg(p)<2k1maxx[λn,λ1]f(x)p(x)\begin{aligned} \hspace{2em}&\hspace{-2em} \EE\left[ \left| \frac{1}{m}\sum_{i=1}^{m} \vec{x}_i^\T f(\vec{A})\vec{x}_i - \Call{Lan-QF}_k(f;\vec{A},\vec{x}_i) \right|^2 \right] \\&\leq \frac{1}{m^2}\EE\left[ \left(\sum_{i=1}^{m} \|\vec{x}_i\|^2 \right)^2 \right] \min_{\deg(p)<2k-1} \max_{x\in[\lambda_n,\lambda_1]} | f(x) - p(x) | \end{aligned}

Now, note that i=1mxi2\sum_{i=1}^{m} \|\vec{x}_i\|^2 is a Chi-squared random variable with mnmn degrees of freedom. By looking on Wikipedia, we see that

E[(i=1mxi2)2]=2mn+(mn)23(mn)2.\EE\left[ \left(\sum_{i=1}^{m} \|\vec{x}_i\|^2 \right)^2 \right] = 2mn + (mn)^2 \leq 3(mn)^2.

Combining all of the above gives the result.

Note that for “nice” functions f(x)f(x), the error of the best polynomial approximation decreases exponentially with kk Trefethen, 2019.

References
  1. Chen, T. (2024). The Lanczos algorithm for matrix functions: a handbook for scientists. https://arxiv.org/abs/2410.11090
  2. Chen, T., Trogdon, T., & Ubaru, S. (2025). Randomized Matrix-Free Quadrature: Unified and Uniform Bounds for Stochastic Lanczos Quadrature and the Kernel Polynomial Method. SIAM Journal on Scientific Computing, 47(3), A1733–A1757. 10.1137/23m1600414
  3. Trefethen, L. N. (2019). Approximation Theory and Approximation Practice, Extended Edition. Society for Industrial. 10.1137/1.9781611975949