Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Bayesian Spectral Inference

    A Euclidean correlator does not determine an unrestricted spectral density from a few noisy times. Bayesian inference makes the missing information explicit: it combines a likelihood with a prior over an identified class of spectra. Its credible intervals answer a conditional probability question. They need not cover every fixed underlying spectrum at the same frequency.

    We work through a continuous two-peak model, reduce its posterior to one-dimensional quadrature, and compute posterior expectations of physically specified spectral averages. Repeated observations reveal prior sensitivity, while independent integration and tail controls distinguish numerical uncertainty from uncertainty under the model.

    Preparation. Ill-conditioned inversion, multivariate Gaussian distributions and conditional probability. The smearing page defines the Gaussian spectral averages used throughout the chapter.

    Start with a likelihood and a measure

    Use a connected zero-temperature positive channel with

    C(t)=∫04s(E)e−tE dE,s(E)≥0,∫04s(E) dE=1.(1)C(t)=\int_0^4s(E)e^{-tE}\,dE,\qquad s(E)\geq0,\qquad \int_0^4s(E)\,dE=1. \tag{1}

    For a diagonal Hermitian channel positivity follows from squared matrix elements. The compact support and normalization are additional benchmark information. They are not general ultraviolet statements about local-QFT correlators; the site's convention is ρ(E>0)=2πs(E)\rho(E>0)=2\pi s(E).

    Our finite family consists of normalized triangles:

    pb(E;μ)=(1−∣E−μ∣/b)+b,s(E;d,w)=wp0.2(E;2−d/2)+(1−w)p0.2(E;2+d/2),0.4≤d≤1.6,0.2≤w≤0.8.(2)\begin{aligned} p_b(E;\mu)&=\frac{(1-|E-\mu|/b)_+}{b},\\ s(E;d,w)&=w p_{0.2}(E;2-d/2) +(1-w)p_{0.2}(E;2+d/2),\\ 0.4&\leq d\leq1.6,\qquad 0.2\leq w\leq0.8. \end{aligned} \tag{2}

    A triangle is the convolution of two uniform densities. Its Laplace transform is therefore

    C(t;d,w)=sinhc⁡2(0.1t)[we−(2−d/2)t+(1−w)e−(2+d/2)t],sinhc⁡x=sinh⁡xx.(3)C(t;d,w)=\operatorname{sinhc}^2(0.1t) \left[we^{-(2-d/2)t}+(1-w)e^{-(2+d/2)t}\right], \quad \operatorname{sinhc}x=\frac{\sinh x}{x}. \tag{3}

    The value at zero is defined continuously. No reconstruction bins are used to generate these data.

    There are sixteen observations at ti=0.15it_i=0.15i. Write y=C+εy=C+\varepsilon, with ε∼N(0,Σ)\varepsilon\sim\mathcal N(0,\Sigma) and

    Σij=δ2Cref,iCref,j(12e−∣i−j∣/2+12δij).(4)\Sigma_{ij}=\delta^2 C_{{\rm ref},i}C_{{\rm ref},j} \left(\frac12e^{-|i-j|/2}+\frac12\delta_{ij}\right). \tag{4}

    CrefC_{\rm ref} is fixed at (d,w)=(1.2,0.6)(d,w)=(1.2,0.6), independently of the trial parameters. The covariance describes one observed vector; it contains no hidden configuration count. Inverting an estimated sample covariance would introduce a separate uncertainty problem.

    Let θ=(d,w)\theta=(d,w). Relative to the measure dd dwdd\,dw,

    p(θ∣y)=p(y∣θ)p(θ)Zy,p(y∣θ)=exp⁡[−12(y−C(θ))TΣ−1(y−C(θ))](2π)8det⁡Σ.(5)p(\theta\mid y)=\frac{p(y\mid\theta)p(\theta)}{\mathcal Z_y}, \qquad p(y\mid\theta)= \frac{\exp[-\tfrac12(y-C(\theta))^T\Sigma^{-1}(y-C(\theta))]} {(2\pi)^8\sqrt{\det\Sigma}}. \tag{5}

    Zy\mathcal Z_y is the evidence, obtained by integrating the numerator. Correlations must remain in this likelihood; replacing Σ\Sigma by its diagonal changes the statistical model. The likelihood construction is discussed in Asakawa, Hatsuda and Nakahara, §3.1 (PDF).

    We fix three proper independent priors before inspecting the observations:

    PriorSeparation ddWeight ww
    UniformUniform on [0.4,1.6][0.4,1.6]Uniform on [0.2,0.8][0.2,0.8]
    Close peaksN(0.6,0.22)\mathcal N(0.6,0.2^2) conditioned on [0.4,1.6][0.4,1.6]Same uniform weight
    Balanced weightsSame uniform separationN(0.5,0.12)\mathcal N(0.5,0.1^2) conditioned on [0.2,0.8][0.2,0.8]

    The truncation normalizations are retained. “Uniform” always refers to the named coordinates: a prior uniform in dd is not uniform in log⁡d\log d. The close-peaks prior deliberately places the primary truth in its tail. It expresses a different information assumption, not an algorithmic setting selected by recovery quality.

    Restricting the family is itself strong prior information. The comparison of parametric Bayesian inference with learned reconstruction in Kades et al., §III and Appendix B makes this issue concrete for a different spectral family. Their numerical model and sampler are not used here.

    Integrate the mixture weight analytically

    At fixed dd, the correlator is affine in ww:

    C(d,w)=c0(d)+w v(d),(6)C(d,w)=c_0(d)+w\,v(d), \tag{6}

    where c0c_0 is the upper-energy triangle transform and vv is the lower transform minus the upper. Factor Σ=LLT\Sigma=LL^T and whiten,

    r=L−1(y−c0),vˉ=L−1v.(7)r=L^{-1}(y-c_0),\qquad \bar v=L^{-1}v. \tag{7}

    Represent the weight-prior quadratic by precision τ\tau: τ=0\tau=0 for either uniform-weight prior, and τ=100\tau=100 for balanced weights, whose center is w0=0.5w_0=0.5. Define

    A=vˉTvˉ+τ,B=vˉTr+τw0,m=BA,sw=A−1/2.(8)A=\bar v^T\bar v+\tau,\qquad B=\bar v^Tr+\tau w_0,\qquad m=\frac BA,\qquad s_w=A^{-1/2}. \tag{8}

    Completing the square gives

    ∥r−wvˉ∥2+τ(w−w0)2=κ+A(w−m)2,κ=∥r−mvˉ∥2+τ(m−w0)2.(9)\|r-w\bar v\|^2+\tau(w-w_0)^2 =\kappa+A(w-m)^2, \quad \kappa=\|r-m\bar v\|^2+\tau(m-w_0)^2. \tag{9}

    The direct expression for κ\kappa avoids subtracting two large nearly equal numbers. The conditional law is a normal distribution of location mm and scale sws_w, restricted to l=0.2l=0.2, u=0.8u=0.8. Its standardized endpoints and normalization are

    a=l−msw,b=u−msw,Zw=Φ(b)−Φ(a),(10)a=\frac{l-m}{s_w},\qquad b=\frac{u-m}{s_w}, \qquad Z_w=\Phi(b)-\Phi(a), \tag{10}

    with Φ\Phi the standard-normal CDF and φ\varphi its density. Its conditional mean is

    wˉ(d)=m+swφ(a)−φ(b)Zw.(11)\bar w(d)=m+s_w\frac{\varphi(a)-\varphi(b)}{Z_w}. \tag{11}

    If cwc_w is the normalization multiplying exp⁡[−τ(w−w0)2/2]\exp[-\tau(w-w_0)^2/2] in the weight prior, integrating ww leaves

    p(d∣y) ∝ pd(d) cw e−κ/22πA Zw.(12)p(d\mid y)\ \propto\ p_d(d)\,c_w\,e^{-\kappa/2} \sqrt{\frac{2\pi}{A}}\,Z_w. \tag{12}

    This reduces all posterior means to smooth one-dimensional integrals. It is an exact reduction within the finite family, not a Gaussian approximation to the joint posterior. Standardized truncation bounds are also the convention used by SciPy's truncated-normal distribution.

    For far-tail intervals, subtracting two CDF values that have both rounded to one fails. The companion evaluates logarithmic Gaussian interval masses with tail symmetry and log-difference identities. Eight fixed stress cases include a location outside the support by 1,200 conditional standard deviations. Fresh 80- and 120-digit formulas bound the observed binary64 mean and CDF discrepancies by about 1.7×10−101.7\times10^{-10}. No observation is clipped, and tiny normalizers are not replaced by arbitrary constants.

    Infer the observable, not a parameter plug-in

    For a Gaussian window Δj\Delta_j normalized on [0,4][0,4], define

    Sj(d,w)=∫04Δj(E)s(E;d,w) dE.(13)S_j(d,w)=\int_0^4\Delta_j(E)s(E;d,w)\,dE. \tag{13}

    The six windows have centers 1.5,2,2.51.5,2,2.5 and widths 0.2,0.50.2,0.5. They are ordered by width, then center. These averages have inverse-energy units, unlike a bin probability.

    Let Aj(d)A_j(d) and Bj(d)B_j(d) be the window integrals over the lower and upper triangle. Then

    Sj(d,w)=Bj(d)+[Aj(d)−Bj(d)]w,(14)S_j(d,w)=B_j(d)+[A_j(d)-B_j(d)]w, \tag{14}

    and the posterior expectation is

    E[Sj∣y]=∫p(d∣y){Bj(d)+[Aj(d)−Bj(d)]wˉ(d)} dd.(15)\mathbb E[S_j\mid y] =\int p(d\mid y) \left\{B_j(d)+[A_j(d)-B_j(d)]\bar w(d)\right\}\,dd. \tag{15}

    This generally differs from Sj(E[d∣y],E[w∣y])S_j(\mathbb E[d\mid y],\mathbb E[w\mid y]). For squared-error loss, the expectation is the optimal conditional estimator, because for any proposed number aja_j,

    E[(Sj−aj)2∣y]=Var⁡(Sj∣y)+[aj−E(Sj∣y)]2.(16)\mathbb E[(S_j-a_j)^2\mid y] =\operatorname{Var}(S_j\mid y) +[a_j-\mathbb E(S_j\mid y)]^2. \tag{16}

    The optimality is conditional on the declared family, likelihood and prior.

    Marginal intervals require a separate calculation. For nonzero slope ℓj=Aj−Bj\ell_j=A_j-B_j, the conditional target CDF is the truncated-normal weight CDF at (z−Bj)/ℓj(z-B_j)/\ell_j, reversing the inequality if ℓj<0\ell_j<0. Integrate this CDF over dd and invert it.

    For a window centered at 22, symmetry instead gives Aj=Bj=hσ(d)A_j=B_j=h_\sigma(d) exactly. The target is independent of ww; division by the zero slope would be an error. The convolution of the symmetric triangle and Gaussian is symmetric and strictly decreasing away from its center, so hσ(d)h_\sigma(d) decreases for d>0d>0. Thus a target's equal-tail interval follows directly from reversed separation quantiles:

    [S0.025,S0.975]=[hσ(d0.975),hσ(d0.025)].(17)[S_{0.025},S_{0.975}] =[h_\sigma(d_{0.975}),h_\sigma(d_{0.025})]. \tag{17}

    These are individual 95% marginal intervals, not a simultaneous band for the density or all six targets.

    What the retained observations show

    The primary display observation is fixed at replica zero and δ=0.01\delta=0.01. Under the uniform prior, it gives

    E[d∣y]=1.21716,d95%=[1.17653,1.25710],E[w∣y]=0.59331,w95%=[0.57083,0.61690].(18)\begin{aligned} \mathbb E[d\mid y]&=1.21716, &d_{95\%}&=[1.17653,1.25710],\\ \mathbb E[w\mid y]&=0.59331, &w_{95\%}&=[0.57083,0.61690]. \end{aligned} \tag{18}

    For the narrow window centered at 2.52.5, the posterior expectation is 0.6604010.660401, whereas the parameter plug-in gives 0.6613920.661392. The difference is small in this observation but conceptually necessary: the latter is not the estimator in (16).

    The repeated study applies every prior to the same 256 observations at each noise scale. Selected parameter results are:

    Noise δ\deltaPriorRMSE of ddRMSE of wwCoverage of ddCoverage of ww
    0.003Uniform0.006370.003730.9530.934
    0.01Uniform0.020840.012480.9410.938
    0.03Uniform0.059770.036920.9530.953
    0.03Close peaks0.085380.053580.8590.855
    0.03Balanced weights0.051710.030360.9690.949

    These are fixed-truth repetition results, not posterior probabilities for a newly observed datum. A coverage near 0.950.95 estimated from 256 independent repeats has a binomial standard error around 0.0140.014. The poorer close-peaks coverage at high noise is a visible effect of an informative prior pulling away from this fixed truth. Conversely, a helpful prior can reduce RMSE at some truths without being uniformly superior.

    Prior and posterior separation densities for the same observation, and fixed-truth coverage of separation intervals at three noise scales and three priors.

    The priors are specified before observing the data. The posterior curves use the fixed representative datum; coverage uses 256 independent observations at each noise scale. Error bars show finite-repeat binomial standard errors, not uncertainty in a single posterior interval.

    Bayesian calibration has a precise averaging statement. If θ\theta is drawn from the same prior used in inference, yy from the stated likelihood, and I(y)I(y) has posterior probability 0.950.95, then

    Pr⁡θ,y{θ∈I(y)}=Ey ⁣[Pr⁡{θ∈I(y)∣y}]=0.95.(19)\Pr_{\theta,y}\{\theta\in I(y)\} =\mathbb E_y\!\left[\Pr\{\theta\in I(y)\mid y\}\right] =0.95. \tag{19}

    This integrates over truths. It does not say the coverage function is 0.950.95 at every fixed θ\theta. The second exercise makes the distinction explicit.

    The learned-inference comparison uses the same uniform generating prior and the actual posterior expectations (15) on common held-out observations. Broader peaks, an extra peak, shifted times and an incorrectly supplied covariance test different kinds of misspecification. Updating the times or covariance can repair the corresponding observation model; it cannot repair a wrong two-peak spectral family. A narrow interval under a false family is still conditional on that family.

    Numerical integration has its own error

    The primary rule uses 32 fixed panels in dd and 32 Gauss–Legendre points per panel: 1,024 nodes. Every case is compared with 512 nodes. A fixed first sixteen cases per noise/prior and four noiseless parameter corners also receive 2,048-node controls. Quantiles use at most 32 bisections. The separation CDF integrates a partial final panel; quadrature nodes are not treated as discrete posterior atoms.

    All 2,304 primary cases return finite results, and all target means meet the preset 512-to-1,024 difference target 10−6max⁡(1,∣ESj∣)10^{-6}\max(1,|\mathbb E S_j|). The target intervals are more demanding. At δ=0.003\delta=0.003, the 10−410^{-4} scaled endpoint target is missed in 246, 240 and 245 of 256 observations for the uniform, close-peaks and balanced priors. At the other two noise levels it is met in every primary case. The fixed 1,024-to-2,048 controls at low noise change endpoints by at most 1.9×10−51.9\times10^{-5}.

    The cause is numerical: conditional target CDFs change sharply across a narrow joint posterior even when means are smoothly integrated. The primary 1,024-node intervals and failure flags are retained; the selected 2,048-node agreement does not certify every unresolved case. The low-noise parameter coverage and target-endpoint refinement use different diagnostics.

    An independent check integrates the original two-dimensional likelihood, without performing the conditional Gaussian integral. It uses fixed 32-by-16 panel boundaries in (d,w)(d,w) so that initial adaptive nodes cannot simply skip a narrow ridge. For replica zero at each noise/prior, all nine integrations terminate successfully with nonzero rescaled normalizations, approximately 270,000–287,000 integrand evaluations each, and no inner-integration failures. Target means agree with the reduced calculation to 2.7×10−152.7\times10^{-15} and log evidences to 10−1310^{-13}. Absolute normalization, subdivision counts and reported integration errors are retained alongside the comparisons. These controls test normalization and means, not every posterior quantile.

    Summary

    A spectral posterior requires a likelihood, a measure and explicit prior information. In the two-triangle family, conditional Gaussian integration gives accurate posterior expectations of actual smeared observables. Credible intervals remain conditional on that family and prior, and their numerical integration needs separate refinement. Fixed-truth coverage, prior-averaged calibration and robustness to misspecification answer different questions.

    Exercises

    1. Add a truncated Gaussian weight prior

    At fixed dd, suppose the whitened likelihood is proportional to exp⁡[−∥r−wvˉ∥2/2]\exp[-\|r-w\bar v\|^2/2] and the weight prior is proportional to exp⁡[−(w−w0)2/(2s02)]\exp[-(w-w_0)^2/(2s_0^2)] on [l,u][l,u]. Derive the conditional distribution, its mean, and the factor contributed to the marginal likelihood of dd.

    Solution

    Set τ=s0−2\tau=s_0^{-2}, A=vˉTvˉ+τA=\bar v^T\bar v+\tau, B=vˉTr+τw0B=\bar v^Tr+\tau w_0, m=B/Am=B/A and sw=A−1/2s_w=A^{-1/2}. Expanding the quadratics and completing the square gives (9), with κ=∥r−mvˉ∥2+τ(m−w0)2\kappa=\|r-m\bar v\|^2+\tau(m-w_0)^2.

    The normalized prior prefactor is

    cw=1s02π [Φ((u−w0)/s0)−Φ((l−w0)/s0)].c_w=\frac{1} {s_0\sqrt{2\pi}\,[\Phi((u-w_0)/s_0)-\Phi((l-w_0)/s_0)]}.

    The conditional density is

    p(w∣d,y)=φ((w−m)/sw)sw[Φ((u−m)/sw)−Φ((l−m)/sw)],l≤w≤u.p(w\mid d,y) =\frac{\varphi((w-m)/s_w)} {s_w[\Phi((u-m)/s_w)-\Phi((l-m)/s_w)]}, \qquad l\leq w\leq u.

    Using φ′(x)=−xφ(x)\varphi'(x)=-x\varphi(x), its mean is (11). Integration over ww contributes cwe−κ/22π/A [Φ(b)−Φ(a)]c_w e^{-\kappa/2}\sqrt{2\pi/A}\,[\Phi(b)-\Phi(a)] to the marginal likelihood, in addition to the common normalized Gaussian likelihood prefactor. Omitting cwc_w changes the evidence; omitting the truncation mass changes even the posterior shape in dd.

    The conditional location mm may lie outside [l,u][l,u] without making the distribution invalid. It then concentrates toward a boundary. Replacing it by a clipped point would discard the tail normalization and uncertainty.

    2. Credible intervals and fixed-truth coverage

    Let y∣θ∼N(θ,σ2)y\mid\theta\sim\mathcal N(\theta,\sigma^2) and θ∼N(0,τ2)\theta\sim\mathcal N(0,\tau^2), with positive known variances. Find the posterior 95% equal-tail interval and its repeated-sampling coverage at a fixed true value θ∗\theta_*. Prove prior-averaged coverage is 95%.

    Solution

    Completing the square gives

    v=σ2τ2σ2+τ2,a=τ2σ2+τ2,θ∣y∼N(ay,v).v=\frac{\sigma^2\tau^2}{\sigma^2+\tau^2},\qquad a=\frac{\tau^2}{\sigma^2+\tau^2},\qquad \theta\mid y\sim\mathcal N(ay,v).

    Let z.975=Φ−1(0.975)z_{.975}=\Phi^{-1}(0.975) and h=z.975vh=z_{.975}\sqrt v. The interval is [ay−h,ay+h][ay-h,ay+h]. At fixed truth, ay−θ∗=(a−1)θ∗+aσZay-\theta_*=(a-1)\theta_*+a\sigma Z, with Z∼N(0,1)Z\sim\mathcal N(0,1). Therefore coverage is

    C(θ∗)=Φ ⁣(h+(1−a)θ∗aσ)−Φ ⁣(−h+(1−a)θ∗aσ).\mathcal C(\theta_*)= \Phi\!\left(\frac{h+(1-a)\theta_*}{a\sigma}\right) -\Phi\!\left(\frac{-h+(1-a)\theta_*}{a\sigma}\right).

    It depends on θ∗\theta_*. For sufficiently large ∣θ∗∣|\theta_*|, shrinkage toward zero produces low coverage; near zero the interval can overcover. In the weak-prior limit τ→∞\tau\to\infty, a→1a\to1, v→σ2v\to\sigma^2, recovering nominal coverage for each fixed truth.

    For the proper finite prior, integrate the coverage against its density. Interchanging the joint integrals yields

    ∫p(θ)C(θ) dθ=∫p(y)[∫I(y)p(θ∣y) dθ]dy=0.95.\int p(\theta)\mathcal C(\theta)\,d\theta =\int p(y)\left[\int_{I(y)}p(\theta\mid y)\,d\theta\right]dy =0.95.

    The equality is an average under the same prior and likelihood used to construct the interval. It does not survive arbitrary changes to the truth-generating distribution or noise model.

    References

    • M. Asakawa, T. Hatsuda and Y. Nakahara, “Maximum Entropy Analysis of the Spectral Functions in Lattice QCD,” Progress in Particle and Nuclear Physics 46 (2001), 459–508, arXiv:hep-lat/0011040v2 (PDF). §3.1: correlated likelihood; §§3.2–3.3: prior measures and posterior treatment.
    • L. Kades et al., “Spectral Reconstruction with Deep Neural Networks,” Physical Review D 102 (2020), 096001, arXiv:1905.04305v2. §III and Appendices A–B distinguish spectral priors, parametric posterior inference and learned information.
    • SciPy developers, Truncated normal distribution, SciPy 1.13.1. Standardized truncation bounds and probability-function conventions.

    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.