• No results found

2. THE ISING MODEL AND MONTE CARLO METHODS

2.5 Measured quantities

As established in section 2.3, the exponential autocorrelation time is a good indi-cator for the efficiency of an algorithm. But for an Ising system with a large enough external field H, we expect to find almost no configuration in the high energy state.

This means that the auto-correlation function will be dominated by the effects of equilibration within one well. The exponential autocorrelation time τexp however de-pends mainly on the transitions between the high energy and the low energy state.

The rarer these transitions are, the noisier the autocorrelation function becomes. Ex-tracting τexp from the data is therefore increasingly difficult. This makes it more and more challenging to measure τ for an increasing external field H, posing a serious problem if we are interested in how the performance of parallel tempering depends on H. Relying on measurements of τexp would for the given reason not only put an upper limit on the field H we can study, it would also expose us to potential systematic errors stemming from fits to an increasingly noisy autocorrelation function.

We will therefore rely on another quantity for evaluating the performance of paral-lel tempering. This quantity will be called the relaxation time τrel and represents the time needed by the PT algorithm to return to thermal equilibrium after a disturbance.

It will be measured in the following way:

1. The probability of the replica at the target temperature TR to be in the low energy state is measured by running the simulation long enough. This quantity will be called γ(∞).

2. All replicas are put in the high energy state at time t=0. This puts the system out of equilibrium, as now all replicas are in the otherwise suppressed state.

3. It is recorded whether t PT sweeps after step 2, the replica at TR is in the low energy state or not. This is done up to time tmax, then step 2 is repeated.

If the external field H is zero, there is strictly speaking no high or low energy state, as both states have exactly the same energy. But the way to measure the relaxation time is exactly the same: we simply call the state with a negative magnetization the high energy state and the one with a positive magnetization the low energy state. We can measure τrel using the same procedure as for H > 0.

By repeating step 2 and 3 often enough, we can calculate the probability γ(t) of the replica at TR to be in the low energy state after t PT sweeps. It is clear that γ(t) will approach γ(∞) as the system returns to equilibrium. To analyze the speed of this return to equilibrium, we observe the quantity γ0(t) = γ(t) − γ(∞). It undergoes an exponential decay, similar to the autocorrelation function and by fitting this function with an exponential, it is possible to extract the relaxation time τrel.

A similar quantity to the relaxation time can be calculated by replacing step 2 with the following:

2’ All replicas are put into a random state. This also puts the system out of equilibrium if H 6= 0.

This quantity is called equilibration time and can also be used to study the efficiency of parallel tempering [11]. The equilibration time suffers from a similar problem as the autocorrelation time, as can be seen in figure 2.5a.

0.001

(a) Comparison of the decays for a PT simula-tion with R = 10 and H = 0.4/L2.

