Bayesian Learning of Conditional Kernel Mean Embeddings for Automatic Likelihood-Free Inference

Kelvin Hsu, Fabio Ramos

Abstract

In likelihood-free settings where likelihood evaluations are intractable, approximate Bayesian computation (ABC) addresses the formidable inference task to discover plausible parameters of simulators. However, standard ABC methods rely on manual tuning of distance metrics and tolerance parameters, often requiring millions of simulations. This paper introduces Kernel Embedding Likelihood-Free Inference (KELFI), a framework that automates hyperparameter selection by treating the simulator as a kernel-based surrogate model. By maximizing a differentiable Marginal Kernel Means Likelihood (MKML), KELFI learns optimal kernel parameters and tolerance levels, significantly improving sample efficiency and accuracy across complex biological and ecological benchmarks.

1. Introduction

Scientific modeling frequently utilizes "black-box" simulators to represent complex phenomena, from ecological dynamics to fluid mechanics. While these simulators can generate data given parameters $\theta$, the underlying likelihood function $p(y|\theta)$ is typically intractable. Traditional Approximate Bayesian Computation (ABC) attempts to circumvent this by accepting parameters that produce simulated data $x$ within a distance $\epsilon$ of the observed data $y$. However, ABC faces two primary challenges: the "efficiency gap," requiring excessive simulations, and the "hyperparameter dark art," where the choice of $\epsilon$ and distance metrics critically determines success but lacks a principled selection method.

2. The KELFI Framework

KELFI addresses these challenges by framing Likelihood-Free Inference (LFI) as a problem of learning conditional kernel mean embeddings. The framework operates in three modular stages:

2.1 Kernel Means Likelihood

Instead of binary accept/reject criteria, KELFI constructs a nonparametric surrogate of the likelihood using Conditional Mean Embeddings (CMEs). By embedding the simulator's output in a Reproducing Kernel Hilbert Space (RKHS), the model leverages the inherent smoothness of the simulator to predict likelihoods for unsampled parameter regions.

2.2 Learning via Marginal Kernel Means Likelihood (MKML)

The core innovation of KELFI is the derivation of the Marginal Kernel Means Likelihood (MKML), a differentiable objective function. By maximizing the MKML, the algorithm can use gradient-based optimization to automatically determine optimal kernel widths and the tolerance parameter $\epsilon$. This process effectively automates the decay of $\epsilon$ as more data becomes available, sharpening the posterior estimate.

Validation on the Exponential-Gamma model: (Left) Approximate posteriors for different hyperparameter settings compared to the true posterior. (Right) The MKML objective landscape showing global and local optima for $\epsilon$ and $\beta$.

2.3 Efficient Posterior Inference

Once the surrogate model is trained, KELFI provides a closed-form posterior mean embedding. High-quality samples can then be drawn using "kernel herding," a technique that allows for rapid posterior estimation without further calls to the computationally expensive simulator.

3. Experimental Evaluation

The authors evaluated KELFI against several benchmarks, including the Exponential-Gamma toy problem, the chaotic Blowfly population model, and the Lotka-Volterra predator-prey system.

3.1 Automatic Relevance Determination (ARD)

A significant advantage of KELFI is its ability to perform Automatic Relevance Determination (ARD). By employing anisotropic kernels, the model learns to weight summary statistics based on their informativeness. Statistics that are primarily noise are assigned large length scales, effectively filtering them out of the inference process.

Automatic Relevance Determination (ARD) and MKML landscapes for complex simulators. (Left) ARD identifies informative summary statistics for the Blowfly model. (Middle/Right) MKML landscapes for Blowfly and Lotka-Volterra models.

3.2 Performance and Efficiency

In the Blowfly benchmark, KELFI achieved less than 1% Normalized Mean Squared Error (NMSE) using only 300 simulations, a significant improvement over MCMC-ABC. In the Lotka-Volterra experiment, KELFI outperformed Mixture Density Networks (MDN) while requiring 75% fewer simulations (2,500 vs. 10,000). Furthermore, KELFI demonstrated superior stability across randomized runs compared to other kernel-based methods like KBR or GPS-ABC.

4. Discussion and Conclusion

KELFI represents a significant step toward automating simulation-based inference. By replacing manual tuning with a principled, data-driven optimization of the MKML objective, it provides a robust and sample-efficient alternative to traditional ABC. While the $O(m^3)$ scaling of the Cholesky decomposition may require sparse approximations for very large simulation budgets, KELFI's performance in low-sample regimes makes it an ideal tool for expensive scientific simulators. Future work may explore its robustness to model misspecification and its extension to non-Gaussian priors.

Summary updated

BibTeX
@inproceedings{hsu2019bayesian,
  author = {Kelvin Hsu and Fabio Ramos},
  title = {{Bayesian Learning of Conditional Kernel Mean Embeddings for Automatic Likelihood-Free Inference}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2019},
  url = {https://openreview.net/forum?id=CODjiU6aUSY},
}
Figure