How to choose neural nets

How to choose neural nets#

sbi implements a wide range of neural networks for the different inference methods. By and large, we expect that the default choices of sbi perform well. This tutorial describes how you can optimize the performance of sbi by choosing the best neural net.

Explicit recommendations#

  • When your simulation outputs are high-dimensional (e.g., images, time-series,…), we strongly recommend using an embedding net, as described here.

  • For NPE and NLE, the nsf density estimator often outperforms the default (maf), but it is slower to train and may be more prone to overfitting. This can be done by setting trainer = NPE(density_estimator="nsf").

  • For best performance, optimize the hyperparameters of sbi.