Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Multilevel and Multigrid Estimation

    A distant-field correlation can be noisy because each configuration contains local fluctuations that average to zero. If the field in one region becomes independent of the field in another after their common boundary is fixed, we can average those local fluctuations first. The remaining estimate fluctuates only with the boundary.

    This article performs that calculation on a periodic Gaussian chain, compares the estimators at equal sampling cost, and then derives the allocation rule for coupled coarse and fine estimates. These are two ways to exploit a hierarchy. A multigrid solver addresses a different question: how to solve a linear system efficiently.

    Preparation: Gaussian covariance and Schur complements, or the conditional Gaussian formula derived below. We work with a finite, dimensionless Euclidean probability density.

    Average over the interior first

    For an observable OO and boundary variables bb, conditional expectation gives

    ⟨O⟩=Eb[E(O∣b)].\langle O\rangle=\mathbb E_b[\mathbb E(O\mid b)].

    The law of total variance states

    Var⁡(O)=Var⁡b(E[O∣b])+Eb[Var⁡(O∣b)].\operatorname{Var}(O)= \operatorname{Var}_b(\mathbb E[O\mid b]) +\mathbb E_b[\operatorname{Var}(O\mid b)].

    Thus replacing OO by its exact conditional average cannot increase its single-sample variance. This is often called Rao–Blackwellization. It does not by itself establish a reduction in computational work: evaluating that average might be expensive.

    For a Gaussian action partitioned into interior and boundary coordinates,

    S(x,b)=12xTKIIx+xTKIBb+12bTKBBb,S(x,b)=\frac12x^TK_{II}x+x^TK_{IB}b+\frac12b^TK_{BB}b,

    complete the square. At fixed bb, the interior mean and covariance are

    μ(b)=Bb,B=−KII−1KIB,G=KII−1.\mu(b)=Bb,\quad B=-K_{II}^{-1}K_{IB}, \qquad G=K_{II}^{-1}.

    The boundary precision after integrating out the interior is the Schur complement

    KBB−KBIKII−1KIB.K_{BB}-K_{BI}K_{II}^{-1}K_{IB}.

    Its inverse is the marginal boundary covariance. Sampling bb using KBB−1K_{BB}^{-1} instead would generally change the target.

    Cut a Gaussian ring into two regions

    Take 12 real fields with ϕ12=ϕ0\phi_{12}=\phi_0 and

    S=12∑i=011[(ϕi+1−ϕi)2+m2ϕi2],m2=0.09.S=\frac12\sum_{i=0}^{11} \left[(\phi_{i+1}-\phi_i)^2+m^2\phi_i^2\right], \qquad m^2=0.09.

    The positive matrix KK has diagonal 2+m22+m^2, neighbor entries −1-1, and covariance C=K−1C=K^{-1}. We want

    ⟨O⟩=⟨ϕ0ϕ6⟩=C06.\langle O\rangle=\langle\phi_0\phi_6\rangle=C_{06}.

    Fix b=(ϕ3,ϕ9)Tb=(\phi_3,\phi_9)^T. Removing sites 3 and 9 cuts the nearest-neighbor graph into two components, with site 0 in one and site 6 in the other. Consequently G06=0G_{06}=0: the two interior variables are conditionally independent. Their conditional means are

    μ0=μ6=α(ϕ3+ϕ9),α=0.349732402252.\mu_0=\mu_6=\alpha(\phi_3+\phi_9), \qquad \alpha=0.349732402252.

    The equality follows from the ring's reflection and half-period symmetries. The coefficient follows by solving the two discrete Dirichlet problems, equivalently the matrix equation KIIB=−KIBK_{II}B=-K_{IB}.

    The improved observable is therefore

    Ocond(b)=E[ϕ0ϕ6∣b]=μ0(b)μ6(b).O_{\rm cond}(b)=\mathbb E[\phi_0\phi_6\mid b] =\mu_0(b)\mu_6(b).

    For a different boundary partition with G06≠0G_{06}\ne0, this expression would require the additional term G06G_{06}. Conditional factorization must be checked from the action, not assumed from a drawing of disjoint regions.

    Inverting the specified finite matrix gives

    C00=C66=1.742110307420,C06=0.564176603393,G00=G66=1.177933704026.\begin{aligned} C_{00}&=C_{66}=1.742110307420,\\ C_{06}&=0.564176603393,\\ G_{00}&=G_{66}=1.177933704026. \end{aligned}

    The boundary covariance has diagonal C00C_{00} and off-diagonal C06C_{06}. Let A=BCbbBTA=BC_{bb}B^T restricted to sites 0 and 6. Then A+G=CA+G=C on those sites, and here every entry of AA is 0.5641766033930.564176603393.

    Compare the exact variances and the work

    For centered jointly Gaussian variables, Wick contraction gives

    Var⁡(ϕ0ϕ6)=C00C66+C062,Var⁡(μ0μ6)=A00A66+A062.\begin{aligned} \operatorname{Var}(\phi_0\phi_6)&=C_{00}C_{66}+C_{06}^2,\\ \operatorname{Var}(\mu_0\mu_6)&=A_{00}A_{66}+A_{06}^2. \end{aligned}

    Their values are 3.353243563 and 0.636590480, a factor of 5.2675. Both estimate the same correlation. For NN independent outer draws, divide these variances by NN.

    To make the cost comparison fair, the direct estimator draws only the two-dimensional marginal (ϕ0,ϕ6)(\phi_0,\phi_6); it does not unnecessarily generate all 12 fields. The conditional estimator draws the two boundary variables and forms their two means. After precomputing the combined linear map, both require two independent standard normals and one 2×22\times2 matrix-vector transform per sample. Setup matrix factorizations are excluded and amortized over all draws. Under this specified sampling-cost model, the conditional estimator reduces variance at equal cost by the same factor 5.2675.

    The implementation performs 512 repetitions of 4,096 draws each:

    EstimateMean over runsStandard deviation across runs
    Direct0.56559300.028194
    Conditional0.56352170.012940

    Measured estimator variances are 0.971 and 1.077 times their analytic predictions, within the fluctuations expected from 512 repetitions. There is no Markov-chain error in this experiment. The benefit for an interacting theory depends on the cost and correlation of its outer and inner samplers.

    When the inner average must be sampled

    Suppose that, for each bb, we estimate μ0\mu_0 and μ6\mu_6 from nn independent draws in each conditional region. Use independent inner streams in the two regions. Their sample means have conditional variances G00/nG_{00}/n and G66/nG_{66}/n. The product of these means remains conditionally unbiased, and its total variance is

    V(n)=Vcond+G00A66+G66A00n+G00G66n2.V(n)=V_{\rm cond} +\frac{G_{00}A_{66}+G_{66}A_{00}}{n} +\frac{G_{00}G_{66}}{n^2}.

    The last term comes from multiplying two independent inner errors. Correlating those errors can introduce an extra conditional covariance and bias the product unless corrected.

    Count two normal draws for the boundary plus 2n2n for these interior averages. Then [2+2n]V(n)[2+2n]V(n) is a simple work–variance coefficient. For n=1,2,4,8n=1,2,4,8 it is respectively 13.41, 9.89, 10.56 and 14.84. More inner work eventually wastes effort because the boundary fluctuation VcondV_{\rm cond} remains. Exact conditional averaging costs two normal draws here and gives coefficient 2Vcond=1.27322V_{\rm cond}=1.2732; it is especially effective because the Gaussian integral is available analytically.

    An outer Markov chain would require its own autocorrelation analysis. Reusing one boundary for many inner updates does not create that many independent boundary samples.

    Couple coarse and fine estimates

    A second multilevel construction begins with approximations P0,…,PLP_0,\ldots,P_L to an observable. The exact telescoping identity is

    EPL=EP0+∑ℓ=1LE(Pℓ−Pℓ−1).\mathbb E P_L=\mathbb E P_0+ \sum_{\ell=1}^{L}\mathbb E(P_\ell-P_{\ell-1}).

    At level ℓ\ell, draw a coupled pair with the correct marginal distributions at both levels. A good coupling makes the difference small. Correct marginals preserve the expectation; independence of the pair would also preserve it but can give a much larger variance.

    Let V0=Var⁡P0V_0=\operatorname{Var}P_0, Vℓ=Var⁡(Pℓ−Pℓ−1)V_\ell=\operatorname{Var}(P_\ell-P_{\ell-1}), and let CℓC_\ell be the cost per sample. With independent samples and streams between levels, the estimator variance and work are

    σ2=∑ℓ=0LVℓNℓ,W=∑ℓ=0LCℓNℓ.\sigma^2=\sum_{\ell=0}^{L}\frac{V_\ell}{N_\ell}, \qquad W=\sum_{\ell=0}^{L}C_\ell N_\ell.

    Minimize WW subject to σ2=ε2\sigma^2=\varepsilon^2 using a multiplier. Differentiating with respect to NℓN_\ell gives Cℓ=ηVℓ/Nℓ2C_\ell=\eta V_\ell/N_\ell^2, hence

    Nℓ=1ε2VℓCℓ∑j=0LVjCj.N_\ell=\frac1{\varepsilon^2} \sqrt{\frac{V_\ell}{C_\ell}} \sum_{j=0}^{L}\sqrt{V_jC_j}.

    Round sample counts upward in an implementation. This is the allocation principle in Giles, §2. The computational gain depends on the decay of the difference variances relative to their costs.

    The estimator targets EPL\mathbb E P_L. If the desired answer is a continuum limit, its discretization bias EPL−EP\mathbb E P_L-\mathbb E P remains separate from this sampling variance. Likewise, coarse-graining a field requires the appropriate coarse marginal or a justified correction; substituting a convenient coarse action does not preserve the fine theory automatically.

    What a multigrid solver does

    A multigrid solver accelerates equations such as Ku=bKu=b by treating smooth error on a coarser grid. In this example it could help compute a conditional mean. It is not by itself a prescription for drawing a random field with covariance K−1K^{-1}. An approximate inverse in a sampler can alter covariance unless its error is controlled or an exact correction restores the target.

    The useful connection is therefore concrete: a solver may reduce the cost of a conditional or coupled estimator, while the probability argument still determines which measure that estimator computes.

    Summary

    Conditional averaging removes interior noise while retaining the correct boundary distribution. Coupled-level differences move most work to inexpensive levels when their variances permit it. In either case, compare total work at fixed observable error, and keep regulator bias separate from sampling error.

    Exercises

    Allocate three levels

    Take V=(1,0.04,0.0025)V=(1,0.04,0.0025), C=(1,4,16)C=(1,4,16), and sampling-variance target 0.010.01. Find the continuous optimum and compare it with using the same integer sample count on every level.

    Solution

    Here ∑VℓCℓ=1+0.4+0.2=1.6\sum\sqrt{V_\ell C_\ell}=1+0.4+0.2=1.6. The optimum is N=(160,16,2)N=(160,16,2), already integral. Its variance is 1/160+0.04/16+0.0025/2=0.011/160+0.04/16+0.0025/2=0.01, and its cost is 160+64+32=256160+64+32=256.

    Equal counts require N≥1.0425/0.01=104.25N\ge1.0425/0.01=104.25, so choose 105. Their cost is 105(1+4+16)=2205105(1+4+16)=2205. These figures compare the stated level variances and costs only; they contain no estimate of a continuum bias.

    Why the mass cannot simply be set to zero

    What fails if m2=0m^2=0 in the periodic Gaussian ring above?

    Solution

    A constant field has zero action, so KK has a zero eigenvalue and the integral over that mode diverges. There is no normalized Gaussian target on all of R12\mathbb R^{12}, and K−1K^{-1} does not exist. One could explicitly remove the zero mode or impose a different constraint, but that defines a different probability space whose conditional distributions must be derived again. Inverting a numerically regularized matrix without declaring this change would hide a change of target.

    References

    • M. B. Giles, “Multilevel Monte Carlo Path Simulation,” Operations Research 56, 607–617 (2008), author's paper, §2, pp.608–609.

    Reproducible calculations: examples/computational-qft/monte-carlo-methods/README.md.

    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.