1. Define the generative model: parameters theta ~ p(theta) prior, simulator produces x ~ p(x|theta) where the likelihood can be unknown. 2. Sample a synthetic training set: N times draw theta_i ~ p(theta), simulate x_i = simulator(theta_i), obtain a dataset {(theta_i, x_i)} of size N (typically 10k-1M). 3. Build a neural density estimator q_phi(theta|x): a conditional network (input: x, output: density over theta). Normalizing flows are the standard - MAF, NSF, coupling flows - because they provide tractable density and sampling. 4. Training: minimise -E[log q_phi(theta_i|x_i)] over the dataset - this is cross-entropy to the true posterior. Optimisation via SGD/Adam. 5. Inference: for a real observation x_obs, compute the posterior q_phi(theta|x_obs) - one forward pass. You can sample theta ~ q_phi(theta|x_obs) and compute marginals, quantiles, and credible intervals. 6. Sequential variants (SNPE-A/B/C): iteratively narrow the sampling region for theta closer to x_obs (proposal distribution) and retrain - improves efficiency for hard observations. 7. Diagnostics: SBC (Simulation-Based Calibration) - checks whether the posterior is well-calibrated on synthetic draws.
Classical Bayesian inference requires computing p(x|theta) - the likelihood of observation x under hypothesis theta. For many interesting models the likelihood is intractable: particle simulators (Pythia), molecular (MD), ecological, robotics - you can only run forward simulation, not backward likelihood. NPE eliminates this: you train a network on (theta, x) pairs from the simulator and the network learns p(theta|x). NPE also amortises inference - after training, inference for any new x is cheap (one forward pass), whereas ABC/MCMC per query requires thousands of simulations.
Forward model producing x = simulator(theta) - can be any black-box (physics engine, ODE solver, agent-based model, robot simulator).
Official
Probability distribution over the parameter space - defines which theta are possible a priori. Typically uniform or gaussian over a physically sensible range.
Official
Conditional network q_phi(theta|x) - a neural network learning the posterior. Standard: normalizing flows (MAF, NSF, coupling flows) because they provide tractable log-density and fast sampling.
Official
Optional network f(x) reducing high-dimensional observations (images, time-series) to a low-dimensional embedding before q_phi(theta|f(x)). Trained jointly.
Official
In SNPE-A/B/C variants: iteratively narrowed proposal q~(theta) for the next simulation round, so more training data lies close to the relevant x_obs.
Official
If the simulator does not faithfully generate realistic x_obs, NPE will return a confident but wrong posterior. Similar to the risk in classical Bayes.
Curse of dimensionality: for theta of dimension >10-20 you need exponentially more simulations; N=10k may be inadequate.
Publishing NPE results without a Simulation-Based Calibration check - the posterior may be systematically too wide/narrow.
Too narrow a prior excludes correct theta; too wide wastes simulations in useless regions.
For high-dim x (images) the embedding network may overfit to simulated x_i, corrupting the posterior for real observations.
Rubin, Tavare, Beaumont - development of classic likelihood-free inference through rejection sampling with summary statistics. The foundation that NPE would replace 32 years later.
Rezende and Mohamed formalise normalizing flows as a tool for training expressive density models - the direct architectural precursor to NPE.
First formal NPE paper - training an MDN (Mixture Density Network) as conditional posterior. Sequential variant (SNPE-A) proposes adaptive proposal.
Papamakarios et al. introduce MAF - a normalizing flow that becomes the de facto NPE standard. Solves MDN limitations.
Sequential extensions SNPE-B (Lueckmann et al.) and SNPE-C / APT (Automatic Posterior Transformation, Greenberg et al.) - key efficiency improvements for hard observations.
Tejero-Cantero et al. release the sbi library (Python, sbi-dev.github.io/sbi) - the reference open-source implementation of NPE + NLE + NRE. In parallel Neural Spline Flows Durkan et al. increase estimator expressiveness.
Community develops diagnostic tools - SBC (Talts et al.) and systematic benchmarks (sbibm - Lueckmann et al.) show where NPE works and where it fails.
NVIDIA RoboLab (RSS 2026) applies NPE to compute the posterior p(theta_env|task_outcome) - which environment parameters (lighting, camera pose) most influence policy success. Evidence that NPE transfers successfully to practical applications beyond physics/biology.
Time complexity: O(N_train * T_simulator) trening + O(1) per inferencja. Space complexity: O(|phi|) parametry sieci + O(N_train * (dim_theta + dim_x)) dataset.
N = dataset size (theta_i, x_i). More = better posterior but more expensive training.
Type of normalizing flow. MAF - simplest, NSF - higher expressiveness, coupling flows - faster sampling.
Number of rounds in sequential variants. 1 round = classic amortised NPE. More = focused on a specific x_obs.
Normalizing flows are dense - every forward pass uses all parameters. For very large problems, factored flows are used.
Training simulations are embarrassingly parallel (each theta_i is independent). Flow training is standard SGD parallel.
Training normalizing flows is standard deep learning training - Tensor Cores accelerate matmul. Simulations are often independent of GPU.
Simulations generating the training set are often run on a CPU cluster (embarrassingly parallel); flow training can be on CPU for small problems.
NPE as a paradigm has no hardware preference, adapting to the domain.