# Released gabp-sparse-inv 0.4.1 - differentiable selected inversion in PyTorch

**URL:** <https://discourse.pymc.io/t/released-gabp-sparse-inv-0-4-1-differentiable-selected-inversion-in-pytorch/17972>\
**Category:** Sharing\
**Tags:** development\
**Created:** [October 19, 2026, 2:33pm UTC](https://discourse.pymc.io/t/released-gabp-sparse-inv-0-4-1-differentiable-selected-inversion-in-pytorch/17972 "2026-10-19T14:33:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vanshdeep\_Sehrawat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/vanshdeep_sehrawat/32/9766_2.png) [@Vanshdeep\_Sehrawat](https://discourse.pymc.io/u/Vanshdeep_Sehrawat)\
**Post date:** [October 19, 2026, 2:33pm UTC](https://discourse.pymc.io/t/released-gabp-sparse-inv-0-4-1-differentiable-selected-inversion-in-pytorch/17972/1 "2026-10-19T14:33:30Z")

</div>

I’ve released an open-source Python package for computing selected inverse blocks of sparse block-structured matrices without forming the dense inverse.

It supports PyTorch autograd, sparse solves, log-determinants, Gaussian sampling, and marginal covariance calculations for Gaussian Markov random fields.

The underlying algorithms are classical (Takahashi/Erisman–Tinney). This is a PyTorch-oriented reference implementation, not a replacement for high-performance sparse-direct libraries such as CHOMPACK or CHOLMOD.

I’d really welcome feedback from anyone working with sparse Gaussian models, differentiable linear algebra, or structured probabilistic inference.

GitHub: [GitHub - vanshsehrawat14/gabp-sparse-inv: Differentiable selected inversion for PyTorch: exact sparse solves, log-determinants, selected marginals, sampling, and first-order adjoints on tree and filled junction patterns. · GitHub](https://github.com/vanshsehrawat14/gabp-sparse-inv)

PyPI: [Client Challenge](https://pypi.org/project/gabp-sparse-inv/)
