HackerPapers

arXiv:2501.17737cs.LG

Sparser, Better, Faster, Stronger: Sparsity Detection for Efficient Automatic Differentiation

Adrian Hill, Guillaume Dalle

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

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.

arXiv comments
33 pages, 6 figures, 6 tables, 3 listings
Journal reference
DOI
Subjects
cs.LGMachine Learning cs.MSMathematical Software

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Apr 2025 to Apr 2025.

Comments linking this paper, per year.

Discussed in comments1 thread

    • Our Arxiv preprint is a slightly longer read, available in PDF form with more precise descriptions: https://arxiv.org/abs/2501.17737

      gdalleView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.