“Know how to solve every problem that has been solved.” “What I cannot create, I do not understand.” — Richard Feynman

Project: Critical Exponents from Finite-Size Scaling

Projects

What you need to know first 2 concepts, 1 layers

The requisite-knowledge inventory for this page, bottom-up: the primitives at the base, combined upward until you reach what this page assumes. Skim the layers you already own; start wherever the ground gets unfamiliar.

  1. base
  2. you are here

1 of these are concepts without a dedicated page yet — the grey chips. Following the linked ones first makes the rest land.

Four exact exponents extracted from lattices no bigger than 128×128 — and the reason a 2.3% "miss" on the GPU Ising page was never an error. Stack: Python · NumPy · numba.

The GPU Ising project located the susceptibility peak of a 64×64 lattice at and noted, almost apologetically, that Onsager says 2.269. Nothing was wrong. A finite lattice has no phase transition at all — the peak must sit off the true , shifted by an amount that shrinks as a power of . Finite-size scaling is the discipline that turns that annoyance inside out: instead of fighting the drift, you measure how observables drift with L, and the drift rates are the critical exponents. This page runs the full pipeline on the 2D Ising model, where every answer is known exactly — , , , — so every step of the method is checkable to the digit.

First problem: Metropolis dies exactly where you need it

At the correlation length wants to be infinite, and single-spin flips move information one site at a time. The autocorrelation time of Metropolis grows as with (Nightingale & Blöte, PRB 62, 1089 (2000)) — double the lattice, pay four times the sweeps per independent sample, on top of the four-fold cost per sweep. Wolff's cluster algorithm (Wolff, PRL 62, 361 (1989)) deletes the problem: grow a cluster of aligned spins by adding each aligned neighbor with probability , then flip the whole thing. That particular is the unique choice that makes the move rejection-free while preserving detailed balance, and it drops to nearly zero.

@njit(cache=True)
def wolff_run(spins, nbr, T, n_steps, seed):
    """n_steps Wolff cluster updates; returns per-step m and cluster sizes."""
    np.random.seed(seed)
    N = spins.size
    p_add = 1.0 - np.exp(-2.0 / T)     # Wolff's magic bond probability
    stack = np.empty(N, dtype=np.int64)
    mag = spins.sum()
    for step in range(n_steps):
        seed_site = np.random.randint(N)
        s0 = spins[seed_site]
        spins[seed_site] = -s0          # flip as you go: no visited[] array
        stack[0] = seed_site
        top = 1
        csize = 1
        while top > 0:                  # grow the cluster depth-first
            top -= 1
            site = stack[top]
            for k in range(4):
                j = nbr[site, k]
                if spins[j] == s0 and np.random.random() < p_add:
                    spins[j] = -s0
                    stack[top] = j
                    top += 1
                    csize += 1
        mag -= 2 * s0 * csize           # the whole cluster flipped at once

Measured at on a 64×64 lattice, with the integrated autocorrelation time computed by Sokal's self-consistent window:

