Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Variance Reduction for Lattice Observables

    A long-distance correlator can fluctuate mainly because of a mode whose average is already known. Subtracting that fluctuation and restoring its exact mean gives a new estimator of the same observable. The useful question is whether the new estimator gives a smaller uncertainty for the same work, including the cost of computing it.

    Here we integrate two Gaussian modes analytically while retaining the rest of an actual scalar Markov history. We prove unbiasedness, check the autocorrelation contribution of the removed modes, and compare measured errors and complete update-plus-measurement costs. The same conditional-expectation principle explains pure-gauge multilevel methods, with an important limitation once a fermion determinant is present.

    Preparation: Gaussian Fourier modes, local lattice updates, and correlated statistical errors.

    Replace a known fluctuation by its expectation

    For an observable OO and retained variables bb, define Ocond=E[O∣b]O_{\mathrm{cond}}=\mathbb E[O\mid b]. The tower property and total-variance identity give

    E[Ocond]=E[O],Var⁡(O)=Var⁡(Ocond)+E[Var⁡(O∣b)].\mathbb E[O_{\mathrm{cond}}]=\mathbb E[O], \qquad \operatorname{Var}(O)=\operatorname{Var}(O_{\mathrm{cond}}) +\mathbb E[\operatorname{Var}(O\mid b)].

    Exact conditional integration cannot increase the variance of a single equilibrium measurement. It does not by itself control Markov autocorrelation or computation time. An expensive conditional average can be unhelpful, and a different observable can overlap differently with the same chain's slow modes.

    A related control variate is Oc=O−c(H−⟨H⟩)O_c=O-c(H-\langle H\rangle) with a known expectation and fixed coefficient cc. Its mean is unchanged. Learning cc from the very measurements used in the final mean can introduce bias; an independent training sample or a justified joint analysis is needed. The estimator below uses an analytic coefficient, with no training or seed selection.

    Two modes of the periodic scalar

    Consider the dimensionless 8×88\times8 Euclidean Gaussian action

    S=12∑n[∑μ=12(φn+μ^−φn)2+m2φn2],m2>0.S=\frac12\sum_n\left[\sum_{\mu=1}^2(\varphi_{n+\hat\mu}-\varphi_n)^2+m^2\varphi_n^2\right],\qquad m^2>0.

    Set V=64V=64, kμ=2πjμ/8k_\mu=2\pi j_\mu/8, and use a unitary discrete Fourier transform. The precision eigenvalue is

    K(k)=m2+4sin⁡2(k1/2)+4sin⁡2(k2/2),⟨∣φ~k∣2⟩=K(k)−1.K(k)=m^2+4\sin^2(k_1/2)+4\sin^2(k_2/2), \qquad \langle|\widetilde\varphi_k|^2\rangle=K(k)^{-1}.

    For a real field, complex modes satisfy φ~−k=φ~k∗\widetilde\varphi_{-k}=\widetilde\varphi_k^*; do not count those as independent complex variables. The constant and checkerboard modes are real and independent of all the remaining Gaussian modes. Write

    M=1V∑nφn,P=1V∑n(−1)n1+n2φn,⟨M2⟩=1Vm2,⟨P2⟩=1V(m2+8).M=\frac1V\sum_n\varphi_n,\qquad P=\frac1V\sum_n(-1)^{n_1+n_2}\varphi_n, \qquad \langle M^2\rangle=\frac1{Vm^2},\quad \langle P^2\rangle=\frac1{V(m^2+8)}.

    The translationally and axis-averaged correlator at separation four is

    C4(φ)=12V∑n,μφnφn+4μ^=1V∑kcos⁡4k1+cos⁡4k22∣φ~k∣2.C_4(\varphi)=\frac1{2V}\sum_{n,\mu}\varphi_n\varphi_{n+4\hat\mu} =\frac1V\sum_k\frac{\cos4k_1+\cos4k_2}{2}|\widetilde\varphi_k|^2.

    Each selected real mode has coefficient +1+1 in the final expression when expressed as M2M^2 or P2P^2. Holding every other Fourier mode fixed and integrating these two gives

    C4low=C4−M2−P2+1Vm2+1V(m2+8).C_4^{\mathrm{low}}=C_4-M^2-P^2+\frac1{Vm^2}+\frac1{V(m^2+8)}.

    Thus ⟨C4low⟩=⟨C4⟩\langle C_4^{\mathrm{low}}\rangle=\langle C_4\rangle exactly. The two-mode constants are equilibrium Gaussian expectations. Reusing them for an interacting λφ4/24\lambda\varphi^4/24 target would generally bias the result because the modes are then coupled. Field control variates develop exact integration-by-parts controls for that situation.

    All free-mode averages could be computed analytically in this particular model. Integrating only two deliberately isolates the estimator idea: practical low-mode methods typically know only part of a covariance or inverse, while the rest still requires sampling.

    Why this pair also removes a slow correlation

    The histories use the even-then-odd exact conditional heat bath. A parity mask contains Fourier momenta 00 and (π,π)(\pi,\pi), so one complete sweep couples kk only to k+(π,π)k+(\pi,\pi). The constant and checkerboard modes form a closed pair under the mean evolution. Gaussian update noise projected onto this pair is independent of noise projected onto the complementary pairs.

    Starting in equilibrium, the removed pair and the remaining process are therefore independent at every pair of Monte Carlo times. If D=M2+P2−⟨M2+P2⟩D=M^2+P^2-\langle M^2+P^2\rangle, then C4=C4low+DC_4=C_4^{\mathrm{low}}+D and

    ΓC4(k)=ΓC4low(k)+ΓD(k).\Gamma_{C_4}(k)=\Gamma_{C_4^{\mathrm{low}}}(k)+\Gamma_D(k).

    The companion checks this dynamical decomposition directly in position space. If TT is the mean sweep matrix, Σ=K−1\Sigma=K^{-1}, and Π\Pi projects onto the two selected modes, then [T,Π]=[Σ,Π]=0[T,\Pi]=[\Sigma,\Pi]=0. This is a property of this Gaussian update, not a general consequence of lower single-configuration variance.

    There is also an exact check of the entire correlation sum. For OA=φTAφO_A=\varphi^TA\varphi with real symmetric AA and stationary Gaussian dynamics,

    ΓA(k)=2tr⁡ ⁣[ATkΣAΣ(TT)k].\Gamma_A(k)=2\operatorname{tr}\!\left[A T^k\Sigma A\Sigma(T^T)^k\right].

    With spectral radius ρ(T)<1\rho(T)<1, solve the discrete Lyapunov equation

    XA=TXATT+ΣAΣ.X_A=T X_A T^T+\Sigma A\Sigma.

    It sums the geometric matrix series, and the asymptotic variance per retained measurement is

    VA=ΓA(0)+2∑k≥1ΓA(k)=4tr⁡(AXA)−2tr⁡(AΣAΣ).\mathcal V_A=\Gamma_A(0)+2\sum_{k\ge1}\Gamma_A(k) =4\operatorname{tr}(A X_A)-2\operatorname{tr}(A\Sigma A\Sigma).

    For the improved observable replace AA by A−mmT−ppTA-mm^T-pp^T, where mn=1/Vm_n=1/V, pn=(−1)n1+n2/Vp_n=(-1)^{n_1+n_2}/V; its added constant contributes no covariance. The companion checks the Lyapunov residual and the vanishing cross-correlations between the removed and retained pieces. This analytic result supplies a benchmark independent of a chosen noisy lag window.

    Compare estimators on the same configurations

    The input is exactly the free heat-bath histories used in the slow-mode experiment: 16 independent stationary replicas, 16,384 sweeps each, and m2=1,1/4,1/16,1/64m^2=1,1/4,1/16,1/64. There is no second production ensemble and no rejection removal. Both estimates therefore use the same number of local site updates. The stored M2M^2 and P2P^2 make their additional difference a few arithmetic operations per record.

    The stated errors below are standard errors from the scatter of sixteen replica means. Block sizes and fixed covariance-sum windows 64, 256 and 1024 are also retained in variance-results.json. The variance ratio estimated from sixteen means is noisy; its digits are not a calibrated speedup.

    m2m^2Raw C4C_4Two-mode C4C_4Replica variance ratioExact asymptotic ratio
    110.004150 ± 0.0000680.004182 ± 0.0000491.92.1
    1/41/40.042355 ± 0.0005200.041897 ± 0.0000972926
    1/161/160.215673 ± 0.0058580.224953 ± 0.0001182.5×1032.5\times10^31.1×1031.1\times10^3
    1/641/640.937094 ± 0.0326620.973788 ± 0.0001256.8×1046.8\times10^46.5×1046.5\times10^4

    At m2=1/4m^2=1/4, the exact mean is 0.042023744940.04202374494. Both results are compatible with it at their stated precision. At m2=1/16m^2=1/16, the empirical variance ratio is about twice the exact asymptotic ratio; sixteen replicas do not determine a variance ratio precisely. The known dynamical block and Lyapunov calculation supply the separate analytic comparison.

    Raw and two-mode scalar correlators share the exact mean; the second panel compares their finite-replica variance ratios with exact asymptotic ratios across masses.

    Both estimators use the same stationary 828^2 heat-bath histories. Bars are standard errors from sixteen independent replica means. The exact target is the finite-lattice K−1K^{-1} correlator; the exact asymptotic ratios come from the position-space Gaussian transition and Lyapunov equation. A ratio from only sixteen means has substantial sampling uncertainty.

    Count the measurement cost too

    An estimator can win on saved configurations yet lose when it is the sole measurement. We therefore also time a standalone C4C_4 task at m2=1/4m^2=1/4. Five interleaved pairs of runs each contain 16 replicas and 2,048 sweeps. A pair uses identical stationary initial fields and identical random streams, so its final fields agree exactly; only the recorded observable differs. The seed is SeedSequence([761025,300+trial,replica]), fixed in advance. Timings include every local update and its measurement, including the sums for MM and PP in the improved case. They exclude the common initialization and are a long-run, amortized comparison.

    If ww is seconds per retained configuration including measurement, a run of duration TrunT_{\mathrm{run}} has asymptotic variance wV/Trunw\mathcal V/T_{\mathrm{run}}. Consequently the relevant efficiency ratio is

    wrawVrawwlowVlow,\frac{w_{\mathrm{raw}}\mathcal V_{\mathrm{raw}}} {w_{\mathrm{low}}\mathcal V_{\mathrm{low}}},

    not the variance ratio alone. This expression compares the estimators at matched total work in the stated long-run regime. Hardware, implementation, shared machine load and the number of measurements can change ww.

    On the measured machine, raw costs range from 13.0 to 13.2 microseconds per configuration and improved costs from 13.7 to 14.0 microseconds. The median cost ratio is 1.050. Combining these costs with the exact asymptotic variances gives an efficiency ratio of about 24.7 at m2=1/4m^2=1/4, compared with a variance-only ratio of 26.0. These timings characterize this implementation and machine load, not a portable performance guarantee; the fixed-work comparison on shared configurations does not depend on them.

    No conclusion about an interacting ensemble follows from this free-field gain. The improvement is especially large when a known low mode dominates the original error; a practical calculation must establish its own exact control means and costs.

    Conditional products and pure-gauge multilevel sampling

    The same idea applies when the conditional average is estimated numerically. Suppose fixing boundary links bb partitions a local pure-gauge action into independent interiors u1,…,usu_1,\ldots,u_s:

    p(u1,…,us∣b)=∏j=1spj(uj∣b),O=∏j=1sOj(uj,b).p(u_1,\ldots,u_s\mid b)=\prod_{j=1}^s p_j(u_j\mid b),\qquad O=\prod_{j=1}^s O_j(u_j,b).

    Then ⟨O∣b⟩=∏j⟨Oj∣b⟩\langle O\mid b\rangle=\prod_j\langle O_j\mid b\rangle. Independently sampled, unbiased inner estimates for the factors give an unbiased product at fixed bb; the outer boundary configurations must themselves have the correct marginal distribution. Reusing correlated inner noise between factors can invalidate the product argument. Inner chains also need their own equilibration and correlation control.

    For a Wilson-loop or Polyakov-line construction, the factors may be matrices or tensors whose boundary color indices are contracted only after the conditional averages. Lüscher and Weisz derive such normalized time-slab averages in pure lattice gauge theory [1, §§3.2–3.3, equations (3.6)–(3.7)]. They preserve the observable while reducing fluctuations through nested averages; replacing a matrix product by a product of traces would instead change the observable. The multilevel-estimation article derives a finite Gaussian boundary example and the inner-sampling cost balance.

    After integrating out dynamical fermions, the gauge weight contains det⁡D[U]\det D[U] or det⁡(D†D)\det(D^\dagger D). The Dirac operator may be local, but its determinant couples links across the whole domain: δlog⁡det⁡D=Tr⁡(D−1δD)\delta\log\det D=\operatorname{Tr}(D^{-1}\delta D). Fixing a layer of gauge links therefore does not generally factor the full conditional measure into independent slab interiors. Specialized domain decompositions, auxiliary fields or correction factors are required. Neither the pure-gauge proof nor the free-scalar two-mode example solves that fermionic factorization problem.

    Summary

    The exact two-mode replacement estimates the original C4C_4 without changing its ensemble. Its gain is checked both by actual shared histories and by a Gaussian transition calculation, with measurement cost included separately. Conditional unbiasedness, temporal correlation and computation cost are three distinct requirements of a useful variance-reduction method.

    Exercises

    1. Use an odd separation

    For the same axis-averaged CrC_r, find the two-mode estimator at odd integer rr. Why would subtracting M2+P2M^2+P^2 be wrong there?

    Solution

    The constant mode has translation phase one. The checkerboard mode has phase (−1)r(-1)^r under either coordinate translation. Its contribution to CrC_r is therefore (−1)rP2(-1)^rP^2, giving

    Crlow=Cr−M2−(−1)rP2+1Vm2+(−1)rV(m2+8).C_r^{\mathrm{low}}=C_r-M^2-(-1)^rP^2 +\frac1{Vm^2}+\frac{(-1)^r}{V(m^2+8)}.

    At odd rr the fluctuating checkerboard term is negative, so conditional integration adds P2P^2 and subtracts its known mean. Using the even-separation formula would still be an unbiased control if both subtracted terms were restored with their matching exact means, but it would not be this conditional expectation: it would double the remaining checkerboard fluctuation instead of removing it. The proof of variance reduction would then fail.

    2. An unbiased product needs independent noise

    At a fixed boundary let two equal factors have conditional mean μ\mu. If μ^\widehat\mu is unbiased with variance v/nv/n, compare using one estimate squared with multiplying two independent estimates. Then explain what happens if a fermion determinant couples the two interiors.

    Solution

    One estimate squared has expectation E[μ^2]=μ2+v/n\mathbb E[\widehat\mu^2]=\mu^2+v/n, so it is biased for μ2\mu^2. Two independent estimates obey E[μ^1μ^2]=μ2\mathbb E[\widehat\mu_1\widehat\mu_2]=\mu^2. More generally a shared noise source adds their conditional covariance to the product mean.

    If the physical conditional measure itself does not factor, even perfectly independent simulations of the two marginal interiors calculate the wrong quantity: E[O1O2∣b]\mathbb E[O_1O_2\mid b] includes a physical conditional covariance. A nonlocal determinant generally generates that coupling. Removing sampling-noise covariance does not remove the physical covariance or justify omitting it.

    References

    1. M. Lüscher and P. Weisz, “Locality and exponential error reduction in numerical lattice gauge theory,” JHEP 09 (2001) 010, arXiv:hep-lat/0108014. §§3.2–3.3 define the pure-gauge time-slab expectation and factorization. The scalar example here applies the factorization to two Gaussian modes.

    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.