Publications · Conference

Bayesian Likelihood Free Inference using Mixtures of Experts

Hien Duy Nguyen, TrungTin Nguyen, Florence Forbes

IJCNN 2024 · IEEE IJCNN 2024. 2024 International Joint Conference on Neural Networks (IEEE WCCI), Yokohama, Japan.

Abstract

We extend Bayesian Synthetic Likelihood (BSL) methods to non-Gaussian approximations of the likelihood function. In this setting, we introduce Mixtures of Experts (MoEs), a class of neural network models, as surrogate likelihoods that exhibit desirable approximation theoretic properties. Moreover, MoEs can be estimated using Expectation–Maximization algorithm-based approaches, such as the Gaussian Locally Linear Mapping model estimators that we implement. Further, we provide theoretical evidence towards the ability of our procedure to estimate and approximate a wide range of likelihood functions. Through simulations, we demonstrate the superiority of our approach over existing BSL variants in terms of both posterior approximation accuracy and computational efficiency.

Index Terms: Likelihood Free Inference, Bayesian Synthetic Likelihood, Mixture of Experts, Gaussian Locally Linear Mapping

1 Introduction

Likelihood-free inference, or simulation-based inference, entails estimation of parameters 𝜽 of a stochastic model without a feasible likelihood function. However, we assume the ability to simulate observations given known parameters. This study takes a Bayesian stance, where we aim to estimate posterior parameter distributions.

In this work, we concentrate on methods that utilize surrogate parametric models in place of an intractable likelihoods. Specifically, we study the class of methods generally called Synthetic likelihood (SL) procedures. These methods provide estimates of likelihood functions that are then used as inputs for a sampling procedure, such as a Markov chain Monte Carlo (MCMC) scheme, to estimate the posterior distribution. Bayesian Synthetic Likelihood (BSL) approaches Price et al. (2018) have, in the past, been investigated as Bayesian extensions of the SL approach of Wood (2010). SL is typically characterized by a Gaussian assumption, while more general formulations are studied under the parametric Bayesian indirect likelihood (pBIL) framework, which includes a number of variants Drovandi et al. (2014). For comparisons with our approaches, we focus on the variants implemented in the BSL package in R An et al. (2019a).

The typical approach of BSL methods is to approximate the intractable likelihood by a multivariate Gaussian distribution whose mean and covariance parameters depend on 𝜽 and are estimated pointwise for each value of 𝜽 via the empirical mean and covariance estimators of a sample of m independent and identically distributed (i.i.d.) summary statistics, simulated from the underlying likelihood, respectively (cf. Wood (2010); Price et al. (2018)).

For good performance, the number of simulations m should not be too small, and evidence suggests that, in practice, the ideal m increases as the dimension of the summary statistics grows Price et al. (2018). Various approaches have been explored to decrease the required number of simulations, such as sparse techniques An et al. (2019b) and shrinkage techniques Ong et al. (2018); Priddle et al. (2022), which aim to diminish the number of parameters necessary for estimating the covariance matrix. Additionally, the uBSL approach of Price et al. (2018) consider unbiased estimation of the normal density functional rather than its mean and covariance parameters. A Semi-parametric variant, semiBSL, has also been suggested to provide robustness when likelihoods are non-Gaussian An et al. (2020).

In Frazier and Drovandi (2021), two other variants are considered, referred to as missBSL. They aim to estimate the Gaussian synthetic likelihood in a more robust manner, to account for incompatibilities between model and summary choice, i.e., model misspecification. The first approach, denoted as missBSLmean, augments the mean of the simulated summaries with additional free parameters, while the second approach, missBSLvar, augments the variance with free parameters, instead.

For all described BSL alternatives, above, an MCMC scheme is required to carry out the posterior inference. Therefore, if I evaluations of the likelihood are needed in the subsequent MCMC algorithm, it is necessary to simulate I values of 𝜽 according to the prior and then simulate I×m values of observations due to the pointwise construction of the SL estimators. For large I and m, this can be overly costly. The solution we investigate is based on Mixture of Experts (MoE), a class of neural network models Nguyen and Chamroukhi (2018); Yuksel et al. (2012), using the so-called Gaussian Locally Linear Mapping model (GLLiM; Deleforge et al. (2015); Xu et al. (1995)) estimator. Our approach has the advantage to both reduce the number of simulations and depart from Gaussianity assumptions. Additionally, it allows us to exploit recent approximation and estimation theoretic results regarding MoEs Nguyen et al. (2019, 2021, 2024, 2023a, 2023b) to establish desirable theoretical results. These results fill a gap in the BSL literature, where there is a lack of theory based on mild and easily checkable assumptions that allow for guarantees in the relationship between the estimated BSL posterior and the target posterior measures.

2 Bayesian synthetic likelihood

Let (Ω,𝔉,) be a probability space. We observe data 𝐗n=(𝑿i)i[n], where [n]={1,,n} and 𝑿i:Ω𝕏 is a random variable taking value in the measurable space (𝕏,𝔛), for each i[n]. We can thus endow 𝐗n with the push-forward probability space (𝕏n,𝔛n,n). Further define the parameter space (𝕋,𝔗), with typical element 𝜽, and equip it with the prior measure Π:𝔗[0,1]. In classical Bayesian inference (see e.g., Robert (2007) and Watanabe (2018)), one assumes that (𝜽,𝑿1,,𝑿n) has joint measure (𝕋×𝕏n,𝔗𝔛n,n), where nλ for some dominating measure λ (e.g. Lebesgue or counting measures), where, for each 𝔸𝔗𝔛n:

n(𝔸)=𝔸fn(𝐱n|𝜽)π(𝜽)λ(d𝜽×d𝐱n).

