A Review of Multiple Try MCMC algorithms for Signal Processing

Luca Martino

Introduction

Bayesian methods have become very popular in signal processing over the last years . They require the application of sophisticated Monte Carlo techniques, such as Markov chain Monte Carlo (MCMC) and particle filters, for the efficient computation of a-posteriori estimators . More specifically, the MCMC algorithms generate a Markov chain such that its stationary distribution coincides with the posterior probability density function (pdf) . Typically, the only requirement is to be able to evaluate the target function, where the knowledge of the normalizing constant is usually not needed.

The most popular MCMC method is undoubtedly the Metropolis-Hastings (MH) algorithm . The MH technique is a very simple method, easy to be applied: this is the reason of its success. In MH, at each iteration, one new candidate is generated from a proposal pdf and then is properly compared with the previous state of the chain, in order to decide the next state. However, the performance of MH are often not satisfactory. For instance, when the posterior is multimodal, or when the dimension of the space increases, the correlation among the generated samples is usually high and, as a consequence, the variance of the resulting estimators grows. To speed up the convergence and reduce the “burn-in” period of the MH chain, several extensions have been proposed in literature.

In this work, we provide an exhaustive review of more sophisticated MCMC methods that, at each iteration, consider different candidates as possible new state of the chain. More specifically, at each iteration different samples are compared by certain weights and then one of them is selected as possible future state. The main advantage of these algorithms is that they foster the exploration of a larger portion of the sample space, decreasing the correlation among the states of the generated chain. In this work, we describe different algorithms of this family, independently introduced in literature. The main contribution is to present them under the same the framework and notation, remarking differences, relationships, limitations and strengths. All the discussed techniques yield an ergodic chain converging to the posterior density of interest (in the following, referred also as target pdf).

The first scheme of this MCMC class, called Orientational Bias Monte Carlo (OBMC) [12, Chapter 13], was proposed in the context of molecular simulation. Later on a more general algorithm, called Multiple Try Metropolis (MTM), was introduced . MTM includes OBMC as a special case (see Section 4.1.1). The MTM algorithm has been extensively studied and generalized in different ways . Other techniques, alternative to the MTM schemes, are the so-called the Ensemble MCMC (EnMCMC) methods . They follow a similar approach to MTM but employ a different acceptance function for selecting the next state of the chain. With respect to (w.r.t.) a generic MTM scheme, EnMCMC does not require any generation of auxiliary samples (as in a MTM scheme employing a generic proposal pdf) and hence, in this sense, EnMCMC are less costly.

In all the previous techniques, the candidates are drawn in a batch way and compared jointly. In the Delayed Rejection Metropolis (DRM) algorithm , in case of rejection of the novel possible state, the authors suggest to perform an additional acceptance test considering a new candidate. If this candidate is again rejected, the procedure can be iterated until reaching a desired number of attempts. The main benefit of DRM is that the proposal pdf can be improved at each intermediate stage. However, the acceptance function progressively becomes more complex so that the implementation of DRM for a great number of attempts is not straightforward (compared to the implementation of a MTM scheme with a generic number of tries).

In the last years, other Monte Carlo methods which combine particle filtering and MCMC have become very popular in the signal processing community. For instance, this is the case of the Particle Metropolis Hastings (PMH) and the Particle Marginal Metropolis Hastings (PMMH) algorithms, which have been widely used in signal processing in order to make inference and smoothing about dynamical and static parameters in state space models . PMH can be interpreted as a MTM scheme where the different candidates are generated and weighted by the use of a particle filter . In this work, we present PMH and PMMH and discuss their connections and differences with the classical MTM approach. Furthermore, we describe a suitable procedure for recycling some candidates in the final Monte Carlo estimators, called Group Metropolis Sampling (GMS) . The GMS scheme can be also seen as a way of generating a chain of sets of weighted samples. Finally, note that other similar and related techniques can be found within the so-called data augmentation approach .

The remaining of the paper is organized as follows. Section 2 recalls the problem statement and some background material, introducing also the required notation. The basis of MCMC and the Metropolis-Hastings (MH) algorithm are presented in Section 3. Section 4 is the core of the work, which describes the different MCMC using multiple candidates. Section 6 provides some numerical results, applying different techniques in a hyperparameter tuning problem for a Gaussian Process regression model, and in a localization problem considering a wireless sensor network. Some conclusions are given in Section 7.

Problem statement and preliminaries

The analytical study of the posterior density πˉ(θ)\bar{\pi}({\bm{\theta}}) is often unfeasible and integrals involving πˉ(θ)\bar{\pi}({\bm{\theta}}) are typically intractable . For instance, one might be interested in the estimation of

where f(θ)f({\bm{\theta}}) is a generic integrable function w.r.t. πˉ\bar{\pi}. Dynamic and static parameters. In some specific application, the variable of interest θ{\bm{\theta}} can be split in two disjoint parts, θ=[x,λ]{\bm{\theta}}=[{\bf x},{\bm{\lambda}}], where one, x{\bf x}, is involved into a dynamical system (for instance, x\bf x is the hidden state in a state-space model) and the other, λ{\bm{\lambda}}, is a static parameter (for instance, an unknown parameter of the model). The strategies for making inference about x{\bf x} and λ{\bm{\lambda}} should take into account the different nature of the two parameters (e.g., see Section 4.2.2). The main notation and acronyms are summarized in Tables 1-2.

I^T{\widehat{I}}_{T} converges in probability to II due to the weak law of large numbers. The approximation above I^T{\widehat{I}}_{T} is known as a direct (or ideal) Monte Carlo estimator if the samples θt{\bm{\theta}}_{t} are independent and identically distributed (i.i.d.) from πˉ\bar{\pi}. Unfortunately, in many practical applications, direct methods for drawing independent samples from πˉ(θ)\bar{\pi}({\bm{\theta}}) are not available. Therefore, different approaches are required, such as the Markov chain Monte Carlo (MCMC) techniques.

Markov chain Monte Carlo (MCMC) methods

A MCMC algorithm generates an ergodic Markov chain with invariant (a.k.a., stationary) density given by the posterior pdf πˉ(θ)\bar{\pi}({\bm{\theta}}) . Specifically, given a starting state θ0{\bm{\theta}}_{0}, a sequence of correlated samples is generated, θ0→θ1→θ2→....→θT{\bm{\theta}}_{0}\rightarrow{\bm{\theta}}_{1}\rightarrow{\bm{\theta}}_{2}\rightarrow....\rightarrow{\bm{\theta}}_{T}. Even if the samples are now correlated, the estimator

is consistent, regardless the starting vector θ(0){\bm{\theta}}^{(0)} . Recall we are assuming that the Markov chain is ergodic and hence the starting value is forgotten. With respect to the direct Monte Carlo approach using i.i.d. samples, the application of an MCMC algorithm entails a loss of efficiency of the estimator I~T{\widetilde{I}}_{T}, since the samples are positively correlated, in general. In other words, to achieve a given variance obtained with the direct Monte Carlo estimator, it is necessary to generate more samples. Thus, in order to improve the performance of an MCMC technique we have to decrease the correlation among the states of the chain. For the sake of simplicity, we use all the generated states in the final estimators, without removing any burn-in period .

The algorithm returns the sequence of states {θ1,θ2,…,θt,…,θT}\{{\bm{\theta}}_{1},{\bm{\theta}}_{2},\ldots,{\bm{\theta}}_{t},\ldots,{\bm{\theta}}_{T}\} (or a subset of them removing the burn-in period if an estimation of its length is available). We can see that the next state θt{\bm{\theta}}_{t} can be the proposed sample θ′{\bm{\theta}}^{\prime} (with probability α\alpha) or the previous state θt−1{\bm{\theta}}_{t-1} (with probability 1−α1-\alpha). Under some mild regularity conditions, when tt grows, the pdf of the current state θt{\bm{\theta}}_{t} converges to the target density πˉ(θ){\bar{\pi}}({\bm{\theta}}) . The MH algorithm satisfies the so-called detailed balance condition which is sufficient to guarantee that the output chain is ergodic and has πˉ{\bar{\pi}} as stationary distribution . Note that the acceptance probability α\alpha can be rewritten as

where we have denoted w(θ′∣θt−1)=π(θ′)q(θ′∣θt−1)w({\bm{\theta}}^{\prime}|{\bm{\theta}}_{t-1})=\frac{\pi({\bm{\theta}}^{\prime})}{q({\bm{\theta}}^{\prime}|{\bm{\theta}}_{t-1})} and w(θt−1∣θ′)=π(θt−1)q(θt−1∣θ′)w({\bm{\theta}}_{t-1}|{\bm{\theta}}^{\prime})=\frac{\pi({\bm{\theta}}_{t-1})}{q({\bm{\theta}}_{t-1}|{\bm{\theta}}^{\prime})} in a similar fashion of the importance sampling weights of θ′{\bm{\theta}}^{\prime} and θt−1{\bm{\theta}}_{t-1} . If the proposal pdf is independent from the previous state, i.e., q(θ∣θt−1)=q(θ)q({\bm{\theta}}|{\bm{\theta}}_{t-1})=q({\bm{\theta}}), the acceptance function depends on the ratio of the importance weights w(θ′)=π(θ′)q(θ′)w({\bm{\theta}}^{\prime})=\frac{\pi({\bm{\theta}}^{\prime})}{q({\bm{\theta}}^{\prime})} and w(θt−1)=π(θt−1)q(θt−1)w({\bm{\theta}}_{t-1})=\frac{\pi({\bm{\theta}}_{t-1})}{q({\bm{\theta}}_{t-1})}, as shown in Table 4. We refer to this special MH case as the Independent MH (I-MH) algorithm. It is strictly related to other techniques described in the following (e.g., see Section 4.2.1).

