EuroSciPy 2026

sethaxen


Session

07-20
11:30
30min
setu: Bridging Simulators to Probabilistic Programming in JAX
Jan Boelts (Teusen), sethaxen

Many scientific models, from climate systems to neural circuits, are defined as simulators: computer programs that generate data from parameters but provide no tractable likelihood function. This makes them invisible to probabilistic programming languages (PPLs) like PyMC and NumPyro, which require explicit likelihoods for Bayesian inference. Practitioners are forced to choose: make simplifying assumptions about the simulator to use a PPL, or use the real simulator and give up the rich modeling capabilities PPLs offer, such as prior specification, uncertainty quantification and exploitation of hierarchical structures.

We present setu ("bridge"), a JAX-native Python package that closes this gap. setu uses generative neural networks trained on simulated data to learn a neural surrogate of the likelihood. This learned likelihood can then be exported directly into PPLs via a simple API: nle.to_pymc() or nle.to_numpyro(). Once inside a PPL, the full Bayesian toolbox becomes available: hierarchical models, custom priors, posterior predictive checks, and standard MCMC samplers — all running on a simulator that was previously out of reach.

The package follows a clean simulate, train, validate, export workflow, with built-in diagnostics to ensure the learned likelihood is trustworthy before it ever enters a PPL. In this talk, we walk through the motivation, design, and a real-world example showing how a black-box simulator gains full PPL capabilities.

Computational Tools and Scientific Python Infrastructure
Room 1.38 (Ground Floor, Turing)