We typically call fn:𝕏n×𝕋0 the likelihood function, with the property that 𝕏nfn(𝐱n|𝜽)λ(d𝐱n)=1, for each 𝜽𝕋, and where π:𝕋0 is the density of the prior measure Π, with respect to λ. The target of Bayesian inference is to either provide an expression for the posterior measure Π(|𝐱n):𝔗[0,1], characterized by integration with respect to the posterior density π(𝜽|𝐱n)fn(𝐱n|𝜽)π(𝜽) or to construct Monte Carlo estimators for integrals with respect to Π(|𝐱n).

2.1 BSL original and variants

Most Bayesian approaches require a closed-form expression for fn and cannot be used in the likelihood-free setting. In the BSL setting, fn can be intractable but we assume that we can simulate i.i.d. samples: (𝐱n1,,𝐱nm) from fn(|𝜽)dλ for any 𝜽𝕋. The goal is then to estimate some tractable replacement for the likelihood function: gn(𝜼()|𝜽):𝕏n0, with dgn(𝜼|𝜽)λ(d𝜼)=1, for 𝜽𝕋 and a summary statistic 𝜼:𝕏nd. In particular, the approach of Price et al. (2018) suggests to replace, for a given 𝐱n and 𝜽, the likelihood by

gn,m(𝜼(𝐱n)|𝜽)=𝔼[𝒩d(𝜼(𝐱n);𝝁((𝐗nk)k[m]),𝚺((𝐗nk)k[m]))|𝜽] (1)

where the expectation is taken over the (𝐗nk)k[m] which, conditionally on 𝜽, are i.i.d. from fn(|𝜽)dλ, and where

𝝁n=𝝁((𝐱nk)k[m]) =1mk=1m𝜼(𝐱nk), (2)
𝚺n=𝚺((𝐱nk)k[m]) =1mk=1m𝜼(𝐱nk)𝜼(𝐱nk)
1m𝝁((𝐱nk)k[m])𝝁((𝐱nk)k[m]) (3)

and 𝒩d(;𝝁,𝚺) is the d-dimensional normal density function, with mean 𝝁d and positive definite covariance 𝚺d×d. In practice, for a given 𝐱n and 𝜽, the expectation (1) is generally replaced by an unbiased estimator

g^n,m(𝜼(𝐱n)|𝜽)=𝒩d(𝜼(𝐱n);𝝁((𝐱nk)k[m]),𝚺((𝐱nk)k[m])) (4)

obtained by considering a single draw (𝐱nk)k[m].

Variations on this construction have been proposed, for example, by An et al. (2020) and Frazier and Drovandi (2021). In An et al. (2020) the authors propose to replace 𝒩d(𝜼(𝐱n);𝝁n,𝚺n), in (1), by a copula transformation of a marginal kernel density estimator, leading to the semiBSL. In Frazier and Drovandi (2021), the authors introduce a prior on an additional free parameter that improves robustness to misspecification of choice of summary statistic 𝜼, leading to the missBSL approach. Further refinements have subsequently been considered by Frazier et al. (2022), where the covariance estimator (3) is replaced by more general classes of covariance estimators.

2.2 Theoretical insights of BSL

It is noteworthy that a number of theoretical results have been proved with respect to the described BSL algorithms. Firstly, for fixed 𝐱n, Drovandi et al. (2014) proved a weak consistency result regarding the approximate posterior measure defined by density

gm(𝜽|𝐱n)gn,m(𝜼(𝐱n)|𝜽)π(𝜽)

to a limiting posterior measure defined by

g(𝜽|𝐱n)gn(𝜼(𝐱n)|𝜽)π(𝜽),

where, gn(𝜼(𝐱n)|𝜽)=𝒩d(𝜼(𝐱n);𝝁(𝜽),𝚺(𝜽)), under the condition that

𝝁((𝐗nk)k[m])m𝝁(𝜽), and 
𝚺((𝐗nk)k[m])m𝚺(𝜽),

in measure fn(|𝜽)dλ, along with uniform integrability assumptions on the sequences of measures (gn,m(|𝐱n)dλ)m and densities

(𝒩d(𝜼(𝐱n);𝝁((𝐗nk)k[m]),𝚺((𝐗nk)k[m])))m.

We note that these results only say that gm(|𝐱n) converges to some g(|𝐱n), as m, but provide no intuition regarding the form of g(|𝐱n), nor how it relates to the target: π(|𝐱n). However, it justifies the use in practice of estimator g^n,m(𝜼(𝐱n)|𝜽) of the form (4) with m as large as possible. Consequently, when a large number I of 𝜽 values are considered, the number of required simulations I×m can be very large.

Stronger results were obtained by Frazier et al. (2022), who required stricter conditions, to prove Bernstein–von Mises-type normal limit theorems for the class of covariance estimator-adjusted BSL techniques. For instance, the authors assume a central limit theorem with respect to the summary 𝜼(𝐗n) and its limit 𝜼0, for some 𝜽0d. They further assume that there is a mapping 𝜽𝜼¯(𝜽), for which 𝜼¯(𝜽0)=𝜼0, uniquely for some 𝜽0𝕋, and further that 𝜼¯ is differentiable with full-rank Jacobian in a neighbourhood of 𝜽0. The covariance matrix estimator is further assumed to satisfy a uniform law of large numbers, under appropriate scaling, and the moment generating function of the scaled difference between 𝜼(𝐗n) and 𝜼0, which admits a central limit theorem, also has sub-Gaussian tails for sufficiently large n. Under these assumptions, the BSL posterior density estimator obtained using covariance estimators that satisfy the regularity conditions will converge, in probability, to a normal density function, in the total variation topology, as both n and m approach infinity. This can better be interpreted as the convergence in distribution of an appropriately scaling of the posterior mean, 𝐗n𝕋𝜽gm(𝜽|𝐗n)λ(d𝜽), to a normal random variable.