MCMC using multiple candidates

In the standard MH technique described above, at each iteration one new sample θ′{\bm{\theta}}^{\prime} is generated to be tested with the previous state θt−1{\bm{\theta}}_{t-1} by the acceptance probability α(θt−1,θ′)\alpha({\bm{\theta}}_{t-1},{\bm{\theta}}^{\prime}). Other generalized MH schemes generate several candidates at each iteration to be tested as new possible state. In all these schemes, an extended acceptance probability α\alpha is properly designed in order to guarantee the ergodicity of the chain. Figure 1 provides a graphical representation of the difference between MH and the techniques using several candidates.

Below, we describe the most important examples of this class of MCMC algorithms. In most of them, a single MH-type test is performed at each iteration whereas in other methods a sequence of tests is employed. Furthermore, most of these techniques use an Importance Sampling (IS) approximation of the target density in order to improve the proposal procedure employed within a MH-type algorithm. Namely, they build an IS approximation, and then draw one sample from this approximation (resampling step). Finally, the selected sample is compared with the previous state of the chain, θt−1{\bm{\theta}}_{t-1}, according to a suitable generalized acceptance probability α\alpha. It can be proved that all the methodologies presented in this work yield a ergodic chain with the posterior πˉ{\bar{\pi}} as invariant density.

The Multiple Try Metropolis (MTM) algorithms are examples of this class of methods, where NN samples θ(1),θ(2),…,θ(N){\bm{\theta}}^{(1)},{\bm{\theta}}^{(2)},\ldots,{\bm{\theta}}^{(N)} (called also “tries” or “candidates”) are drawn from the proposal pdf q(θ)q({\bm{\theta}}), at each iteration . Then, one of them is selected according to some suitable weights. Finally, the selected candidate is accepted or rejected as new state according to a generalized probability function α\alpha.

The MTM algorithm is given in Table 5. For the sake of simplicity, we have considered the use of the importance weights w(θ∣θt−1)=π(θ)q(θ∣θt−1)w({\bm{\theta}}|{\bm{\theta}}_{t-1})=\frac{\pi({\bm{\theta}})}{q({\bm{\theta}}|{\bm{\theta}}_{t-1})}, but there is not a unique possibility, as also shown below . In its general form, when the proposal depends on the previous state of the chain q(θ∣θt−1)q({\bm{\theta}}|{\bm{\theta}}_{t-1}), the MTM requires the generation of N−1N-1 auxiliary samples, v(i){\bf v}^{(i)}, which are employed in the computation of the acceptance function α\alpha. They are needed in order to guarantee the ergodicity. Indeed, the resulting MTM kernel satisfies the detailed balance condition, so that the chain is reversible . Note that for N=1N=1, we have θ(j)=θ(1){\bm{\theta}}^{(j)}={\bm{\theta}}^{(1)}, v(1)=θt−1{\bf v}^{(1)}={\bm{\theta}}_{t-1} and the acceptance probability of the MTM method becomes

that is the acceptance probability of the classical MH technique. Several variants have been studied, for instance, with correlated tries and considering the use of different proposal pdfs .

The MTM method in Table 5 needs at step 2d the generation of N−1N-1 auxiliary samples and at step 2e the computation of their weights (and, as a consequence, N−1N-1 additional evaluation of the target pdf are required), that are only employed in the computation of the acceptance function α\alpha.

The importance weights are not the unique possible choice. It is possible to show that the MTM algorithm generates an ergodic chain with invariant density πˉ\bar{\pi}, if the weight function w(θ∣θt−1)w({\bm{\theta}}|{\bm{\theta}}_{t-1}) is chosen with the form

For instance, choosing ξ(θt−1,θ)=1q(θ∣θt−1)q(θt−1∣θ)\xi({\bm{\theta}}_{t-1},{\bm{\theta}})=\frac{1}{q({\bm{\theta}}|{\bm{\theta}}_{t-1})q({\bm{\theta}}_{t-1}|{\bm{\theta}})}, we obtain the importance weights w(θ∣θt−1)=π(θ)q(θ∣θt−1)w({\bm{\theta}}|{\bm{\theta}}_{t-1})=\frac{\pi({\bm{\theta}})}{q({\bm{\theta}}|{\bm{\theta}}_{t-1})} used above. If we set ξ(θt−1,θ)=1\xi({\bm{\theta}}_{t-1},{\bm{\theta}})=1, we have w(θ∣θt−1)=π(θ)q(θt−1∣θ)w({\bm{\theta}}|{\bm{\theta}}_{t-1})=\pi({\bm{\theta}})q({\bm{\theta}}_{t-1}|{\bm{\theta}}). Another interesting example can be employed if the proposal is symmetric, i.e., q(θ∣θt−1)=q(θt−1∣θ)q({\bm{\theta}}|{\bm{\theta}}_{t-1})=q({\bm{\theta}}_{t-1}|{\bm{\theta}}). In this case, we can choose ξ(θt−1,θ)=1q(θt−1∣θ)\xi({\bm{\theta}}_{t-1},{\bm{\theta}})=\frac{1}{q({\bm{\theta}}_{t-1}|{\bm{\theta}})} and then w(θ∣θt−1)=w(θ)=π(θ)w({\bm{\theta}}|{\bm{\theta}}_{t-1})=w({\bm{\theta}})=\pi({\bm{\theta}}), i.e., the weights only depend on the value of the target density at θ{\bm{\theta}}. Thus, MTM contains the Orientational Bias Monte Carlo (OBMC) scheme [12, Chapter 13] as a special case, when a symmetric proposal pdf is employed, and then one candidate is chosen with weights proportional to the target density, i.e., w(θ∣θt−1)=π(θ)w({\bm{\theta}}|{\bm{\theta}}_{t-1})=\pi({\bm{\theta}}).

1.2 Independent Multiple Try Metropolis (I-MTM) schemes

The MTM method described in Table 5 requires to draw 2N−12N-1 samples at each iteration (NN candidates and N−1N-1 auxiliary samples) and N−1N-1 are only used in the acceptance probability function. The generation of the auxiliary points

can be avoided if the proposal pdf is independent from the previous state, i.e., q(θ∣θt−1)=q(θ)q({\bm{\theta}}|{\bm{\theta}}_{t-1})=q({\bm{\theta}}). Indeed, in this case, we should draw N−1N-1 samples again from q(θ)q({\bm{\theta}}) at the step 2d of Table 5. Since we have already drawn NN samples from q(θ)q({\bm{\theta}}) at step 2a of Table 5, we can set

without jeopardizing the ergodicity of the chain (recall that v(j)=θt−1{\bf v}^{(j)}={\bm{\theta}}_{t-1}). Hence, we can avoid step 2d and the acceptance function can be rewritten as

The I-MTM algorithm is provided in Table 6.

An I-MTM method requires only NN new evaluations of the target pdf at each iteration, instead of 2N−12N-1 new evaluations in the generic MTM scheme in Table 5. Note that we can also write α(θt−1,θ(j))\alpha({\bm{\theta}}_{t-1},{\bm{\theta}}^{(j)}) as

Alternative version (I-MTM2). From the IS theory, we know that Z^1=1N∑n=1Nw(θ(n))\widehat{Z}_{1}=\frac{1}{N}\sum_{n=1}^{N}w({\bm{\theta}}^{(n)}) is an unbiased estimator of the normalizing constant ZZ of the target π\pi (a.k.a, Bayesian evidence or marginal likelihood). It suggests to replace Z^2\widehat{Z}_{2} with other unbiased estimators of ZZ (without jeopardizing the ergodicity of the chain). For instance, instead of recycling the samples generated in the same iteration as auxiliary points as in Eq. (14), we could reuse samples generated in the previous iteration t−1t-1. This alternative version of I-MTM method (I-MTM2) is given in Table 7. Note that, in both cases I-MTM and I-MTM2, the selected candidate θ(j){\bm{\theta}}^{(j)} is drawn from the following particle approximation of the target πˉ\bar{\pi},

i.e., θ(j)∼π^(θ∣θ(1:N)){\bm{\theta}}^{(j)}\sim\widehat{\pi}({\bm{\theta}}|{\bm{\theta}}^{(1:N)}). The acceptance probability α\alpha used in I-MTM2 can be also justified considering a proper IS weighting of a resampled particle and using the expression (7) related to the standard MH method, as discussed in . Figure 2 provides a graphical representation of the I-MTM schemes.

1.3 Reusing candidates in parallel I-MTM chains

Let us consider to run CC independent parallel chains yielded by an I-MTM scheme. In this case, we have NCNC evaluations of the target function π\pi and CC resampling steps performed at each iteration (so that we have NCTNCT total target evaluations and CTCT total resampling steps).

