Simulation-based inference for scientific discovery