All-in-one simulation-based inference
Manuel Gloeckler, Michael Deistler, Christian Weilbach, Frank Wood, Jakob H. Macke
TL;DR
This work presents the Simformer, a transformer-based diffusion model for amortized simulation-based inference (SBI) that learns the joint distribution $p(\boldsymbol{\theta}, \boldsymbol{x})$ and enables sampling of arbitrary conditionals, including both posterior and likelihood. By encoding variables as tokens and using tunable attention masks, it exploits dependency structure and supports function-valued/infinite-dimensional parameters as well as unstructured data. Diffusion guidance further allows conditioning on observation intervals or constraints without retraining. Across benchmarks in ecology, epidemiology, and neuroscience, the Simformer achieves higher accuracy with far fewer simulations than prior SBI methods and provides a unified framework to access multiple conditional distributions quickly and flexibly.
Abstract
Amortized Bayesian inference trains neural networks to solve stochastic inference problems using model simulations, thereby making it possible to rapidly perform Bayesian inference for any newly observed data. However, current simulation-based amortized inference methods are simulation-hungry and inflexible: They require the specification of a fixed parametric prior, simulator, and inference tasks ahead of time. Here, we present a new amortized inference method -- the Simformer -- which overcomes these limitations. By training a probabilistic diffusion model with transformer architectures, the Simformer outperforms current state-of-the-art amortized inference approaches on benchmark tasks and is substantially more flexible: It can be applied to models with function-valued parameters, it can handle inference scenarios with missing or unstructured data, and it can sample arbitrary conditionals of the joint distribution of parameters and data, including both posterior and likelihood. We showcase the performance and flexibility of the Simformer on simulators from ecology, epidemiology, and neuroscience, and demonstrate that it opens up new possibilities and application domains for amortized Bayesian inference on simulation-based models.