In literature, different authors have suggested to recycle the NN candidates, θ(1),θ(2),…,θ(N)∼q(θ){\bm{\theta}}^{(1)},{\bm{\theta}}^{(2)},\ldots,{\bm{\theta}}^{(N)}\sim q({\bm{\theta}}), in order to reduce the number of evaluations of the target pdf . The idea is to performs CC-times the resampling procedure considering the same set of candidates, θ(1),θ(2),…,θ(N){\bm{\theta}}^{(1)},{\bm{\theta}}^{(2)},\ldots,{\bm{\theta}}^{(N)} (a similar approach was proposed in ). Each resampled candidate is then tested as possible future state of one chain. In this scenario, The number of target evaluations per iteration is only NN (hence, the total number of evaluation of π\pi is NTNT). However, the resulting CC parallel chains are no longer independent, and there is a lose of performance w.r.t. the independent chains. There exists also the possibility of reducing the total number of resampling steps, as suggested in the Block Independent MTM scheme (but the dependence among the chains grows even more).

2 Particle Metropolis-Hastings (PMH) method

Assume that the variable of interest is formed by only a dynamical variable, i.e., θ=x=x1:D=[x1…,xD]⊤{\bm{\theta}}={\bf x}=x_{1:D}=[x_{1}\dots,x_{D}]^{\top} (see Section 2). This is the case of inferring a hidden state in state-space model, for instance. More generally, let assume that we are able to factorize the target density as

The Particle Metropolis Hastings (PMH) method is an efficient MCMC technique, proposed independently from the MTM algorithm, specifically designed for being applied in this framework. Indeed, we can take advantage of the factorization of the target pdf and consider a proposal pdf decomposed in the same fashion

Then, as in a batch IS scheme, given an nn-th sample x(n)=x1:D(n)∼q(x){\bf x}^{(n)}=x_{1:D}^{(n)}\sim q({\bf x}) with xd(n)∼qd(xd∣xd−1)x_{d}^{(n)}\sim q_{d}(x_{d}|x_{d-1}), we assign the importance weight

The previous expression suggests a recursive procedure for computing the importance weights: starting with w1(n)=π(x1(n))q(x1(n))w_{1}^{(n)}=\frac{\pi(x_{1}^{(n)})}{q(x_{1}^{(n)})} and then

for d=2,…,Dd=2,\ldots,D. This method is usually referred as Sequential Importance Sampling (SIS). If resampling steps are also employed at some iteration, the method is called Sequential Importance Resampling (SIR), a.k.a., particle filtering (PF) (see Appendix B). PMH uses a SIR approach for providing the particle approximation π^(x∣x(1:N))=∑i=1NwˉD(i)δ(x−x(i))\widehat{\pi}({\bf x}|{\bf x}^{(1:N)})=\sum_{i=1}^{N}\bar{w}_{D}^{(i)}\delta({\bf x}-{\bf x}^{(i)}) where wˉD(i)=wD(i)∑n=1NwD(n)\bar{w}_{D}^{(i)}=\frac{w_{D}^{(i)}}{\sum_{n=1}^{N}w_{D}^{(n)}} and wD(i)=w(x(i))w_{D}^{(i)}=w({\bf x}^{(i)}), obtained using Eq. (26) (with a proper weighting of a resampled particle ). Then, one particle is drawn from this approximation, i.e., with a probability proportional to the corresponding normalized weight. Estimation of the marginal likelihood ZZ in particle filtering. SIR combines the SIS approach with the application of resampling procedures. In SIR, a consistent estimator of ZZ is given by

Due to the application of the resampling, in SIR the standard estimator

is a possible alternative only if a proper weighting of the resampled particles is applied (otherwise, it is not an estimator of ZZ). If a proper weighting of a resampled particle is employed, both Z~\widetilde{Z} and Z^\widehat{Z} are equivalent estimators of ZZ . Without the use of resampling steps (i.e., in SIS), Z~\widetilde{Z} and Z^\widehat{Z} are always equivalent estimators . See also Appendix B. The complete description of PMH is provided in Table 8 considering the use of Z~\widetilde{Z}. At each iteration, a particle filter is run in order to provide an approximation by NN weighted samples of the measure of the target. Then, a sample among the NN weighted particles is chosen by one resampling step. This selected sample is then accepted or rejected as next state of the chain according to an MH-type acceptance probability, which involves two estimators of marginal likelihood ZZ. PMH is also related to other popular method in molecular simulation called Configurational Bias Monte Carlo (CBMC) .

A simple look at I-MTM2 and PMH shows that they are strictly related . Indeed, the structure of the two algorithms coincides. The main difference lies that the candidates in PMH are generated sequentially, using a SIR scheme. If no resampling steps are applied, then I-MTM2 and PMH are exactly the same algorithm, where the candidates are drawn in a batch setting or sequential way. Hence, the application of resampling steps is the main difference between the generation procedures of PMH and I-MTM2. Owing to the use of resampling, the candidates {x(1),…,x(N)}\{{\bf x}^{(1)},\ldots,{\bf x}^{(N)}\} proposed by PMH are not independent (differently from I-MTM2). As an example, Figure 3 shows N=40N=40 particles (with D=10D=10) generated and weighted by SIS and SIR procedures (each path is a generated particle x(i)=x1:10(i){\bf x}^{(i)}=x_{1:10}^{(i)}). The generation of correlated samples can be also considered in MTM methods without jeopardizing the ergodicity of the chain, as simply shown for instance in , for instance. Another difference is the use of Z~{\widetilde{Z}} or Z^{\widehat{Z}}. However, if a proper weighting of a resampled particle is employed, both estimators coincide . Furthermore, both I-MTM2 and PMH can be considered as I-MH schemes where a proper importance sampling weighting of a resampled particle is employed . Namely, I-MTM2 and PMH are equivalent to an I-MH technique using the following complete proposal pdf,

where π~\widetilde{\pi} is given in Eq. (20), i.e., θ(j)∼q~(θ){\bm{\theta}}^{(j)}\sim\widetilde{q}({\bm{\theta}}), and then considering the generalized (proper) IS weighting, w(θ(j))=Z^∗w({\bm{\theta}}^{(j)})=\widehat{Z}^{*}, w(θt−1)=Z^t−1w({\bm{\theta}}_{t-1})=\widehat{Z}_{t-1} . For further details see Appendix A.

2.2 Particle Marginal Metropolis-Hastings (PMMH) method

Assume now that the variable of interest if formed by both dynamical and static variables, i.e., θ=[x,λ]⊤{\bm{\theta}}=[{\bf x},{\bm{\lambda}}]^{\top}. For instance, this is the case of inferring both, an hidden state x{\bf x} in state-space model, and static parameters λ{\bm{\lambda}} of the model. The Particle Marginal Metropolis-Hastings (PMMH) technique is a extension of PMH which addresses this problem.

where π(x∣λ)=γ1(x1∣λ)∏d=2Dγd(xd∣x1:d−1,λ)\pi({\bf x}|{\bm{\lambda}})=\gamma_{1}(x_{1}|{\bm{\lambda}})\prod_{d=2}^{D}\gamma_{d}(x_{d}|x_{1:d-1},{\bm{\lambda}}). For a specific value of λ{\bm{\lambda}}, we can use a particle filter approach, obtaining the approximation π^(x∣λ)=∑n=1NwˉD(n)δ(x−x(n))\widehat{\pi}({\mathbf{x}}|{\bm{\lambda}})=\sum_{n=1}^{N}{\bar{w}}_{D}^{(n)}\delta({\mathbf{x}}-{\mathbf{x}}^{(n)}) and the estimator Z~(λ)\widetilde{Z}({\bm{\lambda}}), as described above. The PMMH technique is then summarized in Table 9. The pdf qλ(λ∣λt−1)q_{\lambda}({\bm{\lambda}}|{\bm{\lambda}}_{t-1}) denotes the proposal density for generating possible values of λ{\bm{\lambda}}. Observe that, with the specific choice qλ(λ∣λt−1)=gλ(λ)q_{\lambda}({\bm{\lambda}}|{\bm{\lambda}}_{t-1})=g_{\lambda}({\bm{\lambda}}), then the acceptance function becomes

Note also that PMMH w.r.t. to λ{\bm{\lambda}} can be interpreted as MH method where an the posterior cannot be evaluated point-wise. Indeed, Z~(λ)\widetilde{Z}({\bm{\lambda}}) approximates the marginal likelihood p(y∣λ)p({\bf y}|{\bm{\lambda}}) .

3 Group Metropolis Sampling

The auxiliary weighted samples in the I-MTM schemes (i.e., the N−1N-1 samples drawn at each iteration that are not selected to be compared with the previous state θt−1{\bm{\theta}}_{t-1}) can be recycled providing a consistent and more efficient estimators .