(b) Comparison of the different decay times for H = 0. (τrel is omitted because it bears not

(c) Comparison of the different decay times for H = 0.4/L2.

(d) Comparison of the different decay times for H = 1.6/L2.

Figure 2.5: Comparison of equilibration time τequ, autocorrelation time τexp and re-laxation time τrel. All measurements for an Ising system with L = 30 and TR= 0.5.

The relaxation time reveals information about the speed that the PT algorithm is able to reach equilibrium with, if started from a strongly perturbed state. The relaxation time should therefore be related to the exponential autocorrelation time τexp which is also a measure of the time needed to reach equilibrium. The easier to measure equilibration time τrel might therefore be a good replacement for the exponential autocorrelation time.

Figure 2.5 shows a comparison between the autocorrelation time, the equilibration time and the relaxation time. The shape of the underlying functions χ(t) (for the autocorrelation time) and γ0(t) (for relaxation and equilibration time) can be seen in figure 2.5a. Although the specific functions all have a different shape, they are subject to a similar exponential decay for t > 100. The main difference is that

-0.2

Figure 2.6: Relative difference between τrel and τexp

the autocorrelation function as well as the equilibration function will first undergo a rapid decay whereas the relaxation function is constant for small t. As the plot is a logarithmic one, the relative errors become larger as the values of χ or γ drop. When determining the rate of the decay by fitting an exponential function, this means that τrel will have a much smaller statistical and systematic error.

If we want to use the relaxation time to study parallel tempering, we should make sure that it does not differ significantly from the autocorrelation time. We therefore compare τexp, τrel and τequ for different values of R and H in the figures 2.5 (b), (c) and (d). It can be seen that the values are quite similar but have statistically significant differences.

The relative difference between the autocorrelation and the relaxation time can be seen in figure 2.6. The number of replicas R seems not to have any clear influence although there are strong fluctuations. Whether there is a strong dependence on the field H can also not be clearly judged. Stronger fields might increase ∆τ /τ , but this could also just be a fluctuation, as there is no big increase in the absolute values of

∆τ /τ for larger H. Nevertheless the relaxation time should be taken with a grain of salt when used as an estimate of the autocorrelation time. The relative error seen in figure 2.6 amounts to at about 0.1%, so we should at least add an error margin of 10% when estimating τexp from τrel.

Regardless of this, the relaxation time is interesting in its own right, because it is a good portrayal of how the equilibrium distribution is approached when not using the ground state as starting configuration. In more complicated systems, the ground state is not known, therefore all replica will start in an high energy state when compared to the ground state.

CHAPTER 3

PREDICTIONS FOR THE EFFICIENCY OF PARALLEL TEMPERING FOR AN ASYMMETRIC ISING SYSTEM

In order to better understand the results of my measurements, this chapter will present some theoretical considerations on the efficiency of parallel tempering. I was interested in how the efficiency of the algorithm changes when the degeneracy of the ground state is lifted. Therefore this chapter will mainly deal with the efficiency of parallel tempering for either symmetric or strongly asymmetric systems. There is a paper by Machta [11] that deals with exactly this question for a very abstract system and the results and methods of this paper are reviewed in section 3.1. But as the system the paper deals with is highly simplified, it is not immediately clear how its results would transfer to simulations of more complicated systems. In this thesis I will study a 2-dimensional Ising system in order to see whether the results of [11] also apply there.

I will first review the paper by Machta [11] in order to give the reader an under-standing of the background of my simulations. I will then explain what quantities I used for studying the 2D Ising system and why I chose them. In section 3.2 I will give theoretical arguments to predict how these quantities might depend on different properties of the parallel tempering algorithm.

3.1 Predictions from a simplified two-well model

In the paper “Strengths and Weaknesses of Parallel Tempering” [11] by Machta the performance of parallel tempering for a simplified model of an double well system

is studied analytically as well as numerically. This chapter will mainly review the predictions made in this paper as they form the backdrop for my own simulations where I try to understand how the predictions generalize to the 2D Ising model.

The system used to make the predictions is an abstracted double well system.

Above the critical temperature, there is only one state. Below the critical tempera-ture, there are two states parametrized by σ with σ ∈ {0, 1}. The free energy is given by:

βFσ(β) = −1

2(β − βc)2(K + Hσ) (3.1)

where K is a parameter controlling the depth of the wells while H controls the difference in free energy between them. If we want the model to represent an Ising system, K would be related to the number of spins and H to the external field. For H = 0 the wells are exactly symmetric. For H > 0 the symmetry is broken and the well at σ = 1 will be preferred.

As σ represents a macrostate, the energy at either of the states is not constant but follows a normal distribution with a certain width. The model can therefore be seen as a discrete version of the kind of free energy landscape as seen in figure 2.1a (for H = 0) and 2.2 (for H > 0). The exact details can be found in [11].

The efficiency of parallel tempering when applied to this model is studied using a mix of analytic and numerical methods. The replicas are placed at evenly spaced inverse temperatures β1 = βc, β2, · · · , βR. For modeling the parallel tempering algo-rithm, it is assumed that transitions between the both wells are impossible at any temperature below Tc. It is furthermore assumed that every replica is perfectly equi-librated within its well between two proposed exchanges. This also implies that the state σ of the replica at Tc is chosen randomly before every proposed exchange.

It is found that the dynamics governing the efficiency of the algorithm differ significantly between the symmetric (H = 0) and the asymmetric (H > 0) case. In

section 2.4 two main influences on the performance of parallel tempering were named.

The first is the production of new states at high temperature replicas, the second the efficiency of the transport of these newly generated states to the target temperature TR. In the model, the production of new states only happens at Tc, but there it does happen with perfect efficiency, as a new state is randomly drawn at every step of the algorithm. This means that only the transport of these states will influence the performance of the algorithm.

For H = 0, all states have the same free energy and thus there is no preferred direction in the transport of states. The transport is governed by a random walk of the newly generated states to the target temperature TR. The average time needed for this walk is called the mean first passage time. If an exchange would occur at every time step, it can be computed to be (R − 1)2 [17]. This random walk is slowed down by the fact that every exchange is only accepted with the probability Pacc. For H = 0, this acceptance probability is constant for all pairs of replicas, yielding τ (R) ≈ (R−1)P 2

acc . Analytically evaluating Paccand then optimizing τ as a function of R leads to the following results for H = 0:

Ropt = 1 + 0.594(β0− βc)√

K (3.2)

τ ∼ (Ropt− 1)2

∼ K(β0− βc)2 (3.3)

As these timescales are due to the transport being a diffusive process, this will be called the diffusive autocorrelation time τd∼ K.

For H > 0, the acceptance probabilities will have a bias towards moving low energy states σ = 1 to lower temperatures and high energy states σ = 0 to higher temperatures. This means that the transport is not only a diffusive transport but also has a drift component. The strength of this drift is the velocity with which a low

energy state moves toward lower temperatures. It can be determined by studying the exchange probabilities for the case, where one of the two replicas is in the high energy state, the other one in in the low energy state. We can calculate a mean velocity a low energy state would move towards TR with, if all other states are occupied by high energy states. This velocity V is calculated by subtracting the acceptance probability for the low energy state moving to a higher temperature from the probability of it going to a lower temperature.

With growing H there is a crossover from diffusion to ballistic motion. For small H, we are in the regime of biased diffusion, but with H large enough it should be possible to describe the motion as a ballistic one with velocity V . Analyzing the exchange probabilities of the model, it can be shown that for H big enough, the number of replicas can be chosen in a way that ensures that V ≈ 1. The time a low energy state would need for traveling from Tc to TR would then equal (R − 1). It is assumed that Ropt ∼ (β0 − βc)√

K, as for the case with H = 0. Therefore the autocorrelation time in the ballistic regime should follow the equation

τ ∼ Ropt ∼ (β0− βc)√

K. (3.4)

3.2 Predictions for the relaxation time

3.2.1 Relaxation times for a non-interacting random walk in one direction To better understand the results of the simulation, let us first look at the behavior of the relaxation time in a strongly simplified model. This model is supposed to represent the dynamics governing parallel tempering for a strongly asymmetric two-well system. It certainly makes some questionable assumptions, but will nevertheless be able to explain the overall shape of γ0(t). We know that quantity γ(t) is the probability of the lowest energy replica being in the low energy state, if all replicas have been but into the high energy state t PT-sweeps earlier. As for a strong external

field, γ(∞) ≈ 1, the quantity γ0(t) will be γ0(t) = 1−γ(t). This is equal the probability to be in the high energy state at time t.

For the simplified model, we are only concerned with exchanges that swap places of a low and a high energy state. Let us make the following assumptions:

• Low energy states can only move to replicas lower in temperature. They never move to a higher temperature. This is surely not realistic for most cases, but we will later replace it by a more realistic condition.

• The acceptance probability for moving a low energy state out of the replica at the highest temperature T1, to the replica at T2 is p0.

• For all other replicas, Pacc = p is constant as long as it leads to a low energy state moving down in temperature (and therefore a high energy moving up in temperature).

• Transitions between the two states only occur at the highest temperature replica at T1. The probability that this replica is in the low energy state is Pcreate = 12. All replicas are in the high energy state at the time t = 0. Therefore every low energy state that could reach TRhas to be created at T1 first. Using the parameters described in section 4.1, we assume that every PT sweep consists of equilibrating all individual replicas, then proposing R exchanges. This means that in every sweep we create a low energy state at T1 with the probability 0.5, followed by the proposed exchanges.

Let us first look at the probability of a newly created low energy state to leave the replica at T1 during a PT sweep. As there are R − 1 neighboring pairs of replicas, the probability a specific exchange being proposed is R−11 . Therefore the probability to leave the highest temperature replica can be written the following way:

P (leaves) = 1 − P (stays) = 1 −



1 − p0 R − 1

R

. (3.5)

Any state that does not leave the replica at T1 during a sweep will be destroyed by the equilibration process at the beginning of the next sweep. The probability that a new low energy state enters the system during a PT sweep is therefore

Pnew =PcreateP (leaves)

=1

We also need to calculate the probability for a existing low energy state to move a certain number of steps during a given number of PT sweeps. This can be imagined to be similar to a random walk, where the walker can only move in one direction and moves with a probability of Pmove = R−1p . The probability for it to have moved l steps after t sweeps is therefore

A low energy state that has already left the highest temperature replica has to do R − 2 steps before it arrives at the lowest temperature. Once it arrives, it will be stuck there. The chance for it to have arrived after t sweeps is therefore chance for the random walk to have moved R − 2 or more steps.

Parrived(t) =

We can now put all everything together: The probability of the replica at the target temperature to be in the low energy state is the probability of such a state having been created at T1 and then having moved the steps to the temperature TR. We assume that these states are created seldom enough to ignore all interactions

1e-12

(b) Comparison of (3.9) with data from PT

Figure 3.1: Numerical evaluation of (3.9) for different parameters and comparison with data

between them1. The chance of the replica at TR to still be in the high energy state at time t is then

The index i represents that at every time i a low energy state could have been created and then wandered to TR in the remaining t − i timesteps. The full expression is evidently a bit unwieldy, so we will restrict ourselves to a numerical evaluation.

I figure 3.1a a plot of (3.9) can be seen for different sets of parameters. The overall shape of γ0(t) is independent of these parameters and consists of a plateau followed by a numeric fall-off. The length of the plateau is influenced by R and p, the strength of the fall-off by p0. The plateau exists because every newly created low energy state

1We furthermore assume that during the first sweep, the state only moves from the replica at T1 to the one at T2. There is also a chance that it already moves further, but including this makes equation (3.9) even more unwieldy and does not have a significant effect on the outcome.

first has to traverse all R states before it can reach the target temperature. This causes a delay of roughly R · p. The exponential decay can be explained by the fact that, in the model, every newly created state that leaves T1 will eventually reach TR. This means that in the long run, γ0(t) will only depend on the probability that no low energy state has been successfully created:

γ0(t) ≈ (1 − pnew)t = et·log(1−pnew). (3.10)

This means that γ0(t) decays with a typical timescale of

τrel = 1 log

1 1−pnew

 . (3.11)

By choosing the parameters p and p0 accordingly, (3.9) can fit the shape of data from PT simulations quite well (figure 3.1b). But when looking at the choice of parameters p and p0 necessary to do so, it becomes clear that the model does not accurately describe the way PT works. In order to describe the observed data, p0 and p have to differ dramatically and need to be much smaller than 1. This is at odds with what is observed for the simulations, where the exchange probabilities do not change strongly with temperature and are also usually higher than 60%. The biggest source of error in the model is the assumption that low energy states move only towards lower temperatures. In reality this is not the case. It is possible to partially amend this by giving the variable p the meaning of an average velocity V with which low energy states move. This only influences the plateau observed for low values of t however. As we want to estimate the autocorrelation time, we should instead focus on explaining the exponential falloff of γ0(t).

3.2.2 Relaxation time for non-interacting first passage processes

As mentioned before, every low energy state that is created and does not return to T1 will eventually end up at TR. Let us therefore reduce the problem to the question

As mentioned before, every low energy state that is created and does not return to T1 will eventually end up at TR. Let us therefore reduce the problem to the question

Related documents