Introduction
In many scientific disciplines, such as physics, ecology, and neuroscience, researchers rely on complex mechanistic models to simulate data. While these simulators can generate synthetic data given specific parameters, calculating the exact probability of observing specific data—the likelihood—is often computationally intractable. This intractability prevents the use of traditional Bayesian inference methods like Markov Chain Monte Carlo (MCMC) to determine which parameters likely produced real-world observations.
Existing "likelihood-free inference" (LFI) methods, such as Approximate Bayesian Computation (ABC), typically require millions of simulations to achieve accuracy, which is prohibitively expensive for slow simulators. Newer neural-network-based approaches, like Sequential Neural Posterior Estimation (SNPE), attempt to learn the posterior distribution directly. However, these methods often require fragile mathematical corrections to account for the "proposal distribution" used to guide simulations, frequently leading to algorithmic instability, such as negative variances or high-variance weights.
Methodology: Sequential Neural Likelihood (SNL)
This paper introduces Sequential Neural Likelihood (SNL), a method that shifts the focus from learning the posterior to learning the likelihood function $p(x|\theta)$. SNL utilizes a conditional neural density estimator—specifically, a Masked Autoregressive Flow (MAF)—to approximate the intractable likelihood.
The SNL algorithm operates in a sequential loop:
- Simulate: Generate parameters from a proposal distribution (initially the prior, then the current approximate posterior) and run the simulator.
- Train: Update the MAF using all accumulated parameter-data pairs. Because the true likelihood is independent of the proposal distribution, SNL avoids the biased training objectives that plague SNPE.
- Infer: Combine the learned likelihood with the prior and use MCMC (Slice Sampling) to draw samples from the resulting approximate posterior.
- Repeat: Use these new posterior samples as the proposal for the next round of simulations.
By learning the likelihood, SNL creates a reusable model that is independent of the prior and allows for built-in diagnostics, such as comparing neural-generated data to simulator-generated data using Maximum Mean Discrepancy (MMD).
Experimental Evaluation and Results
The authors evaluated SNL on four benchmark tasks: a multi-modal Toy Model, an M/G/1 Queue Model, a Lotka-Volterra ecological model, and a 12-parameter Hodgkin-Huxley neuroscience model.
As shown in Figure 4, SNL achieves massive efficiency gains, requiring orders of magnitude fewer simulations than traditional SMC-ABC or Synthetic Likelihood (SL) methods. Furthermore, SNL exhibits superior robustness; while SNPE-A catastrophically failed in several experiments due to numerical instabilities (visible in the early termination of its trace in Figure 4c), SNL converged reliably in all cases.
Quantitatively, SNL consistently achieved the highest log-probability of the true parameters and the lowest discrepancy between simulated and observed data for a given simulation budget (Figure 6). This indicates that the autoregressive flow effectively captures the underlying structure of the simulator's output.
Discussion and Conclusion
SNL represents a significant advancement in LFI by prioritizing the stability of likelihood estimation over direct posterior estimation. While it requires an additional MCMC step for inference, the resulting model is more robust and reusable than posterior-based alternatives. Future work may focus on scaling SNL to high-dimensional data, such as raw images or audio, by integrating more advanced density estimators like PixelCNN or exploiting specific data symmetries.
Summary updated