The so-called Group Metropolis Sampling (GMS) method is shown in Table 10. GMS yields a sequence of sets of weighted samples St={θn,t,ρn,t}n=1N\mathcal{S}_{t}=\{{\bm{\theta}}_{n,t},\rho_{n,t}\}_{n=1}^{N}, for t=1,…,Tt=1,\ldots,T, where we have denoted with ρn,t\rho_{n,t} the importance weights assigned to the samples θn,t{\bm{\theta}}_{n,t} (see Figure 4). All the samples are then employed for a joint particle approximation of the target. Alternatively, GMS can directly provide an approximation of a specific moment of the target pdf (i.e., given a particular function ff). The estimator of this specific moment provided by GMS is

Unlike in the I-MTM schemes, no resampling steps are performed in GMS. However, we can recover an I-MTM chain from the GMS output applying one resampling step when St≠St−1\mathcal{S}_{t}\neq\mathcal{S}_{t-1}, i.e.,

for t=1,…,Tt=1,\ldots,T. More specifically, {θt}t=1T\{{\bm{\theta}}_{t}\}_{t=1}^{T} is a Markov chain obtained by one run of an I-MTM2 technique. The consistency of the GMS estimators is discussed in Appendix C. GMS can be also interpreted as an iterative IS scheme where an IS approximation of NN samples is built at each iteration and compared with the previous IS approximation. This procedure is iterated TT times and all the accepted IS estimators I~N(t)\widetilde{I}_{N}^{(t)} are finally combined to provide a unique global approximation of NTNT samples. Note that the temporal combination of the IS estimators is obtained dynamically by the random repetitions due to the rejections in the acceptance test.

The complete weighting procedure in GMS can be interpreted as the composition of two weighting schemes: (a) by an IS approach building {ρn,t}n=1N\{\rho_{n,t}\}_{n=1}^{N} and (b) by the possible random repetitions due to the rejections in the acceptance test. Figure 4 depicts a graphical representation of the GMS outputs as chain of sets St={θn,t,ρn,t}n=1N\mathcal{S}_{t}=\{{\bm{\theta}}_{n,t},\rho_{n,t}\}_{n=1}^{N}.

4 Ensemble MCMC algorithms

Another alternative procedure, often referred as Ensemble MCMC (EnMCMC) methods (a.k.a., called Locally weighted MCMC), involving several tries at each iteration . Related techniques has been proposed independently in different works . First, let us define the joint proposal density

and, considering N+1N+1 possible elements, S={θ(1),…,θ(N),θ(N+1)}\mathcal{S}=\{{\bm{\theta}}^{(1)},\ldots,{\bm{\theta}}^{(N)},{\bm{\theta}}^{(N+1)}\}, we define the D×ND\times N matrix

with columns all the vectors in S\mathcal{S} with the exception of θ(k){\bm{\theta}}^{(k)}. For simplicity, in the followings we abuse of the notation writing q(θ(1),…,θ(N)∣θt)=q(Θ¬N+1∣θt)q({\bm{\theta}}^{(1)},\ldots,{\bm{\theta}}^{(N)}|{\bm{\theta}}_{t})=q({\bf\Theta}_{\neg N+1}|{\bm{\theta}}_{t}), for instance. One simple example of joint proposal pdf is

i.e., considering independence among θ(n){\bm{\theta}}^{(n)}’s (and having the same marginal proposal pdf qq). More sophisticated joint proposal densities can be employed. A generic EnMCMC algorithm is outlined in Table 11.

Note that with respect to the generic MTM method, EnMCMC does not require to draw auxiliary samples and weights. Therefore, in EnMCMC a smaller number of evaluation of target is required w.r.t. a generic MTM scheme.

In this section, we present an interesting special case, which employs a single proposal pdf q(θ)q({\bm{\theta}}) independent on the previous state of the chain, i.e.,

In this case, the technique can be simplified as shown below. At each iteration, the algorithm described in Table 12 generates NN new samples θ(1),θ(2),…,θ(N){\bm{\theta}}^{(1)},{\bm{\theta}}^{(2)},\ldots,{\bm{\theta}}^{(N)} and then resample the new state θt{\bm{\theta}}_{t} within a set of N+1N+1 samples, {θ(1),…,θ(N),θt+1}\{{\bm{\theta}}^{(1)},\ldots,{\bm{\theta}}^{(N)},{\bm{\theta}}_{t+1}\} (which includes the previous state), according to the probabilities

where w(θ)=π(θ)q(θ)w({\bm{\theta}})=\frac{\pi({\bm{\theta}})}{q({\bm{\theta}})} denotes the importance sampling weight. Note that Eq. (43) for N=1N=1 becomes

that is the Barker’s acceptance function (see ).

As discussed in [42, Appendix B], [48, Appendix C], , the density of a resampled candidate becomes closer and closer to πˉ\bar{\pi} as NN grows, i.e., N→∞N\rightarrow\infty. Hence, the performance of I-EnMCMC clearly improves with N→∞N\rightarrow\infty (see Appendix A). The I-EnMCMC algorithm produces an ergodic chain with invariant density πˉ\bar{\pi}, by resampling N+1N+1 samples at each iteration (NN new samples θ(1),…,θ(N){\bm{\theta}}^{(1)},\ldots,{\bm{\theta}}^{(N)} from qq and setting θ(N+1)=θt−1{\bm{\theta}}^{(N+1)}={\bm{\theta}}_{t-1}). Figure 5 summarizes the steps of I-EnMCMC.

5 Delayed Rejection Metropolis (DRM) Sampling

An alternative use of different candidates in one iteration of a Metropolis-type method is given in . The idea behind the proposed algorithm, called Delayed Rejection Metropolis (DRM) algorithm, is the following. As in a standard MH method, at each iteration, one sample is proposed θ(1)∼q1(θ∣θt−1){\bm{\theta}}^{(1)}\sim q_{1}({\bm{\theta}}|{\bm{\theta}}_{t-1}) and accepted with probability

If θ(1){\bm{\theta}}^{(1)} is accepted then θt=θ(1){\bm{\theta}}_{t}={\bm{\theta}}^{(1)} and the chain is moved forward. If θ(1){\bm{\theta}}^{(1)} is rejected, the DRM method suggests of drawing another samples θ(2)∼q2(θ∣θ(1),θt−1){\bm{\theta}}^{(2)}\sim q_{2}({\bm{\theta}}|{\bm{\theta}}^{(1)},{\bm{\theta}}_{t-1}) (considering a different proposal pdf q2q_{2} taking into account possibly the previous candidate θ(1){\bm{\theta}}^{(1)}) and accepted with a suitable acceptance probability

The acceptance function α2(θt−1,θ(2))\alpha_{2}({\bm{\theta}}_{t-1},{\bm{\theta}}^{(2)}) is designed in order to ensure the ergodicity of the chain. If θ(2){\bm{\theta}}^{(2)} is rejected we can set θt=θt−1{\bm{\theta}}_{t}={\bm{\theta}}_{t-1} and perform another iteration of the algorithm, or continue with this iterative strategy drawing θ(3)∼q3(θ∣θ(2),θ(1),θt−1){\bm{\theta}}^{(3)}\sim q_{3}({\bm{\theta}}|{\bm{\theta}}^{(2)},{\bm{\theta}}^{(1)},{\bm{\theta}}_{t-1}) and test it with a proper probability α3(θt−1,θ(3))\alpha_{3}({\bm{\theta}}_{t-1},{\bm{\theta}}^{(3)}). The DRM algorithm with only 2 acceptance stages is outlined in Table 13 and summarized in Figure 6.

Note that the proposal pdf can be improved at each intermediate stage (θ(1)∼q1(θ∣θt−1){\bm{\theta}}^{(1)}\sim q_{1}({\bm{\theta}}|{\bm{\theta}}_{t-1}), θ(2)∼q2(θ∣θ(1),θt−1){\bm{\theta}}^{(2)}\sim q_{2}({\bm{\theta}}|{\bm{\theta}}^{(1)},{\bm{\theta}}_{t-1}) etc.), using the information provided by the previous generated samples and the corresponding target evaluations.

The idea behind DRM of creating a path of intermediate points, then improving the proposal pdf, and hence fostering larger jumps have been also considered in other works .

Summary: computational cost, differences and connections

The performance of the algorithms described above improves as NN grows, in general: the correlation among samples vanishes to zero, and the acceptance rate of new state approaches one (see Section 6.1). Generally, an acceptance rate close to 11 is not an evidence of good performance for an MCMC algorithm. However, for the techniques tackled in this work, the situation is different: as NN grows, the procedure used for proposing a novel possible state (involving NN tries, resampling steps etc.) becomes better and better, yielding a better approximation of the target pdf. See Appendix A for further details. As NN increases, they become similar and similar to an exact sampler drawing independent samples directly from the target density (for MTM, PMH and EnMCMC schemes the explanation is given in Appendix A). However, this occurs at the expense of an additional computational cost.

In Table 14, we summarize the total number of target evaluations, EE, and the total number of samples used in the final estimators, QQ (without considering to remove any burn-in period). The generic MTM algorithm has the greatest number of target evaluations. However, a random-walk proposal pdf can be used in a generic MTM algorithm and, in general, it fosters the exploration of the state space. In this sense, the generic EnMCMC seems to be preferable w.r.t. MTM, since E=NTE=NT and the random-walk proposal can be applied. A disadvantage of the EnMCMC schemes is that their acceptance function seems worse in terms of Peskun’s ordering (see numerical results in Section 6.1). Namely, fixing the number of NN tries, the target π\pi the proposal qq pdfs, the MTM schemes seem to provide greater acceptance rates than the corresponding EnMCMC techniques. This is theoretically proved for N=1N=1 , and the difference vanishes to zero as NN grows. The GMS technique, like other strategies , has been proposed to recycle samples or re-use target evaluations, in order to increase QQ (see also Section 4.1.3).

