# xi-torch: differentiable scientific computing library

arXiv: https://arxiv.org/abs/2010.01921 · HTML: https://mlsanity.com/paper/2010.01921/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 5 Oct 2020.

## Built on by (most cited first, 3 of 3)

- [Learning the exchange-correlation functional from nature with fully differentiable density functional theory](https://mlsanity.com/paper/2102.04229/) (2021)
- [ReMiDi: Reconstruction of Microstructure Using a Differentiable Diffusion MRI Simulator](https://mlsanity.com/paper/2502.01988/) (2025)
- [Open source Differentiable ODE Solving Infrastructure](https://mlsanity.com/paper/2411.19882/) (2024)

## Abstract (arXiv)

Physics-informed learning has shown to have a better generalization than learning without physical priors. However, training physics-informed deep neural networks requires some aspect of physical simulations to be written in a differentiable manner. Unfortunately, some operations and functionals commonly used in physical simulations are scattered, hard to integrate, and lack higher order derivatives which are needed in physical simulations. In this work, we present xi-torch, a library of differentiable functionals for scientific simulations. Example functionals are a root finder and an initial value problem solver, among others. The gradient of functionals in xi-torch are written based on their analytical expression to improve numerical stability and reduce memory requirements. xi-torch also provides second and higher order derivatives of the functionals which are rarely available in existing packages. We show two applications of this library in optimizing parameters in physics simulations. The library and all test cases in this work can be found at https://github.com/xitorch/xitorch/ and the documentation at https://xitorch.readthedocs.io.