Notice that these assumptions are difficult to intuit and to verify for many sufficiently complex practical scenarios, and can be violated in simple cases. For example, one cannot use summary statistics such as M-estimator solutions van de Geer (2000), where the extrema are unidentifiable (see, e.g., (Shapiro et al., 2021, Sec. 5.1)); nor U- and V-statistics defined by degenerate kernels (Korolyuk and Borovskich, 2013, Ch. 4).

3 BSL via mixture of experts

3.1 Surrogate likelihoods via mixture of experts

As with the BSL methods described above, we seek to approximate the likelihood fn(𝐱n|𝜽) in some form, when 𝕋p, for some p. Namely, given a choice of summary statistic 𝜼:𝕏nd, we consider the classes of MoEs with normal experts and Gaussian gating (cf. Jacobs et al. (1991); Xu et al. (1995); Nguyen and Chamroukhi (2018)). The main reason for this choice is that the maximum conditional likelihood estimator (MCLE) is well approximated by the computationally more convenient GLLiM model estimator of Deleforge et al. (2015). Mutatis mutandis, the same results can be obtained for the softmax gating function via the equivalence between two classes (cf. (Nguyen et al., 2021, Lem. 1)). Writing 𝜼n=𝜼(𝐱n), our likelihood approximators take the form (𝜼n,𝜽)hn,K(𝜼n|𝜽)K, where K is the number of mixture components, and

K={hK:d×𝕋:hK(𝜼|𝜽)=k=1Kγk(𝜽;𝝍K)𝒩d(𝜼;𝒃k+𝑨k𝜽,𝚺k)} (5)

with 𝒃kd, 𝑨kd×p, and 𝚺k𝒮d+ (the positive definite matrices in d×d), for each k[K]. Further, we take the sequence of gating functions 𝜸K(;𝝍K)=(γk(;𝝍K))k[K] in the set of Gaussian gating functions:

𝒢K={𝜸K(;𝝍K):γk(𝜽;𝝍K)=πk𝒩p(𝜽;𝒄k,𝚪k)l=1Kπl𝒩p(𝜽;𝒄l,𝚪l)k[K]},

where 𝒄kp, 𝚪k𝒮p+, and πk[0,1], for each k[K], with k=1Kπk=1. We denote 𝝍K=(πk,𝒄k,𝚪k)k[K], and 𝝌K=(𝒃k,𝑨k,𝚺k)k[K]. Then we assume that 𝚿K=(𝝍K,𝝌K)𝒳, for some domain 𝒳 satisfying the parameter space restrictions, above.

For a fixed 𝚿K, a mixture in K can be seen as a function of 𝜽. The idea is then to learn an estimate of 𝚿K so that the corresponding mixture is a good approximation of the likelihood for every 𝜽.

3.2 Approximation capacities

The approximation of the likelihood by a function in K is appealing for a number of reasons. Recall that gn(𝜼n|𝜽) denotes the pushforward likelihood of 𝜼n=𝜼(𝐗n), based on fn(𝐱n|𝜽). Then, on every compact subset 𝕂𝕋, as long as gn(𝜼n;) is continuous on 𝕋, for every ϵ>0, there exists a sufficiently large K and hn,K(𝜼n|𝜽)K, such that the conditional expectations according to gn(𝜼n|𝜽) and hn,K(𝜼n|𝜽) are uniformly close Nguyen et al. (2019):

sup𝜽𝕂|d𝜼n{gn(𝜼n|𝜽)hn,K(𝜼n|𝜽)}λ(d𝜼n)|<ϵ.

This implies that we can approximate the mean of any pushforward likelihood arbitrarily well using an approximation in K, for sufficiently large K. Further, on any compact sets d and 𝕂𝕋, if gn is a density on for each fixed 𝜽𝕂, and if gn is continuous on ×𝕂, then, by (Nguyen et al., 2021, Thm. 1), for each q[1,) and ϵ>0, there exists a hn,K(𝜼n|𝜽)K such that

{×𝕂|gn(𝜼n|𝜽)hn,K(𝜼n|𝜽)|qλ(d𝜼n×d𝜽)}1/q<ϵ.

Thus, not only is the mean of hn,K(𝜼n|𝜽) close to its target, but if the target is compactly supported, then hn,K(𝜼n|𝜽) will be close to its target conditional density in any q-norm as well.

3.3 Posterior consistency

In Bayesian settings, the subsequent step is to consider the posterior distribution induced by the likelihood approximation. For fixed, K, we first wish to estimate the parameter 𝚿K that determines the optimal hn,K=hn,K(|;𝚿k), where we now make the dependence on 𝚿K explicit. More specifically, using N simulated i.i.d. samples 𝐘N=((𝜽j,𝐗n,j))j[N] from the joint measure n capturing the likelihood information, we consider the MCLE of 𝚿K :

𝚿^K,N=argmax𝚿K1Nj=1Nloghn,K(𝜼(𝐗n,j)|𝜽j;𝚿K), (6)

and parameters 𝚿K minimizing the Kullback–Leibler divergence between gn and mixtures in K (cf. (White, 1996, Ch. 21)):

min𝚿K𝔼n[log{gn(𝜼(𝐗n)|𝜽)hn,K(𝜼(𝐗n)|𝜽;𝚿K)}]=𝔼n[log{gn(𝜼(𝐗n)|𝜽)hn,K(𝜼(𝐗n)|𝜽;𝚿K)}].

For each parameter 𝚿K, we then define the posterior measure corresponding to hn,K(𝜼(𝐱n)|𝜽;𝚿K) via the density

hn,K(𝜽|𝐱n;𝚿K)hn,K(𝜼(𝐱n)|𝜽;𝚿K)π(𝜽).

and show the following convergence result.

Theorem 1 (Posterior consistency).