In PMH, the components of the different tries are drawn sequentially and they are correlated due to the application of the resampling steps. In DMR, each candidate is drawn in a batch way (all the components jointly) but the different candidates are drawn in a sequential manner (see Figure 6), θ(1){\bm{\theta}}^{(1)} then θ(2){\bm{\theta}}^{(2)} etc. The benefit of this strategy is that the proposal pdf can be improved considering the previous generated tries. Hence, if the proposal takes into account the previous samples, DMR generates correlated candidates as well. The main disadvantage of DRM is that the implementation for a generic N>2N>2 is not straightforward.

I-MTM and I-MTM2 differs for the acceptance function employed. Furthermore, The main difference between the I-MTM2 and PMH schemes is the use of resampling steps during the generation the different tries. For this reason, the candidates of PMH are correlated (unlike in I-MTM2). I-MTM2 and PMH can be interpreted as I-MH methods using a sophisticated proposal density q^(θ)\widehat{q}({\bm{\theta}}) in Eq. (31), and an extended IS weighting procedure is employed. Note that, indeed, q^\widehat{q} cannot be evaluated pointwise, hence a standard IS weighting strategy cannot be employed.

Numerical Experiments

We test different MCMC using multiple candidates in different numerical experiments. In the first example, an exhaustive comparison among several techniques with an independent proposal is given. We have considered different number of tries, length of the chain, parameters of the proposal pdfs and also different dimension of the inference problem. In the second numerical simulation, we compare different particle methods. The third one regards the hyperparameter selection for a Gaussian Process (GP) regression model. The last two examples are localization problems in a wireless sensor network (WSN): in the fourth one some parameters of the WSN are also tuned, whereas in last example a real data analysis is performed.

In order to compare the performance of different techniques, in this section we consider a multi-modal, multidimensional Gaussian target density. More specifically, we have

where μ1=[μ1,1,…,μ1,D]⊤{\bm{\mu}}_{1}=[\mu_{1,1},\ldots,\mu_{1,D}]^{\top}, μ2=[μ2,1,…,μ2,D]⊤{\bm{\mu}}_{2}=[\mu_{2,1},\ldots,\mu_{2,D}]^{\top}, μ3=[μ3,1,…,μ3,D]⊤{\bm{\mu}}_{3}=[\mu_{3,1},\ldots,\mu_{3,D}]^{\top}, with μ1,d=−3\mu_{1,d}=-3, μ2,d=0\mu_{2,d}=0, μ3,d=2\mu_{3,d}=2 for all d=1,…,Dd=1,\ldots,D. Moreover, the covariance matrices are diagonal, Σi=δiID{\bm{\Sigma}}_{i}=\delta_{i}{\bf I}_{D} (where ID{\bf I}_{D} is the D×DD\times D identity matrix), with δi=0.5\delta_{i}=0.5 for i=1,2,3i=1,2,3. Hence, given a random variable Θ∼πˉ(θ){\bf\Theta}\sim{\bar{\pi}}({\bm{\theta}}), we know analytically that E[Θ]=[θˉ1,…,θˉD]⊤E[{\bm{\Theta}}]=[{\bar{\theta}}_{1},\ldots,{\bar{\theta}}_{D}]^{\top} with θˉd=−13{\bar{\theta}}_{d}=-\frac{1}{3} for all dd, and \mboxdiag{\mboxCov[Θ]}=[ξ1,…,ξD]⊤\mbox{diag}\{\mbox{Cov}[{\bm{\Theta}}]\}=[\xi_{1},\ldots,\xi_{D}]^{\top} with ξd=8518\xi_{d}=\frac{85}{18} for all d=1,…,Dd=1,\ldots,D.

We apply I-MTM, IMTM2 and I-EnMCMC in order to estimate all the expected values and all the variances of the marginal target pdfs. Namely, for a given dimension DD, we have to estimate all {θˉd}d=1D\{{\bar{\theta}}_{d}\}_{d=1}^{D} and {ξd}d=1D\{\xi_{d}\}_{d=1}^{D}, hence 2D2D values. The results are averaged over 30003000 independent runs. At each run, we compute an averaged square error obtained in the estimation of the 2D2D values and then calculate the Mean Square Error (MSE) averaged over the 30003000 runs. For all the techniques, we consider a Gaussian proposal density q(θ)=N(θ∣μ,σ2ID)q({\bm{\theta}})=\mathcal{N}({\bm{\theta}}|{\bm{\mu}},\sigma^{2}{\bf I}_{D}) with μ=[μ1=0,…,μD=0]⊤{\bm{\mu}}=[\mu_{1}=0,\ldots,\mu_{D}=0]^{\top} (independent from the previous state) and different values of σ\sigma are considered.

We perform several experiments varying the number of tries, NN, the length of the generated chain, TT, the dimension of the inference problem, DD, and the scale parameter of the proposal pdf, σ\sigma. In Figures 7(a)-(b)-(c)-(d)-(e), we show the MSE (obtained by different techniques) as function of NN, TT, DD and σ\sigma, respectively. In Figure 7(d), we only consider I-MTM with N∈{1,5,100,1000}N\in\{1,5,100,1000\} in order to show the effect of using different tries NN in different dimensions DD. Note that I-MTM with N=1N=1 coincides with I-MH.

Let us denote as ϕ(τ)\phi(\tau) the auto-correlation function of the states of the generated chain. Figures 8(a)-(b)-(c) depicts the normalized auto-correlation function ϕˉ(τ)=ϕ(τ)ϕ(0){\bar{\phi}}(\tau)=\frac{\phi(\tau)}{\phi(0)} (recall that ϕ(0)≥ϕ(τ)\phi(0)\geq\phi(\tau) for τ≥0\tau\geq 0) at different lags τ=1,2,3\tau=1,2,3, respectively. Furthermore, given the definition of the Effective Sample Size (ESS) [51, Chapter 4],

in Figure 8(d), we show of the ratio ESST\frac{ESS}{T} (approximated; cutting off the series in the denominator at lag τ=10\tau=10), as function of NN. Since the MCMC algorithms yield positive correlated sequences of states, we have ESS<TESS<T in general. Finally, in Figures 9(a)-(b), we provide the Acceptance Rate (AR) of a new state (i.e., the expected number of accepted jumps to a novel state), as function of NN and DD, respectively.

1.2 Comment on the results

Figures 7(a)-(b), 8 and 9(a), clearly show that the performance improves as NN grows, for all the algorithms. The MSE values and the correlation decrease, and the ESS and the AR grow. I-MTM seems to provide the best performance. Recall that for N=1N=1, I-EnMCMC becomes an I-MH with Baker’s acceptance function and I-MTM becomes the I-MH in Table 4 . For N=1N=1, the results confirm the Peskun’s ordering about the acceptance function for a MH method . Observing the results, the Peskun’s ordering appears valid also for the multiple try case, N>1N>1. I-MTM2 seems to have worse performance than I-MTM for all NN. With respect to I-EnMCMC, I-MTM2 performs better for smaller NN. The difference among the MSE values obtained by the samplers becomes smaller as NN grows, as shown in Figure 7(a)-(b) (note that in the first one D=1D=1, in the other D=10D=10, and the range of NN is different). The comparison among I-MTM, I-MTM2 and I-EnMCMC seems not to be affected by changing TT and σ\sigma, as depicted in Figures 7(c)-(e). Namely, the MSE values change but the ordering of the methods (e.g., best and worst) seems to depend mainly on NN. Obviously, for greater DD, more tries are required in order to obtain good performance (see Figures 7(d) and9(b), for instance). Note that for N→∞N\rightarrow\infty, I-MTM, I-MTM2 and I-EnMCMC perform similarly to an exact sampler drawing TT independent samples from πˉ(θ){\bar{\pi}}({\bm{\theta}}): the correlation ϕ(τ)\phi(\tau) among the samples approaches zero (for all τ\tau), ESS approaches TT and AR approaches 11.

2 Numerical experiment comparing particle schemes

In this section, in order to clarify the differences between batch and particle schemes, we consider again a multidimensional Gaussian target density, that can be express as

We apply I-MTM, I-MTM2, PMH, and a variant of PMH, denote as var-PMH which uses the corresponding acceptance probability of I-MTM in Eq. (19) instead of the acceptance function of the classical PMH in Eq. (30). The goal is to estimate the vector μ{\bm{\mu}}. We compute the MSE in estimating the vector μ=μ1:10{\bm{\mu}}=\mu_{1:10}, averaging the results over 500500 independent simulations. The components of μ{\bm{\mu}} are shown in Figure 10(d) with a dashed line.

For all the techniques, we employ a sequential construction of the NN candidates (using the chain rule, see below): in PMH and var-PMH the resampling is applied at each iteration whereas in I-MTM and I-MTM2 no resampling is applied. More specifically, the proposal density for all the methods is

