Simple, Scalable and Accurate Posterior Interval Estimation
Cheng Li, Sanvesh Srivastava, David B. Dunson
Introduction
We propose a posterior interval estimation algorithm for uncertainty quantification in massive data settings in which usual Bayesian sampling algorithms are too slow. Bayesian models quantify uncertainty via the joint posterior distribution of the model parameters and predictive distributions of new observations. As joint posteriors and predictives are difficult to visualize and use in practice, the focus is almost always on posterior summaries of one-dimensional functionals. For example, it is typical to report 95% posterior credible intervals for a variety of one-dimensional functionals of interest. In practice, by far the most common approach to estimate credible intervals relies on running a Markov chain Monte Carlo algorithm to obtain samples from the joint posterior, based on which estimating intervals for different one-dimensional functionals is trivial. Traditional Markov chain Monte Carlo algorithms are too slow to be practically useful in massive data applications. However, given their rich history and broad use, it would be appealing to be able to incorporate a simple fix-up, which would allow trivial modifications of existing code, solve the computational bottleneck, and enable provably accurate estimation of posterior quantiles for any one-dimensional functional of interest.
Current classes of analytic approximations, such as Gaussian/Laplace, variational Bayes , and expectation propagation , clearly do not provide a generally useful alternative to sampling methods in terms of accurate estimation of posterior credible intervals. Hence, in comparing with the literature, we focus on scalable sampling algorithms. There has been a recent interest in scaling up Bayesian sampling in general and Markov chain Monte Carlo algorithms in particular, with many different threads considered. Three of the most successful include (i) approximating expensive Markov chain Monte Carlo transition kernels with easier to sample surrogates; (ii) running Markov chain Monte Carlo on a single machine but with different subsets of the data used as sampling proceeds ; and (iii) running Markov chain Monte Carlo in parallel for different data subsets and then combining . Motivated by our goal of defining a very simple and theoretically supported algorithm, we focus on embarassingly parallel Markov chain Monte Carlo following strategy (iii).
The key question in embarassingly parallel Markov chain Monte Carlo is how to combine samples from the different subset posteriors. If each subset posterior were approximately Gaussian, then weighted averaging is well justified, motivating the consensus Monte Carlo algorithm . Outside of this restrictive setting, one can instead rely on the product equation representation to combine using kernel smoothing or multi-scale histograms . Such approaches have theory support in terms of accuracy as the number of samples increases, but rely heavily on the accuracy of density estimators for the subset posteriors, suffering badly when subset posteriors have even slightly non-overlapping supports. Moreover, the product equation representation obtained by splitting the prior is not invariant to model reparameterization. An alternative approach is to use data subsamples to define noisy approximations to the full data posterior, and then take an appropriate notion of geometric center, such as geometric median or mean of these approximations. These later approaches are invariant to model reparameterization, but they require a somewhat conceptually and computationally complex combining algorithm.
In this article, we propose a new scalable algorithm for posterior interval estimation. Our algorithm first runs Markov chain Monte Carlo or any alternative posterior sampling algorithm in parallel for each subset posterior, with the subset posteriors proportional to the prior multiplied by the subset likelihood raised to the full data sample size divided by the subset sample size. To obtain an accurate estimate of a posterior quantile for any one-dimensional functional of interest, we simply calculate the quantile estimates in parallel for each subset posterior and then average these estimates. Hence, our combining step is completely trivial conceptually and computationally. We also provide theory justifying the performance of the quantile estimates. We emphasize that we are not proposing a new Markov chain Monte Carlo algorithm, but we are instead developing a simple approach to scale up existing algorithms to datasets with large numbers of observations.
Our approach is related to the frequentist Bag of Little Bootstraps and provides a Bayesian interpretation. Bag of Little Bootstraps divides massive data into small subsets and obtains bootstrap confidence intervals for a one-dimensional parameter on every subset from weighted bootstrap samples. Then the confidence interval of the one-dimensional parameter based on the whole data is constructed by averaging lower and upper bounds of the bootstrap confidence intervals across all subsets. Similarly, our algorithm averages quantiles from all subset posteriors. Our theory leads to new insights into Bag of Little Bootstraps, showing that its confidence intervals correspond to the confidence intervals of the Wasserstein barycenter of bootstrap distributions across all subsets.
Preliminaries
Our algorithm is related to the concept of Wasserstein barycenter of subset posteriors , which depends on the notions of Wasserstein distance and Wasserstein barycenter. Suppose and is the Euclidean distance between any . For any two measures on , their Wasserstein-2 distance is defined as
which can be viewed as the geometric center of the measures .
2 Wasserstein Posterior and Posterior Interval Estimation
and we denote their corresponding distribution functions as and , respectively. In the definition of subset posterior density , we have raised the subset likelihood function to the th power. As a stochastic approximation to the overall posterior , this modification rescales the variance of each subset posterior given to be roughly of the same order as the variance of the overall posterior , as in and . Based on (2.2), runs Markov chain Monte Carlo algorithms on the subsets in parallel, producing draws from each , . Empirical estimates of for all subsets are obtained from the Markov chain Monte Carlo draws, their Wasserstein barycenter is estimated via a linear program, and used as an approximation of the overall posterior .
Suppose we are interested in a scalar parameter with . We denote the overall posterior for by and the th subset posterior for by . For theory development, we mainly focus on the linear functional for some fixed and , which includes the individual components in as special cases. We can define the distance and the set of measures on the univariate space . If for all , then the one-dimensional Wasserstein posterior is defined as the Wasserstein barycenter of as in (1):
In the one-dimensional case, the Wasserstein posterior has an explicit relation with the subset posteriors. Let be the quantile function of a generic univariate distribution function . Let and be two univariate distributions in , with quantile functions and , for any , respectively. Then the distance between and has an explicit expression by Lemma 8.2 of :
Therefore, in (3) is explicitly related to the subset posteriors by
where and are the quantile functions of and , respectively. This expression for the one-dimensional barycenter has been derived in from an optimal transport perspective. The relation indicates that for a scalar functional , the average of subset posterior quantiles produces another quantile function that corresponds exactly to the one-dimensional Wasserstein posterior. Therefore, in our algorithm, to evaluate the Wasserstein posterior of , we simply take the empirical quantiles based on posterior draws from each and then average them over . Our algorithm is summarized in Algorithm 1.
Main Results
In this section, we develop theory supporting our approach. Under mild regularity conditions, we show that the one-dimensional Wasserstein posterior is an accurate approximation to the overall posterior . Essentially, as the subset sample size increases, the distance between them diminishes at a faster than parametric rate . Their biases, variances and quantiles are only different in high orders of . This rate can be improved to when the maximum likelihood estimator of is unbiased. Our results are improved relative to previous papers relying on combining subset posteriors, such as and , with more detailed description of the limiting behavior of the estimated posterior and weaker restrictions on the growth rate of the number of subsets .
Our theory relies on the parametric Bernstein-von Mises theorem. The consensus Monte Carlo algorithm in also leverages approximate normality in their asymptotic justification and can be viewed as a different way of averaging subset posteriors. They used weighted averages of subset posterior samples as an approximate sample from the true posterior, where the weights were taken as the inverse covariance matrices based on each subset posterior samples. Their weighting strategy relies more heavily on the normality assumption than our strategy of averaging quantiles. In contrast to the heuristic arguments in , we provide formal justification for using normal approximations on a large number of subsets, and quantify the asymptotic orders of the induced approximation errors.
We make the following assumptions on the data generating process, the prior and the posterior.
is an interior point of , where is a fixed positive integer and does not depend on . almost everywhere if and only if . contains independent and identically distributed observations generated from .
The support of is the same for all .
is three times differentiable with respect to in a neighborhood of , for some constant . . Furthermore, there exists an envelope function such that , , for all , for all values of , and .
Let , where is the expectation with respect to under the posterior . Then there exists an integer , such that is uniformly integrable under . In other words, , where is the indicator function.
Assumptions 1-5 are standard and mild regularity conditions on the model , which are similar to the assumptions of Theorem 8.2 in Chapter 6 of and Theorem 4.2 in for showing the asymptotic normality of posteriors. Assumption 6 requires the prior to have a finite second moment, such that with high probability all the posterior distributions are in the space and the distance is well defined. In models with heavy tailed priors, such as our example in Section D.1, one can replace Assumption 6 by assuming that the posterior distribution conditional on a fixed number of initial observations has finite second moment; see Example 8.5 in Chapter 6 of and our Proposition 3 in the Appendix. The uniform integrability of subset posteriors in Assumption 7 is an extra mild technical assumption that helps us to generalize the usual Bernstein-von Mises result on the subsets from the convergence in probability to the convergence in distance. We verify Assumption 7 for normal linear models and some exponential family distributions in the Appendix. A stronger condition that can replace Assumption 7 is . The following theorems hold for the one-dimensional Wasserstein posterior defined in (3).
Suppose Assumptions 1–7 hold and for some fixed and . Let . Let , . Let be the normal distribution with mean and variance . (i) As ,
where the convergence is in -probability. (ii) If is an unbiased estimator for , so , then as ,
Theorem 1 shows that both the one-dimensional Wasserstein posterior of from combining subset posteriors and the overall posterior of based on the full dataset are asymptotically close in the distance to their respective limiting normal distributions, with slightly different means and the same variance. Such convergence in the distance implies weak convergence and convergence of the second moment. Furthermore, the distance between the Wasserstein and full posteriors converges to zero in probability with rates and , depending on the behavior of the maximum likelihood estimator .
Previous asymptotic justifications for embarrassingly parallel Markov chain Monte Carlo approaches focus on consistency or convergence rates , while the above theorem is stronger in providing a limiting distribution. In addition, our conditions are much weaker in only requiring the subset sample size to increase, while imposing no restrictions on the growth rates of and . Hence, the number of subsets can grow polynomially in , mimicking the case in which many computers are available but computational resources per computer are limited. For example, the theorem allows , for any . Under this setup, the one-dimensional Wasserstein posterior, the overall posterior and their normal limits will all converge to at the same rate of , and their mutual difference is of order .
When the maximum likelihood estimator is unbiased, Part (ii) of the theorem provides a sharper convergence rate of compared to the rate in Part (i), still with no explicit restrictions on the growth rates of and . When increases very fast, for example and , the rate in Part (ii) is much faster than the rate from Part (i). Moreover, is suboptimal since it is the parametric rate based on only the subset data with size , while is the optimal parametric rate based on the full data with size . The reason for the improvement in Part (ii) lies in the high order difference between the two means and of the limiting normal distributions of the one-dimensional Wasserstein posterior and the overall posterior. When the unbiasedness assumption does not hold and increases with , the difference between the averaged maximum likelihood estimator and the overall maximum likelihood estimator is typically of order , which does not scale in the number of subsets . However, when all subset maximum likelihood estimators are unbiased, this difference is reduced by a factor of due to the averaging effect over subset posteriors and decreases faster as . Hence, in models having unbiased maximum likelihood estimators, the one-dimensional Wasserstein posterior achieves high order accuracy in approximating the overall posterior with a difference .
Independently, has considered a nonparametric generalized linear model and shown a related Bernstein-von Mises theorem. Besides the difference between the form of models, we emphasize that our result in Theorem 1 does not rely on the strong requirement of a uniform normal approximation for all subset posteriors, as used in Shang and Cheng’s paper. Instead, to show Theorem 1, it is only necessary for the normal approximation to work well on average among all subset posteriors. As a result, we have no explicit constraint on the growth rate on the number of subsets , while their paper needs to control explicitly depending on the posterior convergence rate.
Suppose Assumptions 1–7 hold. Let and be the same as defined in Theorem 1. For a generic distribution on , let and be the variance of . Let and be two arbitrary fixed numbers such that . Then the following relations hold:
where and are in -probability. Furthermore, if is an unbiased estimator of , then
Theorem 2 provides the order for the differences for the bias, the variance and the quantiles between the one-dimensional Wasserstein posterior and the overall posterior. Essentially the one-dimensional Wasserstein posterior has an asymptotic bias from the overall posterior, which is generally of order and has higher order when the subset maximum likelihood estimators are unbiased. The variances of the one-dimensional Wasserstein posterior and the overall posterior agree in the leading order. Similar to the biases, the difference between their quantiles has order in the general case, and improves to a higher order when the subset maximum likelihood estimators are unbiased. In our algorithm, when we take different subset posterior credible intervals and average them, the averages of the lower and upper quantiles are asymptotically close to the quantiles from the overall posterior in the leading order. Therefore, Theorem 2 also validates our algorithm in the sense of posterior uncertainty quantification. We can also account for Monte Carlo errors in approximating subset posteriors using samples under mild mixing conditions on the subset Markov chains; see Theorem 3 in the Appendix.
Experiments
We applied the proposed algorithm in a variety of cases, using consensus Monte Carlo , Wasserstein posterior , semiparametric density product , and variational Bayes as our competitors. Posterior summaries from Markov chain Monte Carlo applied to the full data served as the benchmark for all the comparisons. As our theory guarantees good performance for very large samples, we focused on simulations with moderate sample sizes. All Markov chain Monte Carlo algorithms were run for 10,000 iterations. After discarding the first 5000 samples as burn-in, we retained every fifth sample in all the chains; convergence diagnostics suggested that every chain had converged to its stationary distribution. We used the combination step implemented in R package parallelMCMCcombine for consensus Monte Carlo and semiparametric density product methods. We implemented the combination step of our algorithm in R and of Srivastava et al.’s algorithm in Matlab. All experiments were run on an Oracle Grid Engine cluster with 2.6GHz 16 core compute nodes. Memory resources were capped at 8GB for all the methods, except for Markov chain Monte Carlo based on the full data, which had a maximum memory limit of 16GB.
The accuracy of a density approximating was evaluated using the metric
This accuracy metric lies in $q\pi_{n}q(\theta\mid X)\pi_{n}(\theta\mid X)$ based on the posterior samples using the bkde or bkde2D functions in R package KernSmooth, with automatic bandwidth selection via dpik . The density estimates were used to compute a numerical approximation of the integral in (4).
We first evaluated the performance of our proposed algorithm under varying sample size, dimension, and number of subsets in Bayesian linear models. Let the response, design matrix, regression coefficients, and random error be denoted as , , , and , where , , and . The model assumes that
where gdP denotes the generalized double Pareto shrinkage prior of and Half- is chosen to be weakly-informative . See Section D.1 in the Appendix for detailed specifications. The priors on and in (5) are both heavy-tailed with infinite second moments, and therefore do not satisfy Assumption 6. However, one can verify that conditional on the initial observations with , every subset posterior has finite second moments for both and . The result is summarized in Proposition 3 in the Appendix.
We applied our approach for inference on in (5) compared with an asymptotic normal approximation. We calculated the accuracy of approximations using a full data Gibbs sampler as the benchmark (Table 1). The first of entries of were set to with the remaining 0. The entries of were randomly set to and was fixed at 1. We ran 10 replications for and . We varied and applied Algorithm 1 after running a modification of the Gibbs sampler in (2.2) for each subset. We considered two versions of normal approximations for the full posterior. The first version used to approximate the posterior of , where and are the maximum likelihood estimates of and its estimated asymptotic covariance matrix in (5). For the second version, we first obtained the asymptotic normal approximation of the th subset posterior as (, ), where and () are the maximum likelihood estimates of and its estimated asymptotic covariance matrix for the th subset. Then we found the barycenter of the subset normal approximations, which is again a normal distribution . This provides an empirical verification of Theorem 1. See Section D.1 in the Appendix for details of the Gibbs sampler and the form of and .
The performance of all the approaches was fairly similar across all simulations and agreed with our asymptotic theory (Table 1). The results in Table 1 show that the proposed algorithm closely matched the Gibbs sampling results for the full data in terms of uncertainty quantification. It also performed better than the asymptotic normal approximations in some cases. When the subset sample size was too small compared to the dimension, such as when which has a subset size of only , we observe poor performance for both the asymptotic approximations and the proposed approach.
2 Linear mixed effects model
Linear mixed effects models are widely used to characterize dependence in longitudinal and nested data structures. Let be the number of observations associated with the th individual, for . Let be the responses of the th individual, and be matrices including predictors having coefficients that are fixed across individuals and varying across individuals, respectively. Let and , respectively, represent the fixed effects and th random effect. The linear mixed effects model lets
Many software packages are available for Markov chain Monte Carlo-based Bayesian inference in (6), but current implementations become intractable for data with large and .
We applied our algorithm for inference on and in (6) and compared its performance with maximum likelihood, consensus Monte Carlo, semiparametric density product, Wasserstein posterior, and variational Bayes. We set , for , , , , , and . The random effects covariance had , 0.56, 0.52, and 0.0025. This matrix included negative, positive, and small to moderate strength correlations . The simulation was replicated 10 times. The approximate posterior distributions were obtained using consensus Monte Carlo, semiparametric density product, Wasserstein posterior, and our algorithm in three steps. First, full data were randomly partitioned into 20 subsets such that data for each individual were in the same subset. Second, the Markov chain Monte Carlo sampler for and in (6) was modified following (2.2) and Equation (2) in and implemented in Stan (Version 2.5.0). Finally, the posterior samples from all the subsets were combined. We used the streamlined algorithm for variational Bayes . Maximum likelihood produced a point estimate and asymptotic covariance for , and only a point estimate for .
We compared the performance of the seven methods for inference on the fixed effects , the variances of random effects (), and the correlations of random effects (). The correlations are nonlinear functionals of the model parameters . Maximum likelihood estimator, consensus Monte Carlo, semiparametric density product, Wasserstein posterior, and our algorithm had excellent performance in estimation of (Figure 1), as well as the variances and correlations (Tables 2 and 3 and Figure 2). Uncertainty quantification using consensus Monte Carlo, semiparametric density product, Wasserstein posterior, and our algorithm closely agreed with Markov chain Monte Carlo based on the full data. As shown in Figure 1 of the Appendix, variational Bayes was computationally most efficient, but it showed poor accuracy in approximating the posterior of and the variances, with underestimation of posterior uncertainty.
3 United States natality data
We applied our algorithm to United States natality data on birth weight of infants and variables related to their mothers’ health . Linear mixed effects models were used for the covariance in birth weights among siblings. Following the example in , we selected the data for mothers who smoked, had two infants, and had some college education but not a college degree. Detailed information about the variables are in the Appendix. The data set contained mothers and births. There were 13 variables related to mother’s health. All these covariates and an intercept were used as fixed effects in (6), so . The random effects included mother’s age, gestation period, and number of living infants, so . We performed 10 fold cross-validation and randomly split the data into 10 data sets such that data for siblings belonged to the same training data. We estimated fixed effects and covariance matrix for random effects as in Section 4.2 using .
The seven methods in the previous section generally agreed in the inference on fixed effects (Figure 3), with variational Bayes deviating the furthest. Our algorithm and the algorithm of differed significantly from variational Bayes, consensus Monte Carlo, and semiparametric density product in the inference on variances and correlations of random effects (Tables 4 and 5 and Figure 4). Our algorithm and the algorithm of showed better agreement with Markov chain Monte Carlo based on the full data in estimating the correlations. The 90% credible intervals from our algorithm included the maximum likelihood estimates of correlations. Variational Bayes posterior concentrated very close to 0 for every element of the covariance matrix and significantly underestimated posterior uncertainty. Consensus Monte Carlo and semiparametric density product methods performed poorly in the inference on random effects but were better than variational Bayes. Markov chain Monte Carlo based on the full data was extremely slow compared to the other methods (see Figure 1 in the Appendix). Taking into account both the approximation accuracy and the computational efficiency, we concluded that our proposed algorithm performs better than the competing algorithms in estimating the covariance matrix of random effects.
4 Extension to multi-dimensional parameters
Although Algorithm 1 only applies to one-dimensional functionals, we provide a simple extension to the multi-dimensional case with a numerical illustration. Suppose our goal is to find the joint posterior of the -dimensional parameter . First, we center and scale the posterior samples of in every subset. Let and be the empirical mean and covariance matrix for the th subset posterior samples . Let , . We transform every subset draw to . If every subset posterior of is asymptotically normal, then the centered and rescaled version will be asymptotically standard normal with approximately independent components, since is large in practice. For every component of , we apply Algorithm 1 to combine its subset posterior samples and obtain approximations of posterior quantiles for a fine grid of $\theta^{\prime}\theta=\widehat{V}^{1/2}\theta^{\prime}+\widehat{m}\theta$, and credible regions can be estimated based on these samples.
We implemented this generalized algorithm for combining subset posterior samples of all pairs of variances and covariances in the simulation from Section D.2, and compared the results with consensus Monte Carlo, semiparametric density product, Wasserstein posterior, and variational Bayes. The accuracies of our algorithm and the algorithm of were higher than the accuracies of the other three methods for all pairs of variances and covariances (Table 6). Variational Bayes performed poorly in the estimation of posterior distributions for all the pairs of variances. We obtained kernel density estimates of the three pairs of covariances in (6) using the combined posterior samples and the bkde2D function in the KernSmooth R package with a bandwidth of 0.01 (Figure 5). The kernel density estimates centered very close to the true values of the covariance pairs. Compared to the algorithm of , our algorithm was more efficient, easier to implement, and robust to the grid-size of quantiles, while having similar accuracy and stability across all simulation replications.
Conclusion
We have proposed a simple posterior interval estimation algorithm to rapidly and accurately estimate quantiles of the posterior distributions for different one-dimensional functionals of interest. The algorithm is simple and efficient relative to existing competitors, just averaging quantile estimates for each subset posterior based on applying existing sampling algorithms in an embarrassingly parallel manner. There is a fascinating mathematical relationship with the Wasserstein barycenter of subset posteriors: our algorithm calculates quantiles of the Wasserstein posterior without the optimization step in . The credible intervals from our algorithm asymptotically approximate those from the full posterior in the leading parametric order. The quality of approximation is the same even if the subset sample size increases slowly and the number of subsets increases polynomially fast. Our experiments have demonstrated excellent performance for linear mixed effects models and linear models with varying dimension.
Although our current theory focuses on parametric models and one-dimensional linear functionals, the proposed algorithm can be practically implemented for general one-dimensional functionals for semiparametric and nonparametric models. For example, in simulations not shown in the paper, we found that our algorithm shows excellent performance for Dirichlet process mixture models for multivariate categorical data , and Gaussian process nonparametric regression. Furthermore, we have provided an extension to the multi-dimensional case. It would be appealing to develop theory justification in these more complex settings, and to develop guarantees on approximation accuracy for fixed subset sizes and growing numbers of subsets. Also of interest in future work is to consider algorithms that do not require non-overlapping subsets, potentially relying on subsampling. Although such modifications can be implemented trivially, our proof techniques for the combining step in Theorem 1 do not apply directly. Other important extensions include optimal design of subsampling algorithms and extensions beyond product likelihoods.
In Section A we provide the detailed technical proofs of Theorem 1 and Theorem 2 in the main paper. In Section B, we present a theorem that quantifies the Monte Carlo errors in subset posterior sampling. In Section C, we verify Assumption 7 in the main paper for the normal linear model and some exponential family distributions. Section D includes further details about the data analysis in the main paper. In particular, for the heavy tailed priors used in Example 1 in the main paper, we verify a relaxed version of Assumption 6 in Section D.1.
Appendix A Proofs of Theorem 1 and Theorem 2
(Villani Theorem 6.15) For two measures , or similarly ,
where the total variation of moments distance is defined as
In comparison, the usual parametric Bernstein-von Mises theorem on the subset without raising the likelihood to the th power gives
in -probability, where . See, for example, Theorem 8.2 in and Theorem 4.2 in .
Proof of Lemma 2: The relation (A.2) in Lemma 2 is the usual Bernstein-von Mises theorem for the overall posterior . The proof of (A.2) follows a related line to the proof of Theorem 4.2 in , and can be treated as a special case of (A.1) with and . In the following we focus on the proof of (A.1) in Lemma 2.
Given the independent and identically distributed assumption, we only need to show the result for a fixed index . To emphasize the different roles played by the subset sample size and the number of subsets , in the following proofs we will write the total sample size as . We complete the proof in 3 steps. For a generic matrix or a 3-dimensional array , we use to denote its Frobenius norm.
Step 2: Show the following convergence as in -probability:
We prove this result for a fixed subset , since the data are independent and identically distributed, and the conclusion is identical for any . Define the following quantities
Then based on the expression of , with the likelihood raised to the th power,
The induced posterior density on can be written as
Let . Define
as in -probability. Hence, for the difference in (A.3), we obtain that
Divide the domain of the integral into 3 parts: , , , where the constants will be chosen later. Then
as , because the integral on the whole is finite, is bounded from above according to Assumption 6, and .
Next we bound the first term in (A.1). By Assumption 5 and the weak consistency of , there exists a constant that depends on , such that for any and all sufficiently large , with -probability approaching 1,
Furthermore, the weak consistency of implies that for all sufficiently large , with -probability approaching 1, . Therefore, as in -probability,
where we have used the finite second moment of from Assumption 6 in the last step. Hence, we have proved that the first integral in (A.5) goes to zero in -probability.
where the last convergence is almost surely in by the strong law of large numbers. Therefore, we can choose as
where denotes the smallest eigenvalue of a generic matrix . Assumption 4 indicates that is bounded below by a constant. Thus, in (A.8), the choice of implies that for every , for all large with -probability approaching 1,
Therefore for , for all large with -probability approaching 1,
For the third integral in (A.5), we fix a constant and can use the similar Taylor series expansion above, and notice that when , as ,
as in -probability. Therefore, (A.10) and (A.11) together imply that as in -probability,
Hence by the definition of , as in -probability,
This has proved that the right-hand side of (A.5) converges to zero in -probability, and also completes the proof of (A.3).
Step 3: Show the convergence in as . It is clear from the derivation of (A.1) that
In this display, the last term is a finite constant. The middle term is defined in Assumption 7. According to Assumption 7, for any fixed , is uniformly integrable under . Now since is upper bounded by for all and some constant , we obtain that is also uniformly integrable. This uniform integrability together with the convergence in -probability from Step 2 implies the convergence of to zero.
Similar to the distance, for any , we can define the Wasserstein- () distance: for any two measures on , their distance is defined as
where is the set of all probability measures on with marginals and , respectively. The distance on the space can be similarly defined. The distance between two univariate distributions and is the same as the distance between their quantile functions (see Lemma 8.2 of ):
Let . Then for any ,
Proof of Lemma 3: We use and to denote the cumulative distribution function and the quantile function of standard normal distribution . From , the univariate Wasserstein-2 barycenter satisfies that for any ,
Since , we apply Minkowski inequality to the right-hand side of (A.1) and obtain that
which concludes the proof.
where is in probability. Furthermore, if is an unbiased estimator of , then
Proof of Lemma 4: Because of the linearity , it suffices to show
with the further assumption that is an unbiased estimator of .
Next we show the first term in (A.18) is of order under Assumptions 1–7, and is of order if furthermore .
Hence, . This together with (A.18) and (A.19) leads to (A.15).
If we further assume unbiasedness , then from (A.17) we can obtain that
for all . In other words, ’s are centered at zero. Since ’s () are all independent and only depends on , we have for any .
We can again apply Markov’s inequality to the first term in (A.18) and obtain that for any constant ,
Therefore, assuming that and as , which will be proven below, the display above implies that . This together with (A.18) and (A.19) leads to (A.16).
where is the dimension of . We have used the property of the Frobenius norm: for a generic symmetric positive definite matrix , , where and denotes the largest and the smallest eigenvalues of the matrix , respectively. Furthermore, the envelop function condition in Assumption 3 implies that
It follows from (A.20) and (A.21) that for all large ,
where are positive constants that only depend on .
Due to Assumption 3, the first term in (A.1) is bounded by
Thus we have shown that both terms on the right-hand side of (A.1) are finite. Therefore, and by the dominated convergence theorem, .
A.2 Proof of Theorem 1
Proof of Theorem 1(i): Since , we can derive the following for subset posteriors in terms of using a change of variable from to in (A.1) of Lemma 2:
where is now the local parameter for the th subset. From the relation between norms and in Lemma 1, this directly implies
We further use the rescaling property of the distance and obtain the equivalent form in terms of the original parameter :
From Lemma 3, we have that for any constant , as ,
where (i) follows from Lemma 3 with , (ii) uses Markov’s inequality, (iii) comes from the relation between norm and norm, and (iv) follows from (A.23). This result indicates that
which shows the first relation in Part (i) of Theorem 1. The second relation in Theorem 1 (i)
follows from a similar argument using (A.2) in Lemma 2 for the overall posterior.
From Lemma 4, we have . Therefore,
where the first inequality follows because of the definition of distance and the same variance shared by the two normal distributions.
Finally, by (A.24), (A.25), (A.26) and the triangular inequality, we have
which is equivalent to the third relation in Part (i).
Proof of Theorem 1(ii): If is an unbiased estimator of , then by Lemma 4 and the definition of distance, it follows that
Applying the triangular inequality to (A.24), (A.25) and (A.27), we obtain that as ,
Thus the conclusion of Part (ii) follows.
A.3 Proof of Theorem 2
Proof of Theorem 2(i): have shown that the barycenter is related to the subset posteriors () through the quantile function:
To see why this is true, we notice that we have derived the following relation in the proof of Theorem 1:
But according to the definition of in (A.13), by Cauchy-Schwarz inequality,
On the other hand, for the bias of the overall posterior , we follow a similar argument as above and obtain that
where . Moreover we have
by Theorem 1. This completes the proof of Part (i).
Proof of Theorem 2(ii): Similar to the expectation, the variance of a generic univariate distribution can be calculated through its quantile functions: if ,
From (A.14) (with ) and the conclusion of Theorem 1, we have
Again by Cauchy-Schwarz inequality, we have
Therefore, we have shown that .
For the variance of , we use the same definition of as in Part (i) and derive that
Based on the conclusion of Theorem 1 and Cauchy-Schwarz inequality, we have
which proves .
Proof of Theorem 2(iii): The convergence in distance implies weak convergence. Therefore, it follows from Theorem 1 that in probability, both and converge in distribution to normal distributions as . The weak convergence also implies the convergence of quantile functions at any continuous point. Since both and are continuous distributions with posterior densities, their quantiles also converge pointwise to the quantiles of their limiting normal distributions. For any fixed , as , Theorem 1 implies that for ,
We can make this convergence uniform over all quantiles . Divide into equally spaced subintervals for and . For any , since is uniformly continuous on , we can pick sufficiently large such that
for all . Furthermore, because is continuous everywhere, we can find a sufficiently large , such that for all , all with the chosen above,
For any , we can find a such that . Therefore using the monotonicity of quantile functions,
which implies that for the quantiles in terms of ,
By plugging in the order from the proof of Theorem 1, we have
If we further assume that is an unbiased estimator of , then Lemma 4 says that . Therefore, using the results from Part (i), we have
which completes the proof.
Appendix B Theoretical Results for the Posterior Monte Carlo Errors
In practice, the credible intervals are calculated from the averages of empirical quantiles from subset posterior samples. In Algorithm 1, suppose that for each , and for are the initial distribution and the transition kernel for the Markov chain of the th subset posterior. with sample size are drawn sequentially with and for . for and . Let be the empirical distribution of for . Let be the Wasserstein barycenter of , which can be calculated through its quantile function for all . Let for be the space of functions on such that for any , almost surely in . We need three additional assumptions as follows.
is upper bounded by a constant almost surely in . is upper bounded by a constant almost surely in , where is the density of for .
Every subset posterior () is -mixing: there exists a nonnegative constant sequence decreasing to zero and , such that almost surely in , for any integer , any and all ,
where is the th draw in the Markov chain with initial draw , and is the conditional distribution of given .
Then the following theorem accounts for the Monte Carlo error in the empirical version of Wasserstein posterior due to finite sample approximations.
Suppose Assumptions 1–10 hold. Then for two arbitrary fixed numbers ,
where and are in -probability. Furthermore, if is an unbiased estimator of , then
Proof of Theorem 3: In this proof, we first establish the key relations between the empirical distribution and the exact continuous subset posterior , using the recent results from . Given the linear relation and all the assumptions in Theorem 3,
almost surely in for all , where , is a constant that only depends on the sequence , the constant upper bound of , and the constant upper bound of in Assumption 9. The expectation in (A.30) is taken with respect to because the first posterior sample is drawn from the initial distribution . Given Assumptions 8-10, the inequality (A.30) is the consequence of Theorem 15 of by setting their .
For the empirical Wasserstein barycenter , we can establish a similar inequality to Lemma 3: for any ,
where is defined in Lemma 3. Therefore, taking in (A.31), we obtain that
where (i) is from the relation between and norms, (ii) is from the triangular inequality of the distance and for , and (iii) follows from (A.23) and (A.30) with . By Markov’s inequality, it is clear that .
We can also take in (A.31) and obtain that
where is defined in (A.13) and .
For the bias of , we have
By Markov’s inequality and (A.30) with , for any ,
Together with Theorem 2, we conclude that
Furthermore, if is unbiased for , then
The results for quantiles can be derived similarly and therefore the proofs are omitted here.
Next we derive the rate for the posterior variance of . Similar to the derivation in the proof of Theorem 2(ii), we can obtain the following equality:
We bound the last three terms in the display above. It is clear that by Cauchy-Schwarz inequality, the third term is upper bounded by the second term. For the second term, we have
where the last relation follows from (A.24) and applying Markov’s inequality to (A.30).
For the last term in (B), we have the following bound:
where in the second inequality we used the Hölder’s inequality and the Cauchy-Schwarz inequality, and the last step is from Theorem 1. By (A.30), almost surely in ,
where (i) is from and Jensen’s inequality. Now we set and derive from (A.39) that
Hence, by Markov’s inequality, the right-hand side of (B) can be bounded by
Now we combine (B), (B) and (A.39) and conclude that
If we compare this with the results in Theorem 2, we obtain that
This concludes the proof of Theorem 3.
Appendix C Justification of Assumption 7
In this section, we verify Assumption 7 for two special examples: the normal linear model and some exponential family distributions. Without loss of generality, all the samples considered in this section refer to the first subset sample in Assumption 7.
We consider the following normal linear model based on independent and identically distributed observations:
where and ’s are independent. We write , , , and the true parameter is . We impose the following conjugate prior on the parameter :
where is to guarantee a finite variance for the prior of , and is a positive definite matrix. The subset posterior after the stochastic approximation is given by
We have the following proposition, which shows that the function in Assumption 7 is -integrable uniformly for all and , which implies the uniform integrability condition.
In the normal linear model (A.40), assume that is upper bounded by a constant. Assume that the eigenvalues of and are lower and upper bounded by constants for all . Assume that the error in (A.40) has finite 4th moment. Let and be the maximum likelihood estimators of and respectively. Then
Proof of Proposition 1: Let . Let the eigenvalues of and be lower bounded by and upper bounded by . Let . The subset posterior distributions of and are given by
where denotes the multivariate-t distribution with mean , variance matrix , and degrees of freedom.
The maximum likelihood estimators of and are given by
where denotes the trace of a generic square matrix . The posterior variance of can be bounded as
The second term in (A.43) can be bounded as
Since (C) and (C) have finite limits as , they are both bounded by constants, regardless of the value of . They together with (A.43) lead to (A.41).
Next we prove (A.42). We have the similar decomposition
We show an useful bound for the square of :
By using (C), the first term in (C) can be bounded as
And the second term in (C) can be bounded as
where we have used the relation , and denotes the largest eigenvalue of a generic matrix . Since (C) and (C) have finite limits as , they are both bounded by constants, regardless of the value of . They together with (C) lead to (A.42).
In this section, we verify Assumption 7 for the following three commonly used exponential family distributions: Poisson, exponential, and binomial.
(i) Suppose the data () are independent and identically distributed as with the probability mass function and the true parameter . Suppose the prior on is for some constants . Let be the maximum likelihood estimator of . Then
(ii) Suppose the data () are independent and identically distributed as with the probability density function and the true parameter . Suppose the prior on is for some constants . Let be the maximum likelihood estimator of . Then
(iii) Suppose the data () are binary data independent and identically distributed as with the probability density function and the true parameter . Suppose the prior on is for some constants . Let be the maximum likelihood estimator of . Then
Proof of Proposition 2: (i) The subset posterior distribution of is . Therefore
(ii) The subset posterior distribution of is , and notice that follows with , , . Therefore
(iii) The subset posterior distribution of is . Therefore
Therefore, the conclusion holds.
Appendix D Data Analysis
The prior distributions of and are specified as follows:
The prior density of given and is given by
The prior mean and variance of are set to be 0 and . and have independent hyperpriors with densities and . The Half- prior has a convenient parameter expanded form in terms of Inverse-Gamma(, ) distribution, where and are shape and scale parameters: if Inverse-Gamma(, ) and Inverse-Gamma(, ), then Half-(, ). We fixed the hyperparameters and at recommended default values 2 and . We used griddy Gibbs for generating samples of and from their posterior distribution; see Section 3 in for details. The Gibbs sampler in is modified by changing the sample size, , in their sampler to , where is sample size for the subset and is the number of subsets.
Let represent the asymptotic approximations of subset posteriors, then has shown that their barycenter in Wasserstein-2 space is also Gausssian with mean and covariance matrix , where
Therefore, we use the formula above to calculate the barycenter of normal approximations to the subset posteriors. Given , we can find efficiently using fixed-point iteration.
Although the priors of and specified above are heavy-tailed with infinite second moments, in the following proposition and its proof, we verify that every subset posterior after conditioning on the first observations has finite second moment in both and , for some fixed integer .
The last integral of (D.1) can be further bounded by
where the last inequality follows if we choose .
We can combine (D.1), (D.1), (D.1) and obtain that
D.2 Simulated data analysis: Linear mixed effects model
Stochastic approximation for subset posteriors can be easily implemented in Stan. The sampling model for linear mixed effects models implies that likelihood of and is
where is the multivariate normal density with mean and covariance matrix . The likelihood after stochastic approximation is
The generative model is completed by imposing default priors for and in Stan. We take advantage of the increment_log_prob function in Stan to specify that
where is the density that leads to the term for in the likelihood in (A.58). In general would be analytically intractable, but in the present case it corresponds to . The computation time of different methods is summarized in Figure 6a.
D.3 Real data analysis: United States natality data
We selected thirteen variables from the United States natality data summarized in Table 9 and analyzed in and . These data are available at http://qed.econ.queensu.ca/jae/datasets/abrevaya001. The computation time of different methods is summarized in Figure 6b.