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

**URL:** <https://discuss.pytorch.org/t/released-gabp-sparse-inv-0-4-1-differentiable-selected-inversion-in-pytorch/225573>\
**Category:** projects\
**Created:** [October 19, 2026, 7:40am UTC](https://discuss.pytorch.org/t/released-gabp-sparse-inv-0-4-1-differentiable-selected-inversion-in-pytorch/225573 "2026-10-19T07:40:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vanshdeep\_Sehrawat](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/vanshdeep_sehrawat/32/80163_2.png) [@Vanshdeep\_Sehrawat](https://discuss.pytorch.org/u/Vanshdeep_Sehrawat)\
**Post date:** [October 19, 2026, 7:40am UTC](https://discuss.pytorch.org/t/released-gabp-sparse-inv-0-4-1-differentiable-selected-inversion-in-pytorch/225573/1 "2026-10-19T07:40:04Z")

</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: [https://pypi.org/project/gabp-sparse-inv/](https://pypi.org/project/gabp-sparse-inv/)