where q1(θ1)=N(θ1∣−2,4)q_{1}(\theta_{1})=\mathcal{N}(\theta_{1}|-2,4) and qd(θd∣θd−1)=N(θd∣θd−1,σp2)q_{d}(\theta_{d}|\theta_{d-1})=\mathcal{N}(\theta_{d}|\theta_{d-1},\sigma_{p}^{2}), but PMH and var-PMH employ resampling steps so that the generated tries are correlated (whereas in I-MTM and I-MTM2 the generated candidates are independent).

We test all the techniques considering different value of number of tries NN and number of iterations of the chain TT. Figures 10(a)-(b) show the MSE as function of number of iterations TT, keeping fixed the number of tries N=3N=3. Figure 10(a) reports the results of the MTM schemes whereas Figure 10(b) reports the results of the PMH schemes. Figure 10(c) depicts the MSE as function of NN (with T=2000T=2000), for the PMH methods. Note that the use of only N=3N=3 particles and the application of the resampling at each iteration is clearly a disadvantage for the PMH schemes. If the resampling is applied very often (as in this case), a greater number of NN is advisable (such as N=100N=100 or N=1000N=1000). Hence, the results confirm that applying a resampling step at each iteration is not optimal and that a smaller rate of resampling steps could improve the performance . The results also confirm that the use of an acceptance probability of type in Eq. (19) provides smaller MSE, i.e., I-MTM and var-PMH perform better than I-MTM2 and PMH, respectively. This is more evident for small number of candidates NN. When NN grows, the performance of PMH and var-PMH methods becomes similar, since the acceptance probability approaches 11, in both cases. Figure 10(d) depicts 35 different states θt=θ1:10,t{\bm{\theta}}_{t}=\theta_{1:10,t} at different iteration indices tt, obtained with var-PMH (N=1000N=1000 and T=1000T=1000) and the values μ1:10\mu_{1:10} are given in dashed line.

3 Hyperparameter tuning for Gaussian Process (GP) regression models

Given these assumptions, the vector f=[f(z1),…,f(zP)]⊤{\bf f}=[f({\bf z}_{1}),\ldots,f({\bf z}_{P})]^{\top} is distributed as p(f∣Z,δ,κ)=N(f;0,K)p({\bf f}|{\bf Z},\delta,\kappa)=\mathcal{N}({\bf f};{\bf 0},{\bf K}), where 0{\bf 0} is a P×1P\times 1 null vector, and Kij:=κ(zi,zj){\bf K}_{ij}:=\kappa({\bf z}_{i},{\bf z}_{j}), for all i,j=1,…,Pi,j=1,\ldots,P, is a P×PP\times P matrix. The vector containing all the hyperparameters of the model is θ=[δ,σ]{\bm{\theta}}=[\delta,\sigma], i.e., all the parameters of the kernel function in Eq. (52) and standard deviation σ\sigma of the observation noise. In this experiment, we focus on the marginal posterior density of the hyperparameters, πˉ(θ∣y,Z,κ)∝π(θ∣y,Z,κ)=p(y∣θ,Z,κ)p(θ){\bar{\pi}}({\bm{\theta}}|{\bf y},{\bf Z},\kappa)\propto\pi({\bm{\theta}}|{\bf y},{\bf Z},\kappa)=p({\bf y}|{\bm{\theta}},{\bf Z},\kappa)p({\bm{\theta}}), which can be evaluated analytically, but we cannot compute integrals involving it . Considering a uniform prior within 2^{2}, p(x)p({\mathbf{x}}) and since p(y∣θ,Z,κ)=N(y;0,K+σ2I)p({\bf y}|{\bm{\theta}},{\bf Z},\kappa)=\mathcal{N}({\bf y};{\bf 0},{\bf K}+\sigma^{2}{\bf I}), we have

where C>0C>0, and clearly K{\bf K} depends on δ\delta . The moments of this marginal posterior cannot be computed analytically. Then, in order to compute the Minimum Mean Square Error (MMSE) estimator θ^=[δ^,σ^]\widehat{{\bm{\theta}}}=[\widehat{\delta},\widehat{\sigma}], i.e., the expected value E[Θ]E[{\bm{\Theta}}] with Θ∼πˉ(θ∣y,Z,κ){\bm{\Theta}}\sim{\bar{\pi}}({\bm{\theta}}|{\bf y},{\bf Z},\kappa), we approximate E[Θ]E[{\bm{\Theta}}] via Monte Carlo quadrature. More specifically, we apply I-MTM2, GMS, a MH scheme with a longer chain and a static IS method. For all these methodologies, we consider the same number of target evaluations, denoted as EE, in order to provide a fair comparison.

We generated P=200P=200 pairs of data, {yj,zj}j=1P\{y_{j},{\bf z}_{j}\}_{j=1}^{P}, according to the GP model above setting δ∗=3\delta^{*}=3, σ∗=10\sigma^{*}=10, L=1L=1, and drawing zj∼U()z_{j}\sim\mathcal{U}(). We keep fixed these data over the different runs. We computed the ground-truth θ=[δ=3.5200,σ=9.2811]{\bm{\theta}}=[\delta=3.5200,\sigma=9.2811] using an exhaustive and costly grid approximation, in order to compare the different techniques. For I-MTM2, GMS, and MH schemes, we consider the same adaptive Gaussian proposal pdf qt(θ∣μt,λ2I)=N(θ∣μt,λ2I)q_{t}({\bm{\theta}}|{\bm{\mu}}_{t},\lambda^{2}{\bf I})=\mathcal{N}({\bm{\theta}}|{\bm{\mu}}_{t},\lambda^{2}{\bf I}), with λ=5\lambda=5 and μt{\bm{\mu}}_{t} is adapted considering the arithmetic mean of the outputs after a training period, t≥0.2Tt\geq 0.2T, in the same fashion of (μ0=⊤{\bm{\mu}}_{0}=^{\top}). First, we test both techniques fixing T=20T=20 and varying the number of tries NN. Then, we set N=100N=100 and vary the number of iterations TT. Figure 11 (log-log plot) shows the Mean Square Error (MSE) in the approximation of θ^\widehat{{\bm{\theta}}} averaged over 10310^{3} independent runs. Observe that GMS always outperforms the corresponding I-MTM2 scheme. These results confirm the advantage of recycling the auxiliary samples drawn at each iteration during an I-MTM2 run. In Figure 12, we show the MSE obtained by GMS keeping invariant the number of target evaluations E=NT=103E=NT=10^{3} and varying N∈{1,2,10,20,50,100,250,103}N\in\{1,2,10,20,50,100,250,10^{3}\}. As a consequence, we have T∈{103,500,100,50,20,10,4,1}T\in\{10^{3},500,100,50,20,10,4,1\}. Note that the case N=1N=1, T=103T=10^{3}, corresponds to an adaptive MH (A-MH) method with a longer chain, whereas the case N=103N=10^{3}, T=1T=1, corresponds to a static IS scheme (both with the same posterior evaluations E=NT=103E=NT=10^{3}). We observe that the GMS always provides smaller MSE than the static IS approach. Moreover, GMS outperforms A-MH with the exception of two cases where T∈{1,4}T\in\{1,4\}.

4 Localization of a target in a wireless sensor network

Our goal is to compute the Minimum Mean Square Error (MMSE) estimator, i.e., the expected value of the posterior πˉ(θ∣Y)=πˉ(z,ζ∣Y){\bar{\pi}}({\bm{\theta}}|\textbf{Y})={\bar{\pi}}({\bf z},{\bm{\zeta}}|\textbf{Y}) (recall that D=8D=8). Since the MMSE estimator cannot be computed analytically, we apply Monte Carlo methods for approximating it. We compare GMS, the corresponding MTM scheme, the Adaptive Multiple Importance Sampling (AMIS) technique , and NN parallel MH chains with a random walk proposal pdf. For all of them we consider Gaussian proposal densities. For GMS and MTM, we set qt(θ∣μn,t,σ2I)=N(θ∣μt,σ2I)q_{t}({\bm{\theta}}|{\bm{\mu}}_{n,t},\sigma^{2}{\bf I})=\mathcal{N}({\bm{\theta}}|{\bm{\mu}}_{t},\sigma^{2}{\bf I}) which is adapted considering the empirical mean of the generated samples after a training period, t≥0.2Tt\geq 0.2T , μ0∼U(D){\bm{\mu}}_{0}\sim\mathcal{U}(^{D}) and σ=1\sigma=1. For AMIS, we have qt(θ∣μt,Ct)=N(θ∣μt,Ct)q_{t}({\bm{\theta}}|{\bm{\mu}}_{t},{\bf C}_{t})=\mathcal{N}({\bm{\theta}}|{\bm{\mu}}_{t},{\bf C}_{t}), where μt{\bm{\mu}}_{t} is as previously described (with μ0∼U(D){\bm{\mu}}_{0}\sim\mathcal{U}(^{D})) and Ct{\bf C}_{t} is also adapted using the empirical covariance matrix, starting C0=4I{\bf C}_{0}=4{\bf I}. We also test the use of NN parallel Metropolis-Hastings (MH) chains (we also consider the case of N=1N=1, i.e., a single chain), with a Gaussian random-walk proposal pdf, qn(μn,t∣μn,t−1,σ2I)=N(μn,t∣μn,t−1,σ2I)q_{n}({\bm{\mu}}_{n,t}|{\bm{\mu}}_{n,t-1},\sigma^{2}{\bf I})=\mathcal{N}({\bm{\mu}}_{n,t}|{\bm{\mu}}_{n,t-1},\sigma^{2}{\bf I}) with μn,0∼U(D){\bm{\mu}}_{n,0}\sim\mathcal{U}(^{D}) for all nn and σ=1\sigma=1.

