Bayesian computation via empirical likelihood
K. L. Mengersen, P. Pudlo, C. P. Robert
Introduction
Bayesian statistical inference cannot easily operate when the likelihood function associated with the data is not entirely known, or cannot be computed in a manageable time, as is the case in most population genetic models (1, 2, 3). The fundamental reason for this difficulty with population genetics is that the statistical model associated with coalescent data needs to integrate over trees of high complexity. Similar computational issues with the likelihood function often occur in hidden Markov and other dynamic models (4). In those settings, traditional approximation tools based on stochastic simulation (5) are unavailable or unreliable. Indeed, the complexity of the latent structure defining the likelihood makes simulation of such structures too unstable to be trusted. Such settings call for alternative and often cruder approximations. The ABC methodology (1, 6) is a popular solution that bypasses the computation of the likelihood function (see (7) and (8) for surveys); (9) validate a conditional version of ABC that applies to hierarchical Bayes models in a wide generality.
The fast and polytomous development of the ABC algorithm is indicated by the rising literature in the domain, at both the methodological and the application levels. For instance, a whole new area of population genetic modelling (10, 8) has been explored thanks to the availability of such methods. However, both practitioners and theoreticians show a reluctance in adopting ABC, as some doubt about the validaty of the method (11, 12, 13). We propose in this paper to supplement the ABC approach with a generic and convergent likelihood approximation called the empirical likelihood that validates the new Bayesian computational technique as a convergent inferential method when the number of observations grows to infinity. The empirical likelihood perspective, introduced by (14), is a robust statistical approach that does not require the specification of the likelihood function. However, while it does not appear to have been used before in the settings that now rely on ABC, this data analysis method also is a broadly (albeit not universally) applicable and often fast approach which approximation differs from the one found in ABC algorithms, even though both are rooted in non-parametric statistics. Therefore, this methodology can be used both as a solution per se and as a benchmark against which to test the ABC output in many cases. This paper introduces the BC algorithm and illustrates its performances on selected representative examples, comparing the outcome with the true posterior density whenever available, and with an ABC approximation (15) otherwise.
Statistical Methods
The primary purpose of the ABC algorithm is to approximate simulation from the centerpiece of Bayesian inference, the posterior distribution , when it cannot be numerically computed but when the distributions corresponding to both the prior and the likelihood can be simulated by manageable computer devices. The original (6) ABC algorithm is as follows: given a sample of observations from the sample space, a sample of parameters is produced by
The parameters of the ABC algorithm are the summary statistic , the distance and the tolerance level . The basic justification of the ABC approximation is that, when using a sufficient statistic , the distribution of the ’s in the output of the algorithm converges to the genuine posterior distribution when goes to zero (16).
In practice, however, the statistic is non-sufficient and at best the approximation then converges to the genuine posterior when goes to zero. This loss of information seems to be a necessary price to pay for the access to computable quantities. Furthermore, as argued below, it can be evaluated against the empirical likelihood approximation when the latter is available. Indeed, this approach does not require an information reduction through the choice of a tolerance zone or of a non-sufficient summary statistic.
2 Empirical likelihood
Owen (14) developed empirical likelihood techniques as a robust alternative to classical likelihood approaches. He demonstrated that, for some categories of statistical models, this approach inherited the convergence properties of standard likelihood at a much lower cost in assumptions about the model (as detailed in SI). While ABC algorithms do require a fully defined and often complex (hence debatable) statistical model, we argue that one should take advantage of the approximation device provided by the empirical likelihood to overcome most of the calibration difficulties encountered by ABC, at least as a convenient benchmark against which to test ABC solutions.
Assume that the dataset is composed of independent replicates of some random vector with density . Rather than defining the likelihood from the density as usual, the empirical likelihood method starts by defining parameters of interest, , as functionals of , for instance as moments of , and it then profiles a non-parametric likelihood. More precisely, given a set of constraints of the form
where the dimension of sets the number of constraints unequivocally defining , the empirical likelihood is defined as
While the convergence of the empirical likelihood is well-established (see SI and (18)), the Bayesian use of empirical likelihoods has been little examined in the past, apart from a Monte Carlo study in (19), and a probabilistic one in (20).
3 BCelel{}_{\text{el}}
The most natural use of the empirical likelihood approximation is to act as if this representation was an exact likelihood, as in (19). Incorporating this perspective into a basic sampler leads to the following algorithm: Algorithm 2: Basic BC sampler
The output of BC is a sample of size of parameters with associated weights, which operate as an importance sampling output (5). Thus, the performance of the algorithm can be evaluated through the effective sample size
which approximates the size of an iid sample with the same variance as the original sample. As shown in (21), this quantity is always between (corresponding to a very poor outcome) and (corresponding to an iid perfect outcome).
Any algorithm that samples from a posterior distribution (e.g., MCMC, Population Monte Carlo, SMC algorithms, see (5)) may instead use the empirical likelihood as a proxy to the exact likelihood. For instance, to speed up the computation in the population genetics model introduced below, we resorted to the adaptive multiple importance sampling (AMIS, (22)) which is easy to parallelize on a multi-core computer. While the original target distribution is and the AMIS algorithm uses several (multivariate) Student’s distributions, denoted (i.e., with three degrees of freedom, centered at mean and with covariance matrix ), as an importance sampling distribution, the algorithm can be adapted to the empirical likelihood in a straightforward manner:
Algorithm 3: BC-AMIS sampler
The output is thus a weighted sample of size .
In contrast with ABC, BC algorithms do not usually require simulations from the sampling model, given that (2) provides a converging and non-parametric approximation of the likelihood function. This feature thus induces very significative improvements in computing time when the production of pseudo-datasets is time consuming, since solving (1) is usually immediate. This is for instance the case in population genetics and the last section of the SI provides an illustration of a huge improvement in comparison with ABC in two experiments described below. However, the improvement in speed may vanish in cases when producing an iid structure connected with the constraint (1) requires simulations from the sampling model, as illustrated by a counter-example for point processes in the SI, BC and ABC then breaking even in terms of computing time. Even though the computing time required by BC is customarily negligible when compared with ABC (or does not induce any extra time as in the point process counter-example), we further caution against opposing both approaches solely based on computing times, since they differ in the approximations they provide to a genuine Bayesian analysis and thus should be used in conjunction.
Using empirical likelihoods means there is no calibration of the many tuning parameters of ABC algorithms; most significantly, the likelihood ratio acts as a natural distance and importance weights produce an implicit and self-defined quantile on the original sample simulated from the prior. Notwithstanding these appealing qualities, BC still requires calibration, in particular in the choices of the parameterization of the sampling distribution and of the corresponding constraints (1) defining the empirical likelihood. Some examples are discussed below. The BC-AMIS sampler also implies computing values of the prior density, up to a constant, which may be an hindrance in peculiar cases.
4 Composite likelihood in population genetics
ABC was first introduced by population geneticists (2, 10, 6) interested in statistical inference about the evolutionary history of species, as no likelihood-based approach existed apart from very rudimentary and hence unrealistic situations. This approach has been used in a number of biological studies (23, 24, 25), most of them including model choice. It is therefore crucial to obtain insights into the validity of such studies, particularly when they have economic, biological or ecological consequences (see, e.g., (26)). This can be achieved in part by running a comparison using BC. Furthermore, given the major gain in computing time, due to the absence of replications of the data, BC can be applied to more complex biological models.
The main caveat when using the empirical likelihood in such settings is selecting a constraint (1) on the parameter of interest: in phylogeography, parameters like divergence dates, effective population sizes, mutation rates, etc., cannot be expressed as moments of the sampling distribution at a given locus. In particular, the data are not iid. However, when considering microsatellite loci with the stepwise mutation model (27) and evolutionary scenarios composed of divergence, we can derive the pairwise composite scores whose zero is the pairwise maximum likelihood estimator. Composite likelihoods have been proved consistent for estimating recombination rates, introducing an approximation of the dependency structure between nearby loci (28, 29, 30, 31). (See also (32) for composite likelihoods used in a likelihood-free setting.)
More specifically, we are approximating the intra-locus likelihood by a product over all pairs of genes in the sample at a given locus. Assuming that denotes the allele of the -th gene in the sample at the -th locus, and that is the vector of parameters, then the so-called pairwise likelihood of the data at the -th locus, namely , is defined by
provide a constraint (1) in every way comparable to the score equations that give the maximum likelihood estimate and which is quite powerful for empirical likelihood derivations ((18), pp. 48–50). Hence the empirical likelihood of the full dataset given is computed with (2) under the (multidimensional) constraint that
where \rho(\theta)=\theta\big{/}\big{(}1+\theta+\sqrt{1+2\theta}\big{)}. If the two genes belong to individuals from demes having diverged at time , then (33)
Results
2 Quantile distributions
Quantile distributions are defined by a closed-form quantile function , and generally have no closed form for the density function. They are of great interest because of their flexibility and the ease with which they can be simulated by a simple inversion of the uniform distribution. A range of methods, including ABC approaches (10), have been proposed for estimation (see SI). We focus here on the four-parameter -and- distribution, defined by its quantile function, denoted and equal to
where is the th standard normal quantile; the parameters and represent location, scale, skewness and kurtosis, respectively and measures the overall asymmetry (34, 35). We evaluated the BC algorithm for estimating this distribution using two values of , two sets of priors and various combinations of and , where is the number of percentiles used as constraints (see details in SI).
Figure 1 illustrates the true and fitted curves and a 95% credible region for the case with and . The corresponding posterior means (standard deviations) for the parameters were , respectively. The choice of sample size and number of constraints did not substantively affect the accuracy of parameter estimates, but the precision was noticeably improved for the larger sample size; see Figures S4, S5, and S6.
The accuracy and precision of the estimates were broadly comparable with the results obtained by (36) for the same distribution. Based on the whole experiment, the parameters and were well estimated in all cases, while the estimates of and were poorer for smaller values of and . For small the estimates were more subject to the vagaries of sampling variation, whereas for small they were subject to the influence of a smaller number of very large importance weights. However, given the speed of BC compared with competing ABC algorithms, it is feasible to use even larger values of than considered in this experiment, since there is no requirement to simulate new datasets at each iteration. Moreover, this experiment is based on the very basic case of sampling from the prior; the results would be further improved by using an analogue of BC-AMIS or alternative approaches similar to those proposed by (37) for ABC.
3 Dynamic models
In dynamic models, the difficulty with empirical likelihood stems from the dependence in the data . However, these models can be represented as transforms of unobserved iid sequences . The recovery of a converging empirical likelihood representation thus requires the reconstitution of the ’s as transforms of the data and of the parameter . Independence between the ’s is then at least as important as moment conditions. (This implies equivalent computing times for ABC and BC.)
For instance, consider a simple dynamic model, namely the ARCH(1) model:
with a uniform prior over the simplex, i.e., , . While this model can be handled by other means, since the likelihood function is available, we will compare here the behaviour of ABC and BC algorithms.
First, a natural empirical likelihood representation is based on the reconstituted ’s, defined as when the ’s are derived recursively. Figure 2 shows the result of estimating both parameters and when Algorithm ABC uses as summary statistics either the least square estimates of the parameters (derived from the series ), which we label “optimal ABC” in connection with (38), or the mean of the series supplemented by the two first autocorrelations of the series . The constraints in the empirical likelihood are either based on the three first moments of the reconstituted ’s or on the variance of those ’s complemented by both the correlations between the ’s and the ’s and between the ’s and the ’s. As seen from this experiment, BC does as well as the optimal ABC for the estimation of the parameters, but further brings a reduction in the variability of those estimates, thanks to the importance weights.
A much more complex dynamic model is the GARCH model of (39) that can be formalized as the observation of when
under the constraints and , that is, . Given the constraints on the parameters, a natural prior is to choose an exponential distribution on , for instance an exponential distribution, and a Dirichlet on . An ABC approach requires the choice of summary statistics, which are necessarily non-sufficient since the model is a state-space model. Following (38), we use the maximum likelihood estimator as summary statistics, relying on the R function garch for its derivation despite its lack of stability. Since (40) derived natural score constraints for the empirical likelihood associated with this model, we used their constraints to build our BC algorithm. Fig. 3 provides a comparison of both approaches with the MLE. It shows in particular that the ABC algorithm is unable to produce acceptable inference in this case, even in the most favorable case when it is initialized at a satisfactory maximum likelihood estimate (as shown by the bottom row). The BC algorithm is performing better, even though it fails to catch the correct range of .
Another type of non-iid model relying on the superposition of an unknown number of gamma point processes and processed in (41) through a (non-Bayesian) alternative to ABC is discussed in the SI as an additional illustration of the possibilities of the empirical likelihood perspective for complex models, offering a free benchmark for evaluating the ABC outcome. Figure S7 shows a clear improvement brought by BC over the corresponding ABC outcome.
4 Population genetics
We compare our proposal with the reliable ABC-based estimates given by (3). We set up two toy experiments that are designed to defeat ABC, using pseudo observed data. The two evolutionary scenarios are given in Figure 4. In all experiments, we only consider microsatellite loci and assume that the effective population size is identical over all populations of the scenario.
In the second experiment, we consider three populations, see Figure 4 (right): the last two populations diverged at time and their common ancestral population diverged from the first population at time . The sample comprises thirty diploid individuals per population genotyped at a hundred independent loci. In contrast to the first experiment, all components of the composite scores are computed here by summing over all pairs of genes whatever the population to which they belong. The results given in Table 1 show that ABC and BC mainly agree on both parameters and , but BC is slightly more accurate than ABC on .
Table S1 gives a comparison of the computing times for both algorithms, showing the difference of magnitudes between them. This is due to the simulation of the the simulated datasets for ABC: While this difference should not be over-interpreted, it signals a potential for self-assessment and testing that is missing for ABC methods.
Discussion
When compared with ABC methods, the (often) significant time savings provided by BC due to the lack of pseudo-sample simulation may open wider ranges for processing models involving complex likelihoods. For instance, in population genetics, ABC is severely hindered by the time spent simulating a dataset when modelling isolation by distance in a continuously distributed population, or when studying a large set of SNP markers even on quite simple evolution scenarios. Moreover, when the dataset is composed of large sets of markers, the summary statistics proposed in ABC (in DIY-ABC, these are averages of some quantitative statistics over all loci) ignores some (statistical) information, while BC manages to recover most of it, more specifically to estimate divergence on large datasets. Improvements in accuracy of estimation and computational efficiency are also possible in other contexts as illustrated in the range of examples given above.
Even when BC requires the same computing time as ABC, it uses the outcome in a very different perspective and provides a benchmark likelihood that helps in evaluating the pertinence of the ABC approximation, as illustrated in the gamma point process of SI.
We acknowledge that a caveat of the empirical likelihood is that it requires a careful choice of the constraint (1). Those pivotal quantities have to be connected to the parameter in an identifying way, which may require complex manipulations as in the gamma process case or even be impossible. However, repeated experimentation is often available, as illustrated by the normal example and the population genetic experiments (where we computed the composite score on both a restricted set of pairs and all pairs of genes). Checking for the accuracy of the approximation means that a constraint in BCshould be tested on simulated datasets in controlled experiments where the true parameters are known, although much less than in ABC runs. Then we can test coverage of credibility intervals, and measure the error of various point estimates based on the output of the scheme.
Acknowledgments
The last two authors wish to thank Jean-Marie Cornuet for his help and availability. Their work has been partly supported by the Agence Nationale de la Recherche (ANR) through the 2009–2012 project Emile. The third author is grateful to Patrice Bertail, Chris Drovandi, Brunero Liseo, and Art Owen for useful discussions. Comments and suggestions from the whole PNAS editorial board greatly contributed to improve both the presentation and the scope of the paper.
References
Supplementary information (SI)
We also reproduce here an illuminating comment from Art Owen: “The interesting thing about Theorem 3.4 is what is not there. It includes no conditions to make a good estimate of , nor even conditions to ensure a unique value for , nor even that any solution exists. Theorem 3.4 applies in the just determined, over-determined, and under-determined cases. When we can prove that our estimating equations uniquely define , and provide a consistent estimator of it, then confidence regions and tests follow almost automatically through Theorem 3.4.”.
Pairwise composite likelihoods in population genetics
We detail here the derivation of the composite likelihoods used for the version of the BC algorithm implemented in the case of the population genetics study.
First, we recall that we scale the time axis so that a pair of genes of the same deme coalesces at a random time with an exponential distribution with rate . We now consider a given locus and two microsatellite genes from our sample that come from the same deme. We denote their respective allelic state by and . Their most recent common ancestor (MRCA) dates back to a time , where . We assume that the mutation rate, namely does not vary along the whole history of our populations. Therefore, conditioned on , the number of mutations between () and the MRCA is distributed according to a Poisson distribution with mean . Hence, conditional on , the number of mutations between and is a Poisson variable with mean and
i.e., , the geometric distribution with positive weight at . Finally, the difference between both genes is the accumulation over the mutations, i.e.,
where the ’s are iid Rademachers ( with equal probability). Thus,
which proves that the pairwise likelihood is
with \rho(\theta)=\theta\big{/}\big{(}1+\theta+\sqrt{1+2\theta}\big{)}.
Two genes from different demes
We now consider two genes that come from two different demes that diverged from an ancestral deme at time in the past. We denote the allelic state of the two ancestors at time by and , respectively. Then, , where follows a distribution whose Fourier transform is given by (4), while , are iid., whose distribution is given by the difference of two allelic states separated by a fixed time . This distribution is derived in Equation (3) of (2):
where denotes the th-order modified Bessel function of the first kind, given by
Using the independence between and , we obtain
We then retrieve this distribution by computing Fourier transforms in the same vein as above. First, we note that the number of mutations between and its ancestor at time is a Poisson variate with parameter . And,
Finally, the distribution of is a (discrete) convolution product between the distributions given by (5) and (6) which yields
Quantile estimation
Examples of quantile distributions are the three-, four- and five-parameter Tukey’s lambda distributions and their generalizations and the Burr family of distributions; particular examples include the -and- and -and- distributions (3, 4, 5, 7).
Proposed methods for estimation of quantile distributions include maximum likelihood estimation using numerical approximations to the likelihood (7, 8, 9), moment matching (10, 11), location and scale-free shape functionals (12), percentile matching (6), quantile matching (13) and, more recently, ABC (14, 15, 16). Sequential Monte Carlo approaches for multivariate extensions of the -and- have also been proposed (37).
There has been a number of ABC approaches proposed for this problem. For example, (15) adopted the ABC-MCMC algorithm of (18), in which draws of are based on a Metropolis algorithm with a Gaussian proposal distribution, and are accepted based on the rule , where D is the entire set of order statistics, is the Euclidean norm and is heuristically chosen after inspection of a histogram of obtained from a preliminary run using a very large value of . This approach has recently been improved by (16) through more sophisticated MCMC approaches, the use of regression summary statistics for based on percentiles and their powers, and more automated choices of . However, they still maintain a form of distance-based measure in accepting .
Normal estimation
Figures S1–S3 evaluate the impact on the posterior distribution approximation of increasing the number of constraints in the empirical likelihood definition. Since this is a formal example, the true posterior distribution is available.
Quantile estimation
The BC experiment involved evaluation of Algorithm 1 for estimation of the parameters of the -and- distribution using the two values of , namely , which corresponds to the standard normal distribution, and ; which was chosen by (36) as ‘an interesting, far-from-normal distribution’. The simulation experiment comprised multiple repetitions of BC using different combinations of sample size, , number of iterations, , and number of constraints (), corresponding to percentile sets , , , and . Two sets of priors were considered for : (denoted as ) and (denoted as ). Although the priors were set independently for each element of , the four elements were drawn together at each iteration of the algorithm, so that the same importance weight was attached to the values drawn in the th iteration. The experiment was replicated ten times with different draws of samples of size . Posterior means and standard deviations were computed for each parameter, and the overall goodness of fit to the true curve was assessed by comparing the true quantiles at with two measures: the estimated mean at each quantile (denoted by RSSm) and the average of the estimated quantile for each importance sample (RSSt).
Boxplots of the posterior means and standard deviations are shown in Figure S4 and Figure S5, respectively, for the four parameters, based on , prior and the 20 replicates for , for ten of the trials: for (trials 1-5) and (trials 6-10). Boxplots for the corresponding overall goodness of fit measures (RSSm, RSSt) are given in Figure S6.
Superposition of point processes
(41) discuss an alternative to ABC, using fractional design and linear interpolation. While their purpose is the non-Bayesian processing of models with intractable likelihood functions, they propose as their main example a model consisting in the superposition of renewal processes with waiting times distributed as variables, when is unknown. The renewal processes are thus
and the observations are made of the first values of the ’s,
This model offers an interesting testing ground for BC in that the data points are neither iid nor Markov. It is however possible to recover and exploit an iid structure in this case by first simulating a pseudo-dataset, , as in ABC settings, and then deriving a sequence of renewal processes indicators , as
These indicators are thus distributed from the prior distribution on the ’s and an iid sample of variables can be derived from those indicators and the genuine data, leading to an associated empirical likelihood. As shown on Figure S7, when applied to a simulated dataset (as in (41)), the empirical likelihood approximation produces a better approximation than the corresponding ABC solution based on the same statistics as (41) (for exactly the same computational cost).
Time gains in population genetic models
In general, the speed of executing an ABC algorithm depends on many factors, including:
one’s ability to program an efficient simulator from the model distribution and to compute the selected summary statistics,
and the size of the Monte Carlo sample, denoted ,
and the speed of BC depends on:
the difficulty to optimize under the constraints (in the population genetics examples, this is not straightforward because of the Bessel functions and of the various series involved when the two individuals are not in the same deme),
and the size of the Monte Carlo sample.
While producing many simulations from the model distribution often is the stumbling block for ABC algorithms, the selection of the constraints and the time requirements of the optimization step are both highly variable and delicate to quantify. While all the experiments described in this paper induced no inflation in computing time and mostly significant reductions, we cannot exclude the possibility of requiring more computing time than ABC.
Both population genetic experiments conducted in this paper analyse datasets with a large number of loci (one hundred). Thus ABC, which requires simulations of all loci to produce a simulated dataset, is quite time consuming and particularly so when the evolutionary scenario is more complex than the one in the first experiment. We compare here the computing times required by our implementation of the BC-AMIS sampler and by DIYABC (3) on an Intel Xeon W3680 Plateform with GNU/Linux. Both methods were parallelized over five among the six cores of this CPU with the OpenMP API. Table 2 exhibits computation time averages on ten replicates of the estimation.