- Home
- Library
- Computational Quantum Field Theory
- Sampling Measures and Estimating Free Energies
- Cluster Updates and Critical Slowing Down
Cluster Updates and Critical Slowing Down
Near the critical temperature of the square-lattice Ising model, how much work buys an independent measurement of the energy? Reversing all spins changes the magnetization sign instantly while leaving the energy exactly fixed. A useful collective update must also change the interfaces that carry the energy. We will build such an update, verify its stationary measure on four spins, and measure the precision of two spin-reversal-even observables at comparable computational cost.
Use a periodic square, sites, spins , and no magnetic field. With and , write and . Each horizontal and vertical bond enters the sum once. The normalized Gibbs measure is . The random-cluster expansion gives the geometry. Autocorrelation and effective sample size supplies the error convention.
Grow one cluster from a uniformly chosen site
For one bond with if its spins agree, expand its Boltzmann factor as
For opposite spins the right side is , and for equal spins it is . Interpret the two terms as an empty bond and an occupied bond. Conditional on the spins, independently occupy each equal-spin bond with probability , leaving unlike pairs disconnected. This is the Potts construction with Potts reduced coupling .
Choose one site uniformly as a seed. Grow its connected component by testing bonds to like-spin neighbors with probability . When a site joins the cluster, mark it and add it to the exploration queue. A failed bond leaves the site eligible to join through a different bond. Once the queue empties, reverse every spin in the component. This is one Wolff update. A seed samples a component with probability proportional to its number of sites. The implementation flips spins as they join, which also marks membership.
To see why the flip needs no final acceptance test, fix a proposed cluster . Let boundary bonds join equal spins before the flip and join unequal spins. To obtain , every one of the aligned boundary bonds must fail to activate. In the reverse move such bonds must fail. The seed probabilities and all interior bond weights are identical in both directions. Therefore
This proves detailed balance. Any single-site cluster has positive probability at finite , so successive allowed flips connect all spin configurations. At positive finite a site and an aligned nearest-neighbor pair can also make a two-site cluster, which removes the parity restriction of always flipping exactly one spin. A field would change the energy of the cluster interior under reversal and requires a different update.
Enumerate the stationary measure on four spins
On a torus the east and west neighbors of a site coincide, as do its north and south neighbors. The Hamiltonian still contains eight bonds, counting the parallel edges separately. Enumerate all 16 spin configurations. For each, list every subset of its aligned bonds, weight it by its Bernoulli probability, and choose each of the four seeds in turn. Placing each resulting spin flip in its destination column gives the complete matrix . Form a second matrix by choosing one site uniformly and accepting its spin flip with probability , adding rejections to the diagonal.
At , the infinite square-lattice critical coupling, both matrices have unit row sums and obey . The largest discrepancies in these two checks are below . Detailed-balance discrepancies are below . The enumeration gives . For the uniform seed its mean cluster contains sites. This second number also follows from , with (Exercise 1).
As a control, choose between doing nothing and flipping all spins with equal probabilities. This kernel also preserves . Starting in equilibrium, the next signed has zero correlation with the current value. Both and have lag-one correlation exactly one and retain their initial values forever. The enumeration checks all three correlations. The stalled even observables expose the disconnected sectors directly.
Compare the cost of measuring even observables
For the local chain, one update consists of uniformly sampled single-site proposals with replacement. For the cluster chain, one update grows and flips a single component. Both inspect four neighbors for each site they process. Let be the mean number of processed sites per update divided by . Thus for a local sweep and for a Wolff step. For a measured observable , write
Here counts complete updates and is the connected correlation divided by its zero-lag value. If the tail beyond is negligible, estimates the sweep-equivalent work per independent observation at the same single-observation variance. Counting the measurement itself adds neighbor reads per record to evaluate . In units of reads, the corresponding time becomes . These counts omit random-number, queue and memory overhead and carry no wall-clock claim.
Use 12 independent streams per size and algorithm, six initially ordered and six initially disordered. Each local stream discards 2,048 sweeps and records the next 8,192. An independent pilot estimates the average cluster size; it sets fixed cluster counts for equilibration and measurement with the same intended spin-visit budgets. Log after every completed cluster. Stopping each measurement interval at a prescribed number of visited sites could preferentially select configurations with particular cluster sizes. Actual production spin visits of the two algorithms agree within 4% at all three sizes. Each lag uses pairs from the same stream.
The table shows the windowed times in spin-visit sweep equivalents, at a lag cutoff of approximately 64 sweep equivalents. The last column gives the standard error of the mean of , calculated from the dispersion of the 12 independent stream means. No assumed autocorrelation window enters that error.
| Update | Mean and standard error | |||
|---|---|---|---|---|
| 8 | Local | 6.99 | 9.12 | |
| 8 | Cluster | 1.04 | 0.94 | |
| 16 | Local | 16.92 | 27.50 | |
| 16 | Cluster | 1.38 | 1.15 | |
| 24 | Local | 24.77 | 41.82 | |
| 24 | Cluster | 1.72 | 1.35 |
An independent row-transfer calculation on the torus gives and . The local estimate of the latter is , and the cluster estimate is . Both observables agree with the finite-box reference within 1.7 replica standard errors. At the cluster uses million production spin visits, compared with million for the local update. Charging both samplers for every observable evaluation raises their autocorrelation times at the displayed window to 2.73 and 62.72, respectively.
Resolve the slow tail
Repeat the estimate at lag cutoffs of 16, 64 and 128 sweep equivalents. At the local times grow from 14.19 through 41.82 to 61.73, while the cluster values are 1.32, 1.35 and 1.32. The local tail still matters at the largest cutoff. Inverting the observed variance across the 12 replica means gives a rough local time of 77.8 sweep equivalents, itself noisy with so few replicas. The table's local value of 41.82 is a truncated correlation sum. Quoting it as a converged time would understate the estimated cost. The smaller replica error for the cluster algorithm persists when one counts the additional measurement work (Exercise 2).
The cluster update improves the precision of energy and squared magnetization for these finite critical boxes. The three sizes do not determine a critical dynamic exponent. A model with frustration, a magnetic field, or a different observable requires its own invariant kernel and cost study.
Reproduce the calculation
The scientific companion under examples/computational-qft/cluster-monte-carlo/ contains the C++17 sampler, the Python and NumPy checks, and the retained results.json. To reproduce all 72 production streams and the independent pilots, run the following command from that directory with a C++ compiler on your path.
python3 check.py --output results.json
The output includes the seed rule's deterministic results, actual neighbor counts, means and errors for both observables, all three lag windows, and the ordered-minus-disordered differences. The independent finite-volume Ising calculation uses a row transfer matrix.
Exercises
1. Why does a seed measure susceptibility? Show that a uniformly chosen seed has mean cluster size in the finite zero-field ensemble, and relate it to the magnetic susceptibility per site for a field coupling .
Solution
Conditional on the bonds, distinct clusters have independent unbiased Ising signs. Thus equals the probability that and are connected. Summing over gives the expected size of the cluster containing . Averaging over uniform gives . Differentiating with respect to gives . Spin reversal makes the finite-volume mean zero, so . No extra factor of enters the reduced-field derivative with respect to .
2. Charge the measurements to the simulation. At the measured total neighbor-read counts, including measurement, are 339.74 million for the local run and 472.05 million for the cluster run. Use the replica errors and for to compare the work needed for the same standard error.
Solution
With independent repetitions of the same finite-run protocol, mean variance falls inversely with total work. Estimate the ratio of work needed by the local and cluster protocols from
The cluster run spent more on measurements because it recorded more events. The observed difference in precision more than covers that extra cost. This is a ratio estimated from a finite number of replica means. Its magnitude can change with measurement frequency, implementation and observable.
References
- R. G. Edwards and A. D. Sokal, “Generalization of the Fortuin-Kasteleyn-Swendsen-Wang representation and Monte Carlo algorithm,” Physical Review D 38, 2009–2012 (1988), pp. 2009–2010 for the joint spin-and-bond distribution. Article
- U. Wolff, “Collective Monte Carlo Updating for Spin Systems,” Physical Review Letters 62, 361–364 (1989), pp. 361–362 for construction of a single-cluster update. Article
- U. Wolff, “Monte Carlo errors with less errors,” Computer Physics Communications 156, 143–153 (2004), corrected version 4, §§2.1, 3.1–3.3 for the covariance sum, independent replicas and window choice. Full text
Scrollable formula. Use Left and Right arrow keys to reveal hidden content.
Scrollable table. Use Left and Right arrow keys to reveal hidden columns.
Scrollable figure. Use Left and Right arrow keys to reveal hidden content.