This is my final work product for Google Summer of Code 2026, where I spent the summer redesigning how sbi builds neural networks.

What the project is about?

sbi does Bayesian inference for simulators you cannot write a likelihood for. You have a simulator and a prior, you run simulations, and a neural network learns the posterior over the simulator's parameters from those runs. It implements a whole family of methods (NPE, NLE, NRE, FMPE, NPSE and the mixed variants), and every one of them trains some kind of neural density estimator.

My project was about how you pick that network and configure it. Over the summer I replaced the old string and factory-function interface with typed configuration objects, one class per model, across every estimator family in the library. The goal was that a setting the chosen model cannot use fails immediately when you write it, rather than being quietly dropped on the way to the network, and that existing code keeps working through a deprecation path instead of breaking.

Organisation: NumFOCUS | Sub-organisation: sbi-dev/sbi | Mentors: Jan Teusen (@janfb) & Nicholas Junge (@nicholasjng)