Sparser, Better, Faster, Stronger: Sparsity Detection for Efficient Automatic Differentiation
Not on the map. Why?
Abstract (arXiv)
From implicit differentiation to probabilistic modeling, Jacobian and Hessian matrices have many potential use cases in Machine Learning (ML), but they are viewed as computationally prohibitive. Fortunately, these matrices often exhibit sparsity, which can be leveraged to speed up the process of Automatic Differentiation (AD). This paper presents advances in sparsity detection, previously the performance bottleneck of Automatic Sparse Differentiation (ASD). Our implementation of sparsity detection is based on operator overloading, able to detect both local and global sparsity patterns, and supports flexible index set representations. It is fully automatic and requires no modification of user code, making it compatible with existing ML codebases. Most importantly, it is highly performant, unlocking Jacobians and Hessians at scales where they were considered too expensive to compute. On real-world problems from scientific ML, graph neural networks and optimization, we show significant speed-ups of up to three orders of magnitude. Notably, using our sparsity detection system, ASD outperforms standard AD for one-off computations, without amortization of either sparsity detection or matrix coloring.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 21 of its 95 references that are in the map. First posted on arXiv 29 Jan 2025.
Builds on
21 of 95 references.
References · 21
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2018Neural Ordinary Differential Equationscited by 3,733
- 2015Automatic differentiation in machine learning: a surveycited by 846
- 2021Gradient Descent on Neural Networks Typically Occurs at the Edge of Stabilitycited by 413
- 2020Universal Differential Equations for Scientific Machine Learningcited by 345
- 2017A Conceptual Introduction to Hamiltonian Monte Carlocited by 207
- 2021Efficient and Modular Implicit Differentiationcited by 199
- 2020Implicit Graph Neural Networkscited by 98
- 2019A Differentiable Programming System to Bridge Machine Learning and Scientific Computingcited by 81
- 2019The Power Grid Library for Benchmarking AC Optimal Power Flow Algorithmscited by 63
- 2018An Introduction to Probabilistic Programmingcited by 62
- 2018Fashionable Modelling with Fluxcited by 53
9 more
- 2015JuMP: A Modeling Language for Mathematical Optimizationcited by 49
- 2018Don't Unroll Adjoint: Differentiating SSA-Form Programscited by 44
- 2024The Elements of Differentiable Programmingcited by 41
- 2024CANOS: A Fast and Scalable Neural AC-OPF Solver Robust To N-1 Perturbationscited by 27
- 2020Instead of Rewriting Foreign Code for Machine Learning, Automatically Synthesize Fast Gradientscited by 26
- 2023Accelerating Optimal Power Flow with GPUs: SIMD Abstraction of Nonlinear Programs and Condensed-Space Interior-Point Methodscited by 11
- 2021High-performance symbolic-numerics via multiple dispatchcited by 6
- 2020A new framework for the computation of Hessianscited by 2
- 2024Optimizing Automatic Differentiation with Deep Reinforcement Learningcited by 2
Built on by
Citing papers per year: 2025: 2; 2026: 2.
4 papers.
- 2025A Common Interface for Automatic Differentiationcited by 0
- 2025NaN-Propagation: A Novel Method for Sparsity Detection in Black-Box Computational Functionscited by 0
- 2026Scalable Bayesian Inference for Nonlinear Conservation Lawscited by 0
- 2026Truncated automatic sparse differentiation for machine learning interatomic potentialscited by 0
- 2026Truncated automatic sparse differentiation for machine learning interatomic potentials17 Sep 2026
- 2026Scalable Bayesian Inference for Nonlinear Conservation Laws29 May 2026
- 2025NaN-Propagation: A Novel Method for Sparsity Detection in Black-Box Computational Functions31 Jul 2025
- 2025A Common Interface for Automatic Differentiation8 May 2025