def tau_int(series, c=6.0):
    """Integrated autocorrelation time with the Sokal self-consistent window."""
    x = series - series.mean()
    n = len(x)
    acf = np.correlate(x, x, mode='full')[n - 1:] / (np.arange(n, 0, -1) * x.var())
    tau = 0.5
    for W in range(1, n // 3):
        tau = 0.5 + acf[1:W + 1].sum()
        if W >= c * tau:               # stop summing when the window
            break                      # exceeds c times the answer
    return tau
At Tc, L=64:  tau_int(|m|)  Metropolis = 275.8 sweeps
              tau_int(|m|)  Wolff      = 3.56 steps
              mean cluster = 1585 spins = 0.387 sweeps of work
              work-normalized Wolff tau = 1.378 sweep-equivalents
              speedup at L=64 ~ 200x
Autocorrelation of |m| at Tc on a 64 by 64 lattice, log scale: the Metropolis curve decays over hundreds of sweeps while the Wolff curve drops within a few cluster steps.

One Wolff step costs less than a full sweep of work (the mean cluster is a fraction of the lattice), and its samples decorrelate in a couple of steps. Everything below uses Wolff; the same statistics with Metropolis would multiply the compute by two orders of magnitude at the largest — and the gap widens as .

The Binder cumulant: a dimensionless quantity crosses at one point

The fourth-order cumulant of the magnetization (Binder, Z. Phys. B 43, 119 (1981)),

is built to be dimensionless: near criticality it depends on and only through the single combination . At that combination is zero for every — so the curves of all lattice sizes pass through one point. Plot five sizes, find the crossing, and you have located an infinite-volume phase transition using boxes that fit in a laptop's cache:

Binder cumulant versus temperature for L = 8 to 128 with jackknife error bars: five curves fanning apart on both sides but crossing at one point, at the exact critical temperature and the universal value 0.61069.
U4 crossing L=8/16:   T = 2.26358   U4 = 0.61448
U4 crossing L=16/32:  T = 2.26657   U4 = 0.61289
U4 crossing L=32/64:  T = 2.26476   U4 = 0.61477
U4 crossing L=64/128: T = 2.25590   U4 = 0.63188

Tc estimate  = 2.26241   (exact 2.26919, error 0.299%)
U4* estimate = 0.61985   (Kamieniarz-Blote 0.61069)

The crossing value itself is a universal number — every system in the 2D Ising universality class shares it. The benchmark is (Kamieniarz & Blöte, J. Phys. A 26, 201 (1993)), with the caveat that it depends on boundary conditions and aspect ratio, so it identifies your setup as much as your model.

Look at the table before moving on: the three mid-size crossings cluster within 0.25% of the exact answer, and then the 64/128 crossing sits visibly low. Diagnosis, not hand-waving: the crossings are located by intersecting cubic fits of over the whole temperature window, and at the true curve has become so steep (its slope grows as ) that a cubic can no longer follow it — the interpolant, not the physics, moves the crossing. The tell is that tripling the sample count at moved this crossing by 0.00008: statistics-immune errors are systematic errors. The same underfit derivative is why the estimate below is the weakest of the four numbers. A narrower fit window around the crossing is the standard cure — left as the first exercise for anyone reproducing this.

Two exponents from five lattice sizes

Sit exactly at (we know it; that is the luxury of 2D) and watch observables change with alone. Scale invariance forces pure power laws: and . On a log-log plot the exponents are slopes:

Log-log plots of the magnetization and susceptibility at the exact critical temperature versus lattice size: straight power laws whose fitted slopes match minus one eighth and seven fourths.
beta/nu  = 0.1251   (exact 0.1250, error 0.1%)
gamma/nu = 1.7502   (exact 1.7500, error 0.0%)
1/nu     = 1.1075  ->  nu = 0.9030   (exact 1.0, error 9.7%)

Data collapse — and what failure looks like

The scaling hypothesis makes one more prediction, stronger than any single exponent: plotted against , the data for all sizes and all temperatures must fall on a single curve. With the exact they do. And the test has teeth — feed it a wrong exponent and the curves fan apart:

Two panels of Binder cumulant data plotted against the scaling variable: with the exact nu equals one, all five lattice sizes collapse onto a single curve; with nu equals 0.8 the curves visibly fan apart.

This is the falsifiability picture. Data collapse is not a fit that always "sort of works" — a 20% error in is visible from across the room.

Why this works at L ≤ 128 — and why 3D took thirty years

Every scaling law above has corrections of order . The 2D Ising model is charmed: , so at the corrections sit at the 10⁻⁴ level and small lattices tell the truth. In 3D, — corrections die so slowly that state-of-the-art Monte Carlo needed lattices up to 1024³ and careful correction-to-scaling fits to reach (Ferrenberg, Xu & Landau, PRE 97, 043301 (2018)). The same exponents now come from a completely different direction — the conformal bootstrap gives (Kos, Poland, Simmons-Duffin & Vichi, JHEP 08 (2016) 036) — and from experiments on liquid-gas critical points. Three unrelated methods, five shared digits: universality is not a metaphor.

Error bars here come from jackknife over 20 blocks (the cumulant is a ratio of noisy averages, so naive error propagation underestimates); sample counts per point range from 400,000 Wolff steps at to 240,000 at . The analysis recipes are straight from Newman & Barkema, Monte Carlo Methods in Statistical Physics (1999), chapters 3 and 8 — still the best methodology text in the field.

Try First

Each prompt asks a checkable question about the working code or math above — predict an output, derive a sign, state an invariant, find a bug. Commit to an answer before clicking "reveal." That commitment is the whole point: if your answer matched, you understand the piece you were looking at; if it didn't, that's the part worth re-reading.

predict
Below , does increase or decrease with at fixed ? Work out the two limits first: what is for a perfectly ordered system (), and for a Gaussian-distributed with zero mean?
why does this work
The exponent fits measure and at the exact for every . Why not measure each lattice at its own susceptibility peak, where the signal is strongest?
what if
Suppose the transition were first order (as in the q = 10 Potts model). What does the Binder-cumulant picture look like then?

Extensions

Reproduce it

scripts/projects/ising_fss.py regenerates every figure and number (about four hours on a laptop, of which the L = 128 sweep is nearly all; numba does the heavy lifting). Wolff validation against Onsager's exact magnetization, from the run:

T=1.8: <|m|> = 0.95704   Onsager = 0.95686
T=2.1: <|m|> = 0.86867   Onsager = 0.86875