Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Combining Integral Errors into Amplitude Errors

    Suppose two numerical loop contributions are each about 10310^3, while their finite, subtracted combination is about 10−810^{-8}. Asking for six relative digits in each large contribution does not determine even the sign of the small answer. Yet treating the two errors as independent can also be badly misleading if both integrals were evaluated at the same random points.

    This article constructs such a calculation from the chapter's massive bubble. We first expose the covariance created by a specific change of variables, then evaluate a stable finite remainder and allocate samples using an independent pilot. The final requested standard error is slightly missed, and that outcome is retained. The distinction between a requested tolerance, an estimated uncertainty, and an independently checked error is central.

    Propagate the errors of the combination

    For real contributions and fixed coefficients,

    A=∑iciIi,A^=∑iciI^i,Var⁡(A^)=cTΣc,A=\sum_i c_i I_i, \qquad \widehat A=\sum_i c_i\widehat I_i, \qquad \operatorname{Var}(\widehat A) =\boldsymbol c^T\Sigma\boldsymbol c,

    where Σij=Cov⁡(I^i,I^j)\Sigma_{ij}=\operatorname{Cov}(\widehat I_i,\widehat I_j) is the covariance of the integral estimates, not the covariance of single integrand values without their sample-count factors.

    For complex contributions, the corresponding mean-square fluctuation is

    E∣δA∣2=∑ijcicj∗E[δIi δIj∗].\mathbb E|\delta A|^2 =\sum_{ij}c_i c_j^* \mathbb E[\delta I_i\,\delta I_j^*].

    To quote separate real and imaginary uncertainties, retain the covariance of those real components. A single number E∣δA∣2\mathbb E|\delta A|^2 does not describe their correlation. Uncertain coefficients would contribute additional terms; the example below keeps them exact.

    If I1I_1 and I2I_2 use independent random points, the covariance vanishes. If they use the same points XkX_k, then

    I^1−I^2=1N∑k=1N[f1(Xk)−f2(Xk)],\widehat I_1-\widehat I_2 =\frac1N\sum_{k=1}^N[f_1(X_k)-f_2(X_k)],

    and its variance is

    1N[Var⁡(f1)+Var⁡(f2)−2Cov⁡(f1,f2)].\frac1N\left[ \operatorname{Var}(f_1)+\operatorname{Var}(f_2) -2\operatorname{Cov}(f_1,f_2) \right].

    Positive correlation reduces the variance of a difference. It would instead increase the variance of a sum with the same signs. Shared points are a deliberate estimator choice, not a reason to omit off-diagonal entries.

    This is also an arithmetic issue. If the three covariance terms are large and nearly cancel, estimate the sample variance of the pointwise difference directly. Subtracting the separately accumulated large covariance entries can lose significant digits even when the underlying covariance formula is correct.

    A regulated bubble with an explicit subtraction

    Let q=Q2/m2>0q=Q^2/m^2>0, h(u)=u(1−u)h(u)=u(1-u), and ϵ>0\epsilon>0. After scaling the mass and removing the common loop normalization, the Feynman-parameter factor of a massive bubble in D=4−2ϵD=4-2\epsilon is

    Bϵ(q)=Γ(ϵ)∫01du [1+qh(u)]−ϵ.\mathcal B_\epsilon(q) =\Gamma(\epsilon)\int_0^1du\,[1+q h(u)]^{-\epsilon}.

    This equation defines the dimensionless normalization used here. Its difference from Bϵ(0)=Γ(ϵ)\mathcal B_\epsilon(0)=\Gamma(\epsilon) has the limit

    lim⁡ϵ→0[Bϵ(q)−Bϵ(0)]=−∫01du log⁡[1+qh(u)]=F(−q).\lim_{\epsilon\to0} \left[\mathcal B_\epsilon(q)-\mathcal B_\epsilon(0)\right] =-\int_0^1du\,\log[1+q h(u)] =F(-q).

    Remove the first Taylor term as well:

    Rϵ(q)=Γ(ϵ)∫01du {[1+qh(u)]−ϵ−1+ϵqh(u)}.R_\epsilon(q) =\Gamma(\epsilon)\int_0^1du\, \left\{[1+q h(u)]^{-\epsilon}-1+\epsilon q h(u)\right\}.

    The added analytic term is qΓ(1+ϵ)/6q\Gamma(1+\epsilon)/6. The four-dimensional limit of the full remainder gives the preceding article's

    R0(q)=q6+F(−q),Rϵ(q)=Γ(1+ϵ)(1+ϵ)60q2+O(q3).R_0(q)=\frac q6+F(-q), \qquad R_\epsilon(q) =\frac{\Gamma(1+\epsilon)(1+\epsilon)}{60}q^2+O(q^3).

    The small-qq behavior gives a natural small target without subtracting a numerically chosen reference value.

    Where the large stochastic cancellation comes from

    Under uniform sampling in uu, the integrand for Bϵ(0)\mathcal B_\epsilon(0) is constant. Its variance is zero. It would be incorrect to attribute a large covariance to that representation.

    Instead make the declared change u=r2u=r^2 and sample rr uniformly on [0,1][0,1]. The two integrands become

    a(r)=2r Γ(ϵ)exp⁡{−ϵlog⁡[1+qr2(1−r2)]},b(r)=2r Γ(ϵ).\begin{aligned} a(r)&=2r\,\Gamma(\epsilon) \exp\{-\epsilon\log[1+q r^2(1-r^2)]\},\\ b(r)&=2r\,\Gamma(\epsilon). \end{aligned}

    Both are now nonconstant. Their individual variances grow like 1/ϵ21/\epsilon^2, because the chosen Jacobian is variable. This inefficiency is created by the representation; it is not an unavoidable stochastic divergence of the subtracted bubble.

    At the fixed values ϵ=0.001\epsilon=0.001 and q=0.001q=0.001, deterministic central-moment integration gives

    ⟨a⟩=999.4236059306,⟨b⟩=999.4237724846,⟨a−b⟩=−1.6655395741×10−4.\begin{aligned} \langle a\rangle&=999.4236059306,\\ \langle b\rangle&=999.4237724846,\\ \langle a-b\rangle&=-1.6655395741\times10^{-4}. \end{aligned}

    The individual variances and covariance are about 3.33×1053.33\times10^5, whereas

    Var⁡(a−b)=1.8372682910×10−8.\operatorname{Var}(a-b)=1.8372682910\times10^{-8}.

    With 40964096 samples for each term, the exact-moment standard error is 12.7512.75 for independent sampling and 2.118×10−62.118\times10^{-6} for paired sampling. Both cost 81928192 scalar term evaluations. The actual independent estimate of the difference is 2.10±12.782.10\pm12.78; the paired estimate is −1.65310×10−4±2.12105×10−6-1.65310\times10^{-4}\pm2.12105\times10^{-6}. These are one-standard-error summaries, not deterministic bounds.

    Adding the known Taylor counterterm after integration leaves those uncertainties unchanged. A further improvement is to combine it pointwise, with its exact integral preserved. The resulting integrand estimates Rϵ(q)R_\epsilon(q) directly. At the same 40964096 sampled rr values its reported standard error is 2.605×10−102.605\times10^{-10}. This last comparison uses 40964096 evaluations of a combined remainder kernel; it is a separate cost unit from evaluating two raw terms. No equality of wall-clock work is asserted.

    Uniform-uu sampling is an independent useful control: the variance of its subtracted-bubble integrand is 5.55×10−95.55\times10^{-9}, finite as ϵ→0\epsilon\to0, with a deterministic second term. The purpose of the poor rr representation is to make covariance and cancellation visible, then show how a better representation removes unnecessary work.

    Stable arithmetic before more samples

    Let x=qh(u)x=q h(u) and L=log⁡(1+x)L=\log(1+x). The numerator of the remainder can be regrouped as

    e−ϵL−1+ϵx=[expm1⁡(−ϵL)+ϵL]+ϵ[x−log⁡(1+x)].e^{-\epsilon L}-1+\epsilon x =\bigl[\operatorname{expm1}(-\epsilon L)+\epsilon L\bigr] +\epsilon[x-\log(1+x)].

    Neither bracket should be evaluated by a damaging small subtraction. Define continuous remainder functions

    rlog⁡(x)=x−log⁡(1+x),rexp⁡(y)={ey−1−yy2,y≠0,12,y=0.r_{\log}(x)=x-\log(1+x), \qquad r_{\exp}(y)= \begin{cases} \dfrac{e^y-1-y}{y^2},&y\ne0,\\[4pt] \dfrac12,&y=0. \end{cases}

    Then the stable integrand in uu coordinates is

    gϵ(q,u)=Γ(1+ϵ)[rlog⁡(x)+ϵL2rexp⁡(−ϵL)].g_\epsilon(q,u)= \Gamma(1+\epsilon) \left[ r_{\log}(x)+\epsilon L^2 r_{\exp}(-\epsilon L) \right].

    The companion uses the alternating series for rlog⁡r_{\log} and the Taylor series

    rexp⁡(y)=∑k=0∞yk(k+2)!.r_{\exp}(y)=\sum_{k=0}^{\infty}\frac{y^k}{(k+2)!}.

    The retained arguments are small, and explicit series-remainder controls accompany high-precision checks. At ϵ=0\epsilon=0, the same expression continuously reduces to rlog⁡(x)r_{\log}(x). This avoids forming Γ(ϵ)\Gamma(\epsilon) separately in a finite-limit kernel.

    Sampling more points does not repair a biased floating-point kernel. Conversely, increasing working precision does not remove Monte Carlo variance. These are distinct parts of the calculation.

    Allocate work to the small final target

    Our declared illustrative combination is

    Aϵ=Rϵ(0.001)+10−5Rϵ(0.1),ϵ=0.001.\mathcal A_\epsilon =R_\epsilon(0.001)+10^{-5}R_\epsilon(0.1), \qquad \epsilon=0.001.

    The coefficients and kinematics define a reproducible combination of loop functions; it is not identified with a complete scattering amplitude of a particular theory. Independent 80- and 120-digit integration gives

    Aϵ=1.8315267902555738477…×10−8.\mathcal A_\epsilon =1.8315267902555738477\ldots\times10^{-8}.

    The requested Monte Carlo standard error is the absolute value η=10−10\eta=10^{-10}. At an exactly zero amplitude a relative-only target is undefined; the same absolute criterion remains meaningful. Relative tolerance 10−610^{-6} on each original 10310^3 contribution would allow errors around 10−310^{-3}, far larger than this target.

    For independent groups, let did_i be the standard deviation of the weighted integrand and kik_i its cost per sample. Then

    V=∑idi2Ni,T=∑ikiNi.V=\sum_i\frac{d_i^2}{N_i}, \qquad T=\sum_i k_iN_i.

    Minimizing TT at V=η2V=\eta^2 gives

    Ni=diki∑jdjkjη2.N_i= \frac{d_i}{\sqrt{k_i}} \frac{\sum_j d_j\sqrt{k_j}}{\eta^2}.

    For equal costs, NiN_i is proportional to did_i. This is an allocation between independent combined remainder integrals, after the covariance inside each subtraction has been handled. Applying an independent-error formula directly to correlated raw pieces would be a different and incorrect optimization.

    The weighted-sum strategy is discussed by Heinrich and collaborators in Section 2.1.3, Eqs. (1)–(6). Here we use the ordinary Monte Carlo 1/N1/N variance law. An empirical randomized-quadrature convergence rate is not a universal replacement for that law.

    The pilot predicts the target; the final variance misses it

    For each group, take 512512 independent pilot samples of 2r gϵ(q,r2)2r\,g_\epsilon(q,r^2), including its coefficient. Estimate did_i from that pilot, then round the proposed NiN_i upward. Production uses new streams. Conditional on the pilot, the fixed-size production sample means remain unbiased, and their ordinary variance estimates apply. Reusing pilot values in a data-dependent stopping estimate would need a separate analysis.

    The pilot selects 2881528815 and 28912891 production evaluations. Its predicted SE is 9.9998×10−119.9998\times10^{-11}. The pilot costs 10241024 evaluations, making the total 3273032730. For a fair equal-allocation comparison, spend the entire same total on two groups of 1636516365 production samples, without an unnecessary pilot.

    AllocationEstimateReported SESE from independent exact moments
    Pilot-based1.8365670×10−81.8365670\times10^{-8}1.02528×10−101.02528\times10^{-10}1.02600×10−101.02600\times10^{-10}
    Equal counts1.8330111×10−81.8330111\times10^{-8}1.30648×10−101.30648\times10^{-10}1.30639×10−101.30639\times10^{-10}

    The pilot-based allocation improves the variance at equal total cost, but does not meet the requested SE: the known-moment value is about 2.6%2.6\% too large. Its smaller predicted value arose from pilot uncertainty. The retained result explicitly records this miss; no samples were added after consulting the exact answer. The equal-count estimate happens to lie closer to the reference in this realization, despite having larger variance. Realized absolute error and estimator precision are different quantities.

    The reduction in standard error after pairing and stable subtraction, and the pilot-based versus equal-count final estimates with their uncertainties.

    Left: standard errors computed from independently integrated moments for 40964096 sampled points, with the same known Taylor term added where necessary. Right: actual estimates of Aϵ\mathcal A_\epsilon at the same total evaluation cost, with one reported SE. The shaded band marks the reference plus or minus the requested absolute scale 10−1010^{-10}; it is not a confidence interval.

    A production policy could use a conservative pilot margin, or a prespecified series of independent stages with an appropriate stopping analysis. It should not silently keep sampling until an estimate agrees with a known answer. Here the useful output is an estimate with its quantified uncertainty and an explicit missed-target status.

    The regulator also has a separate effect. The ϵ=0\epsilon=0 value is 1.8307533000×10−81.8307533000\times10^{-8}, so the chosen finite regulator shifts the target by 7.7349×10−127.7349\times10^{-12}. Checks at ϵ=10−4\epsilon=10^{-4} and 10−210^{-2} retain that dependence. This deterministic shift is neither part of the sampling SE nor evidence that the physical regulator limit has been taken. At a tighter statistical target it would matter directly.

    Validate a complete one-loop amplitude

    The small remainder above tests stochastic error propagation. We can now use the same equal-mass integral in a physical on-shell amplitude whose sign, symmetry factor and imaginary part have independent tests. Take one real scalar in four dimensions with interaction −λRϕ4/4!-\lambda_R\phi^4/4!, physical pole mass mm and tree invariant amplitude −λR-\lambda_R. Fix the renormalized four-point vertex at zero external momenta to its tree value. This is an off-shell subtraction condition. The scattering momenta at which we predict the amplitude below are on shell. The one-loop tadpole shifts the mass and has no momentum-dependent residue at this order.

    At second order, attach two distinct external labels to each quartic vertex and connect the two remaining pairs of slots. The three unordered partitions give the s,t,us,t,u graphs. For each partition there are two vertex assignments, twelve ordered external attachments per vertex and two internal pairings. The expansion gives

    c=2(4⋅3)2 22!(4!)2=12.c=\frac{2(4\cdot3)^2\,2}{2!(4!)^2}=\frac12.

    The scalar numerator is one. In each graph a shift of the dimensionally regulated loop momentum puts the denominators into the same two-propagator family with invariant z=P2/m2z=P^2/m^2. No master with a tensor numerator is needed. Subtracting the zero-external-momentum vertex removes the same momentum-independent pole from each channel. In the site's convention for the connected matrix element iMi\mathcal M, the finite result is

    M=−λR+M1+O(λR3),M1=C∑j=s,t,uF(j/m2),C=λR232π2.\begin{aligned} \mathcal M&=-\lambda_R+\mathcal M_1+O(\lambda_R^3),\\ \mathcal M_1&=C\sum_{j=s,t,u} F(j/m^2),\\ C&=\frac{\lambda_R^2}{32\pi^2}. \end{aligned}

    Write h=x(1−x)h=x(1-x) and Lz(x)=log⁡(1−zh−i0)L_z(x)=\log(1-zh-i0). The three arguments use a single subtracted master,

    F(z)=−∫01Lz(x) dx.\begin{aligned} F(z)&=-\int_0^1 L_z(x)\,dx. \end{aligned}

    The vertex and propagator factors, the dimensional subtraction and the physical upper edge are derived in the one-loop scalar optical theorem. The master-integral transport evaluates this same branch from Euclidean boundary data.

    Set m=1m=1, λR=0.8\lambda_R=0.8 and s=3\sqrt{s}=3. Generating physical center-of-mass momenta at scattering angle θ\theta yields t=−2q2(1−cos⁡θ)t=-2q^2(1-\cos\theta) and u=4m2−s−tu=4m^2-s-t, with q2=s/4−m2q^2=s/4-m^2. The program enumerates the labeled attachments, routes their momenta and sums the masters. Above threshold it divides the parameter interval at the two real zeros of the logarithm’s argument, integrates −log⁡∣1−zx(1−x)∣-\log|1-zx(1-x)| and adds the upper-edge imaginary area. A second evaluation uses the closed form of the bubble.

    cos⁡θ\cos\theta(t,u)/m2(t,u)/m^2Re⁡M1\operatorname{Re}\mathcal M_1Im⁡M1\operatorname{Im}\mathcal M_1
    1(0,−5)(0,-5)−0.00003475-0.000034750.004745080.00474508
    0(−2.5,−2.5)(-2.5,-2.5)−0.00022829-0.000228290.004745080.00474508

    The real part at right angles changes when either crossed master is omitted. Exchanging the two outgoing scalars interchanges tt and uu, leaving the sum invariant. Summing the three real quadrature indicators with the common positive coefficient gives less than 3×10−143\times10^{-14} at both points; the closed-form sums agree to 10−1210^{-12}. These tests cover the numerical integrals at the stated inputs. Effects of order λR3\lambda_R^3 require another perturbative order.

    In the forward direction, integrate the squared tree amplitude over the identical two-particle intermediate state. At s=9m2s=9m^2 its speed factor is β=5/3\beta=\sqrt5/3. Let P2P_2 be this phase-space integral divided by 2!2! for identical particles. State completeness then predicts

    P2=λR2β16π=0.00949017.\begin{aligned} P_2&=\frac{\lambda_R^2\beta}{16\pi}\\ &=0.00949017 . \end{aligned}

    This equals 2Im⁡M12\operatorname{Im}\mathcal M_1. Taking the opposite logarithmic edge reverses the optical-theorem sign. Omitting the graph factor doubles this imaginary part. The cut is insensitive to the real crossed channels, which is why the numerical real-part and crossing comparisons are also part of this validation. Zwicky, §§4.2.3–4.3

    Reproduction and scope

    Run the adjacent one_loop_scalar_amplitude.py for the generated scalar graphs, physical momenta, subtracted parameter integrals and independent cut comparison.

    Run python3 examples/computational-qft/numerical-integration/amplitude_error_budget.py to regenerate amplitude-error-results.json. Comparison streams use SeedSequence([881025,20,stream]). Allocation pilots, allocated production, and equal-count production use stages 3030, 3131, and 3232, respectively, with the group index as the final seed component. The settings were fixed before any draws.

    The selected output retains sample means, covariance entries, stable difference variances, pilot and final counts, high-precision references, and regulator refinements. Exact moments diagnose the achieved variance but do not determine the implemented allocation. This is one allocation experiment, not a coverage study. Control variates explain the related idea of subtracting a fluctuation with a known integral.

    Exercises

    1. Shared points, signs, and a constant subtraction

    For A=I1−I2A=I_1-I_2, derive the independent- and common-point variances using NN evaluations of each integrand. When is pairing beneficial? Explain why uniform sampling of the bubble parameter makes the second term deterministic, while u=r2u=r^2 changes that statement without changing the integral.

    Solution

    Write σi2=Var⁡(fi)\sigma_i^2=\operatorname{Var}(f_i) and C=Cov⁡(f1,f2)C=\operatorname{Cov}(f_1,f_2) when the functions are evaluated on a common point. Independent streams give

    Vindependent=σ12+σ22N.V_{\rm independent}=\frac{\sigma_1^2+\sigma_2^2}{N}.

    Shared points give

    Vpaired=σ12+σ22−2CN=Var⁡(f1−f2)N.V_{\rm paired}=\frac{\sigma_1^2+\sigma_2^2-2C}{N} =\frac{\operatorname{Var}(f_1-f_2)}{N}.

    Pairing helps exactly when C>0C>0; negative covariance worsens a difference. For a sum, the covariance has the opposite sign in the comparison.

    With uniform uu, the subtraction integrand is f2(u)=Γ(ϵ)f_2(u)=\Gamma(\epsilon), so σ22=C=0\sigma_2^2=C=0. After u=r2u=r^2, the measure contributes du=2r drdu=2r\,dr and f2(r)=2rΓ(ϵ)f_2(r)=2r\Gamma(\epsilon) varies. The integral is still Γ(ϵ)\Gamma(\epsilon) because ∫012r dr=1\int_0^12r\,dr=1, but its stochastic estimator now fluctuates. When the other integrand shares this leading factor, the covariance nearly cancels those fluctuations. The estimator's variance depends on its representation as well as on the target integral.

    2. Derive the minimum-cost allocation

    For independent groups with variance V=∑idi2/NiV=\sum_i d_i^2/N_i and cost T=∑ikiNiT=\sum_i k_iN_i, derive the minimum-cost allocation for a requested absolute variance η2\eta^2. State how an independent pilot and integer counts modify its practical interpretation.

    Solution

    For positive di,kid_i,k_i, introduce

    L=∑ikiNi+λ(∑idi2Ni−η2).\mathcal L=\sum_i k_iN_i+ \lambda\left(\sum_i\frac{d_i^2}{N_i}-\eta^2\right).

    Stationarity gives ki−λdi2/Ni2=0k_i-\lambda d_i^2/N_i^2=0, hence Ni=λ di/kiN_i=\sqrt{\lambda}\,d_i/\sqrt{k_i}. Substitution into the constraint yields

    λ=∑jdjkjη2,Tmin⁡=(∑jdjkj)2η2.\sqrt{\lambda}=\frac{\sum_jd_j\sqrt{k_j}}{\eta^2}, \qquad T_{\min}=\frac{(\sum_jd_j\sqrt{k_j})^2}{\eta^2}.

    Known zero-variance groups need no stochastic work. An observed zero variance in a small pilot is not proof of that property. Integer rounding upward preserves the variance target if the did_i are known exactly; maximum budgets can prevent it.

    With estimated pilot deviations, the formula only targets the estimated variance. The pilot's cost must be added, and its uncertainty can make the actual variance exceed the requested value, as it does here. New production samples keep the final means unbiased conditional on the pilot. An absolute η\eta works even when the true amplitude is zero; no division by that amplitude enters the optimization.

    3. Test the identical-particle factor

    At the same m,λR,sm,\lambda_R,s, a program reports Im⁡M1=0.00949017\operatorname{Im}\mathcal M_1=0.00949017. Can a different real zero-momentum subtraction account for this value? Which piece of the computation should be inspected first?

    Solution

    Twice the reported imaginary part is 0.018980340.01898034, whereas the tree-level two-body probability is 0.009490170.00949017 after dividing the labeled phase space by 2!2!. A real local quartic counterterm changes the real amplitude. Check that exchanging the two identical internal lines gives the coefficient 1/21/2 in the loop, then check that the imaginary part of the normalized master is +π1−4m2/s+\pi\sqrt{1-4m^2/s}. The factor of two relating the absorptive amplitude to the probability belongs only on the optical-theorem side of this comparison.

    Summary

    Set precision using the final combination, preserve covariance when points are shared, and stabilize cancellations before spending more samples. Allocate independent work using the variance of the combined integrands and count the pilot. A requested SE is a design target: the retained estimate must still report its achieved uncertainty, regulator dependence, and any missed target.

    References

    • G. Heinrich, S. P. Jones, M. Kerner, V. Magerya, A. Olsson, and J. Schlenk, Numerical Scattering Amplitudes with pySecDec, Computer Physics Communications 295 (2024) 108956, arXiv:2305.19768v2, Section 2.1.3, Eqs. (1)–(6), weighted-sum allocation and the subsequent discussion of nonuniform convergence. The independent-error formula there is distinguished from the shared-point covariance in this article.

    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.