We fix the total number of evaluations of the posterior density as E=NT=104E=NT=10^{4}. Note that, generally, the evaluation of the posterior is the most costly step in MC algorithms (however, AMIS has the additional cost of re-weighting all the samples at each iteration according to the deterministic mixture procedure ). We recall that TT denotes the total number of iterations and NN the number of samples drawn from each proposal at each iteration. We consider θ∗=[z∗,ζ∗]⊤{\bm{\theta}}^{*}=[{\bf z}^{*},{\bm{\zeta}}^{*}]^{\top} as the ground-truth and compute the Mean Square Error (MSE) in the estimation obtained with the different algorithms. The results are averaged over 500500 independent runs and they are provided in Tables 15, 16, and 17 and Figure 13(b). Note that GMS outperforms AMIS for each a pair {N,T}\{N,T\} (keeping fixed E=NT=104E=NT=10^{4}), and GMS also provides smaller MSE values than NN parallel MH chains (the case N=1N=1 corresponds to a unique longer chain). Figure 13(b) shows the MSE versus NN maintaining E=NT=104E=NT=10^{4} for GMS and the corresponding MTM method. This figure again confirms the advantage of recycling the samples in a MTM scheme.

5 Localization with real data

In this section, we describe a numerical experiment involving real data. More specifically, we consider a localization problem . We have carried out an experiment with a network consisting of four nodes. Three of them are placed at fixed positions and play the role of sensors that measure the strength of the radio signals transmitted by the target. The other node plays the role of the target to be localized. All nodes are bluetooth devices (Conceptronic CBT200U2A) with a nominal maximum range of 200 m. We consider a square monitored area of 4×44\times 4 m and place the sensors at fixed positions h1=[0.5,1]\textbf{h}_{1}=[0.5,1], h2=[3.5,1]\textbf{h}_{2}=[3.5,1] and h3=\textbf{h}_{3}=, with all coordinates in meters. The target is located at z=[z1=2.5,z2=2]\textbf{z}=[z_{1}=2.5,z_{2}=2]. The measurement provided by the ii-th sensor is denoted as a random variable YiY_{i}, considering the following model

where BiB_{i} are again independent Gaussian random variables with pdfs N(bi;0,ζ2)\mathcal{N}(b_{i};0,\zeta^{2}), for all i=1,2,3i=1,2,3. Differently from the previous section, we estimate in advance the following parameters of the model, κ^≈−26.58{\hat{\kappa}}\approx-26.58 and ζ^≈4.73{\hat{\zeta}}\approx 4.73, using a least square fitting. We obtain NO=5N_{O}=5 measurements from each sensor (dY=3NO=15d_{Y}=3N_{O}=15), and we consider a uniform prior on the 4×44\times 4 m area. Given these measurements, we approximate the expected value E[Z]E[{\bf Z}] of the corresponding posterior πˉ(z){\bar{\pi}}({\bf z}) (here θ=z{\bm{\theta}}={\bf z}) using a thin deterministic bivariate grid, obtaining the ground truth ≈[3.17,2.62]⊤\approx[3.17,2.62]^{\top}. We test an MH method and MTM scheme using with a random walk Gaussian proposal pdf, q(z∣\bzt−1)=N(z∣zt−1,σ2I2)q({\bf z}|{\b{z}}_{t-1})=\mathcal{N}({\bf z}|{\bf z}_{t-1},\sigma^{2}{\bf I}_{2}), with σ=1\sigma=1, T∈{1000,5000}T\in\{1000,5000\}, and N∈{10,100,1000}N\in\{10,100,1000\} tries for MTM (clearly, N=1N=1 for MH). We also test a Metropolis-adjusted Langevin algorithm (MALA), where the proposal is Gaussian random walk density with mean zt−1+β∇[log⁡π(z)]{\bf z}_{t-1}+\beta\nabla[\log\pi({\bf z})] and ∇[log⁡π(z)]\nabla[\log\pi({\bf z})] denotes the gradient of log⁡π(z)\log\pi({\bf z}) . The covariance matrix of MALA Gaussian proposal is σ2I2\sigma^{2}{\bf I}_{2} (as the other techniques) and the drift parameter β=σ2/2\beta=\sigma^{2}/2. We compute the MSE in estimating E[Z]≈[3.17,2.62]⊤E[{\bf Z}]\approx[3.17,2.62]^{\top} and averaged the results over 20002000 independent runs (at each run, we take the mean of the square error values of each component). The results are shown in Table 18. Recall that MALA uses the additional information of the gradient. Note that, a MALA-type proposal pdf can also be used in a MTM scheme. The use of multiple tries improves the mixing of the Markov chain and speeds up the convergence.

Conclusions

We have provided a thorough review of MCMC methods using multiple candidates in order to select the next state of the chain. We have presented and compared different Multiple Try Metropolis, Ensemble MCMC and Delayed Rejection Metropolis schemes. We have also described the Group Metropolis Sampling technique which generates a chain of set of weighted samples, so that some candidates are properly reused in the final estimators. Furthermore, we have shown how the Particle Metropolis-Hastings algorithm can be interpreted as an MTM scheme using a particle filter for generating the different weighted candidates. Several connections and differences have been pointed out. Finally, we have tested several techniques in different numerical experiments: two toy examples in order to provide an exhaustive comparison among the methods, a numerical example regarding the hyperparameter selection for a Gaussian Process (GP) regression model, and two localization problems, one of them involving a real data analysis.

Acknowledgements

This work has been supported by the European Research Council (ERC) through the ERC Consolidator Grant SEDAL ERC-2014-CoG 647423.

References

Appendix A Distribution after resampling

Let us also denote as θ∈{θ(1)…,θ(N)}{\bm{\theta}}\in\{{\bm{\theta}}^{(1)}\ldots,{\bm{\theta}}^{(N)}\}, a generic sample after applying one multinomial resampling step according to the normalized IS weights wˉn{\bar{w}}_{n}, n=1,…,Nn=1,\ldots,N. The density of θ{\bm{\theta}} is given by

We also define also the matrix m¬n=[θ(1),…,θ(n),θ(n+1),…,θ(N)],{\bf m}_{\neg n}=[{\bm{\theta}}^{(1)},\ldots,{\bm{\theta}}^{(n)},{\bm{\theta}}^{(n+1)},\ldots,{\bm{\theta}}^{(N)}], containing all the samples except for the nn-th. After some straightforward rearrangements, Eq. (55) can be rewritten as

where Z^=1N∑n=1Nπ(θ(n))q(θ(n))\widehat{Z}=\frac{1}{N}\sum_{n=1}^{N}\frac{\pi({\bm{\theta}}^{(n)})}{q({\bm{\theta}}^{(n)})} that is that IS estimator of ZZ. The equation above represents the density of a resampled particle θ∈{θ(1)…,θ(N)}{\bm{\theta}}\in\{{\bm{\theta}}^{(1)}\ldots,{\bm{\theta}}^{(N)}\}. Note that if Z^=Z\widehat{Z}=Z then q~(θ)=π(θ)\widetilde{q}({\bm{\theta}})=\pi({\bm{\theta}}). Clearly, for a finite value of NN, there exists a discrepancy between q~(θ)\widetilde{q}({\bm{\theta}}) and πˉ(θ)\bar{\pi}({\bm{\theta}}), but this discrepancy decreases as NN grows.

Appendix B Particle Filtering

Given a proposal of type q(x)=q1(x1)∏d=2Dqd(xd∣xd−1)q({\bf x})=q_{1}(x_{1})\prod_{d=2}^{D}q_{d}(x_{d}|x_{d-1}), and a sample x(n)=x1:D(n)∼q(x){\bf x}^{(n)}=x_{1:D}^{(n)}\sim q({\bf x}) with xd(n)∼qd(xd∣xd−1)x_{d}^{(n)}\sim q_{d}(x_{d}|x_{d-1}), we assign the importance weight

The weight above can be compute with a recursive procedure for computing the importance weights: starting with w1(n)=π(x1(n))q(x1(n))w_{1}^{(n)}=\frac{\pi(x_{1}^{(n)})}{q(x_{1}^{(n)})} and then

for d=2,…,Dd=2,\ldots,D. Let also define the partial target pdfs