Assume that 𝛈(𝐗n) and 𝛉 have finite second moments with respect to n and 𝒳 is compact. Then, if Φ is compact and (𝚿^K,N)N is a convergent sequence, the posterior measures defined by (𝚿^K,N)N converge in total variation, almost surely, to the posterior measure defined by 𝚿K, in the sense that, for each 𝐱n𝕏n,

𝕋|hn,K(𝜽|𝐱n;𝚿^K,N)hn,K(𝜽|𝐱n;𝚿K)|λ(d𝜽)N[]0

for almost every (𝐘N)N.

The proof of Theorem 1 is given in the Appendix.

3.4 Fast convergence rates

Note that not only is the MoE approximation of the likelihood and posterior consistency attractive, but we can also obtain near-optimal convergence estimation rates via Theorem 2, which is proved in the Appendix. We specialize to the well-specified case, where the generative measure n has conditional density in K, denoted as hn,K0(|;𝚿0K0) with K0 number of mixture components, where K0K. For each 𝜽𝕋, we define the Hellinger distance, denoted by He(,), as follows:

He(hn,K(|𝜽;𝚿^K,N),hn,K0(|𝜽;𝚿0K0))
=[12𝒳(hn,K(𝜼n|𝜽;𝚿^K,N)
hn,K0(𝜼n|𝜽;𝚿0K0))2×λ(d𝜼n)]1/2.
Theorem 2 (Conditional density estimation).

Assume that ((𝛉j,𝐗n,j))j[N] are sampled i.i.d from generative joint measure n. Assume that 𝒳 is compact and 𝕋 is bounded. Given 𝚿^K,N defined in (6), the corresponding conditional density function hn,K(|;𝚿^K,N) admits the convergence rate of order O((logN/N)1/2) under the Hellinger distance in the sense that:

(𝔼Π[He(hn,K(|𝜽;𝚿^K,N),hn,K0(|𝜽;𝚿0K0))]
>C1(logN/N)1/2)C2NC3,

where C1,C2 and C3 are universal positive constants.

4 Numerical illustrations

4.1 Surrogate MoE likelihoods via GLLiM

For our numerical illustration, we use the GLLiM estimator of Deleforge et al. (2015). GLLiM has been used previously in Forbes et al. (2022) to provide surrogate posterior estimators. In our current setting, it is the likelihood that we approximate as an MoE:

hn,K(𝜼n|𝜽;𝚿K)=k=1Kγk(𝜽;𝝍K)𝒩d(𝜼n;𝒃k+𝑨k𝜽,𝚺k) (7)

with n=1 and 𝜼n(𝐗n)=𝐗 in each of our examples.

In the pBIL framework and notation of Drovandi et al. (2014), we thus have an auxiliary model hn,K, which can be viewed as a mixture of K Gaussian densities with parameters

Φ(𝜽;𝚿K) = ((γk(𝜽;𝝍K),𝒃k+𝑨k𝜽,𝚺k))k[K]. (8)

Specifically, Φ(𝜽,𝚿K) is now a parametric function of 𝜽 that depends on 𝚿K and specifies the proportions, means and covariance matrices of the K components. To define the mapping Φ, we only need an estimate of 𝚿K. The parameter 𝚿K can be estimated, from 𝐘N=((𝜽j,𝐗n,j))j[N], using a GLLiM model estimator 𝚿¯K,N, computed via a standard Expectation–Maximization (EM) algorithm. Details of the estimation procedure appears in Deleforge et al. (2015). Note that in contrast to BSL approaches such as (4), the estimation in not pointwise in 𝜽 and we can take m=1. Once we have computed 𝚿¯K,N, no further simulations are required. That is, 𝚿K can be estimated using only the size N simulation: 𝐘N, with N fixed and independent of the required number of MCMC iterations, leading to an amortized procedure. In the sequel, we will referred to our approach, using GLLiM model estimated MoE for BSL, as GLLiM-BSL.

4.2 Posterior samples

To sample from the posterior measure, BSL procedures use an estimation of the likelihood, plugged into an MCMC algorithm. In the BSL package An et al. (2019a), the default MCMC scheme is a Random Walk Metropolis Hastings (RW MH) algorithm, as provided by the mcmc package Geyer and Jonhson (2020). The covariance matrix of the Gaussian proposal is set to s𝑰, where s>0 is a scale parameter that has to be carefully chosen and 𝑰 is the identity matrix. For GLLiM-BSL, we also test a Slice Sampler (SS) Neal (2003) and a Metropolis Hastings scheme, using the GLLiM approximation of the posterior as a proposal distribution (G MH). These two latter choices have the advantage of not requiring tuning. For all MCMC schemes, we perform 3×105 iterations, with a burnin of 2×105 and a 1-in-100 sample thinning, resulting in a sample of 1000 𝜽 values.

An MoE is learned on a sample 𝐘N of size N=105, obtained by simulating parameters from the prior and underlying measure defined by fn, using a GLLiM estimator. The Bayesian information criterion (BIC) is used to choose the number of mixture components K. Once estimated with the selected K, the MoE provides an approximation of the likelihood which is used together with one of the aforementioned MCMC schemes. The whole procedure used for posterior sampling with GLLiM-BSL is summarized in Algorithm 1.

Algorithm 1 Sampling from π(𝜽|𝒙n) with GLLiM-BSL
1:  Simulate 𝐘N=((𝜽j,𝐗n,j))j[N] from the joint n
2:  Set MoE component number K to the BIC minimizer
3:  Learn 𝚿^K,N (6) from 𝐘N using GLLiM
4:  Use as surrogate likelihood hn,K(𝒙n|𝜽;𝚿^K,N) in (7)
5:  [Optional] Get GLLiM posterior hn,K(𝜽|𝒙n;𝚿^K,N)
6:  Simulate posterior samples from an MCMC procedure using the prior, the surrogate likelihood (RW MH or SS) and [optional] GLLiM posterior as a proposal (G MH)

