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.
翻译:摊销贝叶斯推断通过模型模拟训练神经网络解决随机推断问题,从而能够对任意新观测数据快速执行贝叶斯推断。然而,当前的模拟驱动摊销推断方法存在模拟消耗大且灵活性不足的问题:它们需要预先指定固定的参数先验、模拟器和推断任务。在此,我们提出一种新型摊销推断方法——Simformer——用以克服这些局限。通过采用Transformer架构的概率扩散模型进行训练,Simformer在基准任务上优于当前最先进的摊销推断方法,且具备显著更强的灵活性:可应用于具有函数值参数的模型,能处理数据缺失或非结构化场景下的推断任务,并能对参数与数据联合分布的任意条件分布进行采样(涵盖后验分布和似然函数)。我们通过生态学、流行病学和神经科学领域的模拟器展示了Simformer的性能与灵活性,证明其为基于模拟模型的摊销贝叶斯推断开辟了新的可能性和应用领域。