arXiv Science⌕ Search

arXiv · 2610.37333

diff-soup: GPU-native Differentiable Simulation and Inference for Large-scale Stiff Dynamical Systems

Abstract

Learning physical models from spatiotemporal data requires simulating systems of partial differential equations (PDEs) and differentiating through their solution. Upon spatial discretization, these models give rise to stiff dynamical systems that require repeatedly solving large, sparse linear systems. Traditional scientific computing frameworks are largely CPU-based and require problem-specific tuning to accelerate, scale, and differentiate. In this work, we introduce diff-soup, a differentiable, sparse-oriented, unified PDE suite for GPU-native simulation and inference of large, stiff dynamical systems. Built in JAX, diff-soup provides 1) a fully differentiable design for problems with sparse structure, 2) scaling to large problems through the NVIDIA cuDSS sparse direct solver with model and data multi-GPU parallelism, and 3) end-to-end PDE-constrained optimization, from classical statistical inference to embedded deep learning. On stiff PDE benchmarks, diff-soup outperforms established CPU- and GPU-based frameworks by one to two orders of magnitude in both forward solves and gradients. We demonstrate both a classical Bayesian inference workflow, identifying constitutive relationships, and a modern deep learning workflow, training a neural field for the catalyst activity of a three-dimensional packed bed reactor. We provide diff-soup as an open-source repository to facilitate research in computational science and engineering.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Samuel Degnan-Morgenstern, Martin Z. Bazant. 2026-10-27. diff-soup: GPU-native Differentiable Simulation and Inference for Large-scale Stiff Dynamical Systems. https://arxiv.org/abs/2610.37333

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

py-ARGOS: A Python package for automatic, statistically principled discovery of ordinary differential equations from data

Recovering the governing equations of a dynamical system from data is a central problem in data-driven science, yet the available Python tooling forces a compromise among automation, statistical rigor, and reliability. We present py-ARGOS, a Python package implementing two automatic algorithms, bootstrap ARGOS and Bayesian-ARGOS, behind a uniform interface. Both are statistically principled throughout: automated model selection reduces the candidate library, each coefficient is reported with a bootstrap confidence or Bayesian credible interval that quantifies its uncertainty, and a term is retained when this interval excludes zero. Built-in diagnostics additionally flag unreliable fits. On chaotic benchmark systems, the two algorithms improve on the SINDy family's identification performance.

cs.MS↗

Native Rectangular Linear Assignment with Implicit Rejection: A Jonker-Volgenant Solver without Square Expansion

Tracking and matching applications often solve rectangular assignment with a uniform penalty for leaving elements unmatched. Widely used tracking interfaces embed the $N \times M$ costs in an (N+M)-square matrix: for 256 rows and 4096 columns, 144.5 MiB of costs for an 8 MiB problem. We describe a Jonker-Volgenant implementation that keeps the real matrix and represents rejection inside its shortest-path search by one terminal distance and one predecessor row. Building on established rectangular and optional-assignment formulations, we derive the one-sided objective and its primal-dual certificate. Rust (JVRUST), hybrid Rust/C++ (JVHYBRID), and C++ (JVCPP) implementations with native batching agree with exhaustive enumeration and are compared with expanded solvers and an exact capped-cost SciPy formulation. Two environments, Python 3.14.9 and 3.11.17 on one Intel/Windows host, each provide 8,946 timing samples across 204 cases, including 5000-square matrices, extreme aspect ratios, structured costs, and rejection sweeps. JVRUST beats capped SciPy in the same nine of ten formulation cases; JVRUST and JVCPP each preserve their ordering against the relevant SciPy baseline in all 201 non-batch cases. Congestion remains a counterexample: capped SciPy is about 9.4 and 9.1 times faster at $1024 \times 1280$. For small problems, JVRUST's four-worker batching improves on its sequential Python loop by 5.1 and 4.7 times. Repeated memory measurements confirm the cost of square expansion and an orientation-dependent native footprint. These results characterize particular implementations and software environments; they do not isolate a Python-version or programming-language effect.

cs.MS↗

Using RngStreams for Parallel Random Number Generation in C++ and R

The RngStreams software package provides one viable solution to the problem of creating separate random number streams for simulations in parallel processing environments. Techniques are presented for effectively using RngStreams with C++ programs that are parallelized via OpenMP or MPI. Ways to access the backbone generator from RngStreams in R through the parallel and rstream packages are also described. The ideas in the paper are illustrated with both a simple running example and a Monte Carlo integration application.

cs.MS↗