JetSCI: A Hybrid JAX–PETSc Framework for Scalable Differentiable Simulation

Alberto Cattaneo, M. Keith Ballard, Robert M. Kirby, Varun Shankar · 2026

Read JetSCI: A Hybrid JAX–PETSc Framework for Scalable Differentiable Simulation by Alberto Cattaneo, M. Keith Ballard, Robert M. Kirby, Varun Shankar (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-22087.txt.

Introduction

Cattaneo and three colleagues present JetSCI, a mixed JAX-PETSc tool for big simulations. Big simulations still need server farms: PETSc gives fast parallel runs, strong solvers, and smart setup. JetSCI uses JAX for fast differentiable math grids and PETSc for solving systems on split-memory machines. It runs at multiple levels, with fast chips inside machines and message passing between them. For mixed tiny-part problems, JetSCI beats JAX-only implementations on speed and efficiency.

Catalog record

CREATORAlberto Cattaneo, M. Keith Ballard, Robert M. Kirby, Varun Shankar
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE44843
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2604.22087

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

JetSCI: A Hybrid JAX–PETSc Framework for Scalable Differentiable Simulation Thanks: This work is funded under the U.S. Air Force Research Laboratory contract Aerospace Materials Processing, Performance and Characterization (AMPPAC), FA2394-25-D-B005. Alberto Cattaneo, M. Keith Ballard, Robert M. Kirby, Varun Shankar Abstract The rapid rise of scientific machine learning (SciML) has expanded the role of differentiable modeling, surrogate modeling, and data-driven constitutive laws in large-scale simulation. The JAX framework provides an attractive environment for these workflows through automatically differentiable programs, vectorization, GPU acceleration, and while enabling seamless learning of surrogate models. However, large-scale simulation still relies on mature HPC infrastructure. Libraries, such as PETSc, provide scalable MPI-based parallelism, robust linear and nonlinear solvers, and advanced preconditioning capabilities that remain difficult to reproduce in JAX-only workflows. We present JetSCI, a hybrid JAX–PETSc framework that unifies these complementary strengths. JetSCI uses JAX for GPU-parallel differentiable discretizations and PETSc for robust, scalable solution of the resulting systems on distributed-memory architectures, exposing multilevel parallelism through GPU acceleration within nodes and MPI parallelism across nodes. For finite element discretizations of heterogeneous micromechanics problems, JetSCI outperforms JAX-only implementations in efficiency and accuracy. I Introduction Scientific machine learning (SciML) is changing how large-scale simulation codes are constructed, coupled, and deployed. Across computational science, machine learning is no longer used only for post-processing or reduced-order closure; it is increasingly embedded directly into simulation workflows through differentiable discretizations, learned surrogate models, operator-learning architectures, and data-driven constitutive updates [ 1 , 2 , 3 , 4 ] . In computational mechanics in particular, this shift has created new opportunities to combine first-principles models with learned constitutive behavior and multiscale surrogates, while also exposing new requirements for software systems that can support automatic differentiation, accelerator execution, and scalable PDE solves within a single workflow [ 3 , 5 , 4 ] . Modern array-programming frameworks have made this style of simulation increasingly practical. The scientific Python ecosystem has become a central interface for numerical computing, with NumPy providing the dominant array abstraction and SciPy supplying much of the core algorithmic infrastructure used throughout scientific and engineering software [ 6 , 7 ] . Built on this ecosystem, JAX provides composable transformations for numerical programs, including automatic differentiation, vectorization, and just-in-time compilation, together with execution on accelerator hardware [ 8 ] . These features make JAX attractive for differentiable simulation, inverse problems, and machine-learning-augmented numerical methods, especially when local residual evaluations, constitutive updates, and element-level kernels can be expressed in an array-oriented style. This promise is already visible in emerging differentiable mechanics frameworks such as JAX-FEM, which show that substantial portions of finite-element workflows can be written concisely while retaining access to automatic differentiation and GPU-backed execution [ 9 ] . However, the strengths of JAX do not remove the core algorithmic and software demands of large-scale PDE simulation. Once problem sizes become sufficiently large, or when implicit time stepping, nonlinear constitutive response, multiphysics coupling, or highly heterogeneous coefficients are present, end-to-end performance is often governed less by local kernel throughput than by the global solution of large sparse algebraic systems. In this regime, scalable distributed-memory data structures, robust Krylov solvers, nonlinear solution strategies, preconditioning, and matrix-free formulations are not optional implementation details but central algorithmic components. These capabilities have been developed over decades in production HPC libraries rather than in ML-oriented frameworks [ 10 , 11 ] . As a result, a purely JAX-based implementation may offer elegant differentiation and accelerator programming while still lacking the mature distributed solver stack needed for robust simulation at scale. PETSc is one of the standard foundations for this solver-centric view of scientific computing. Designed for the scalable solution of PDE-based applications, PETSc provides distributed vectors and matrices, Krylov subspace methods, nonlinear solvers, preconditioners, time integrators, optimization tools, and support for both matrix-based and matrix-free workflows, all organized around MPI-based distributed-memory execution [ 10 , 11 , 12 ] . It has consequently become a common substrate for large-scale multiphysics and multiscale simulation codes in which solver robustness, portability, and parallel scalability are decisive. Yet PETSc, like most mature HPC libraries, is not designed around differentiable programming or close integration with modern machine-learning frameworks. This creates a persistent software and algorithmic gap: ML-oriented systems provide expressive differentiable kernels and convenient accelerator programming, whereas solver-oriented HPC systems provide the distributed numerical infrastructure needed once simulation becomes dominated by sparse global solves. The central idea of this work is that these two ecosystems should not be viewed as competitors, but as complementary layers in a single computational stack. We present JetSCI , a hybrid JAX–PETSc framework that combines JAX for differentiable, accelerator-oriented discretization and constitutive computation with PETSc for robust and scalable distributed-memory solution of the resulting algebraic systems. This separation of concerns is natural from both a software and numerical perspective: local physics, automatic differentiation, and data-driven updates are expressed where JAX is strongest, while global linear and nonlinear solution is delegated to PETSc, where decades of solver development can be brought to bear. The resulting design exposes multilevel parallelism through accelerator execution within nodes and MPI parallelism across nodes, while avoiding the need to reproduce mature sparse-solver technology inside a JAX-only workflow. This hybridization is especially relevant for computational mechanics problems involving heterogeneous and multiscale material behavior. Such problems are natural targets for learned constitutive laws, differentiable calibration, and surrogate-assisted multiscale simulation, but they also generate stiff, ill-conditioned, and communication-intensive algebraic systems whose efficient solution still depends on established HPC solver infrastructure [ 3 , 4 , 5 ] . JetSCI is designed precisely for this setting. In the numerical experiments reported here, we consider finite-element discretizations of heterogeneous micromechanics problems and show that coupling JAX and PETSc yields a practical framework that improves efficiency, robustness, and scalability relative to JAX-only approaches, while preserving the differentiable programming model needed for modern SciML workflows. [ 13 ] I-A Related Work Differentiable programming for PDE-constrained simulation now spans several distinct software design points. At one end are ML-first differentiable simulation frameworks, which implement both local discretization kernels and global solves largely inside an automatic-differentiation-enabled array framework. JAX-FEM [ 9 ] is the canonical example in computational mechanics: it uses JAX to provide differentiable, GPU-accelerated finite-element workflows for forward and inverse problems. More recent JAX-based efforts such as JAX-SSO [ 14 ] pursue a similar direction for structural optimization and neural-network coupling. Earlier TensorFlow-based efforts such as ADCME [ 15 ] likewise demonstrated the appeal of embedding physical simulation and inverse problems in a modern AD framework. These systems provide seamless end-to-end differentiability and easy integration with machine learning models, but they largely retain both discretization and solver logic inside a single ML-oriented runtime. JetSCI shares the interest in ML-native local differentiation, but deliberately does not require the global sparse solve to remain inside JAX. A second line of work is represented by high-level finite-element domain-specific languages (DSLs) and adjoint-capable partial differential equation (PDE) frameworks. Firedrake [ 16 ] and FEniCSx/DOLFINx [ 17 ] provide mature finite-element environments with MPI-parallel execution and PETSc-based linear and nonlinear solver support. In the Firedrake/FEniCS ecosystem, dolfin-adjoint / pyadjoint automates discrete adjoints for PDE-constrained optimization and inverse problems [ 18 ] . Recent work has extended this direction by coupling Firedrake directly to

Read the complete text