Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Reduced-Basis and Gaussian-Process Surrogates

    Suppose a field equation must be solved for many masses, lengths or couplings, but the desired output is only one integrated response. There are two economical alternatives to a large neural solver: reuse a low-dimensional space of previously computed fields, or interpolate the response itself. They answer different questions. A reduced Galerkin field still satisfies a projected equation and admits a residual estimate; a Gaussian-process prediction supplies uncertainty conditional on its statistical model.

    This article constructs both alternatives for one scalar boundary problem, compares them with cubic interpolation and a small fitted network, and tests unseen parameters. The example is sufficiently explicit to distinguish finite-discretization error, reduced-space error and learned-map error without treating any one of them as another.

    Preparation: Variational neural solvers develop the positive scalar functional. The thin-layer calculation derives the boundary layers and the continuous residual estimate used here.

    One response, several approximation spaces

    On 0<x<10<x<1, consider

    Lϵu=−ϵ2u′′+u=1,u(0)=u(1)=0,R(ϵ)=∫01u dx.(1)\mathcal L_\epsilon u=-\epsilon^2u''+u=1, \qquad u(0)=u(1)=0, \qquad R(\epsilon)=\int_0^1u\,dx. \tag{1}

    The dimensionless parameter is ϵ=κ/(mL)\epsilon=\sqrt\kappa/(mL) for a static scalar equation −κϕXX+m2ϕ=J-\kappa\phi_{XX}+m^2\phi=J. Its physical integrated response is LR/m2LR/m^2. The exact benchmark is

    R(ϵ)=1−2ϵtanh⁡12ϵ.(2)R(\epsilon)=1-2\epsilon\tanh\frac1{2\epsilon}. \tag{2}

    We reserve (2) for validation. Training labels instead come from a conventional sine-Galerkin calculation. Because the source and solution are reflection-even about x=1/2x=1/2, only odd-index sine modes contribute. With j=0,…,K−1j=0,\ldots,K-1, define

    φj(x)=2sin⁡[(2j+1)πx],bj=∫01φj dx=22(2j+1)π,Djj=[(2j+1)π]2,Aϵ=I+ϵ2D.(3)\begin{aligned} \varphi_j(x)&=\sqrt2\sin[(2j+1)\pi x],\\ b_j&=\int_0^1\varphi_j\,dx=\frac{2\sqrt2}{(2j+1)\pi},\\ D_{jj}&=[(2j+1)\pi]^2,\qquad A_\epsilon=I+\epsilon^2D. \end{aligned} \tag{3}

    The orthonormal basis makes coefficient Euclidean norm equal to field L2L^2 norm. The finite solution and response are

    c(ϵ)=Aϵ−1b,uK=∑jcjφj,RK=bTc.(4)c(\epsilon)=A_\epsilon^{-1}b, \qquad u_K=\sum_jc_j\varphi_j, \qquad R_K=b^Tc. \tag{4}

    Calling uKu_K a “truth” approximation means that it is the resolved numerical reference for a reduced calculation. This distinction underlies the reduced-basis construction in Sen et al., §1.1.

    POD compresses snapshots; Galerkin solves at a new parameter

    Take nine training parameters equally spaced in

    z=log⁡(ϵ/0.025)log⁡40,zj=j/8,j=0,…,8.(5)z=\frac{\log(\epsilon/0.025)}{\log40}, \qquad z_j=j/8,\qquad j=0,\ldots,8. \tag{5}

    Assemble their KK-component coefficient vectors into C=[c(ϵ0),…,c(ϵ8)]C=[c(\epsilon_0),\ldots,c(\epsilon_8)] and compute the singular value decomposition C=UΣWTC=U\Sigma W^T. The first rr columns VV of UU minimize the summed squared projection error of these snapshots among orthonormal rank-rr spaces. The minimum sum is the sum of the discarded singular values squared. At unseen parameters the projection error has to be checked separately.

    At a new ϵ\epsilon, seek v=Vav=Va and require the residual to be orthogonal to this space:

    VT(AϵVa−b)=0.(6)V^T(A_\epsilon Va-b)=0. \tag{6}

    Since VTV=IV^TV=I, the online calculation becomes

    (Ir+ϵ2Dr)a=br,Dr=VTDV,br=VTb,RRB=brTa.(7)(I_r+\epsilon^2D_r)a=b_r, \qquad D_r=V^TDV,\quad b_r=V^Tb, \qquad R_{\mathrm{RB}}=b_r^Ta. \tag{7}

    Snapshots, the SVD and the projected matrices are computed offline. A response query solves only an rr-dimensional system. Reconstructing every coefficient of the field still costs work proportional to KrK r; it is unnecessary when only (7) is requested. The reduced field is not obtained by interpolating the snapshot coefficients: it solves the equation projected into their common space.

    An output-error identity and a continuum tail

    For the same finite reference, put e=c−ve=c-v and ρ=b−Aϵv\rho=b-A_\epsilon v. The residual equation is Aϵe=ρA_\epsilon e=\rho. The smallest eigenvalue is λ1=1+ϵ2π2\lambda_1=1+\epsilon^2\pi^2, so

    ∥e∥Aϵ≤∥ρ∥2λ1,∥e∥Aϵ2=eTAϵe.(8)\|e\|_{A_\epsilon}\le\frac{\|\rho\|_2}{\sqrt{\lambda_1}}, \qquad \|e\|_{A_\epsilon}^2=e^TA_\epsilon e. \tag{8}

    For this particular response, Galerkin orthogonality gives more than a generic linear-functional bound. Since b=Aϵcb=A_\epsilon c and vTAϵe=0v^TA_\epsilon e=0,

    RK−RRB=bTe=(v+e)TAϵe=∥e∥Aϵ2≤∥ρ∥22λ1.(9)R_K-R_{\mathrm{RB}} =b^Te=(v+e)^TA_\epsilon e =\|e\|_{A_\epsilon}^2 \le\frac{\|\rho\|_2^2}{\lambda_1}. \tag{9}

    The nonnegative error relies on the symmetric positive operator, the same source as output functional, and a Galerkin solution. It is not a general bound for an arbitrary fitted response network. More general reduced-basis residual/output estimates are developed in Sen et al., §6.1, Lemma 6.1 and Proposition 6.3; (8)–(9) follow directly for our diagonal coercive problem.

    The finite reference omits a positive response tail,

    TK=R−RK=∑j=K∞8π2(2j+1)2[1+ϵ2π2(2j+1)2].(10)T_K=R-R_K =\sum_{j=K}^\infty \frac{8}{\pi^2(2j+1)^2[1+\epsilon^2\pi^2(2j+1)^2]}. \tag{10}

    Bounding the denominator by its large-mode term and using the first term plus an integral for a decreasing function gives, with q=2K+1q=2K+1,

    TK≤BK:=8ϵ2π4(1q4+16q3).(11)T_K\le B_K :=\frac8{\epsilon^2\pi^4} \left(\frac1{q^4}+\frac1{6q^3}\right). \tag{11}

    Consequently,

    0≤R−RRB≤∥ρ∥22λ1+BK.(12)0\le R-R_{\mathrm{RB}} \le\frac{\|\rho\|_2^2}{\lambda_1}+B_K. \tag{12}

    The omitted field L2L^2 norm squared is also bounded by TK/[1+ϵ2π2q2]T_K/[1+\epsilon^2\pi^2q^2]. A small finite-reference residual becomes a continuum statement only after this separate tail is included.

    To evaluate the residual cheaply, factor the offline matrix [b,V,DV]=QT[b,V,DV]=QT by a thin QR decomposition. Then

    ∥ρ∥2=∥T(1−a−ϵ2a)∥2.(13)\|\rho\|_2 =\left\|T \begin{pmatrix}1\\-a\\-\epsilon^2a\end{pmatrix} \right\|_2. \tag{13}

    The small factor avoids forming all KK residual coefficients online and avoids evaluating an expanded sum of large cancelling squared terms. Finite precision remains: the companion compares (13) against the full coefficient residual and records raw discrepancies. Equations (9)–(12) are exact-arithmetic bounds; the displayed floating-point evaluations are not interval arithmetic.

    A response GP and its conditional uncertainty

    A response-only surrogate discards the field and fits the nine labels RK(ϵj)R_K(\epsilon_j). Standardize them using their training mean Rˉ\bar R and population standard deviation sRs_R:

    yj=RK(ϵj)−RˉsR.(14)y_j=\frac{R_K(\epsilon_j)-\bar R}{s_R}. \tag{14}

    No validation or test label enters this transformation. Use a zero-mean Gaussian process with squared-exponential kernel

    kℓ(z,z′)=exp⁡[−(z−z′)22ℓ2],Cij=kℓ(zi,zj)+νδij,ν=10−10.(15)k_\ell(z,z')=\exp\left[-\frac{(z-z')^2}{2\ell^2}\right], \qquad C_{ij}=k_\ell(z_i,z_j)+\nu\delta_{ij}, \qquad \nu=10^{-10}. \tag{15}

    The fixed nugget ν\nu is a chosen numerical/model term. It is not a measurement of Galerkin error and has no experimentally estimated noise interpretation here. For a new latent function value f∗f_*, the joint covariance with yy is

    Cov⁡(yf∗)=(Ck∗k∗T1).(16)\operatorname{Cov}\begin{pmatrix}y\\f_*\end{pmatrix} =\begin{pmatrix}C&k_*\\k_*^T&1\end{pmatrix}. \tag{16}

    Completing the square in this joint normal density, or subtracting the best linear predictor and checking that its covariance with yy vanishes, gives

    μ∗=k∗TC−1y,σ∗2=1−k∗TC−1k∗.(17)\mu_*=k_*^TC^{-1}y, \qquad \sigma_*^2=1-k_*^TC^{-1}k_*. \tag{17}

    The original-unit prediction is Rˉ+sRμ∗\bar R+s_R\mu_* and its latent conditional standard deviation is sRσ∗s_R\sigma_*. A new noisy observation under this model would add ν\nu to the standardized variance. These are distinct predictions. See Rasmussen and Williams, §2.2, Eqs. (2.22)–(2.24).

    For fitting ℓ\ell, the negative log marginal likelihood is

    N(ℓ)=12yTC−1y+12log⁡det⁡C+n2log⁡(2π).(18)\mathcal N(\ell)=\frac12y^TC^{-1}y +\frac12\log\det C+\frac{n}{2}\log(2\pi). \tag{18}

    If α=C−1y\alpha=C^{-1}y, differentiation gives

    ∂N∂log⁡ℓ=12tr⁡[(C−1−ααT)∂C∂log⁡ℓ],∂kℓ(zi,zj)∂log⁡ℓ=kℓ(zi,zj)(zi−zj)2ℓ2.(19)\frac{\partial\mathcal N}{\partial\log\ell} =\frac12\operatorname{tr}\left[ (C^{-1}-\alpha\alpha^T) \frac{\partial C}{\partial\log\ell}\right], \quad \frac{\partial k_\ell(z_i,z_j)}{\partial\log\ell} =k_\ell(z_i,z_j)\frac{(z_i-z_j)^2}{\ell^2}. \tag{19}

    The sign is for the negative likelihood. It is the negative of the log-likelihood gradient in GPML §5.4, Eq. (5.9). Cholesky triangular solves evaluate (17)–(19); explicit inverses are unnecessary for prediction.

    The resulting spread conditions on the chosen kernel, fixed nugget, fitted length and numerical labels. It does not integrate hyperparameter uncertainty, infer missing physics or prove a PDE residual bound. Small spread in an extrapolation region is particularly weak evidence without an appropriate model for that region.

    A common comparison with held-out inputs

    The retained experiment uses K=256K=256 odd modes for all nine training fields and labels. POD ranks are 1, 2, 3, 4, 6, 8 and 9; a rank is unavailable when its singular value is at most 10−1210^{-12} of the leading one. Rank 4 is designated before testing. Rank 9 is indeed unavailable: its relative singular value is about 5.4×10−145.4\times10^{-14}, whereas rank 8 is retained.

    Three response baselines use those same labels:

    • PCHIP interpolates in zz and retains its endpoint-polynomial extrapolation without clipping.
    • The GP fits log⁡ℓ\log\ell from starts 0.10.1, 0.50.5 and 22, with 0.03≤ℓ≤50.03\le\ell\le5. Each fit allows 200 L-BFGS-B iterations and 1000 actual calls. The smallest finite training objective selects the displayed fit.
    • A width 8 tanh network has 25 parameters. It minimizes half the standardized mean-square label error plus 10−8∥θ∥2/210^{-8}\|\theta\|^2/2. Three fixed starts each receive at most 2000 iterations and 5000 calls; start 0 is designated, independently of test errors.

    Eight interval midpoints are a diagnostic validation set. Sixteen quarter/three-quarter points are held out for the following comparison; neither set selects the ranks or training budgets. Four extrapolation values are ϵ=0.0125\epsilon=0.0125, 0.020.02, 1.251.25 and 22, outside the training interval [0.025,1][0.025,1].

    ModelMaximum test response errorMaximum extrapolation error
    PCHIP1.34×10−31.34\times10^{-3}8.59×10−28.59\times10^{-2}
    GP6.98×10−46.98\times10^{-4}3.43×10−23.43\times10^{-2}
    Network, start 08.49×10−58.49\times10^{-5}4.59×10−34.59\times10^{-3}
    POD rank 49.32×10−69.32\times10^{-6}5.30×10−45.30\times10^{-4}
    POD rank 81.30×10−71.30\times10^{-7}4.39×10−64.39\times10^{-6}

    Errors are absolute differences from (2), not sampling standard errors. Against the descriptive target 10−510^{-5}, PCHIP misses all 16 test points, the GP 15, and network/start 0 fourteen. POD 4 meets the target at all 16. This finite test does not prove uniform accuracy over the interval. The other network starts remain in the output: their maximum test errors are 5.52×10−55.52\times10^{-5} and 1.07×10−41.07\times10^{-4}.

    The GP length is about 0.32175960.3217596 and its training covariance condition number is 8.19×1068.19\times10^6. The frozen minimum-objective rule selects start 1 even though it reports an abnormal line-search termination. The three objectives differ by only about 10−1110^{-11}, and their lengths are nearly identical; this is not evidence that the failed fit is better converged. Both the successful and unsuccessful stop states are preserved. All computed latent variances are positive. On the test set, conditional standard deviations range from 1.35×10−51.35\times10^{-5} to 2.06×10−42.06\times10^{-4}, without an established coverage guarantee.

    Network starts 0 and 2 hit their iteration caps; start 1 stops by function tolerance. None meets the separately evaluated gradient target 10−710^{-7}.

    Held-out and extrapolated response errors for five surrogates, and POD rank errors compared with a residual plus continuum-tail bound and a refined reference.

    Left: continuum response errors on the fixed test and extrapolation inputs; dotted vertical lines mark the training interval. Right: maximum test errors and the evaluated residual-plus-tail bound across POD ranks. The K=512K=512 control separates reference truncation from reduced-space error. No ranks or starts were added after these outcomes.

    The rank 4 maximum evaluated continuum bound is 3.95×10−33.95\times10^{-3} on the test set, much larger than its actual maximum error. Such a bound may be valid yet conservative. At rank 8, the K=256K=256 error is mostly reference truncation: rebuilding only the prescribed POD ranks 4 and 8 at K=512K=512 reduces the rank 8 maximum test error to 1.62×10−81.62\times10^{-8}. The largest pointwise response change between these references is 1.13×10−71.13\times10^{-7}. Rank 4's maximum remains approximately 9.32×10−69.32\times10^{-6}, showing its different dominant error. The independently recomputed POD spaces are not asserted to be nested.

    The finite output-bound check records a maximum positive floating-point violation of 6.66×10−166.66\times10^{-16} near solved states. It is not silently padded away. No positive continuum-bound violation is observed in the fixed scan after including (11); this is numerical evidence, not a formal rounding-error proof.

    Offline work and actual online costs

    The retained timings use seven repetitions, each evaluating the fixed 20-point test-plus-extrapolation batch 100 times. Median milliseconds per 2000 responses are:

    Operation actually timedMedian milliseconds
    PCHIP, physical response0.3340.334
    GP, physical mean0.4700.470
    Network, physical response0.4960.496
    Exact formula1.311.31
    Full K=256K=256 diagonal Galerkin response1.401.40
    GP, standardized mean and raw variance1.401.40
    POD rank 4, response13.213.2
    POD rank 4, response and bound33.133.1

    The GP mean/variance timing excludes final physical rescaling and the square root. The POD path performs a small solve per input in a Python loop; the scalar baselines and full diagonal truth use vectorized batches. The table measures these implementations on one machine, not their best possible implementations or a hardware-independent speed ratio. In particular, this exceptionally cheap diagonal model provides no practical POD speedup.

    Offline snapshot assembly, SVD/precomputation and all fits are separate from these inference intervals. The recorded POD interval includes reassembling its nine snapshots before the SVD. A large non-diagonal field problem may have a much more favorable offline/online balance, but its costs would have to be measured for that problem.

    The companions reduced_response.py and surrogate_study.py retain every model, error group, timing repetition and stop reason. Independent controls compare GP conditioning with a full finite joint-Gaussian Schur complement, check likelihood/network derivatives, compare the QR residual with its full vector, and deliberately omit ϵ2\epsilon^2 from the online operator as a negative control. Default commands replay saved predictions without fitting; explicit production refuses existing output files.

    Summary

    A POD space compresses previously computed fields; Galerkin projection supplies new parameter-dependent coefficients and a residual estimate. A response GP or network learns only the output map, so its error must be assessed on unseen inputs and against numerical-label refinement. Here a positive output identity makes a finite-reference residual bound especially transparent, while a separate sine tail connects it to the continuum. GP conditional spread, held-out errors and PDE bounds remain different quantities even when displayed beside the same response.

    Exercises

    1. From a reduced residual to a continuum response estimate

    For a symmetric positive matrix AA, source bb, exact finite solution c=A−1bc=A^{-1}b and Galerkin state v=Vav=Va, derive the output identity (9). Then derive (11) and a bound for the omitted field norm. Explain why replacing vv by an arbitrary response-network output invalidates this argument.

    Solution

    Put e=c−ve=c-v. Galerkin orthogonality gives VTAe=0V^TAe=0, hence vTAe=0v^TAe=0. Because the same bb defines source and output,

    bT(c−v)=cTAe=(v+e)TAe=eTAe.b^T(c-v)=c^TAe=(v+e)^TAe=e^TAe.

    Also Ae=ρAe=\rho and A⪰λ1IA\succeq\lambda_1I, so eTAe=ρTA−1ρ≤∥ρ∥2/λ1e^TAe=\rho^TA^{-1}\rho\le\|\rho\|^2/\lambda_1.

    For the odd sine expansion, each omitted response term is at most 8/[ϵ2π4(2j+1)4]8/[\epsilon^2\pi^4(2j+1)^4]. Monotonicity gives

    ∑j=K∞(2j+1)−4≤(2K+1)−4+∫K∞(2t+1)−4dt=q−4+16q3.\sum_{j=K}^\infty(2j+1)^{-4} \le(2K+1)^{-4}+\int_K^\infty(2t+1)^{-4}dt =q^{-4}+\frac1{6q^3}.

    This proves (11). In the omitted coefficient norm, the summand is bj2/Ajj2b_j^2/A_{jj}^2, whereas the response-tail summand is bj2/Ajjb_j^2/A_{jj}. Since omitted Ajj≥1+ϵ2π2q2A_{jj}\ge1+\epsilon^2\pi^2q^2, their sum is bounded by TK/[1+ϵ2π2q2]T_K/[1+\epsilon^2\pi^2q^2]. The field and output estimates can thus be combined with the independent finite-space residual.

    A scalar network prediction supplies neither a field coefficient vector nor Galerkin orthogonality. Its error need not be nonnegative, and no ρ\rho of the above kind follows from a small label loss. A reconstructed non-Galerkin field can still have an ordinary residual bound, but it loses the special identity used here.

    2. A nonzero GP variance at a training point

    Let two standardized latent values have unit variance and correlation ρ\rho with ∣ρ∣<1|\rho|<1. Observations have independent nugget variance ν>0\nu>0. Condition on their values y0,y1y_0,y_1 and predict the latent value at the first training input. Derive its mean and variance, take ν→0\nu\to0, and explain why that limit does not certify the physical response.

    Solution

    The observation covariance and latent cross-covariance are

    C=(1+νρρ1+ν),k∗=(1ρ),d=(1+ν)2−ρ2>0.C=\begin{pmatrix}1+\nu&\rho\\\rho&1+\nu\end{pmatrix}, \qquad k_*=\begin{pmatrix}1\\\rho\end{pmatrix}, \qquad d=(1+\nu)^2-\rho^2>0.

    Using C−1=d−1(1+ν−ρ−ρ1+ν)C^{-1}=d^{-1}\bigl(\begin{smallmatrix}1+\nu&-\rho\\-\rho&1+\nu\end{smallmatrix}\bigr) in (17),

    μ∗=(1+ν−ρ2)y0+νρy1d,σ∗2=ν(1+ν−ρ2)d.\mu_*=\frac{(1+\nu-\rho^2)y_0+\nu\rho y_1}{d}, \qquad \sigma_*^2=\frac{\nu(1+\nu-\rho^2)}{d}.

    The latent variance is positive at a training point because the model allows observational nugget uncertainty. A new noisy observation has variance σ∗2+ν\sigma_*^2+\nu. As ν→0\nu\to0, the latent mean tends to y0y_0 and its variance to zero. In original units these are Rˉ+sRμ∗\bar R+s_R\mu_* and sR2σ∗2s_R^2\sigma_*^2.

    The zero-nugget limit exactly interpolates the numerical label. That label may still differ from the continuum response by TKT_K, and the selected kernel may misrepresent unseen parameters. Neither defect is inferred by conditioning on the label as exact. No PDE residual or truncation bound has been evaluated in this GP calculation.

    References

    • C. E. Rasmussen and C. K. I. Williams, Gaussian Processes for Machine Learning, MIT Press (2006), ISBN 026218253X. Chapter 2 (PDF), §2.2, Eqs. (2.22)–(2.24); Chapter 5 (PDF), §5.4, Eq. (5.9).
    • S. Sen, K. Veroy, D. B. P. Huynh, S. Deparis, N. C. Nguyen and A. T. Patera, “‘Natural norm’ a posteriori error estimators for reduced basis approximations,” Journal of Computational Physics 217 (2006) 37–62, doi:10.1016/j.jcp.2006.02.012, author-hosted PDF, §1.1 and §6.1, Lemma 6.1 and Proposition 6.3.

    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.