traceax: a JAX-based framework for stochastic trace estimation
Abstract
In many applications, from statistical inference to machine learning, calculating the trace of a matrix is a fundamental operation, yet may be infeasible due to memory constraints. Stochastic trace estimation offers a practical solution by using randomized matrix-vector products to obtain accurate, unbiased estimates without constructing the full matrix in memory. Here, we present traceax, a Python framework for scalable trace estimation that leverages efficient linear operator representations of matrices while supporting automatic differentiation and hardware acceleration. traceax supports state-of-the-art trace estimators and through simulations we recapitulate results demonstrating their high accuracy while significantly reducing runtime and memory usage when compared with direct trace computation. As a proof of concept, we implemented a stochastic heritability estimator using traceax requiring only several lines of code. Overall, traceax provides a versatile tool for stochastic trace estimation that can be easily integrated into existing inferential pipelines. traceax is freely available at: https://github.com/mancusolab/traceax
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 0
- Research Focus
- Approach
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- pyABC: distributed, likelihood-free inference
Emmanuel Klinger, Dennis Rickert, Jan Hasenauer·BioinformaticsPeer-reviewed·May 10, 2018
- Scalable approximate Bayesian inference for particle tracking data
Ruoxi Sun, Liam Paninski·bioRxiv·Mar 5, 2018
- hopsy - a methods marketplace for convex polytope sampling in Python
Richard Dominik Paul, Johann F. Jadebeck, … Katharina Nöh·BioinformaticsPeer-reviewed·Jun 28, 2024
- Scalable Bayesian inference for high-dimensional neural receptive fields
Mikio Aoi, Jonathan W. Pillow·bioRxiv·Nov 1, 2017
- Efficient Estimation of Large-Scale Spatial Capture-Recapture Models
D. Turek, C. Milleret, … P. de Valpine·bioRxiv·May 7, 2020
- Automatic Tracing of Ultra-Volume of Neuronal Images
Hanchuan Peng, Zhi Zhou, … Michael Hawrylycz·Nature MethodsPeer-reviewed·Mar 31, 2017