Parallel Tempering

General Chain-Structured Models

There is an important probability distribution used in applications (Liu, 2008):

π(x)exp{i=1dhi(xi1,xi)}exp(H(x))\pi(\mathbf x) \propto \exp\Big\{-\sum_{i=1}^dh_i(x_{i-1},x_i)\Big\} \equiv \exp(-H(\mathbf x))

where x=(x0,x1,,xd)\mathbf x = (x_0,x_1,\ldots,x_d). This type of model exhibits a so-called "Markovian structure" because

π(xix[i])exp{h(xi1,xi)h(xi,xi+1)}.\pi(x_i\mid \mathbf x_{[-i]}) \propto \exp\{-h(x_{i-1},x_i)-h(x_i,x_{i+1})\}\,.

We can simulate from π(x)\pi(\mathbf x) by an exact method. Note that

Zxexp{H(x)}=xd[[x1{x0eh(x0,x1)}eh2(x1,x2)]].Z\equiv \sum_{\mathbf x}\exp\{-H(\mathbf x)\} = \sum_{x_d}\Big[\cdots\Big[ \sum_{x_1}\Big\{\sum_{x_0}e^{-h(x_0,x_1)}\Big\}e^{-h_2(x_1,x_2)} \Big] \cdots\Big]\,.

The simulating procedure is as follows:

Exact Method for Ising Model

For a one-dimensional Ising Model,

π(x)=Z1exp{β(x0x1++xd1xd)},\pi(\mathbf x)=Z^{-1}\exp\{\beta(x_0x_1+\cdots+x_{d-1}x_d)\}\,,

where xi{1,1}x_i\in\{-1,1\}. And thus the simulating procedure is much easy. Note that for t=1,,dt=1,\ldots,d,

Vt(x)=(eβ+eβ)tV_t(x) = (e^{-\beta}+e^{\beta})^t

and Z=2(eβ+eβ)dZ=2(e^{-\beta}+e^{\beta})^d.

We can use the following Julia program to simulate from π(x)\pi(\mathbf x):

Parallel Tempering for Ising Model

Liu (2008) also introduced the parallel tempering strategy:

I wrote the following Julia program to implement this procedure and reproduce the simulation example of Liu (2008):

It is important to note that we should use logpdf to avoid too big values, in which the rejection part doesn't work well. Refer to Ising-model.jl for complete source code.

Finally, I reproduce the Figure 10.1 as follows:

and the corresponding autocorrelation plots:

References

Liu, J. S. (2008). Monte Carlo strategies in scientific computing. Springer Science & Business Media.

Last updated