Gradients of Functions of Large Matrices
Not on the map. Why?
Abstract (arXiv)
Tuning scientific and probabilistic machine learning models - for example, partial differential equations, Gaussian processes, or Bayesian neural networks - often relies on evaluating functions of matrices whose size grows with the data set or the number of parameters. While the state-of-the-art for evaluating these quantities is almost always based on Lanczos and Arnoldi iterations, the present work is the first to explain how to differentiate these workhorses of numerical linear algebra efficiently. To get there, we derive previously unknown adjoint systems for Lanczos and Arnoldi iterations, implement them in JAX, and show that the resulting code can compete with Diffrax when it comes to differentiating PDEs, GPyTorch for selecting Gaussian process models and beats standard factorisation methods for calibrating Bayesian neural networks. All this is achieved without any problem-specific code optimisation. Find the code at https://github.com/pnkraemer/experiments-lanczos-adjoints and install the library with pip install matfree.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 43 of its 105 references that are in the map. First posted on arXiv 27 May 2024.
Builds on
43 of 105 references.
References · 43
- 2022Flow Matching for Generative Modelingcited by 5,702
- 2018Neural Ordinary Differential Equationscited by 3,779
- 2015Variational Inference with Normalizing Flowscited by 2,170
- 2018GPyTorch: Blackbox Matrix-Matrix Gaussian Process Inference with GPU Accelerationcited by 609
- 2022Fast Sampling of Diffusion Models with Exponential Integratorcited by 532
- 2018Invertible Residual Networkscited by 365
- 2021Laplace Redux -- Effortless Bayesian Deep Learningcited by 365
- 2015Scalable Bayesian Optimization Using Deep Neural Networkscited by 284
- 2022On Neural Differential Equationscited by 268
- 2019Residual Flows for Invertible Generative Modelingcited by 257
- 2020Being Bayesian, Even Just a Bit, Fixes Overconfidence in ReLU Networkscited by 231
- 2020How to train your neural ODE: the world of Jacobian and kinetic regularizationcited by 228
31 more
- 2022Visual Attention Networkcited by 210
- 2021Efficient and Modular Implicit Differentiationcited by 203
- 2018Online Structured Laplace Approximations For Overcoming Catastrophic Forgettingcited by 201
- 2015Kernel Interpolation for Scalable Structured Gaussian Processes (KISS-GP)cited by 177
- 2022Generative Modelling With Inverse Heat Dissipationcited by 167
- 2019Exact Gaussian Processes on a Million Data Pointscited by 119
- 2021Scalable Marginal Likelihood Estimation for Model Selection in Deep Learningcited by 106
- 2020Kernel Operations on the GPU, with Autodiff, without Memory Overflowscited by 104
- 2020Traces of Class/Cross-Class Structure Pervade Deep Learning Spectracited by 94
- 2020Bayesian Deep Learning via Subnetwork Inferencecited by 87
- 2020Rethinking Parameter Counting in Deep Models: Effective Dimensionality Revisitedcited by 51
- 2018Constant-Time Predictive Distributions for Gaussian Processescited by 48
- 2024The Elements of Differentiable Programmingcited by 43
- 2017Scalable Log Determinants for Gaussian Process Kernel Learningcited by 35
- 2016Preconditioning Kernel Matricescited by 33
- 2019DiffEqFlux.jl - A Julia Library for Neural Differential Equationscited by 33
- 2021Sketching Curvature for Efficient Out-of-Distribution Detection for Deep Neural Networkscited by 32
- 2022Accelerated Linearized Laplace Approximation for Bayesian Deep Learningcited by 28
- 2020Fast Matrix Square Roots with Applications to Gaussian Processes and Bayesian Optimizationcited by 26
- 2021Preconditioning for Scalable Gaussian Process Hyperparameter Optimizationcited by 23
- 2020The Convolution Exponential and Generalized Sylvester Flowscited by 18
- 2023Large-Scale Gaussian Processes via Alternating Projectioncited by 11
- 2022Laplacian Autoencoders for Learning Stochastic Representationscited by 10
- 2023Stochastic Marginal Likelihood Gradients using Neural Tangent Kernelscited by 10
- 2022j-Wave: An open-source differentiable wave simulatorcited by 9
- 2017Auto-Differentiating Linear Algebracited by 7
- 2020Generative Flows with Matrix Exponentialcited by 6
- 2018Backpropagation for Implicit Spectral Densitiescited by 3
- 2022Adaptive Cholesky Gaussian Processescited by 2
- 2022Geometric Methods for Adjoint Systemscited by 1
- 2023Efficient training of Gaussian processes with tensor product structurecited by 1
Built on by
Citing papers per year: 2025: 1.
1 paper.