ScimBa

pipeline status coverage report Latest Release Doc

Scimba is a Python library that implements several Scientific Machine Learning (SciML) methods for PDE problems, as well as tools for hybrid numerical methods.

The current version of the code solves parametric PDE problems using various nonlinear methods (such as neural networks, low-rank approximations, and kernel-based methods) combined with classical linear solvers (DG, FEM). These methods:

  • can handle complex geometries generated via level-set techniques and mappings, including sub-volumetric and surface domains;

  • support function projections as well as elliptic, time-dependent, and kinetic parametric PDEs;

  • are compatible with both space–time algorithms (PINN, Deep Ritz) and time-sequential ones (discrete PINNs, neural Galerkin and neural semi-Lagrangian schemes).

To achieve this, the code provides several optimization strategies, including:

  • Adam, L-BFGS, SS-BFGS and SS-Broyden;

  • natural gradient methods (for neural network-based models);

  • hybrid least-squares approaches.

There are two versions of Scimba based on two backends:

  • scimba_torch is based on PyTorch,

  • scimba_jax is based on Jax.

Website: https://www.scimba.org/ with up-to-date contacts and projects

Documentation: https://www.scimba.org/docs/

Code repository: https://gitlab.com/scimba/scimba/

Development guide: https://www.scimba.org/docs/develop/setup.html

Install

uv is the preferred tool to install scimba, but you can also use pip. In any case, it is strongly recommended to isolate your installation in a virtual environment (uv does this for you).

If your project is handled by a pyproject.toml:

uv init
uv add scimba

otherwise:

uv pip install scimba
pip install scimba

Note

Scimba installs JAX CPU-only by default. For an NVIDIA GPU on Linux x86_64, pick the extra matching your GPU:

  • cuda12 — JAX built with CUDA 12;

  • cuda13 — JAX built with CUDA 13; requires a GPU with compute capability

    = 7.5 (Turing or newer: Maxwell, Pascal and Volta are no longer supported by CUDA 13).

uv add "scimba[cuda12]"   # most NVIDIA GPUs
uv add "scimba[cuda13]"   # Turing or newer
pip install "scimba[cuda12]"
pip install "scimba[cuda13]"

Note

If your GPU is a Volta (e.g. V100, compute capability 7.0), cap torch below 2.11 before installing scimba: the PyPI wheels of torch >= 2.11 depend on CUDA 13 packages, which land in the environment and break the CUDA 12 build on compute capability 7.0.

uv add "torch<2.11"
uv add "scimba[cuda12]"
pip install "torch<2.11"
pip install "scimba[cuda12]"

Note

If you are using an AMD GPU, you need to set the appropriate index URL to install the PyTorch ROCm version prior to installing scimba.

export UV_EXTRA_INDEX_URL="https://download.pytorch.org/whl/rocm6.4"
export PIP_INDEX_URL="https://download.pytorch.org/whl/rocm6.4"

Learning ScimBa

If you are new to Physics Informed Neural Networks, a good start may be to follow this course: https://rimbach.gitlabpages.inria.fr/fabrique-ton-pinns.

In the meantime, here is a gallery of tutorials and examples to get you started with ScimBa.

scimba_jax documentation

Please refer to the scimba_jax documentation page for an overview of scimba_jax.

scimba_torch documentation

Please refer to the scimba_torch documentation page for an overview of scimba_torch.

Development