
Learning Bayesian Statistics #151 Diffusion Models in Python, a Live Demo with Jonas Arruda
Feb 12, 2026
Jonas Arruda, mathematician and PhD researcher at the University of Bonn and core contributor to Baseflow. He explores using diffusion models for simulation-based inference. Short demos show building simulators, training amortized posteriors, and sampling multimodal results. Discussion covers score learning, reverse sampling, flow-matching alternatives, diagnostics like coverage/SBC, and practical tips for scaling and guided inference.
AI Snips
Chapters
Transcript
Episode notes
Multimodal Posteriors From Simple Simulators
- The inverse kinematics toy reveals how one observation can imply a multimodal posterior over parameters.
- Multimodality is a strong stress-test for any SBI algorithm and visualizes posterior complexity.
Train Neural Nets From Simulations
- Do generate training pairs by sampling parameters from the prior and simulating data when you lack a tractable likelihood.
- Train a neural network on (parameters, simulated data) pairs and then condition it on real observations.
Use Baseflow's Minimal API
- Do define only a prior and a simulator function for Baseflow; the library handles model training and diagnostics.
- Use Baseflow's workflow, fit, and sample API to amortize inference across datasets.
