GenSBI: Generative Methods for Simulation-Based Inference in JAX

Aurelio Amerio
5/26/2026
cs.LGastro-ph.COastro-ph.IM
diffusion-flowtransformer-attention

Official code: aurelio-amerio/GenSBI (20 stars, Python, JAX, last commit 2026-10-27).

Abstract

Flow and diffusion generative models have established themselves as widely adopted density estimators for simulation-based inference (SBI), extending naturally from neural posterior estimation to likelihood and joint density estimation. Their principled optimization objectives and freedom from architectural constraints have driven rapid adoption across the natural sciences.

Show full abstract

Yet the most widely used SBI libraries remain PyTorch-based, leaving researchers who develop their forward models and analysis pipelines in JAX without a native option. We present GenSBI, an open-source library that implements flow matching, score matching, and denoising diffusion entirely in JAX. The library offers three transformer-based architectures - SimFormer, Flux1, and a novel Flux1Joint that extends gate-modulated transformer blocks to joint density estimation - all interchangeable through a unified interface that decouples generative method, neural backbone, and inference mode. GenSBI provides an end-to-end workflow from training through posterior calibration (SBC, TARP, LC2ST) and supports custom architectures with domain-specific embedding networks. We validate the framework on standard SBI benchmarks, achieving near-ideal mean C2ST scores (0.50-0.56, where 0.50 is ideal) on SBIBM tasks with minimal per-task tuning and well-calibrated posterior coverage across all tested configurations. The code is publicly available at https://github.com/aurelio-amerio/GenSBI.

View on arXivView PDF

Code Implementations(1)

JAX

Generative Models for Simulation-Based Inference in JAX

200Python, HTMLApr 1, 20251 months agoNOASSERTION
density-estimationdiffusion-modelsflaxflow-matchingjax+6 more

Similar Papers

Cite this paper

@article{amerio2026gensbi,
  title  = {GenSBI: Generative Methods for Simulation-Based Inference in JAX},
  author = {Aurelio Amerio},
  year   = {2026},
  eprint = {2605.27499},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.27499v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.27499.svg)](https://codeofpaper.com/paper/2605.27499)

Discussion