For comparison, we also use the GLLiM approximation of the posterior measure to directly generate a sample of size 1000, as per Forbes et al. (2022). This does not require any MCMC scheme. These direct GLLiM-based samples are then compared with samples resulting from various BSL procedures from the BSL package: BSL, semiBSL, missBSLmean, missBSLvar and uBSL; see An et al. (2019a) for details. We limit to visual comparison as it is enough to illustrate the improvement obtained by our method. There exists quantitative criteria for comparing samples, such as distances between samples (e.g. Wasserstein, energy distances etc.), 2-sample tests, etc. Lueckmann et al. (2021). However, they provide highly volatile and inconsistent rankings between methods that are inconsistent with visual diagnoses. The development of quality assessment tools in likelihood free settings is actually an open question. It is a promising direction for future research that falls outside the scope of this paper.

4.3 Two moons example

The two moons model corresponds to a simulator that, given some parameters 𝜽=(θ1,θ2)2, produces an observation 𝑿2 via the scheme: 𝑿=𝑷+12(|θ1+θ2|,θ1+θ2), with 𝑷=[Rcos(U)+0.22,Rsin(U)] and U𝒰(π/2,π/2)R𝒩(0.1,0.012), where 𝒰 is the uniform distribution. We adopt the same setting as in Greenberg et al. (2019). Variable P follow a single crescent-shaped distribution, which is subsequently shifted and rotated around the origin, depending on 𝜽. The absolute value |θ1+θ2| gives rise to the second crescent in the posterior. The prior is uniform over [1,1]2 and the observed data is set to 𝒙=(0,0). The likelihood cannot be expressed explicitly but Figure 1 (a) shows 1000 simulations for 𝜽=(0.5,0.75), which clearly exhibit a non-Gaussian shape. A sample obtained from the GLLiM approximation of the likelihood, with K=49 Gaussian components, is shown in Figure 1 (b), for comparison. The approximation is quite good, with a few extra outliers visible on the right indicating that some of the components are located there, but with low weight. The true posterior measure is made of two moon-like parts, see e.g. Greenberg et al. (2019) and Figure 2 (a).

Refer to caption
Refer to caption
Figure 1: Data 𝑿 generated from the Two Moons example for 𝜽=(0.5,0.75). Samples of size 1000 from (a) the 2 moons simulator and from (b) the GLLiM likelihood estimation with K=49 Gaussian components.

The GLLiM model is estimated using simulations 𝐘N. Selecting from K=2 to 50, the smallest BIC was obtained for K=49. Figure 2 shows the different obtained samples. In this example, only the RW MH algorithm is tested as a MCMC scheme. We note that the uBSL variant from the BSL package exhibited a runtime error in this particular example and, as a result, was not used.

All methods identify the bimodality of the posterior distribution, but the BSL methods do not correctly recover the local structure of the two parts. In contrast, GLLiM-BSL provides a good representation of the posterior mass and moon structures. Among GLLiM-based procedures, the two moons were slightly better recovered with GLLiM-BSL than with the direct GLLiM posterior approximation. Table 1 shows the computing times obtained on a laptop (MacBook Pro, 2.4 GHz Quad-Core Intel Core i5) using the mentioned CRAN packages, and additional basic R code with no resorting to parallel computing. For the low dimensions of this example, i.e., d=p=2, the computing times were always less for GLLiM-based procedures, but not significantly so. However, the amortization nature of the GLLiM solution becomes an advantage in higher-dimensional problems, as seen in the following example.

Refer to captionRefer to captionRefer to caption(a) GLLiM Posterior(b) GLLiM-BSL(c) BSLRefer to captionRefer to captionRefer to caption(d) semiBSL(e) missBSLmean(f) missBSLvar

Figure 2: Two moons example. Plots are zoomed in on [0.6,0.6]2. Plots (a) and (b): GLLiM posterior and GLLiM-BSL samples for K=49. Plots (c) to (f): BSL variants, respectively BSL, semiBSL, missBSLmean and missBSLvar. The MCMC scheme is a random walk Metropolis Hastings algorithm.

4.4 Hyperboloids example

This example was introduced in Forbes et al. (2022) and exhibits a posterior distribution whose mass is located on 4 hyperboloids, as illustrated in Figure 3 (a). The GLLiM estimator was used to produce an MoE with K=38 mixture components, as selected by BIC. The GLLiM-based likelihood was used with an RW MH algorithm to make comparisons with the standard BSL procedures. We also considered SS and G MH. In G MH, the variance of the GLLiM posterior was multiplied by 2 to avoid the proposal distribution being too narrow. The acceptance rate was 60% for G MH vs 16% for RW MH.

As depicted in Figure 3, although the posterior is far from being unimodal, some of the standard BSL variants (semiBSL and missBSL) succeed in capturing it satisfactorily compared to the previous example. This is likely due to the fact that the likelihood is simpler here, being a mixture of two Student distributions. Figure 3 shows the best results, obtained with GLLiM-BSL (c,d) and semiBSL (f). GLLiM approximations (Figure 3 (b,c,d)) appear to be better at capturing the hyperboloid branches, while some of the BSL variants (f,g,h), are more precise in the center with an obvious excess mass at the intersections of the branches. To complement this visual comparison, we also show the posterior marginals in Figure 4. The marginal plots allow us to better visualize the difference with standard BSL procedures. Refer to Figure 4 (f-j), which all show larger deviations from the truth, determined by numerical integration. Both true posterior marginals are the same due to symmetry in the model formulation and exhibit a non-smooth shape, which has also been double-checked using a long run of 3×105 iterations of the SS algorithm; see Figure 4 (a). For GLLiM-BSL, among the three MCMC schemes, it appears that the SS version in Figure 4 (d) provides more satisfactory samples than the MH versions (c, e). The gain over the direct GLLiM posterior sample (b) is also clearer. Computing times are reported in Table 1. For the larger dimensional example (d=10), GLLiM methods take much less time than standard BSL, even when considering BIC and learning times.

