โ† back to journal

Wolff clusters make Ising autocorrelation nearly flat at Tc

2026-10-15 ยท Kit Wickham

My last post ended with plain Metropolis getting slow near the 2D Ising critical point and a cluster algorithm as the fix. I tried it. At the exact Tc, a 128ร—128 lattice needs about 2,500 Metropolis sweeps between independent readings of the magnetization, but only 1.65 sweeps' worth of Wolff cluster flips. That's roughly 1,500 times less work per independent sample, and the gap keeps widening with size.

The setup

Two small C programs in one file, run exactly at Tc = 2/ln(1+โˆš2). One does single-spin Metropolis with random site picks, the other does Wolff: grow a cluster from a random seed spin, adding each aligned neighbour with probability 1 โˆ’ eโˆ’2/T, then flip the whole cluster. For each run I recorded |m| after every update (a Metropolis sweep, or one Wolff cluster) and computed its integrated autocorrelation time with a self-consistent window. To compare costs fairly I converted Wolff time into sweeps: one cluster costs (cluster size รท N) of a sweep, and that average shrinks from 0.65 sweeps at L=8 to 0.27 at L=256. Three seeds per size, averaged.

LMetropolis, sweepsWolff, cluster flipsWolff, sweep-equivalents
89.71.551.00
1639.92.221.21
321823.021.38
647383.951.53
1282,4905.081.65
256โ€”6.551.79

The exponents

Fitting ฯ„ โˆ Lz on a log-log scale gives z โ‰ˆ 2.0 for Metropolis over all five sizes (1.9 using only 32 to 128) and z โ‰ˆ 0.41 for Wolff counted in cluster flips (0.37 from 32 up). Literature values are about 2.17 and 0.25. My Metropolis fit sits a little low and the Wolff one a little high, which is what you'd expect from small-lattice corrections: the Wolff numbers are still bending downward, not following a clean power law. In the unit that actually costs CPU time, sweep-equivalents, Wolff grows as L0.12โ€“0.16, close to flat. Metropolis at L=128 also has real noise: its three seeds gave 2,110, 2,470 and 2,900.

So what

Here the cost of an independent sample under Metropolis went up 260ร— from L=8 to L=128, while under Wolff it went up 1.7ร—. That is why the Binder run in the last post stopped at L=128: each doubling cost about 4ร— more sweeps per sample, on top of 4ร— more spins. With Wolff, L=1024 is a matter of minutes per thousand samples rather than days. The catch is that it only works near Tc. Away from it, clusters either stay tiny or swallow the whole lattice, and plain Metropolis is fine. It also doesn't carry over to GPUs as easily, since growing a cluster is a sequential flood fill, so my checkerboard MLX code stays the better choice for many independent small lattices.

Method: one Mac, 12 cores, about 70 lines of C, a cluster-size and autocorrelation estimate on |m| only, 1 million updates per Wolff run and 1 to 2 million sweeps per Metropolis run. Metropolis L=256 and Wolff Lโ‰ฅ512 were planned but didn't finish before I stopped the batch, and the autocorrelation of other observables like energy may behave differently.