SIR procedure. In SIR, a.k.a., standard particle filtering, resampling steps are incorporated during the recursion as shown of Table 19 . In general, the resampling steps are applied only in certain iterations in order to avoid the path degeneration, taking into account an approximation ESS^\widehat{ESS} of the Effective Sampling Size (ESS) . If ESS^\widehat{ESS} is smaller than a pre-established threshold, the particles are resampled. Two examples of ESS approximation are ESS^=1∑n=1N(wˉd(n))2\widehat{ESS}=\frac{1}{\sum_{n=1}^{N}(\bar{w}_{d}^{(n)})^{2}} and ESS^=1max⁡wˉd(n)\widehat{ESS}=\frac{1}{\max\bar{w}_{d}^{(n)}} where wˉd(n)=wd(n)∑i=1Nwd(i)\bar{w}_{d}^{(n)}=\frac{w_{d}^{(n)}}{\sum_{i=1}^{N}w_{d}^{(i)}} (note that 1≤ESS^≤N1\leq\widehat{ESS}\leq N). Hence, the condition for the adaptive resampling can be expressed as ESS^<ηN\widehat{ESS}<\eta N where η∈\eta\in. SIS is given when η=0\eta=0 and SIR for η∈(0,1]\eta\in(0,1]. When η=1\eta=1, the resampling is applied at each iteration and in this case SIR is often called bootstrap particle filter . If η=0\eta=0, no resampling steps are applied, and we have the SIS method described above.

Note that in Table 19, we have employed a proper weighting for resampling particles ,

Generally, it is remarked that wd(1)=wd(2)=…=wd(n)w_{d}^{(1)}=w_{d}^{(2)}=\ldots=w_{d}^{(n)} but a specific value is not given. If a different value c≠Z^dc\neq\widehat{Z}_{d} is employed, i.e., wd(1)=…=wd(n)=cw_{d}^{(1)}=\ldots=w_{d}^{(n)}=c, the algorithm is still valid but the weight recursion loses part of the statistical meaning. This is the reason why the marginal likelihood estimator Z^=Z^D=1N∑n=1NwD(n)\widehat{Z}=\widehat{Z}_{D}=\frac{1}{N}\sum\limits_{n=1}^{N}w_{D}^{(n)} is consistent only, if a proper weighting after resampling is used .

In SIS, both estimators are equivalent Z‾d≡Z^d\overline{Z}_{d}\equiv\widehat{Z}_{d}.

Indeed, the classical IS estimator of the normalizing constant ZdZ_{d} at the dd-th iteration is

An alternative formulation, denoted as Z‾d\overline{Z}_{d}, is often used

where we have employed wˉj−1(n)=wj−1(n)∑i=1Nwj−1(i){\bar{w}}_{j-1}^{(n)}=\frac{w_{j-1}^{(n)}}{\sum_{i=1}^{N}w_{j-1}^{(i)}} and wj(n)=wj−1(n)βj(n)w_{j}^{(n)}=w_{j-1}^{(n)}\beta_{j}^{(n)} .

Furthermore, note that Z‾d\overline{Z}_{d} can be written in a recursive form as

B.2 Marginal likelihood estimators in SIR

If a proper weighting after resampling is applied in SIR, both formulations Z^d\widehat{Z}_{d} and Z‾d\overline{Z}_{d} in Eqs. (66)-(67) provide consistent estimator of ZdZ_{d} and they are equivalent, Z^d≡Z‾d\widehat{Z}_{d}\equiv\overline{Z}_{d} (as in SIS).

If a proper weighting is not applied, only

is a consistent estimator of ZdZ_{d}, in SIR. In this case, Z^d=1N∑n=1Nwd(n)\widehat{Z}_{d}=\frac{1}{N}\sum_{n=1}^{N}w_{d}^{(n)} is not a possible alternative (without using a proper weighting after resampling). However, considering the proper weighting of the resampled particles, then Z^d\widehat{Z}_{d} is also a consistent estimator of ZdZ_{d} and it is equivalent to Z‾d\overline{Z}_{d}. Below, we analyze three cases:

No Resampling (η=0\eta=0): this scenario corresponds to SIS where Z^d\widehat{Z}_{d}, Z‾d\overline{Z}_{d} are equivalent as shown in Eq. (71).

Resampling at each iteration (η=1\eta=1): using the proper weighting, wd−1(n)=Z^d−1w_{d-1}^{(n)}=\widehat{Z}_{d-1} for all nn and for all dd, and replacing in Eq. (68) we have

Since after resampling all particles have the same weight, we have wˉd−1(n)=1N{\bar{w}}_{d-1}^{(n)}=\frac{1}{N} for all nn. Replacing it in the expression of Z‾d\overline{Z}_{d} in (72), we obtain

that coincides with Z^d\widehat{Z}_{d} in Eq. (74).

Adaptive resampling (0<η<10<\eta<1): for the sake of simplicity, let us start considering a unique resampling step applied at the kk-th iteation with k<dk<d. We check if both estimators are equal at dd-th iteration of the recursion. Due to Eq. (71), we have Z‾k≡Z^k\overline{Z}_{k}\equiv\widehat{Z}_{k}, We consider to compute the estimators before the resampling. since before the kk-th iteration no resampling has been applied. With the proper weighting wk(n)=Z^kw_{k}^{(n)}=\widehat{Z}_{k} for all nn, at the next iteration we have

so that the estimators are equivalent also at the (k+1)(k+1)-th iteration, Z‾k+1≡Z^k+1\overline{Z}_{k+1}\equiv\widehat{Z}_{k+1}. Since we are assuming no resampling steps after the kk-th iteration and until the dd-th iteration, we have that Z‾i≡Z^i\overline{Z}_{i}\equiv\widehat{Z}_{i} for i=k+2,…,di=k+2,\ldots,d due to we are in a SIS scenario for i>ki>k (see Eq. (71)). This reasoning can be easily extended for different number of resampling steps.

Appendix C Consistency of GMS estimators

Dynamic of GMS. We have already seen that we can recover an I-MTM chain from the GMS outputs applying one resampling step for each tt when St≠St−1\mathcal{S}_{t}\neq\mathcal{S}_{t-1}, i.e.,

for t=1,…,Tt=1,\ldots,T. The sequence {θt}t=1T\{{\bm{\theta}}_{t}\}_{t=1}^{T} is a chain obtained by one run of an I-MTM2 technique. Note that (a) the sample generation, (b) the acceptance probability function and hence (c) the dynamics of GMS exactly coincide with the corresponding steps of I-MTM2 (or PMH; depending on candidate generation procedure). Hence, the ergodicity of the recovered chain is ensured. Parallel chains from GMS outputs. As described in Section 4.1.3, we can extend the consideration above for generation CC parallel I-MTM2 chains. Indeed, we resample CC times instead of only one, i.e.,

for c=1,…,Cc=1,\ldots,C, where the super-index denotes the cc-th chain (similar procedures have been suggested in ). Clearly, the resulting CC parallel chains are not independent, and there is an evident loss of performance w.r.t. the case of independent chains. However, at each iteration, the number of target evaluations per iteration is only NN instead of NCNC. Note that that each chain in ergodic, so that each estimator I~T(c)=1T∑t=1Tg(θt(c))\widetilde{I}_{T}^{(c)}=\frac{1}{T}\sum_{t=1}^{T}g({\bm{\theta}}_{t}^{(c)}) is consistent (i.e., convergence to the true value for T→∞T\rightarrow\infty). As a consequence, the arithmetic mean of consistent estimators,

is also consistent, for all values of C≥1C\geq 1. GMS as limit case. Let us consider the case St≠St−1\mathcal{S}_{t}\neq\mathcal{S}_{t-1} (the other one is trivial), at some iteration tt. In this scenario, the samples of the CC parallel I-MTM2 chains, θt(1){\bm{\theta}}_{t}^{(1)},θt(2){\bm{\theta}}_{t}^{(2)},…,θt(C){\bm{\theta}}_{t}^{(C)}, are obtained by resampled independently CC samples from the set {θ1,t,…,θN,t}\{{\bm{\theta}}_{1,t},\ldots,{\bm{\theta}}_{N,t}\} according to the normalized weights ρˉn,t=ρn,t∑i=1Nρi,t\bar{\rho}_{n,t}=\frac{\rho_{n,t}}{\sum_{i=1}^{N}\rho_{i,t}}, for n=1,…,Nn=1,\ldots,N. Recall that the samples θt(1){\bm{\theta}}_{t}^{(1)},θt(2){\bm{\theta}}_{t}^{(2)},…,θt(C){\bm{\theta}}_{t}^{(C)}, will be used in the final estimator I~C,T\widetilde{I}_{C,T} in Eq. (77).

Let us denote as #j\#j the number of times that a specific candidate θj,t{\bm{\theta}}_{j,t} (contained in the set {θn,t}n=1N\{{\bm{\theta}}_{n,t}\}_{n=1}^{N}) has been selected as state of one of CC chains, at the tt iteration. As C→∞C\rightarrow\infty, The fraction #jC\frac{\#j}{C} approaches exactly the corresponding weights ρˉj,t\bar{\rho}_{j,t}. Then, for C→∞C\rightarrow\infty, we have that the estimator in Eq. (77) approaches the GMS estimator, i.e.,

Since I~C,T\widetilde{I}_{C,T} as T→∞T\rightarrow\infty is consistent for all values of CC, then the GMS estimator is also consistent (and it can be obtained as C→∞C\rightarrow\infty).