Refer to captionRefer to captionRefer to captionRefer to caption(a): RW MH(b): GLLiM posterior(c): G-BSL RW MH(d): G MHRefer to captionRefer to captionRefer to captionRefer to captionRefer to caption(e): BSL(f): semiBSL(g): missBSLmean(h): missBSLvar(i): uBSL

Figure 3: Hyperboloid example. Plot (a): reference Metropolis Hastings (RW MH) sample. Plots (b,c,d): GLLiM posterior, GLLiM-BSL (RW MH and G MH) samples for K=38. Plots (e) to (i): BSL variants with RW MH, respectively BSL, semiBSL, missBSLmean, missBSLvar, uBSL.

Refer to captionRefer to captionRefer to captionRefer to captionRefer to caption(a): True marginal(b): GLLiM posterior(c): G-BSL RW MH(d): G-BSL SS(e): G MHRefer to captionRefer to captionRefer to captionRefer to captionRefer to caption(f): BSL(g): semiBSL(h):missBSLmean(i): missBSLvar(j): uBSL

Figure 4: Hyperboloid posterior marginals. Plot (a): true marginal and slice sampler (SS) histogram. Plot (b): GLLiM posterior. Plots (c,d,e): GLLiM-BSL resp. with RW MH, SS and GLLiM posterior proposal (G MH). Plots (f) to (j): BSL variants, respectively BSL, semiBSL, missBSLmean, missBSLvar, uBSL.
Table 1: Settings and computation times for the 2 examples and various procedures.
Example Procedure MCMC p d K N m BIC GLLiM 3105 iterations R Package(s)
2 Moons GLLiM BSL RW MH 2 2 49 105 - 1h 28min 3min 6s 12min 30s xLLiM, mcmc
GLLiM post - 2 2 49 105 - 1h 28min 3min 6s - xLLiM
BSL RW MH 2 2 - - 500 - - 23min 39s BSL
semiBSL RW MH 2 2 - - 500 - - 33min 40s BSL
missBSLmean RW MH 2 2 - - 500 - - 30min 21s BSL
missBSLvar RW MH 2 2 - - 500 - - 29min 14s BSL
Hyperboloids GLLiM BSL RW MH 2 10 38 105 - 1h 43min 4min 47s 43min 20s xLLiM, mcmc
GLLiM BSL SS 2 10 38 105 - 1h 43min 4min 47s 2h 35min xLLiM, diversitree
GLLiM BSL G MH 2 10 38 105 - 1h 43min 4min 47s 46min 28s xLLiM
GLLiM post - 2 10 38 105 - 1h 43min 4min 47s - xLLiM
BSL RW MH 2 10 - - 500 - - 4h 19min BSL, mcmc
semiBSL RW MH 2 10 - - 500 - - 4h 49min BSL, mcmc
missBSLmean RW MH 2 10 - - 500 - - 4h 49min BSL, mcmc
missBSLvar RW MH 2 10 - - 500 - - 4h 34min BSL, mcmc
uBSL RW MH 2 10 - - 500 - - 4h 10min BSL, mcmc

N is the number of samples used to learn a MoE and m is the number of simulations at each BSL iteration. The BIC column indicates the learning time for all GLLiM models between K=2 and some Kmax, while the GLLiM column shows the time for the selected K indicated under column K. The second last column shows times for 3×105 MCMC iterations. The CRAN packages used are indicated in the last column.

5 Conclusion

MoE approaches provide several advantages over previous BSL variants. The flexibility of the model allows for better approximations of likelihoods that strongly depart from Gaussianity. In particular, GLLiM model estimators have interesting amortization properties. GLLiM-based procedures can be applied in a wide variety of settings, such as sets of i.i.d. observations or time series, as illustrated in Forbes et al. (2022).To the best of our knowledge, we are the first to demonstrate approximation and estimation theoretical properties of MoEs in this setting.

6 Appendix

Proof of Theorem 1.

By the uniform strong law of large numbers (Shapiro et al., 2021, Thm. 9.60),

sup𝚿K𝒳|N1j=1Nloghn,K(𝜼(𝐗n,j)|𝜽j;𝚿K)𝔼n[loghn,K(𝜼(𝐗n,j)|𝜽j;𝚿K)]|N[]a.s.0

under the assumptions that 𝜼(𝐗n) and 𝜽 have finite second moments with respect to n, and compact 𝒳. By (Shapiro et al., 2021, Thm. 5.3), this implies that since (𝚿^K,N)N is convergent and conditional likelihood maximizing, i.e., 𝚿^K,NN[]𝚿K for almost every (𝒀N)N, for some Kullback–Leibler divergence minimizing 𝚿K. Then, on this almost sure event, the continuity of hn,K(𝜼(𝐱n)|𝜽;) implies that

hn,K(𝜼(𝐱n)|𝜽;𝚿^K,N)hn,K(𝜼(𝐱n)|𝜽;𝚿K)

for every fixed 𝐱n and 𝜽. It suffices to show that on the event,

𝕋hn,K(𝜼(𝐱n)|𝜽;𝚿^K,N)π(𝜽)λ(d𝜽)N𝕋hn,K(𝜼(𝐱n)|𝜽;𝚿K)π(𝜽)λ(d𝜽),

which follows from the dominated convergence theorem by noticing that, for each fixed 𝐱n and 𝚿K,

|hn,K(𝜼(𝐱n)|𝜽;𝚿K)π(𝜽)|Cπ(𝜽)

