English

Fast and Stable Gradient Approximation for Bilinear Forms of Hermitian Matrix Functions

Numerical Analysis 2026-05-14 v1 Numerical Analysis

Abstract

Objectives involving bilinear forms uf(A(θ))vu^\top f(A(\theta))v for Hermitian AA arise widely in scientific computing and probabilistic machine learning. For large matrices, Lanczos efficiently approximates these quantities, but differentiating them with respect to θ\theta is challenging. Existing approaches either backpropagate through the Lanczos recurrence, requiring reorthogonalization for stability, or apply Arnoldi to an augmented block matrix of twice the original size. Both introduce extra computation and orthogonalization costs that can limit performance on modern hardware. We propose a forward-only gradient approximation that reuses the Lanczos pass and adds very minimal overhead in most cases. We prove that its error is proportional to the Lanczos residual norm, the same quantity controlling the forward approximation. Whereas a traditional adjoint-based calculation would be unstable without reorthogonalization, the new method appears unconditionally stable in our tests. It is also faster than existing state-of-the-art approaches.

Keywords

Cite

@article{arxiv.2605.12801,
  title  = {Fast and Stable Gradient Approximation for Bilinear Forms of Hermitian Matrix Functions},
  author = {Navjot Singh and Kipton Barros and Xiaoye Sherry Li},
  journal= {arXiv preprint arXiv:2605.12801},
  year   = {2026}
}
R2 v1 2026-07-22T07:08:53.512Z