Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Correlated Errors in Lattice Measurements

    A scalar simulation measures several separations of the same correlator on every configuration. Those measurements are correlated both with one another and with nearby Monte Carlo steps. A mass-like ratio or a fitted energy can therefore have an uncertainty quite different from one obtained by attaching independent errors to each point.

    We analyze the actual shared 828^2 scalar histories using independent replicas, blocking and fixed-window covariance sums. A free finite-lattice correlator supplies an exact energy benchmark. The interacting calculation tests uncertainty propagation without assuming that a short correlator fit isolates a ground state.

    Preparation: The first scalar simulation and local updates. The Computational QFT treatment derives effective sample size and tests coverage on exactly soluble processes; here the input is the chapter's shared field ensemble.

    Specify the measured object

    The dimensionless two-dimensional Euclidean action is

    S=∑n[12∑μ=12(φn+μ^−φn)2+12φn2+λ24φn4]S=\sum_n\left[\frac12\sum_{\mu=1}^2(\varphi_{n+\hat\mu}-\varphi_n)^2+\frac12\varphi_n^2+\frac{\lambda}{24}\varphi_n^4\right]

    on a periodic 8×88\times8 lattice. We use λ=0\lambda=0 and 22. A Monte Carlo step is a complete local sweep or a complete HMC trajectory, as appropriate. Every rejected proposal remains in the history as a repeated state.

    Two correlators answer different questions. The axis average is

    Cr=12V∑n,μφnφn+rμ^,V=64.C_r=\frac1{2V}\sum_{n,\mu}\varphi_n\varphi_{n+r\hat\mu},\qquad V=64.

    For a spectral analysis we instead project spatial momentum to zero. With Euclidean time tt and spatial coordinate xx, define

    qt=18∑x=07φt,x,G(r)=18∑t=07qtqt+r.q_t=\frac1{\sqrt8}\sum_{x=0}^7\varphi_{t,x},\qquad G(r)=\frac18\sum_{t=0}^7 q_t q_{t+r}.

    Time indices wrap periodically. GG contains spatial cross terms absent from CrC_r; the two cannot be substituted for one another. The data contain G(0),…,G(4)G(0),\ldots,G(4) measured together, along with CrC_r, S/VS/V, M=V−1∑nφnM=V^{-1}\sum_n\varphi_n and the integration-by-parts observable V−1∑nφn∂S/∂φnV^{-1}\sum_n\varphi_n\partial S/\partial\varphi_n.

    The generator uses 16 independent replicas for each target and algorithm. Local random-walk and Gaussian-proposal updates each discard 2,048 sweeps and retain 8,192; HMC discards 256 trajectories and retains 1,024. Half start at zero field and half at constant field three. The seed for each is SeedSequence([761025,case_id,algorithm_id,replica_id]), with free/interacting case IDs 0/1 and random-walk/Gaussian/HMC IDs 0/1/2. HMC uses step size 0.10.1 and independently chooses 8, 10 or 12 leapfrog steps per trajectory. The HMC article checks the integrator and work comparison.

    These histories are generated once by run_scalar.py; analyze_scalar.py only reads them. Prefixes, the discarded histories and separate starting groups are retained for equilibration diagnostics. An error formula for a stationary chain cannot establish that the discarded interval was sufficient.

    Sum correlations within replicas

    Let Xr,t,aX_{r,t,a} be observable aa at retained step tt of independent replica rr. For RR replicas of equal length nn, the total number of records is N=RnN=Rn. Center all records at the combined mean X‾a\overline X_a and estimate

    Γ^ab(k)=1R(n−k)∑r=1R∑t=0n−k−1(Xr,t,a−X‾a)(Xr,t+k,b−X‾b).\widehat\Gamma_{ab}(k)=\frac1{R(n-k)} \sum_{r=1}^R\sum_{t=0}^{n-k-1} (X_{r,t,a}-\overline X_a)(X_{r,t+k,b}-\overline X_b).

    No pair crosses a replica boundary. Centering each short replica separately could erase offsets that should instead warn about slow sampling. Global centering also has a finite-sample bias because the true mean is unknown; it does not eliminate that issue.

    For a long stationary run with summable correlations, a fixed-window estimate of the covariance of the mean is

    Σ^X‾(W)=1N[Γ^(0)+∑k=1W(Γ^(k)+Γ^(k)T)].\widehat\Sigma_{\overline X}(W)=\frac1N \left[\widehat\Gamma(0)+\sum_{k=1}^{W} \bigl(\widehat\Gamma(k)+\widehat\Gamma(k)^T\bigr)\right].

    The transpose matters when the update sequence is not reversible. For one observable, this reduces to Γ^(0)[1+2∑k=1Wρ^(k)]/N\widehat\Gamma(0)[1+2\sum_{k=1}^W\widehat\rho(k)]/N. A short window misses a tail; an excessively long window accumulates noise. A significantly negative variance or indefinite covariance estimate is a failed diagnostic, not permission to clip it into a physical answer.

    The analysis uses predeclared windows W=16,64,256W=16,64,256 local sweeps and W=8,32,128W=8,32,128 HMC trajectories. It implements this fixed-window estimator, including its finite-mean bias, rather than claiming the full automatic Γ\Gamma-method and bias correction of Wolff [1, §§3.1–3.3]. The companion verifies its Fourier-transform implementation against a direct within-replica lag sum.

    Blocks and replicas supply different comparisons

    Partition each replica into complete aligned blocks of bb records, never joining two replicas. If their B=N/bB=N/b means YjY_j are approximately independent, the covariance estimate is

    Σ^b=1B(B−1)∑j=1B(Yj−X‾)(Yj−X‾)T.\widehat\Sigma_b=\frac1{B(B-1)} \sum_{j=1}^B(Y_j-\overline X)(Y_j-\overline X)^T.

    The chosen block sizes are the same numerical values as the respective windows. Small blocks retain correlations; large blocks reduce the number of observations available to estimate an error. A plateau is useful evidence, not a proof against an invisible slow mode. For comparison, the scatter of the RR complete replica means ZrZ_r gives

    Σ^rep=1R(R−1)∑r(Zr−X‾)(Zr−X‾)T.\widehat\Sigma_{\mathrm{rep}}=\frac1{R(R-1)} \sum_r(Z_r-\overline X)(Z_r-\overline X)^T.

    Only sixteen means enter the latter estimate. Its fluctuations can be substantial even when every chain samples correctly. If start groups remain inconsistent, increasing a lag window does not repair the underlying nonequilibrium problem. Blocking and replica comparisons are discussed in [1, §3.1 and Appendix B].

    For C4C_4, the same data give the following central values and standard errors. “Block” and “window” use the largest predeclared size; errors are displayed in units of 10−410^{-4}.

    Target and updateMean C4C_4Naive SEBlock SEWindow SEReplica SE
    Free, random walk0.0046031.062.732.873.55
    Free, heat bath0.0041551.061.371.361.36
    Free, HMC0.0039162.984.173.754.21
    Quartic, random walk0.0029240.942.282.332.53
    Quartic, Gaussian MH0.0026170.951.201.230.87
    Quartic, HMC0.0026222.683.643.803.45

    For the free HMC stream the window error is 3.753.75 in the table's units while the independent-configuration estimate is 2.982.98. For this observable and these finite windows the variance ratio is about 1.581.58. Its value depends on the measured separation and on the update. To test a window rule against an ensemble with known long-run variance, follow the autocorrelation-sum comparison.

    These runs have different numbers and costs of updates, so this table compares error analyses, not algorithmic speed. In particular, the interacting Gaussian-MH replica error is smaller than its block error; no general equality of finite error estimators is being asserted.

    Standard-error estimates versus block size and covariance window on the same free scalar histories, with independent-replica scatter for comparison.

    The same free-field C4C_4 measurements are analyzed by blocking, fixed-window covariance sums and independent-replica scatter. Both panels use complete local sweeps; the HMC comparison is in the table.

    The diagnostics are not uniformly flat. For free random-walk C4C_4, the zero-start group gives 0.005346±0.0003520.005346\pm0.000352 and the constant-three group 0.003861±0.0005100.003861\pm0.000510, about 2.4 combined replica standard errors apart. The interacting random-walk quarter-, half- and full-length prefixes give 0.002134, 0.002724 and 0.002924. Prefixes overlap and are correlated; these differences should remain visible rather than be turned into a binary equilibration certificate. The independent free target and alternative algorithms provide additional checks, while longer independent runs would sharpen the start comparison.

    Propagate a nonlinear observable with its covariance

    A convenient finite-time statistic is

    Eeff(2)=arcosh⁡z,z=G‾(1)+G‾(3)2G‾(2).E_{\mathrm{eff}}(2)=\operatorname{arcosh}z,\qquad z=\frac{\overline G(1)+\overline G(3)}{2\overline G(2)}.

    It is real here only when G‾(2)>0\overline G(2)>0 and z>1z>1. At z=1z=1 its derivative is singular. An undefined resample must be reported, not moved to the boundary by clipping.

    For a smooth function F=f(G‾)F=f(\overline{\boldsymbol G}), its leading fluctuating direction is ∑afaGa\sum_a f_a G_a, where fa=∂f/∂G‾af_a=\partial f/\partial\overline G_a at the sample mean. The leading covariance propagation is

    Var⁡(F)≃∑a,bfa ΣG‾,ab fb.\operatorname{Var}(F)\simeq \sum_{a,b} f_a\,\Sigma_{\overline G,ab}\,f_b.

    For the displayed statistic the only nonzero derivatives are

    f1=f3=12G‾(2)z2−1,f2=−zG‾(2)z2−1.f_1=f_3=\frac1{2\overline G(2)\sqrt{z^2-1}}, \qquad f_2=-\frac{z}{\overline G(2)\sqrt{z^2-1}}.

    Cross-covariances are indispensable because numerator and denominator share configurations. Their contributions can cancel or reinforce the diagonal terms. The companion checks this gradient by finite differences and applies each window covariance to this projected direction.

    For a block jackknife, remove one entire aligned block at a time and recompute the nonlinear statistic from the remaining mean. If its values are F(−j)F_{(-j)} and their average is F‾JK\overline F_{\mathrm{JK}}, use

    Var⁡^JK(F)=B−1B∑j(F(−j)−F‾JK)2.\widehat{\operatorname{Var}}_{\mathrm{JK}}(F) =\frac{B-1}{B}\sum_j(F_{(-j)}-\overline F_{\mathrm{JK}})^2.

    This preserves the relationships among all measured separations. The central value remains f(G‾)f(\overline G), without a jackknife bias correction; nonlinear estimates can have finite-sample bias even when each G‾a\overline G_a is unbiased. Large, approximately independent blocks and a smooth statistic underlie the error approximation.

    UpdateFree Eeff(2)E_{\mathrm{eff}}(2)Quartic Eeff(2)E_{\mathrm{eff}}(2)
    Random walk0.95369 ± 0.015411.07825 ± 0.01866
    Gaussian proposal0.95595 ± 0.007951.06611 ± 0.01009
    HMC0.95874 ± 0.023261.06375 ± 0.02888

    Errors use the largest-block jackknife. All delete-one-block effective energies are defined. The projected window errors agree with the jackknife errors at the displayed precision.

    For λ=2\lambda=2, these are finite-time effective-energy statistics. The calculation does not show that r=2r=2 isolates a single interacting state. A stable statistical error cannot replace an excited-state or fit-window analysis.

    A correlated fit with an exact finite-lattice target

    For the free field, zero spatial momentum reduces the covariance to a one-dimensional periodic inverse:

    Gfree(r)=18∑j=07cos⁡(2πjr/8)1+4sin⁡2(πj/8)=cosh⁡[E(4−r)]2sinh⁡E sinh⁡4E,E=2arsinh⁡12.G_{\mathrm{free}}(r)=\frac18\sum_{j=0}^7 \frac{\cos(2\pi jr/8)}{1+4\sin^2(\pi j/8)} =\frac{\cosh[E(4-r)]}{2\sinh E\,\sinh4E}, \qquad E=2\operatorname{arsinh}\frac12.

    The second equality follows by solving the periodic difference equation. The backward contribution around the finite time circle is essential. In this Gaussian example the cosh is exact at every separation, not an assumption about a large-time plateau.

    The fit range r=1,2,3,4r=1,2,3,4 was fixed before production. Fit G(r)=Acosh⁡[E(4−r)]G(r)=A\cosh[E(4-r)] by minimizing

    χ2=(G‾−g(A,E))TΣ^b−1(G‾−g(A,E)).\chi^2=(\overline{\boldsymbol G}-\boldsymbol g(A,E))^T \widehat\Sigma_b^{-1} (\overline{\boldsymbol G}-\boldsymbol g(A,E)).

    Here Σ^b\widehat\Sigma_b is the full four-separation covariance of the mean, using b=256b=256 for local updates or 128128 for HMC. These give 512 or 128 blocks, respectively. The positive covariance is inverted without an eigenvalue cutoff. For each trial EE, the minimizing AA is obtained linearly; a bounded one-dimensional minimization then finds EE. The numerical search interval 0.05<E<40.05<E<4 is fixed and a fit reaching a boundary is flagged as failed.

    Refit every delete-one-block mean with the same covariance weights as the original fit. The retained output gives both parameter errors, covariance eigenvalues, and χ2\chi^2 with two nominal degrees of freedom. Estimated, fixed weights and correlated finite data do not justify treating this χ2\chi^2 as an exactly calibrated probability test.

    The exact free value is E=0.9624236501E=0.9624236501. The fitted results are:

    UpdateFitted EEJackknife SEχ2\chi^2 / 2
    Random walk0.956660.016023.910 / 2
    Heat bath0.956350.007821.315 / 2
    HMC0.959830.022070.054 / 2

    No seed or fit window was changed to improve agreement with the known energy. The result checks the measured object, periodic normalization and uncertainty propagation at this finite lattice. It does not establish coverage from one set of replicas or validate an interacting one-cosh model.

    Summary

    Analyze the observable actually used in the final answer, including its temporal and cross-separation covariance. Comparing windows, block sizes, independent replicas and starting groups exposes different limitations. The free correlator gives a quantitative check; none of these diagnostics proves that an unvisited slow sector has been sampled.

    Exercises

    1. A ratio with exact cancellation

    Suppose every measurement obeys At=cBtA_t=cB_t, with B‾≠0\overline B\ne0. Use covariance propagation to find the leading error of F=A‾/B‾F=\overline A/\overline B. What does discarding the cross-covariance do?

    Solution

    The gradient is (1/B‾,−A‾/B‾2)=(1,−c)/B‾(1/\overline B,-\overline A/\overline B^2)=(1,-c)/\overline B. Since the entire histories obey the relation, every window or block covariance is proportional to

    (c2cc1).\begin{pmatrix}c^2&c\\c&1\end{pmatrix}.

    The gradient annihilates this matrix, giving zero variance. Indeed the ratio is exactly cc in every defined resample. Omitting the cross-covariance would instead give 2c2Var⁡(B‾)/B‾22c^2\operatorname{Var}(\overline B)/\overline B^2, a spurious positive uncertainty. Correlations are part of the calculation, not an optional refinement.

    2. Independent replicas do not extend a lag window

    There are RR independent stationary chains of length nn with scalar covariance Γ(k)\Gamma(k). Derive the exact variance of their combined mean. Why is concatenating them into one chain of length RnRn inappropriate for estimating Γ(k)\Gamma(k)?

    Solution

    Cross-replica covariances vanish. Within each chain there are nn diagonal pairs and 2(n−k)2(n-k) ordered pairs at positive separation kk. Hence

    Var⁡(X‾)=1Rn[Γ(0)+2∑k=1n−1(1−kn)Γ(k)].\operatorname{Var}(\overline X)=\frac1{Rn} \left[\Gamma(0)+2\sum_{k=1}^{n-1}\left(1-\frac{k}{n}\right)\Gamma(k)\right].

    The 1/R1/R reduction comes from averaging independent chain means. Concatenation inserts artificial lag pairs across boundaries whose expectation is zero rather than Γ(k)\Gamma(k), diluting the correlation estimate. More replicas improve the precision of within-chain estimates, but they do not observe the evolution of any one chain beyond nn steps. A correlation time much longer than nn remains a sampling problem even if the concatenated file is large.

    References

    1. U. Wolff, “Monte Carlo errors with less errors,” Computer Physics Communications 156 (2004) 143–153, erratum 176 (2007) 383, arXiv:hep-lat/0306017v4. §§3.1–3.3, especially equations (31)–(36) and (49)–(52), treat primary and derived observables, independent replicas, finite-mean bias and automatic windows; Appendix B discusses binning. The present companion uses the explicitly stated fixed-window version.

    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.