for some C< and 𝕋π(𝜽)λ(d𝜽)=1. We obtain our desired conclusion by Scheffe’s theorem (Van der Vaart, 2000, Cor. 2.30). ∎

Proof of Theorem 2.

It is convenient to index the true conditional density hn,K0(|;𝚿0K0) as hG0(|;𝚿0K0), by the discrete mixing measure on the parameters as follows: G0=k=1K0π0kδ(𝒄0k,𝚪0k,𝑨0k,𝒃0k,𝚺0k) where δ(𝒄0k,𝚪0k,𝑨0k,𝒃0k,𝚺0k) is the Dirac measure indexing the atom (𝒄0k,𝚪0k,𝑨0k,𝒃0k,𝚺0k), for each k[K0]. Here we denote the space of measures with at least K0 atoms by 𝒪K, which equals:
{G=k=1K¯πkδ(𝒄k,𝚪k,𝑨k,𝒃k,𝚺k):K¯[K]KK0}. Note that for any K0K, 𝒪K can be defined equivalently as K={hG(𝜼|𝜽):G𝒪K} and write 𝒬1/2K={h1/2(G+G0)/2(𝜼|𝜽):G𝒪K}. Then, we define the Hellinger ball centered around the conditional density hG0(𝜼|𝜽) and intersected with the set 𝒬1/2K by 𝒬1/2K(γ)={g1/2𝒬1/2K:He(g,hG0)γ}. Following the framework from van de Geer (2000), we introduce the following quantity to capture the size of the above Hellinger ball:

𝒥B(γ,𝒬1/2K) =[γ2/213γH1/2B(u,𝒬1/2K(u),)λ(du)]γ. (9)

Here, HB1/2(u,𝒬K1/2(u),) denotes the bracketing entropy of 𝒬K1/2(u) under the Euclidean distance, and uγ=max{u,γ}. Next, we introduce the upper bounds of the covering number (under the sup norm ), N(ϵ,K,), and the bracketing entropy (under the Hellinger distance) HB(ϵ,K,He) of the metric space K. Note that by using the definition of the spaces 𝒬1/2K and K and the relationship between and He, for any u>0, it holds that

H1/2B(u,𝒬1/2K(u),)H1/2B(u,K,He). (10)

Then (9) implies that 𝒥B(γ,𝒬1/2K) is upper bounbed by

γ2/213γH1/2B(u,K,He)λ(du)γ
γ2/213γlog(1/u)λ(du)γT(γ). (11)

The first inequality follows from Lemmas 4.3 and 4.6 in Nguyen et al. (2022) while the second is obtained with T(γ)=γ[log(1/γ)]1/2 and that T(γ)/γ2 is a non-increasing function of γ. Finally, let γN=log(N)/N, then NγN2CT(γN) holds for some universal constant C. This leads to the desired convergence rate thanks to Lemma 1. The proof of Lemma 1 for the conditional density estimation rate is similar to Theorem 7.4 in van de Geer (2000) for joint densities and is not presented here.

Lemma 1 (Theorem 7.4 in van de Geer (2000)).

Take T(γ)𝒥B(γ,𝒬K1/2) such that T(γ)/γ2 is a non-increasing function of γ. Then, for a universal constant C and a sequence (γN) that satisfies NγN2CT(γN), for γγN, it holds

(𝔼Π[He(hn,K(|𝜽;𝚿^K,N),hn,K0(|𝜽;𝚿0K0))]>γ)
Cexp(Nγ2C2).

Acknowledgements

All authors acknowledge funding from the Australian Research Council grant DP230100905, and from Inria for Project-Team WOMBAT.

