- Home
- Library
- Computational Quantum Field Theory
- Sampling Measures and Estimating Free Energies
- Control Variates from Field Identities
Control Variates from Field Identities
An exact field identity can improve a noisy measurement even when it does not solve the theory. If a fluctuating quantity has a known mean, subtracting a suitable multiple of its fluctuation leaves the desired expectation unchanged. The practical question is how to construct that quantity and choose its coefficient without introducing an unnoticed bias.
We will use integration by parts to reduce the error in a quartic moment, then repeat the calculation for four coupled scalar variables. Both examples use positive, dimensionless Euclidean weights at a fixed finite regulator.
Preparation: Expectations, covariance, and a Gaussian integral. No functional-integral notation is needed for the derivation below.
Build a zero-mean observable
For , let . A differentiable vector function obeys
on a finite domain , with summation over . If the boundary flux vanishes in the infinite-domain limit, then
Sufficient decay and integrability are part of this identity. Periodic variables instead require compatible periodic functions and cancellation at the identified boundary. Field-space constraints or a nontrivial measure can change the derivative term.
For any fixed coefficient , the modified observable
has the same mean as . Its variance is
Provided , minimization gives
where is their correlation coefficient. A strongly correlated control is useful even if its own mean is zero. Multiple controls replace the scalar denominator by their covariance matrix; nearly dependent controls require care because fitting can become unstable.
The same finite-dimensional integration-by-parts construction underlies lattice field controls; see Bedaque and Oh, §IIA. Our examples use a simple polynomial control rather than a trained neural function.
Solve a quartic example
Take
This local definition uses , not the normalization often used for a field vertex. With ,
The boundary flux vanishes at both ends. Large tends to accompany negative , so the optimal coefficient is negative. For the Gaussian limit , gives exactly: the variance disappears. At nonzero coupling, the quartic term prevents this complete cancellation but still gives a useful control.
Direct one-dimensional quadrature at gives
The numerical experiment first draws 2,048 independent samples to fit , then a separate 8,192 samples to evaluate both the raw and controlled means. It repeats this procedure 256 times. Exact rejection sampling uses a standard Gaussian proposal and acceptance , so these measurements contain no Markov-chain autocorrelation. They do include pilot-fit randomness.
The average fitted coefficient is . The standard deviation of the estimated mean across runs falls from to , a variance reduction of 13.45 at the same evaluation sample count. The controlled average over the runs is , consistent with quadrature at the measured repeated-run precision.
The fit costs samples too. Counting a pilot plus evaluation as 10,240 accepted samples, versus 8,192 for the raw baseline, changes the corresponding sample-cost gain to about . This count omits the small additional arithmetic of evaluating the control and fitting the coefficient.
Couple four field variables
Let and define the periodic Euclidean action
Write the quadratic part as , with and nearest-neighbor entries . Choosing gives
The field identity includes the coupling between sites: replacing by would give a nonzero-mean control and bias the answer.
Gaussian-coordinate quadrature with 32 and 40 nodes per coordinate changes by , giving at the finer order. This is a numerical convergence comparison, not a rigorous quadrature error bound. The independent sampling calculation uses the covariance as its Gaussian proposal and accepts with .
| Quantity, 256 runs | Raw mean estimator | Controlled estimator |
|---|---|---|
| Average estimate | 0.35679828 | 0.35699358 |
| Standard deviation across runs | 0.0029574 | 0.0013559 |
| Variance ratio, raw/controlled | 4.76 |
The pilot and evaluation sizes are the same as in the one-variable example. With the pilot included, the accepted-sample cost gain is approximately 3.81 before extra arithmetic. The nonzero statistical estimates of are also checked against zero over repeated runs; setting them to zero by hand would conceal a possible implementation error.
Keep fitting separate from evaluation
If is fitted on independent pilot data, then conditional on that fit,
Averaging over pilot fits preserves unbiasedness. If the same measurements fit and evaluate , is correlated with their mean control; the cancellation need not hold. This is a finite-sample issue even when the field identity is exact. Overfitting is especially relevant for flexible controls; Bedaque and Oh, §IIB discuss training and evaluation in this setting.
For independent data, one can cross-fit: train on one subset and evaluate on another, then interchange their roles. The combined uncertainty must account for the dependence between fitted estimates. A split in one correlated Markov chain is not automatically an independent split; use independent chains or justify the separation.
For Markov samples, minimizing the single-configuration variance need not minimize the variance of the sample mean. The latter depends on all time-lag covariances. A control that cancels rapid fluctuations can leave the slowest mode untouched. Check the autocorrelation of itself and include fitting cost in any efficiency comparison.
Summary
A vanishing field-space boundary term supplies a zero-mean control. The covariance with the target observable determines the best fixed coefficient. Independent fitting preserves the estimator's expectation; independent quadrature and repeated runs test both the target and the measured variance reduction in the examples above.
Exercises
A finite boundary matters
Restrict the unit Gaussian to with normalization . Is still a zero-mean control?
Solution
Integrating yields
The boundary flux is not zero. Using would shift the expectation by . One can subtract the known mean from , or choose a function whose boundary values make the flux vanish. The infinite-domain identity follows only as .
A fitted coefficient can create bias
Let , , and . Every fixed-coefficient estimator has expectation one. What happens if a single observation is used to choose ?
Solution
Using the same draw gives . With an independent pilot and , because . A zero-mean control guarantees unchanged expectation for fixed or independently fitted coefficients; efficiency still needs a variance check.
References
- P. F. Bedaque and H. Oh, “Leveraging neural control variates for enhanced precision in lattice field theory,” Physical Review D 109, 094519 (2024), doi:10.1103/PhysRevD.109.094519, §§IIA–IIB.
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.