References

  • Z. An, D. J. Nott, and C. Drovandi (2020) Robust Bayesian synthetic likelihood via a semi-parametric approach. Statistics and Computing 30, pp. 543–557. Cited by: §1, §2.1. 1 2.1
  • Z. An, L. F. South, and C. Drovandi (2019a) BSL: An R Package for Efficient Parameter Estimation for Simulation-Based Models via Bayesian Synthetic Likelihood. External Links: 1907.10940 Cited by: §1, §4.2, §4.2. 1 4.2
  • Z. An, L. F. South, D. J. Nott, and C. C. Drovandi (2019b) Accelerating Bayesian Synthetic Likelihood With the Graphical Lasso. Journal of Computational and Graphical Statistics, pp. 471–475. Cited by: §1. 1
  • A. Deleforge, F. Forbes, and R. Horaud (2015) High-dimensional regression with Gaussian mixtures and partially-latent response variables. Statistics and Computing 25, pp. 893–911. Cited by: §1, §3.1, §4.1, §4.1. 1 3.1 4.1
  • C. Drovandi, A. Pettitt, and A. Lee (2014) Bayesian indirect inference using a parametric auxiliary model. Statistical Science 30, pp. 72–95. Cited by: §1, §2.2, §4.1. 1 2.2 4.1
  • F. Forbes, H. D. Nguyen, T. T. Nguyen, and J. Arbel (2022) Summary statistics and discrepancy measures for ABC via surrogate posteriors. Statistics and Computing 32. Cited by: §4.1, §4.2, §4.4, §5. 4.1 4.2 4.4 5
  • D. T. Frazier and C. Drovandi (2021) Robust approximate Bayesian inference with synthetic likelihood. Journal of Computational and Graphical Statistics 30, pp. 958–976. Cited by: §1, §2.1. 1 2.1
  • D. T. Frazier, D. J. Nott, C. Drovandi, and R. Kohn (2022) Bayesian inference using synthetic likelihood: asymptotics and adjustments. Journal of the American Statistical Association, pp. 1–12. Cited by: §2.1, §2.2. 2.1 2.2
  • C. J. Geyer and L. T. Jonhson (2020) mcmc: Markov chain Monte Carlo. Note: https://cran.r-project.org/web/packages/mcmc/ Cited by: §4.2. 4.2
  • D. Greenberg, M. Nonnenmacher, and J. Macke (2019) Automatic posterior transformation for likelihood-free inference. In ICML, Cited by: §4.3. 4.3
  • R. A. Jacobs, M. I. Jordan, S. J. Nowlan, and G. E. Hinton (1991) Adaptive mixtures of local experts. Neural computation 3, pp. 79–87. Note: Publisher: MIT Press Cited by: §3.1. 3.1
  • V. S. Korolyuk and Y. V. Borovskich (2013) Theory of U-statistics. Vol. 273, Springer. Cited by: §2.2. 2.2
  • J. Lueckmann, J. Boelts, D. Greenberg, P. Goncalves, and J. Macke (2021) Benchmarking simulation-based inference. In AISTATS, Cited by: §4.2. 4.2
  • R. M. Neal (2003) Slice sampling. The Annals of Statistics 31, pp. 705–767. Cited by: §4.2. 4.2
  • H. D. Nguyen, F. Chamroukhi, and F. Forbes (2019) Approximation results regarding the multiple-output Gaussian gated mixture of linear experts model. Neurocomputing 366, pp. 208–214. Cited by: §1, §3.2. 1 3.2
  • H. D. Nguyen and F. Chamroukhi (2018) Practical and theoretical aspects of mixture-of-experts modeling: an overview. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery 8. Cited by: §1, §3.1. 1 3.1
  • H. D. Nguyen, T. Nguyen, F. Chamroukhi, and G. J. McLachlan (2021) Approximations of conditional probability density functions in Lebesgue spaces via mixture of experts models. Journal of Statistical Distributions and Applications 8, pp. 1–15. Cited by: §1, §3.1, §3.2. 1 3.1 3.2
  • H. Nguyen, P. Akbarian, T. Nguyen, and N. Ho (2023a) A General Theory for Softmax Gating Multinomial Logistic Mixture of Experts. arXiv preprint arXiv:2310.14188. Cited by: §1. 1
  • H. Nguyen, T. Nguyen, and N. Ho (2023b) Demystifying Softmax Gating Function in Gaussian Mixture of Experts. In Thirty-seventh Conference on Neural Information Processing Systems, Cited by: §1. 1
  • H. Nguyen, T. Nguyen, K. Nguyen, and N. Ho (2024) Towards convergence rates for parameter estimation in Gaussian-gated mixture of experts. In AISTATS, Cited by: §1. 1
  • T. Nguyen, H. D. Nguyen, F. Chamroukhi, and F. Forbes (2022) A non-asymptotic approach for model selection via penalization in high-dimensional mixture of experts models. Electronic Journal of Statistics 16, pp. 4742 – 4822. Cited by: §6. 6
  • V. Ong, D. Nott, M. Tran, S. Sisson, and C. Drovandi (2018) Likelihood-free inference in high dimensions with synthetic likelihood. Computational Statistics and Data Analysis 128, pp. . Cited by: §1. 1
  • L. F. Price, C. C. Drovandi, A. Lee, and D. J. Nott (2018) Bayesian synthetic likelihood. Journal of Computational and Graphical Statistics 27, pp. 1–11. Cited by: §1, §1, §1, §2.1. 1 2.1
  • J. W. Priddle, S. A. Sisson, D. T. Frazier, I. Turner, and C. Drovandi (2022) Efficient Bayesian Synthetic Likelihood With Whitening Transformations. Journal of Computational and Graphical Statistics 31, pp. 50–63. External Links: ISSN 1061-8600, 1537-2715 Cited by: §1. 1
  • C. P. Robert (2007) The Bayesian choice: from decision-theoretic foundations to computational implementation. Vol. 2, Springer. Cited by: §2. 2
  • A. Shapiro, D. Dentcheva, and A. Ruszczynski (2021) Lectures on stochastic programming: modeling and theory. SIAM. Cited by: §2.2, §6. 2.2 6
  • S. van de Geer (2000) Empirical Processes in M-estimation. Cambridge University Press. Cited by: §2.2, §6, Lemma 1. 2.2 6
  • A. W. Van der Vaart (2000) Asymptotic statistics. Cambridge University Press. Cited by: §6. 6
  • S. Watanabe (2018) Mathematical theory of bayesian statistics. CRC Press. Cited by: §2. 2
  • H. White (1996) Estimation, inference and specification analysis. Cambridge University press. Cited by: §3.3. 3.3
  • S. N. Wood (2010) Statistical inference for noisy nonlinear ecological dynamic systems. Nature 466, pp. 1102–1104. Cited by: §1, §1. 1
  • L. Xu, M. Jordan, and G. E. Hinton (1995) An Alternative Model for Mixtures of Experts. In NeurIPS, Vol. 7. Cited by: §1, §3.1. 1 3.1
  • S. E. Yuksel, J. N. Wilson, and P. D. Gader (2012) Twenty years of mixture of experts. IEEE transactions on neural networks and learning systems 23, pp. 1177–1193. Cited by: §1. 1

Cite this paper

Please cite the published version. Venue: IJCNN 2024, 2024 International Joint Conference on Neural Networks (IEEE WCCI), Yokohama, Japan. DOI: 10.1109/IJCNN60899.2024.10650052. Official record: IEEE Xplore.

BibTeX
@inproceedings{nguyen2024bayesian,
  title     = {Bayesian Likelihood Free Inference using Mixtures of Experts},
  author    = {Nguyen, Hien Duy and Nguyen, TrungTin and Forbes, Florence},
  booktitle = {2024 International Joint Conference on Neural Networks (IJCNN)},
  year      = {2024}, publisher = {IEEE},
  doi       = {10.1109/IJCNN60899.2024.10650052},
}