Skip to content

Menu

WorksMathematics

Dynamic Emulation for Bayesian Inverse Problems in Spatiotemporal Mechanistic Models

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_dnc6s69h. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

Calibrating a spatiotemporal mechanistic model to field data is a Bayesian inverse problem in which every likelihood evaluation needs a simulator run. The R package spDBL replaces the simulator with a dynamic emulator, a matrix-variate dynamic linear model with a closed-form posterior that evolves the field in discrete time and processes large grids in spatial blocks. It then calibrates the parameters without further simulator runs, using Hamiltonian Monte Carlo (implemented in the Stan programming environment) conditionally on emulator draws. In benchmarks on epidemic fields, with every method tuned alike, spDBL's predictions at untried inputs were the only ones with near-nominal interval coverage, though a tuned RobustGaSP was more accurate, and spDBL's calibrations matched the accuracy of RobustCalibration with higher, though below nominal, interval coverage (80% against 67-76%) and over 50 times more effective samples per CPU second.

Introduction

Mechanistic or physics-driven models such as reaction–diffusion systems advance a spatial field in discrete time steps for every setting of their inputs. spDBL addresses two problems they pose: discrete-time modelling, in which a statistical emulator trained on a modest design of runs models each time step’s field given the previous ones, as the simulator does; and the Bayesian inverse problem of inferring the inputs from noisy field observations [35], in which the emulator stands in for the costly simulator and calibration accounts for its error and the model’s discrepancy from reality [24]. Existing software treats the space–time output as one long vector with a shared Gaussian process [15, 17], as a separable process over inputs and time [27], or through a principal-component basis [22, 10, 31]; other emulation packages [19, 28, 13, 8, 14] have no dynamic model, and dynamic emulators [25, 5, 21] and dynamic linear model and Kalman-filter Gaussian process software [30, 20, 7, 18] handle time series or observed data. While fast and accurate for their purposes (especially multiple packages from Mengyang Gu and collaborators), spDBL is distinct in its scalable implementation of Banerjee et al. [1] as reusable software and, beyond its research code (see IMPROVEMENTS.md), calibrates without simulator runs, with the No-U-Turn sampler [23], cached compiled models, resumable and parallel fits, and tests against independent calculations.

Models and Computation

Each run’s output at time tt is a field over SS sites, split into blocks of CC sites (ww grid columns, the episode window); each (time, block) pair is an episode ee. With YeY_e the N×CN \times C outputs of NN training runs and FeF_e the N×pN \times p design built from their two previous outputs (p=2Cp = 2C), the emulator follows Banerjee et al. [1],

Ye=FeΘe+Ee,Ee∼ind.MNN×C(O,V,Σ),Θe=GΘe−1+Γe,Γe∼ind.MNp×C(O,W,Σ),e=1,2,…,E,Θ0∣Σ∼MNp×C(m0,M0,Σ),Σ∼IW(n0,D0)orΣ=σ2R, σ2∼IG(n0,d0),(1)\begin{aligned} Y_e &= F_e\Theta_e + \mathcal{E}_e,\qquad\mathcal{E}_e \mathrel{\overset{\mathrm{ind.}}{\sim}} \mathcal{MN}_{N\times C}(O,V,\Sigma),\\ \Theta_e &= G\Theta_{e-1}+\Gamma_e,\qquad\Gamma_e \mathrel{\overset{\mathrm{ind.}}{\sim}} \mathcal{MN}_{p\times C}(O,W,\Sigma),\qquad e=1,2,\ldots,E,\\ \Theta_0\mid\Sigma&\sim\mathcal{MN}_{p\times C}(m_0,M_0,\Sigma),\qquad\Sigma\sim\mathcal{IW}(n_0,D_0)\quad\text{or}\quad\Sigma=\sigma^2R,\ \sigma^2\sim\mathcal{IG}(n_0,d_0), \tag*{(1)} \end{aligned}

where VV is a Gaussian-process covariance over the inputs, G=W=IG = W = I and RR is a spatial correlation. Forward filtering and backward smoothing (Carter and Kohn, [4]; Frühwirth-Schnatter, [9]; West and Harrison, [38]) give each episode’s posterior in closed form. Field data at observed sites ss follow Banerjee et al. [1],

zt(s)=yt(η,s)+ut(s)+εtz(s),εtz(s)∼ind.N(0,τt2),ut(s)=ut−1(s)+εtu(s),εtu(s)∼ind.GP(0,τt2C(⋅,⋅)),τt2∼ind.IG(btnz0n,btdz0d),t=1,2,…,T,η∼p(η),(2)\begin{aligned} z_t(s) &= y_t(\eta,s)+u_t(s)+\varepsilon_t^z(s),\qquad\varepsilon_t^z(s)\mathrel{\overset{\mathrm{ind.}}{\sim}}\mathcal{N}(0,\tau_t^2),\\ u_t(s) &= u_{t-1}(s)+\varepsilon_t^u(s),\qquad\varepsilon_t^u(s)\mathrel{\overset{\mathrm{ind.}}{\sim}}\mathcal{GP}(0,\tau_t^2C(\cdot,\cdot)),\\ \tau_t^2 &\mathrel{\overset{\mathrm{ind.}}{\sim}}\mathcal{IG}(b_t^n z_0^n,b_t^d z_0^d),\qquad t=1,2,\ldots,T,\qquad\eta\sim p(\eta), \tag*{(2)} \end{aligned}

where p(η)p(\eta) is uniform on a box and UU, the matrix of CC at the observed sites, is user-supplied. At an untried η\eta a Gaussian process (Matérn 5/25/2, one per time step) predicts F(η)F(\eta) with its uncertainty. Given one emulator draw, yty_t and utu_t are integrated out (the latter by a Kalman filter) and Stan (Carpenter et al., [3]) samples (η,τ2)(\eta,\tau^2) with NUTS from the best of several local optima; pooling over MM draws gives a modular (“cut”) posterior (Liu et al., [26]; Plummer, [32]). Appendix B derives predictions at unobserved sites.

Software Design and Usage

Seven workflow functions cover emulation and calibration (Figure 1); the underlying filters, smoothers, samplers and predictors are exported as building blocks alongside closed-form WAIC scores (Appendix § 9), with C++ inverse-Wishart steps (RcppEigen; Bates and Eddelbuettel, [2]), out-of-core routines for oversized grids and stored or regenerable coefficient draws. Results are serializable S3 objects recording settings, seed and version. Listing 1 calibrates a spatial susceptible–infected–recovered (SIR) model (3) from 40 shipped runs on a 6×66 \times6 grid, initialized at the best of 20 L-BFGS optima. On 20 cores it runs in 26 minutes with R^≤1.007\hat{R} \le1.007 (Vehtari et al., [36]), bulk and tail ESS ≥1,835\ge1{,}835 and 738, no divergences and 95% intervals covering the truth.

Figure 1. Architecture of spDBL. Blue: workflow functions and classes; dashed: optional.

Evaluation

We compared spDBL (Table 1) with RobustGaSP (Gu et al., [17]), a principal-component Gaussian process (PCA-GP) in mlegp (Dancik and Dorman, [6]), and RobustCalibration (Gu, [14]) with S-GaSP and GaSP discrepancies (Gu and Wang, [16]), on SIR fields (3) from 40 training runs (E3: 100; Figure 2; Appendix § 7). All methods were tuned alike.

SoftwareSpatial fieldsDynamic emulatorEmulator without MCMCCalibration with discrepancyLarge outputs
spDBLyesyesyesdynamic (NUTS)blocks
Research code1yesyesyesdynamic (MCMC)blocks
RobustGaSP (ppgasp)as vectornoyesvia RobustCalibrationshared kernel
RobustCalibrationas vectornoyesyes (MCMC)shared kernel
SEPIA / GPMSAPCA basisnonoyes (MCMC)PCA
surmisePCA basisnoyesno2PCA
dynemunoyesyesno–

Table 1. Features of spDBL and related software (November 2026). 1Banerjee et al. [1], solving the simulator at every MCMC step. 2MCMC without a discrepancy.

Figure 2. (a) E1: fit time by window ww (dashed: stored draws), peak memory at S=104S = 10^{4}. (b, c) E2: RMSE and 95% coverage (mean, 95% interval, 10 designs). (d) E3: error relative to prior range in 30 calibrations (median, quartiles), 95% coverage.

Listing 1: Calibration from saved simulations (benchmarks/listing1.R in the repository).

library(spDBL)
data("dt_calibration"); d <- dt_calibration
em <- emulator_learn(d$training$input, d$training$responses, d$Nx, d$Ny,
                     covariance = "sigma2R", episode_window = 2,
                     nsam = 20, seed = 1)                 # closed form, no MCMC
cal <- calibration_prepare(em, d$lower, d$upper)          # design GP
calibration_validate(cal, d$validation$input, d$validation$responses)$field
fit <- calibration_fit(cal, d$field$z, d$field$U, chains = 4, iter = 2000,
  parallel_draws = 20, seed = 1)                          # NUTS, 20 cores
summary(fit)                                               # eta, R-hat, ESS
fields <- calibration_predict(fit)                         # y, u and z draws

Scaling (E1). With 10410^{4} sites and regenerated draws, fitting took 1.0 min and 9 GiB (window 1) to 12.9 min and 33 GiB (window 5; 62 GiB if stored), growing as S1.4S^{1.4}–S1.7S^{1.7}.

Emulation at untried inputs (E2). On one 10 ×\times 10 domain at 10210^{2}, 20220^{2} and 50250^{2} sites, with 10 designs of 40 training and 50 held-out runs, only spDBL’s predictions had near-nominal 95% intervals (94.8–96.1% coverage against 91.8–92.4% for RobustGaSP and 83.9–87.3% for the PCA-GP). RobustGaSP was more accurate: its CRPS [12] was lower on every grid and its RMSE lower, significantly at 50250^{2} (0.735 against 0.780); the PCA-GP’s did not differ significantly from spDBL’s.

Calibration (E3). In 30 calibrations of three parameters from 100 training runs, spDBL matched RobustCalibration’s accuracy (relative RMSE 0.087 against 0.103 and 0.092 for S-GaSP and GaSP), and its 95% intervals covered 80%, against 67% for S-GaSP (a significant difference) and 76% for GaSP. Chains mixed (R^≤1.1\hat{R} \le1.1) in all but one replicate per method, and spDBL gave 72 and 54 times more effective samples per CPU second. With 40 bundled runs every method under-covered, spDBL’s most (54%; Appendix A).

xrefAppendix A

Availability and Limitations

spDBL 1.2.0 (tag v1.2.0, doi:10.32614/CRAN.package.spDBL) is MIT-licensed on CRAN, with Linux, macOS and Windows CI and 99.1% R/C++ test coverage checking each numerical component independently; the website hosts vignettes and an architecture guide, and the repository provides a contributing guide, issue tracker and forum. Outputs require complete single-grid fields, prediction is costlier than competitors’ (Table A2), and calibration requires a user-supplied UU, costs O(TSo3)O(TS_o^3) for SoS_o observed sites and under-covers intervals from emulator error (Appendix § 7). Rather than fixing GP hyperparameters, future versions will stack closed-form posteriors over a grid by cross-validation (predictive stacking; Zhang et al., [39]; Pan et al., [29]).

GridMethodRMSECRPSCov.WidthFit (s)Predict (s)Peak (GiB)
10210^{2}spDBL, tunedd0.4530.1250.9610.929.251.390.36
ppgasp, tunedd0.4320.1060.9240.593.19–0.17
PCA-GP, tunedd0.4150.1240.8390.467.750.130.14
spDBL, design GP0.4540.1270.9580.928.090.880.23
design GP alonea0.4670.1270.9490.888.450.470.23
spDBL, known AR rowsb0.0680.0240.9860.280.310.250.21
ppgasp, default0.4740.1130.8570.400.580.010.14
ppgasp, nugget, Nelder–Mead0.4660.1130.8670.422.860.010.14
ppgasp per time step0.4570.1060.8550.403.91–0.17
PCA-GP (mlegp)0.4300.1330.8190.560.780.080.14
spDBL, design GPc0.4540.1270.9580.928.061.090.21
20220^{2}spDBL, tunedd0.6120.1860.9551.3118.75.251.74
ppgasp, tunedd0.5920.1570.9200.857.73–0.21
PCA-GP, tunedd0.5970.1930.8610.859.060.160.18
spDBL, design GP0.6130.1870.9511.3110.52.670.58
design GP alonea0.6300.1890.9491.3110.40.920.53
spDBL, known AR rowsb0.0990.0280.9800.312.080.990.52
ppgasp, default0.6820.1780.8590.642.470.020.18
ppgasp, nugget, Nelder–Mead0.6630.1770.8680.6710.50.030.17
ppgasp per time step0.6610.1670.8610.635.62–0.20
PCA-GP (mlegp)0.5930.2050.8540.890.920.100.18
spDBL, design GPc0.6130.1870.9511.319.534.010.42
50250^{2}spDBL, tunedd0.7800.2590.9481.7919142.220.42
ppgasp, tunedd0.7350.2120.9181.1639.6–0.63
PCA-GP, tunedd0.7530.2610.8731.1310.20.240.59
spDBL, design GP0.7820.2600.9451.7939.916.15.34
design GP alonea0.7970.2620.9461.8139.53.224.65
spDBL, known AR rowsb0.2250.0410.9690.4129.56.705.32
ppgasp, default0.9180.2620.8670.999.810.200.62
ppgasp, nugget, Nelder–Mead0.8590.2550.8841.1264.90.200.61
ppgasp per time step0.8830.2440.8760.9919.8–0.68
PCA-GP (mlegp)0.7690.2810.8631.201.230.180.60
spDBL, design GPc0.7820.2600.9451.7929.536.92.41

Table A2. Table A2: E2 on the fixed 10×1010 \times10 domain: held-out prediction on 50 runs at times t≥3t \ge3, means over 10 independent training/test designs; Cov. and Width are the coverage and mean width of central 95% intervals (spDBL’s from predict(..., interval = "prediction")). Fit and prediction time and peak memory are from design 1, rerun with spDBL 1.2.0’s batched prediction, one task per node; ppgasp per time step fits one ppgasp per time, and its fit time includes prediction. aTimes 3≤t≤253 \le t \le25: it has no prediction for the last time, t=26t = 26. bUses the simulator’s outputs at the test inputs to build the autoregressive rows (one-step prediction), so it is not simulator-free. cWith coefficient draws regenerated on demand (emulator_learn(keep_draws = FALSE)); its predictions are identical. dEach method’s setting selected on designs 11–12 (Table A4): spDBL with episode window 5, gp_tune = 1 and 50 draws; ppgasp fitted per time step with a linear trend and the Matérn 3/23/2 kernel; the PCA-GP with a linear mean, 99.99% of variance, a nugget and 20 restarts; times and memory from design 1, one task per node; the tuned ppgasp’s fit time includes prediction.

Acknowledgments and Disclosure of Funding

The authors acknowledge funding from the National Science Foundation through DMS-1916349 and DMS-2113778, and from the National Institutes of Health through NIEHS-R01ES027027, NIEHS-R01ES030210 and NIGMS-R01GM148761. The authors declare no competing interests.

Benchmark Results

The tables at the end of this appendix give every metric behind Figure 2. They are generated from the committed results by benchmarks/paper/tables.R; benchmarks/README.md maps each result folder to this paper.

Simulator. Listing 1 and E1–E3 use the spatial SIR model of Banerjee et al. [1], in which the numbers of susceptible, infected and recovered people, St(s)S_t(s), It(s)I_t(s) and Rt(s)R_t(s), at site ss evolve as

∂St(s)∂t=−η1St(s)It(s)N+α1∇2St(s),∂It(s)∂t=η1St(s)It(s)N−η2It(s)+α2∇2It(s),∂Rt(s)∂t=η2It(s)+α3∇2Rt(s),(3)\begin{aligned} \frac{\partial S_t(s)}{\partial t} &= -\eta_1\frac{S_t(s)I_t(s)}{N}+\alpha_1\nabla^2S_t(s),\\ \frac{\partial I_t(s)}{\partial t} &= \eta_1\frac{S_t(s)I_t(s)}{N}-\eta_2I_t(s)+\alpha_2\nabla^2I_t(s),\\ \frac{\partial R_t(s)}{\partial t} &= \eta_2I_t(s)+\alpha_3\nabla^2R_t(s), \tag*{(3)} \end{aligned}

where η1\eta_1 is the transmission rate, η2\eta_2 the recovery rate, α1\alpha_1, α2\alpha_2 and α3\alpha_3 are diffusion coefficients, NN is the population of a grid cell (here, not the number of training runs) and ∇2f=∂2f/∂s12+∂2f/∂s22\nabla^2 f = \partial^2 f/\partial s_1^2 + \partial^2 f/\partial s_2^2. gen_pde() solves (3) by the method of lines on unit grid cells (deSolve and ReacTran; [34, 33]), with values fixed at zero outside the grid (an absorbing boundary), N=10,000N = 10{,}000 susceptible people in every cell, one infected person in the central cell and 0.05N0.05N in a cell near a corner; E2 solves the same system on a fixed 10×1010 \times10 domain at every resolution. The emulated output is yt(η,s)=log⁡{It(s)+1}y_t(\boldsymbol{\eta},s) = \log\{I_t(s) + 1\} at the solver’s times 0,1,…,250,1,\ldots,25, indexed t=1,…,26t = 1,\ldots,26, with η1∈[2,4]\eta_1 \in[2,4], η2∈[0.2,0.4]\eta_2 \in[0.2,0.4], α2∈[0,0.2]\alpha_2 \in[0,0.2] and α1=α3=0\alpha_1 = \alpha_3 = 0.

Settings. One core per task on Intel Xeon Gold 6240 nodes (E3 with 40 training runs: 18 tasks per 36-core node; with 100: one Slurm job per calibration, RobustCalibration running its four chains on four cores), R 4.6.1 with oneMKL; spDBL 1.2.0, RobustGaSP 0.6.8, RobustCalibration 0.5.6, mlegp 3.1.10. RobustCalibration ran 4 chains of 20,000 iterations (5,000 burn-in), twice its default length, and spDBL 4 chains of 2,000 iterations for each of 20 emulator draws. E3 with 40 runs ran before two later speed-ups in 1.2.0: calibration gradients are now 1.3 times faster (the same log density, compiled with stanc’s O1 optimisations), and conditional fits can run in parallel (parallel_draws). E3 with 100 runs has the faster gradients and runs the conditional fits in sequence.

Tuning. Every method was tuned by the same procedure, on data the evaluation does not use or by rules that use no true values. In E2 each method’s settings were compared on two further designs (11 and 12) at all three resolutions: round 1 changed one setting at a time, round 2 combined the changes that lowered CRPS, and the setting with the lowest mean CRPS was selected, a rule fixed before any result (Table A4). The selected settings are spDBL with episode window 5, gp_tune = 1 and 50 draws (CRPS 1.5% lower than with its E2 setting), ppgasp fitted per time step with a linear trend and the Matérn 3/2 kernel (23% lower), and the PCA–GP with a linear mean, 99.99% of variance, a nugget and 20 restarts (7.5% lower). In E3 both packages start their chains at their optimum from 20 starts (spDBL: L-BFGS on each conditional posterior; RobustCalibration: maximum likelihood), and RobustCalibration’s emulator estimates a nugget, as its tuned E2 fits do.

MethodSettingRoundCRPSRMSECov.
spDBLwindow 5, gp_tune 1, 50 draws20.11820.4320.959
window 5, gp_tune 120.11830.4320.959
window 5, 50 draws20.11840.4320.958
episode window 510.11840.4320.958
gp_tune 1, 50 draws20.11990.4330.958
gp_tune 110.12000.4330.958
50 draws10.12000.4330.955
E2 setting: window 2, gp_tune 0.5, 20 draws10.12000.4330.955
gp_tau2 10−210^{-2}10.12010.4330.955
AR(1) design10.12040.4340.955
gp_tune 0.2510.12090.4340.955
episode window 110.12160.4350.953
gp_sigma2 410.12260.4340.960
squared-exponential design GP10.12500.4460.938
one design GP for all times10.14110.4610.961
ppgaspper time step, trend, Matérn 3/220.10580.4420.914
per time step, trend, power exp.20.10600.4420.928
per time step, Matérn 3/220.10720.4420.915
per time step, power exp.20.11080.4450.935
per time step, trend10.11390.4930.841
per time step10.11470.4930.840
trend, Matérn 3/220.11710.4610.913
Matérn 3/210.12400.4730.911
power exponential10.13020.4810.932
linear trend10.13360.5330.835
10 optimiser starts10.13690.5420.833
mmle10.13690.5420.833
ref_gamma prior10.13690.5420.833
nugget, Nelder–Mead (E2’s tuned)10.13690.5420.833
PCA-GPlinear mean, 99.99%, nugget, 20 restarts20.11800.4320.837
linear mean, 99.99%, nugget20.11810.4310.841
linear mean, nugget20.12050.4320.808
linear mean, 99.99%20.12300.4360.825
99.99%, nugget20.12360.4370.844
linear mean10.12500.4380.792
99.99% of variance10.12550.4390.844
nugget10.12580.4390.813
20 restarts10.12750.4400.809
E2 setting: 99.9% of variance10.12760.4400.810
99% of variance10.14280.4450.655

Table A4. E2 tuning study: every setting tried for each method on designs 11 and 12, which E2 does not evaluate, all three grids, means over the six grid–design pairs, sorted by mean CRPS. Round 1 changes one setting at a time from the method’s E2 setting (the row labelled E2); round 2 combines the round-1 changes that lowered CRPS. The setting with the lowest mean CRPS (bold; ties broken by RMSE), a rule fixed before any result, is the tuned setting of Tables A2 and A3. Settings not listed are the package defaults. Three ppgasp settings (10 starts, mmle, ref_gamma) change its mean CRPS by under 10−510^{-5}.

spDBL’s NUTS adapts its step size and mass matrix during warm-up; RobustCalibration’s random-walk proposal for η\boldsymbol{\eta} has a fixed scale, by default 5% of each prior range, which its sampler multiplies by the range again, so that its steps were 10% of the range for η1\eta_1 and 1% for η2\eta_2 and α2\alpha_2 and accepted 11% of moves. Each scale is therefore set to 1.2 times the parameter’s posterior standard deviation in a 4,000-iteration pilot chain from the optimum; the factor 1.2 gave the most effective samples per CPU second on replicates 1–3 among 0.7, 1.2 and 2.0. CPU times include the pilot. Results before tuning are kept in the repository.

E1. Each episode costs time cubic in the block size C=wNyC = wN_y for a grid NyN_y sites high, so on square grids the cost grows at most as Tw2S2T w^2 S^2; the log–log slopes of fit time against SS were 1.3, 1.5 and 1.6 for windows 1, 2 and 5 with stored draws, and 1.4, 1.6 and 1.7 with regenerated draws. With coefficient draws regenerated on demand (emulator_learn(keep_draws = FALSE)), peak memory at 10410^4 sites fell from 13, 23 and 62 GiB to 9, 15 and 33 GiB, fitting was 17–29% faster, and Monte Carlo prediction 3–8 times slower, with identical results (Table A1).

GridSSw=1w = 1 fitw=1w = 1 predictw=1w = 1 peakw=2w = 2 fitw=2w = 2 predictw=2w = 2 peakw=5w = 5 fitw=5w = 5 predictw=5w = 5 peak
10210^21000.180.050.2/0.20.200.040.2/0.20.500.040.2/0.2
20220^24000.920.160.3/0.21.610.140.4/0.34.010.140.7/0.4
30230^29002.520.280.7/0.44.710.281.0/0.513.80.331.7/1.0
40240^21,6005.300.461.1/0.711.20.521.9/1.135.30.633.8/2.2
50250^22,50010.10.721.8/1.222.00.773.6/1.876.41.068.2/4.0
70270^24,90027.61.425.4/3.364.11.389.6/5.32522.4621.8/10.6
1002100^210,00086.63.1813.3/9.12143.8223.3/15.59295.8861.6/33.5

Table A1. Table A1: E1: inverse-Wishart emulator with 10 posterior draws, 40 training runs and 26 time steps; fit and prediction (10 held-out runs) time in seconds and peak memory of the whole task in GiB, one task per node, with stored coefficient draws and, after the slash, with draws regenerated on demand (emulator_learn(keep_draws = FALSE); same accuracy). Times are with stored draws.

E2. The grids discretise the same physical domain, so they simulate the same epidemic at increasing resolution. spDBL’s intervals, from predict() with interval = "prediction", are moment-matched Gaussians over its emulator draws. With every method tuned (Table A2 and Table A3), the competitors’ coverage was 3–4 points (RobustGaSP) and 8–12 points (PCA-GP) lower than spDBL’s, significantly on every grid; RobustGaSP’s CRPS was lower by 0.019–0.047 on every grid and its RMSE by 0.020–0.045, significantly only at 50250^2; the PCA-GP’s RMSE and CRPS did not differ significantly from spDBL’s. Tuning changed spDBL little and RobustGaSP most, by fitting one Gaussian process per time step instead of one with range parameters shared by all outputs. Before tuning, the competitors’ coverage was on average 6–14 points lower than spDBL’s, and lower in 119 of the 120 comparisons on the same design; the PCA-GP’s RMSE was lower by 0.014–0.026, within design-to-design variation, and RobustGaSP’s higher on every grid, by 0.10–0.14 at 50250^2 for its default and per-time-step fits. The design Gaussian process alone covers 94.6–94.9%, with 1–1.5% higher RMSE, and has lower CRPS on the 10210^2 grid (by 0.003). When the autoregressive rows come from the simulator’s earlier outputs at the test input, one-step predictions have RMSE 0.07–0.22, 15–29% of the simulator-free error. Times and memory in Table A2 come from a rerun of design 1 with spDBL 1.2.0’s batched prediction, which predicts the 50 runs about 50 times faster than the version first benchmarked (43, 133 and 905 s on the three grids) with identical results; with regenerated draws, peak memory at 50250^2 is 2.4 instead of 5.3 GiB.

GridMethodΔ\Delta RMSEΔ\Delta CRPSΔ\Delta coverage (points)
10210^{2}ppgasp, tuned−0.021 [−0.047, 0.005]-0.021\ [-0.047,\ 0.005]−0.019 [−0.028, −0.010]-0.019\ [-0.028,\ -0.010]−3.7 [−4.8, −2.6]-3.7\ [-4.8,\ -2.6]
PCA-GP, tuned−0.038 [−0.090, 0.014]-0.038\ [-0.090,\ 0.014]−0.001 [−0.030, 0.027]-0.001\ [-0.030,\ 0.027]−12.2 [−14.5, −9.8]-12.2\ [-14.5,\ -9.8]
20220^{2}ppgasp, tuned−0.020 [−0.068, 0.028]-0.020\ [-0.068,\ 0.028]−0.029 [−0.044, −0.014]-0.029\ [-0.044,\ -0.014]−3.5 [−4.5, −2.5]-3.5\ [-4.5,\ -2.5]
PCA-GP, tuned−0.014 [−0.088, 0.059]-0.014\ [-0.088,\ 0.059]0.007 [−0.022, 0.036]0.007\ [-0.022,\ 0.036]−9.4 [−12.7, −6.0]-9.4\ [-12.7,\ -6.0]
50250^{2}ppgasp, tuned−0.045 [−0.091, −0.0003]-0.045\ [-0.091,\ -0.0003]−0.047 [−0.066, −0.028]-0.047\ [-0.066,\ -0.028]−3.0 [−4.0, −2.0]-3.0\ [-4.0,\ -2.0]
PCA-GP, tuned−0.028 [−0.099, 0.043]-0.028\ [-0.099,\ 0.043]0.002 [−0.024, 0.029]0.002\ [-0.024,\ 0.029]−7.5 [−9.5, −5.6]-7.5\ [-9.5,\ -5.6]

Table A3. E2 with every method’s tuned setting (Table A2, note d): each competitor minus tuned spDBL, paired by design, mean and 95% tt interval over the 10 designs, at times t≥3t \ge3. Positive RMSE and CRPS differences favour spDBL; negative coverage differences mean the competitor’s 95% intervals cover less.

E2 replaced an earlier profile, kept in benchmarks/results/e2/paper, that had one design per grid and unit grid cells, so that, as in E1, the larger grids were larger domains with different epidemics, which confounds resolution with the problem; the fixed-domain profile was set before any of its results were seen. In the earlier profile spDBL’s intervals also covered 95.0–95.6% on every grid and the competitors’ 76–91% on the 10210^2 and 20220^2 grids, but on the 50250^2 grid tuned RobustGaSP had lower RMSE than spDBL (0.66 against 0.70) and similar coverage (95.4% against 95.0%).

E3. With random starts (kept in benchmarks/results/e3/paper), R^\hat{R} exceeded 1.1 in 26 of 30 replicates, and 24 spDBL chains on one replicate and emulator draw found six modes: one near the true parameters and five 36 to 586 log-density units below it, three of them on the boundary of the prior box. Because a conditional fit’s chains now start near one optimum, R^\hat{R} checks mixing within its mode; the fit records the optima of all 20 starts. R^\hat{R} is rank-normalised, and reported for the worst of spDBL’s 20 conditional fits. Effective sample sizes per CPU second are summed over the conditional fits, each keeping all 4,000 post-warm-up draws (the default keeps 200), and RobustCalibration’s over its four chains.

With 100 training runs (one Latin-hypercube design, the same for every replicate and method; Table A5), a paired replicate bootstrap finds no accuracy difference between the methods. spDBL’s intervals covered 0.13 [0.01, 0.26] more than tuned S-GaSP’s, mostly for η2\eta_2 (0.87 against 0.50), and 0.04 [−0.07, 0.16] more than tuned GaSP’s; they covered 77% in the 20 replicates whose chains converged (R^≤1.01\hat{R} \le1.01). R^\hat{R} exceeded 1.01 in 10, 1 and 3 replicates for spDBL, S-GaSP and GaSP; spDBL’s is the worst of 20 conditional fits. A calibration took 9.4, 16.8 and 10.3 CPU hours and gave 1.71, 0.024 and 0.032 bulk effective samples of its slowest parameter per CPU second (means over replicates), so spDBL gave 72 and 54 times as many. With RobustCalibration’s default proposals, its chains accepted 11% of moves, R^\hat{R} exceeded 1.01 in 29 and 30 replicates and 1.1 in 14 and 21, and spDBL gave about 1,500 and 2,000 times more effective samples per CPU second, at similar accuracy and coverage (64% and 74%).

MethodParameterRelative RMSECoverageRel. widthRelative RMSECoverage
spDBLη1\eta_10.038 [0.029, 0.045]0.73 [0.57, 0.90]0.09––
η2\eta_20.140 [0.111, 0.171]0.87 [0.73, 0.97]0.37––
α2\alpha_20.037 [0.029, 0.045]0.80 [0.67, 0.93]0.11––
all0.087 [0.071, 0.103]0.80 [0.70, 0.89]0.19––
S-GaSPη1\eta_10.039 [0.031, 0.047]0.73 [0.57, 0.87]0.090.002 [−0.008, 0.012]0.00 [−0.20, 0.20]
η2\eta_20.169 [0.133, 0.202]0.50 [0.33, 0.67]0.210.028 [−0.012, 0.068]−0.37 [−0.57, −0.17]
α2\alpha_20.040 [0.029, 0.051]0.77 [0.60, 0.90]0.110.003 [−0.008, 0.013]−0.03 [−0.13, 0.07]
all0.103 [0.084, 0.121]0.67 [0.56, 0.78]0.140.016 [−0.006, 0.037]−0.13 [−0.26, −0.01]
GaSPη1\eta_10.037 [0.029, 0.045]0.80 [0.63, 0.93]0.090.000 [−0.009, 0.009]0.07 [−0.13, 0.27]
η2\eta_20.151 [0.114, 0.184]0.67 [0.50, 0.83]0.300.010 [−0.030, 0.048]−0.20 [−0.40, 0.03]
α2\alpha_20.038 [0.027, 0.049]0.80 [0.63, 0.93]0.110.001 [−0.009, 0.011]0.00 [−0.10, 0.10]
all0.092 [0.073, 0.111]0.76 [0.64, 0.86]0.170.006 [−0.016, 0.026]−0.04 [−0.16, 0.07]

Table A5. E3 with 100 Latin-hypercube training runs (one design for every replicate and method): 30 replicate calibrations of the three free inputs η=(η1,η2,α2)\eta= (\eta_1, \eta_2, \alpha_2) by spDBL and by RobustCalibration with its S-GaSP and GaSP discrepancies, every chain started at its package’s optimum from 20 starts (spDBL: conditional posterior mode from 20 L-BFGS starts, 20 emulator draws with 4 NUTS chains of 2,000 iterations each; RobustCalibration: maximum-likelihood estimate from 20 starts, an emulator nugget, random-walk proposal scales set from a 4,000-iteration pilot chain, and 4 chains of 20,000 iterations); errors and widths relative to the prior range, with replicate-bootstrap 95% intervals, paired over replicates for the differences. Replicates with rank-normalised R^\hat{R} above 1.01 and above 1.1 for some η\eta component (for spDBL the worst of its 20 conditional fits, for RobustCalibration its four chains): spDBL 10 and 1 of 30, S-GaSP 1 and 1 of 30, GaSP 3 and 1 of 30. Mean CPU hours per calibration, one Slurm job per calibration (spDBL on one core; RobustCalibration running its four chains on four cores, CPU time summed over them and including the mode search and pilot): spDBL 9.4, S-GaSP 16.8, GaSP 10.3.

With the 40 runs shipped with the package (Table A6), every method under-covered, spDBL’s most (54% against 60% and 67%), at relative RMSE 0.100 against 0.107 and 0.118. Only the η1\eta_1 differences exceed sampling error: spDBL is less accurate than the GaSP variant and covers less than both. spDBL’s intervals covered 45% in the 17 replicates whose chains converged. The under-coverage does not come from the emulator understating its error at the truth: at each replicate’s true parameters, the calibration emulator’s pointwise 95% predictive intervals covered 98.8% of the simulator output, and for each emulator draw the errors whitened by the covariance the likelihood uses had mean square 0.40 (1 under the model) and lag-1 correlation over time 0.05 (benchmarks/e3_emulator_error.R). Ablations on replicates 1–10 (Table A7) locate the cause. Jointly sampled coefficient paths and 60 instead of 20 emulator draws changed nothing. With field data whose simulator output was replaced by a draw from the emulator’s own model, so that spDBL is exactly specified, the intervals covered 93% and the relative RMSE halved: the inference is sound, and the narrow intervals come from the emulator’s systematic error, which shifts the posterior in ways its predictive variance does not describe. Without the design-GP uncertainty the intervals were 64% wider and covered 77% at the same accuracy; propagating it, which corrects prediction intervals (E2), narrows the calibration posterior here.

MethodParameterRelative RMSECoverageRel. widthRelative RMSECoverage
spDBLη1\eta_10.053 [0.040, 0.064]0.43 [0.27, 0.60]0.06––
η2\eta_20.156 [0.105, 0.201]0.57 [0.40, 0.73]0.21––
α2\alpha_20.050 [0.036, 0.063]0.63 [0.47, 0.80]0.09––
all0.100 [0.073, 0.123]0.54 [0.42, 0.67]0.12––
S-GaSPη1\eta_10.043 [0.036, 0.051]0.70 [0.53, 0.83]0.09−0.009 [−0.022, 0.005]0.27 [0.03, 0.50]
η2\eta_20.176 [0.139, 0.208]0.43 [0.27, 0.60]0.170.019 [−0.038, 0.079]−0.13 [−0.37, 0.10]
α2\alpha_20.044 [0.033, 0.054]0.67 [0.50, 0.83]0.10−0.006 [−0.023, 0.009]0.03 [−0.17, 0.27]
all0.107 [0.088, 0.125]0.60 [0.48, 0.72]0.120.008 [−0.023, 0.039]0.06 [−0.10, 0.21]
GaSPη1\eta_10.037 [0.030, 0.043]0.77 [0.60, 0.90]0.09−0.016 [−0.028, −0.002]0.33 [0.10, 0.57]
η2\eta_20.198 [0.146, 0.248]0.50 [0.33, 0.67]0.260.041 [−0.011, 0.090]−0.07 [−0.30, 0.17]
α2\alpha_20.039 [0.029, 0.049]0.73 [0.57, 0.87]0.10−0.011 [−0.027, 0.005]0.10 [−0.10, 0.30]
all0.118 [0.090, 0.147]0.67 [0.57, 0.77]0.150.019 [−0.010, 0.045]0.12 [−0.02, 0.27]

Table A6. E3 with the 40 training runs bundled with the package (dt_calibration), with RobustCalibration’s default proposal scales, no emulator nugget and 10 maximum-likelihood starts: every chain started at its package’s optimum (spDBL: conditional posterior mode, init = "mode", 20 emulator draws with 4 NUTS chains of 2,000 iterations each; RobustCalibration: its 10-start maximum-likelihood estimate, 4 chains of 20,000 iterations); errors and widths relative to the prior range, with replicate-bootstrap 95% intervals, paired over replicates for the differences. Replicates with rank-normalised R^\hat{R} above 1.01 and above 1.1 for some η\eta component (for spDBL the worst of its 20 conditional fits, for RobustCalibration its four chains): spDBL 13 and 5 of 30, S-GaSP 30 and 4 of 30, GaSP 30 and 14 of 30. Mean CPU hours per calibration, with 18 one-core tasks per 36-core node: spDBL 8.4, S-GaSP 14.5, GaSP 9.0.

VariantCoverage valueCoverage minus baselineRelative widthRelative RMSE valueRelative RMSE minus baselineR^>1.01\hat{R} > 1.01 replicates
Baseline (Table A6)0.57—0.1230.086—6
Joint paths0.53−0.03 [−0.10, 0.00]0.1230.0870.001 [0.000, 0.002]4
60 draws0.53−0.03 [−0.10, 0.00]0.1250.0860.000 [−0.001, 0.001]6
No design uncertainty0.770.20 [0.00, 0.37]0.2020.084−0.002 [−0.027, 0.025]3
Data from emulator model0.930.37 [0.17, 0.57]0.1820.045−0.041 [−0.081, −0.003]6
New 40-run design0.770.20 [−0.03, 0.43]0.1860.061−0.025 [−0.065, 0.015]0
80 training runs0.830.27 [0.07, 0.50]0.2150.080−0.005 [−0.030, 0.021]2
100 training runs0.830.27 [0.07, 0.47]0.1910.0880.002 [−0.031, 0.038]2
160 training runs0.930.37 [0.20, 0.53]0.2200.069−0.017 [−0.056, 0.019]2
40 + 40 targeted runs1.000.43 [0.23, 0.63]0.2210.052−0.033 [−0.071, 0.001]0

Table A7. E3 ablations: spDBL on replicates 1–10 with one change each from the setting of Table A6, against that run on the same replicates and seeds, with paired replicate-bootstrap 95% intervals of the differences. Joint paths: calibration_prepare(sampling = "joint"). 60 draws: 60 emulator draws instead of 20. No design uncertainty: design_uncertainty = FALSE. New 40-run design, 80, 100 and 160 training runs: new Latin-hypercube designs over the prior box instead of the 40 bundled runs (100 runs: replicates 1–10 of Table A5). 40 + 40 targeted runs: the bundled runs plus 40 placed by greedy maximin where a short first-stage calibration puts the posterior, its spread tripled. Data from emulator model: the simulator output in each replicate’s field data replaced by a draw from the emulator’s own predictive model at the true parameters (one random emulator draw; the same discrepancy and noise), so that spDBL is exactly specified.

More training runs reduce the under-coverage (Table A7). On replicates 1–10, new Latin-hypercube designs of 40, 80 and 160 runs covered 77%, 83% and 93% (the bundled 40 runs: 57%; the 100-run design of Table A5: 83%), with posterior means a median 0.96, 0.78 and 0.68 posterior standard deviations from the truth (1.42; 0.67 for a calibrated posterior); a calibration took 12.7 and 17.2 CPU hours with 80 and 160 runs, against 8.9 with the bundled runs on these replicates. Adding 40 runs where a short first-stage calibration put the posterior covered all 30 parameters, with the lowest error of any design (relative RMSE 0.052 against 0.086), at 12.0 CPU hours including the 1.3-hour first stage. The bundled design is also unfavourable: a fresh 40-run design covered 77%. Banerjee et al. [1] report 59 minutes for 30,000 draws of their research code on an Apple M3 Max, against 26 minutes on 20 cores (7.1 CPU hours) for Listing 1, which generates 80,000 post-warm-up NUTS draws over 20 emulator draws and keeps 4,000.

Spatial Prediction of Field Observations

Whereas Banerjee et al. [1] derive predictive distributions only for the emulated simulator output at untried mechanistic inputs over the fixed training grid S={s1,…,sS}S = \{s_1,\ldots,s_S\}, their calibration development [1 Equations 27–29] addresses parameter estimation and smoothing exclusively at the SoS_o observed field sites So={so,1,…,so,So}⊆SS_o = \{s_{o,1},\ldots,s_{o,S_o}\} \subseteq S (denoted S~\widetilde{S} there). Predicting field measurements zt(s0)z_t(s_0) at an arbitrary spatial location s0∉Sos_0 \notin S_o was not addressed in Banerjee et al. [1] and is derived here by augmenting their joint posterior with latent states at s0s_0 and applying conditional composition sampling.

Let D={z1:T,Y1:T}\mathcal{D} = \{z_{1:T},Y_{1:T}\} denote the collection of So×1S_o \times1 field observation vectors z1:T={z1,…,zT}z_{1:T} = \{z_1,\ldots,z_T\} at SoS_o and N×SN \times S simulator training outputs Y1:T={Y1,…,YT}Y_{1:T} = \{Y_1,\ldots,Y_T\} over design inputs X={x1,…,xN}\mathcal{X} = \{x_1,\ldots,x_N\} and grid SS. Let Ω={η,τ2,u0:T,y1:T(η),Θ,Σ}\Omega= \{\eta,\tau^2,u_{0:T},y_{1:T}(\eta),\Theta,\Sigma\} collect all calibration parameters and latent states at SoS_o from the joint posterior in Banerjee et al. [1]—where τ2=(τ02,τ12,…,τT2)⊤\tau^2 = (\tau_0^2,\tau_1^2,\ldots,\tau_T^2)^\top, u0:T={u0,…,uT}u_{0:T} = \{u_0,\ldots,u_T\} are the So×1S_o \times1 discrepancy vectors on SoS_o, y1:T(η)={y1(η),…,yT(η)}y_{1:T}(\eta) = \{y_1(\eta),\ldots,y_T(\eta)\} are the So×1S_o \times1 latent emulator vectors on SoS_o, and {Θ,Σ}\{\Theta,\Sigma\} are the emulator states and spatial covariance from (1). When calibration_fit() marginalises y1:T(η)y_{1:T}(\eta) and u0:Tu_{0:T} in Stan to sample (η,τ2)(\eta,\tau^2) via NUTS for each of the MM emulator draws, draws of u0:Tu_{0:T} and y1:T(η)y_{1:T}(\eta) on SoS_o are first recovered from their exact closed-form full conditionals [1 Algorithms 7 and 8] to form posterior draws of Ω\Omega.

To predict at a target location s0∉Sos_0 \notin S_o and epoch t∈{1,…,T}t \in\{1,\ldots,T\}, let So+=So∪{s0}S_o^+ = S_o \cup\{s_0\} denote the augmented set of So+1S_o+1 sites, and define the augmented latent vectors uk+=(uk⊤,uk(s0))⊤∈RSo+1u_k^+ = (u_k^\top,u_k(s_0))^\top\in\mathbb{R}^{S_o+1} (k=0,…,Tk=0,\ldots,T) and yk+(η)=(yk(η)⊤,yk(η,s0))⊤∈RSo+1y_k^+(\eta) = (y_k(\eta)^\top,y_k(\eta,s_0))^\top\in\mathbb{R}^{S_o+1} (k=1,…,Tk=1,\ldots,T). Generalising Banerjee et al. [1] from SoS_o to So+S_o^+, the augmented joint posterior predictive density of Ω+=Ω∪{u0:T(s0),y1:T(η,s0),zt(s0)}\Omega^+ = \Omega\cup\{u_{0:T}(s_0),y_{1:T}(\eta,s_0),z_t(s_0)\} given D\mathcal{D} is proportional to

p(Ω+∣D)∝p(η)p(Θ,Σ∣Y1:T)×NG(u0+,τ0−2∣m0z,+,M0z,+,n0z,d0z)×∏k=1TNG(uk+,τk−2∣uk−1+,U+,bkn0z,bkd0z)×∏k=1T{NSo+1(yk+(η)∣μ~k+(η),Σ~k+(η))×∏i=1SoN(zk(so,i)∣yk(η,so,i)+uk(so,i),τk2)}×N(zt(s0)∣yt(η,s0)+ut(s0),τt2),(4)\begin{aligned} p(\Omega^+ \mid\mathcal{D}) \propto{}& p(\eta)p(\Theta,\Sigma\mid Y_{1:T}) \times\mathcal{NG}\left(u_0^+,\tau_0^{-2} \mid m_0^{z,+},M_0^{z,+},n_0^z,d_0^z\right) \\ &\times\prod_{k=1}^{T}\mathcal{NG}\left(u_k^+,\tau_k^{-2} \mid u_{k-1}^+,U^+,b^kn_0^z,b^kd_0^z\right) \\ &\times\prod_{k=1}^{T}\left\{\mathcal{N}_{S_o+1}\left(y_k^+(\eta)\mid\widetilde{\mu}_k^+(\eta),\widetilde{\Sigma}_k^+(\eta)\right)\right. \\ &\qquad\left.\times\prod_{i=1}^{S_o}\mathcal{N}\left(z_k(s_{o,i})\mid y_k(\eta,s_{o,i})+u_k(s_{o,i}),\tau_k^2\right)\right\} \\ &\times\mathcal{N}\left(z_t(s_0)\mid y_t(\eta,s_0)+u_t(s_0),\tau_t^2\right), \tag*{(4)} \end{aligned}

where NG(⋅)\mathcal{NG}(\cdot) denotes the Normal–Gamma density, UU is user-supplied (so p(η,ρ)p(\eta,\rho) in Banerjee et al. [1] reduces to p(η)p(\eta)), m0z,+=((m0z)⊤,m0z(s0))⊤m_0^{z,+} = ((m_0^z)^\top,m_0^z(s_0))^\top,

M0z,+=[M0zm0,oz(s0)m0,oz(s0)⊤m00z(s0)],U+=[Uc0(s0)c0(s0)⊤1]M_0^{z,+} = \begin{bmatrix} M_0^z & m_{0,o}^z(s_0) \\ m_{0,o}^z(s_0)^\top& m_{00}^z(s_0) \end{bmatrix}, \qquad U^+ = \begin{bmatrix} U & c_0(s_0) \\ c_0(s_0)^\top& 1 \end{bmatrix}

with m0,oz(s0)=M0z(So,s0)m_{0,o}^{z}(s_0)=M_{0}^{z}(\mathcal{S}_o,s_0), m0,0z(s0)=M0z(s0,s0)m_{0,0}^{z}(s_0)=M_{0}^{z}(s_0,s_0), c0(s0)=[C(so,1,s0),…,C(so,So,s0)]Tc_0(s_0)=[\mathcal{C}(s_{o,1},s_0),\ldots,\mathcal{C}(s_{o,S_o},s_0)]^{\mathsf{T}}, C(s0,s0)=1\mathcal{C}(s_0,s_0)=1, and μ~k+(η)\widetilde{\mu}_{k}^{+}(\eta), Σ~k+(η)\widetilde{\Sigma}_{k}^{+}(\eta) denoting the (So+1)(S_o+1)-dimensional emulator predictive mean and covariance on So+\mathcal{S}_o^{+} (with the off-grid case s0∉Ss_0\notin\mathcal{S} also conditioning on the imputed state column θk(s0)\theta_k(s_0)).

Integrating (4) over u0:T(s0)u_{0:T}(s_0), y1:T(η,s0)y_{1:T}(\eta,s_0), and zt(s0)z_t(s_0) recovers the calibration posterior p(Ω∣D)p(\Omega\mid\mathcal{D}) of Banerjee et al. [1]. Conversely, dividing (4) by p(Ω∣D)p(\Omega\mid\mathcal{D}) and marginalising out yk(η,s0)y_k(\eta,s_0) for k≠tk\ne t and uk(s0)u_k(s_0) for k>tk>t yields the joint posterior predictive decomposition by conditional composition:

p(zt(s0),yt(η,s0),ut(s0)∣D)=∫p(zt(s0)∣yt(η,s0),ut(s0),D,Ω)×p(yt(η,s0),ut(s0)∣D,Ω)p(Ω∣D) dΩ.(5)p\left(z_t(s_0),y_t(\eta,s_0),u_t(s_0)\mid\mathcal{D}\right)=\int p\left(z_t(s_0)\mid y_t(\eta,s_0),u_t(s_0),\mathcal{D},\Omega\right) \times p\left(y_t(\eta,s_0),u_t(s_0)\mid\mathcal{D},\Omega\right)p(\Omega\mid\mathcal{D})\,\mathrm{d}\Omega. \tag*{(5)}

Because the emulator terms y1:T+(η)y_{1:T}^{+}(\eta) and discrepancy terms u0:T+u_{0:T}^{+} appear in disjoint product factors in (4) and zt(s0)z_t(s_0) is unobserved, yt(η,s0)y_t(\eta,s_0) and ut(s0)u_t(s_0) are conditionally independent given (D,Ω)(\mathcal{D},\Omega):

p(yt(η,s0),ut(s0)∣D,Ω)=p(yt(η,s0)∣yt(η),Yt,Θt,Σ,η)×p(ut(s0)∣u0:T,τ2).(6)p\left(y_t(\eta,s_0),u_t(s_0)\mid\mathcal{D},\Omega\right)=p\left(y_t(\eta,s_0)\mid y_t(\eta),Y_t,\Theta_t,\Sigma,\eta\right)\times p\left(u_t(s_0)\mid u_{0:T},\tau^2\right). \tag*{(6)}

Conditional distribution of yt(η,s0)y_t(\eta,s_0).

Under (1) and Banerjee et al. [1], the emulated field at time tt conditional on (Θt,Σ,η)(\Theta_t,\Sigma,\eta) has mean ft(x,s)Tθt(s)f_t(x,s)^{\mathsf{T}}\theta_t(s) (with θt(s)∈Rp\theta_t(s)\in\mathbb{R}^{p} the state column at site ss) and separable covariance Cov⁡(yt(x,s),yt(x′,s′)∣Θt,Σ)=CX(x,x′)Σ(s,s′)\operatorname{Cov}(y_t(x,s),y_t(x',s')\mid\Theta_t,\Sigma)=C_X(x,x')\Sigma(s,s'), where CX(⋅,⋅)C_X(\cdot,\cdot) is the input-space correlation function with CX(x,x)=1C_X(x,x)=1, V=[CX(xi,xj)]i,j=1NV=[C_X(x_i,x_j)]_{i,j=1}^{N}, and Jt(η)=[CX(x1,η),…,CX(xN,η)]T∈RNJ_t(\eta)=[C_X(x_1,\eta),\ldots,C_X(x_N,\eta)]^{\mathsf{T}}\in\mathbb{R}^{N}. Define the input-space kriging weight vector κt(η)=V−1Jt(η)∈RN\kappa_t(\eta)=V^{-1}J_t(\eta)\in\mathbb{R}^{N}, Schur complement ct(η)=1−Jt(η)Tκt(η)∈[0,1]c_t(\eta)=1-J_t(\eta)^{\mathsf{T}}\kappa_t(\eta)\in[0,1] (with ct(η)>0c_t(\eta)>0 for η∈X∘\eta\in\mathcal{X}^{\circ}), and qt(η)=1−ct(η)q_t(\eta)=1-c_t(\eta). At the observed sites So\mathcal{S}_o, yt(η)∣Yt,Θt,Σ,η∼NSo(μ~t(η),ct(η)Σo)y_t(\eta)\mid Y_t,\Theta_t,\Sigma,\eta\sim\mathcal{N}_{S_o}(\widetilde{\mu}_t(\eta),c_t(\eta)\Sigma_o), where Σo=Σ(So)\Sigma_o=\Sigma(\mathcal{S}_o) is the So×SoS_o\times S_o submatrix of Σ\Sigma on So\mathcal{S}_o and

μ~t(η)=Θt(So)TF~t(η)T+(Yt(So)−FtΘt(So))Tκt(η),\widetilde{\mu}_t(\eta)=\Theta_t(\mathcal{S}_o)^{\mathsf{T}}\widetilde{F}_t(\eta)^{\mathsf{T}}+\left(Y_t(\mathcal{S}_o)-F_t\Theta_t(\mathcal{S}_o)\right)^{\mathsf{T}}\kappa_t(\eta),

with Θt(So)\Theta_t(\mathcal{S}_o) (p×Sop\times S_o) and Yt(So)Y_t(\mathcal{S}_o) (N×SoN\times S_o) selecting the columns indexed by So\mathcal{S}_o, and F~t(η)\widetilde{F}_t(\eta) (1×p1\times p) denoting the design row at η\eta (including the design-GP draw when used). We consider two cases for s0s_0:

Case 1: On-grid prediction

(s0∈S∖Sos_0\in\mathcal{S}\setminus\mathcal{S}_o; both Σ∼IW(n0,D0)\Sigma\sim\mathcal{IW}(n_0,D_0) and Σ=σ2R\Sigma=\sigma^2R).

Here the training column Yt(⋅,s0)∈RNY_t(\cdot,s_0)\in\mathbb{R}^{N} and state column θt(s0)∈Rp\theta_t(s_0)\in\mathbb{R}^{p} are available on the emulator grid. Applying Banerjee et al. [1] jointly on So+=So∪{s0}\mathcal{S}_o^{+}=\mathcal{S}_o\cup\{s_0\} specifies μ~t+(η)\widetilde{\mu}_t^{+}(\eta) and Σ~t+(η)\widetilde{\Sigma}_t^{+}(\eta) in (4) as

[yt+(η)yt(η,s0)]∣Yt,Θt,Σ,η∼NSo+1([μ~t(η)μ~t(η,s0)],ct(η)[Σoσo(s0)σo(s0)Tσ00(s0)]),\begin{bmatrix} y_t^{+}(\eta)\\ y_t(\eta,s_0) \end{bmatrix} \mid Y_t,\Theta_t,\Sigma,\eta \sim\mathcal{N}_{S_o+1}\left( \begin{bmatrix} \widetilde{\mu}_t(\eta)\\ \widetilde{\mu}_t(\eta,s_0) \end{bmatrix}, c_t(\eta) \begin{bmatrix} \Sigma_o & \sigma_o(s_0)\\ \sigma_o(s_0)^{\mathsf{T}} & \sigma_{00}(s_0) \end{bmatrix} \right),

where σo(s0)=Σ(So,s0)∈RSo\sigma_o(s_0)=\Sigma(\mathcal{S}_o,s_0)\in\mathbb{R}^{S_o}, σ00(s0)=Σ(s0,s0)\sigma_{00}(s_0)=\Sigma(s_0,s_0), and μ~t(η,s0)=f~t(η,s0)Tθt(s0)+κt(η)T(Yt(⋅,s0)−Ftθt(s0))\widetilde{\mu}_t(\eta,s_0)=\widetilde{f}_t(\eta,s_0)^{\mathsf{T}}\theta_t(s_0)+\kappa_t(\eta)^{\mathsf{T}}(Y_t(\cdot,s_0)-F_t\theta_t(s_0)). Conditioning further on yt(η)y_t(\eta), the scalar ct(η)c_t(\eta) cancels in the

Algorithm 1 Conditional Spatial Sampling of the Emulated Field yt(η,s0)y_t(\eta, s_0)

Input: Target site s0∉Sos_0 \notin\mathcal{S}_o, target epoch set T={t}\mathcal{T} = \{t\} (with tmax⁡=tt_{\max}=t) or full horizon T={1,…,T}\mathcal{T} = \{1,\ldots,T\} (with tmax⁡=Tt_{\max}=T), training data {Y1:T,F1:T}\{\mathbf{Y}_{1:T},\mathbf{F}_{1:T}\}, and posterior draws {η(l),y1:T(l)(η(l)),Θ0:T(l),Σ(l)}l=1L\left\{\boldsymbol{\eta}^{(l)},\mathbf{y}_{1:T}^{(l)}(\boldsymbol{\eta}^{(l)}),\mathbf{\Theta}_{0:T}^{(l)},\mathbf{\Sigma}^{(l)}\right\}_{l=1}^{L} with design rows F~1:T(η(l))\widetilde{\mathbf{F}}_{1:T}(\boldsymbol{\eta}^{(l)}).

Output: Conditional posterior predictive draws {yk(l)(η(l),s0):k∈T}l=1L\left\{y_k^{(l)}(\boldsymbol{\eta}^{(l)},s_0): k\in\mathcal{T}\right\}_{l=1}^{L}.

  1. if s0∉Ss_0 \notin\mathcal{S} then ▹\triangleright Precompute grid-level spatial kriging weights for off-grid GP emulator

  2. Compute λ(s0)←R−1r(s0)\boldsymbol{\lambda}(s_0) \leftarrow\mathbf{R}^{-1}\mathbf{r}(s_0), vS(s0)←1−r(s0)Tλ(s0)v_{\mathcal{S}}(s_0) \leftarrow1-\mathbf{r}(s_0)^{\mathsf{T}}\boldsymbol{\lambda}(s_0), and λo(s0)←Ro−1ro(s0)\boldsymbol{\lambda}_o(s_0) \leftarrow\mathbf{R}_o^{-1}\mathbf{r}_o(s_0).

  3. end if

  4. for l=1l=1 to LL do

  5. if s0∉Ss_0 \notin\mathcal{S} then ▹\triangleright Impute latent state trajectory at s0s_0 up to tmax⁡t_{\max}

  6. Draw θ0(l)(s0)∼Np(m0(s0)+(Θ0(l)−m0)λ(s0),σ2,(l)vS(s0)M0)\boldsymbol{\theta}_0^{(l)}(s_0) \sim\mathcal{N}_p\left(\mathbf{m}_0(s_0)+(\mathbf{\Theta}_0^{(l)}-\mathbf{m}_0)\boldsymbol{\lambda}(s_0),\sigma^{2,(l)}v_{\mathcal{S}}(s_0)\mathbf{M}_0\right).

  7. for k=1k=1 to tmax⁡t_{\max} do

  8. Draw θk(l)(s0)∼Np(Gθk−1(l)(s0)+(Θk(l)−GΘk−1(l))λ(s0),σ2,(l)vS(s0)W)\boldsymbol{\theta}_k^{(l)}(s_0) \sim\mathcal{N}_p\left(\mathbf{G}\boldsymbol{\theta}_{k-1}^{(l)}(s_0)+(\mathbf{\Theta}_k^{(l)}-\mathbf{G}\mathbf{\Theta}_{k-1}^{(l)})\boldsymbol{\lambda}(s_0),\sigma^{2,(l)}v_{\mathcal{S}}(s_0)\mathbf{W}\right).

  9. end for

  10. end if

  11. for k∈Tk\in\mathcal{T} do

  12. Compute κk(l)←Vk−1Jk(η(l))\boldsymbol{\kappa}_k^{(l)} \leftarrow\mathbf{V}_k^{-1}\mathbf{J}_k(\boldsymbol{\eta}^{(l)}), ck(l)←1−Jk(η(l))Tκk(l)c_k^{(l)} \leftarrow1-\mathbf{J}_k(\boldsymbol{\eta}^{(l)})^{\mathsf{T}}\boldsymbol{\kappa}_k^{(l)}, and qk(l)←1−ck(l)q_k^{(l)} \leftarrow1-c_k^{(l)}.

  13. Compute μ~k(l)←Θk(l)(So)TF~k(η(l))T+(Yk(So)−FkΘk(l)(So))Tκk(l)\widetilde{\boldsymbol{\mu}}_k^{(l)} \leftarrow\mathbf{\Theta}_k^{(l)}(\mathcal{S}_o)^{\mathsf{T}}\widetilde{\mathbf{F}}_k(\boldsymbol{\eta}^{(l)})^{\mathsf{T}}+\left(\mathbf{Y}_k(\mathcal{S}_o)-\mathbf{F}_k\mathbf{\Theta}_k^{(l)}(\mathcal{S}_o)\right)^{\mathsf{T}}\boldsymbol{\kappa}_k^{(l)}.

  14. if s0∈S∖Sos_0\in\mathcal{S}\setminus\mathcal{S}_o then ▹\triangleright Case 1: on-grid prediction via (7)

  15. Compute γy(l)(s0)←(Σo(l))−1σo(l)(s0)\boldsymbol{\gamma}_y^{(l)}(s_0)\leftarrow\left(\mathbf{\Sigma}_o^{(l)}\right)^{-1}\boldsymbol{\sigma}_o^{(l)}(s_0) and vy(l)(s0)←σo(l)(s0)−σo(l)(s0)Tγy(l)(s0)v_y^{(l)}(s_0)\leftarrow\sigma_{o}^{(l)}(s_0)-\boldsymbol{\sigma}_o^{(l)}(s_0)^{\mathsf{T}}\boldsymbol{\gamma}_y^{(l)}(s_0).

  16. μ~k(l)(s0)←f~k(η(l),s0)Tθk(l)(s0)+κk(l)T(Yk(⋅,s0)−Fkθk(l)(s0))\widetilde{\mu}_k^{(l)}(s_0)\leftarrow\widetilde{\mathbf{f}}_k(\boldsymbol{\eta}^{(l)},s_0)^{\mathsf{T}}\boldsymbol{\theta}_k^{(l)}(s_0)+\boldsymbol{\kappa}_k^{(l)\mathsf{T}}\left(\mathbf{Y}_k(\cdot,s_0)-\mathbf{F}_k\boldsymbol{\theta}_k^{(l)}(s_0)\right).

  17. μy,k(l)(s0)←μ~k(l)(s0)+γy(l)(s0)T(yk(l)(η(l))−μ~k(l))\mu_{y,k}^{(l)}(s_0)\leftarrow\widetilde{\mu}_k^{(l)}(s_0)+\gamma_y^{(l)}(s_0)^{\mathsf{T}}\left(y_k^{(l)}(\boldsymbol{\eta}^{(l)})-\widetilde{\mu}_k^{(l)}\right), σy,k2,(l)(s0)←ck(l)vy(l)(s0)\sigma_{y,k}^{2,(l)}(s_0)\leftarrow c_k^{(l)}v_y^{(l)}(s_0).

  18. else ▹\triangleright Case 2: off-grid prediction (s0∉Ss_0\notin\mathcal{S}, Σ(l)=σ2,(l)R\mathbf{\Sigma}^{(l)}=\sigma^{2,(l)}\mathbf{R}) via (8)

  19. μ~kkrig,(l)(s0)←f~k(η(l),s0)Tθk(l)(s0)+κk(l)T(Yk−FkΘk(l))λ(s0)\widetilde{\mu}_{k}^{\mathrm{krig},(l)}(s_0)\leftarrow\widetilde{\mathbf{f}}_k(\boldsymbol{\eta}^{(l)},s_0)^{\mathsf{T}}\boldsymbol{\theta}_k^{(l)}(s_0)+\boldsymbol{\kappa}_k^{(l)\mathsf{T}}\left(\mathbf{Y}_k-\mathbf{F}_k\mathbf{\Theta}_k^{(l)}\right)\boldsymbol{\lambda}(s_0).

  20. vk,0(l)(s0)←1−qk(l)r(s0)Tλ(s0)v_{k,0}^{(l)}(s_0)\leftarrow1-q_k^{(l)}\mathbf{r}(s_0)^{\mathsf{T}}\boldsymbol{\lambda}(s_0).

  21. μy,k(l)(s0)←μ~kkrig,(l)(s0)+λo(s0)T(yk(l)(η(l))−μ~k(l))\mu_{y,k}^{(l)}(s_0)\leftarrow\widetilde{\mu}_k^{\mathrm{krig},(l)}(s_0)+\boldsymbol{\lambda}_o(s_0)^{\mathsf{T}}\left(y_k^{(l)}(\boldsymbol{\eta}^{(l)})-\widetilde{\mu}_k^{(l)}\right).

  22. σy,k2,(l)(s0)←σ2,(l)(vk,0(l)(s0)−ck(l)ro(s0)Tλo(s0))\sigma_{y,k}^{2,(l)}(s_0)\leftarrow\sigma^{2,(l)}\left(v_{k,0}^{(l)}(s_0)-c_k^{(l)}\mathbf{r}_o(s_0)^{\mathsf{T}}\boldsymbol{\lambda}_o(s_0)\right).

  23. end if

  24. Draw yk(l)(η(l),s0)∼N(μy,k(l)(s0),σy,k2,(l)(s0))y_k^{(l)}(\boldsymbol{\eta}^{(l)},s_0)\sim\mathcal{N}\left(\mu_{y,k}^{(l)}(s_0),\sigma_{y,k}^{2,(l)}(s_0)\right).

  25. end for

  26. end for

kriging weights and yields

yt(η,s0)∣yt(η),Yt,Θt,Σ,η∼N(μy,t(s0),σy,t2(s0))(7)y_t(\boldsymbol{\eta},s_0)\mid y_t(\boldsymbol{\eta}),Y_t,\Theta_t,\Sigma,\boldsymbol{\eta}\sim\mathcal{N}\left(\mu_{y,t}(s_0),\sigma^2_{y,t}(s_0)\right) \tag*{(7)}

where the mean is μy,t(s0)=μ~t(η,s0)+σo(s0)TΣo−1(yt(η)−μ~t(η))\mu_{y,t}(s_0)=\widetilde{\mu}_t(\boldsymbol{\eta},s_0)+\boldsymbol{\sigma}_o(s_0)^\mathsf{T}\Sigma_o^{-1}\left(y_t(\boldsymbol{\eta})-\widetilde{\mu}_t(\boldsymbol{\eta})\right) and the variance is σy,t2(s0)=ct(η)(σ00(s0)−σo(s0)TΣo−1σo(s0))\sigma^2_{y,t}(s_0)=c_t(\boldsymbol{\eta})\left(\sigma_{00}(s_0)-\boldsymbol{\sigma}_o(s_0)^\mathsf{T}\Sigma_o^{-1}\boldsymbol{\sigma}_o(s_0)\right).

Case 2: Off-grid prediction (Off-grid prediction).

When s0∉Ss_0\notin S, spatial interpolation requires the structured spatial covariance Σ=σ2R\Sigma=\sigma^2R induced by a spatial correlation function ρ(s,s′)\rho(s,s') with ρ(s,s)=1\rho(s,s)=1 ([1 Section 2.3]). Let r(s0)=[ρ(s1,s0),…,ρ(sS,s0)]T\boldsymbol{r}(s_0)=[\rho(s_1,s_0),\ldots,\rho(s_S,s_0)]^\mathsf{T} and ro(s0)=[ρ(so,1,s0),…,ρ(so,So,s0)]T\boldsymbol{r}_o(s_0)=[\rho(s_{o,1},s_0),\ldots,\rho(s_{o,S_o},s_0)]^\mathsf{T}, and define the spatial kriging weight vector λ(s0)=R−1r(s0)∈RS\boldsymbol{\lambda}(s_0)=R^{-1}\boldsymbol{r}(s_0)\in\mathbb{R}^{S} and Schur complement vS(s0)=1−r(s0)Tλ(s0)v_S(s_0)=1-\boldsymbol{r}(s_0)^\mathsf{T}\boldsymbol{\lambda}(s_0). Because no simulator run exists at s0∉Ss_0\notin S, the latent state column θt(s0)\boldsymbol{\theta}_t(s_0) is first imputed by spatial kriging across the columns of Θ0:t\Theta_{0:t} in (1) sequentially for k=0,1,…,tk=0,1,\ldots,t:

θ0(s0)∣Θ0,σ2∼Np(m0(s0)+(Θ0−m0)λ(s0),σ2vS(s0)M0),\boldsymbol{\theta}_0(s_0)\mid\Theta_0,\sigma^2\sim\mathcal{N}_p\left(\boldsymbol{m}_0(s_0)+(\Theta_0-\boldsymbol{m}_0)\boldsymbol{\lambda}(s_0),\sigma^2v_S(s_0)M_0\right),
θk(s0)∣θk−1(s0),Θk−1:k,σ2∼Np(Gθk−1(s0)+(Θk−GΘk−1)λ(s0),σ2vS(s0)W).\boldsymbol{\theta}_k(s_0)\mid\boldsymbol{\theta}_{k-1}(s_0),\Theta_{k-1:k},\sigma^2\sim\mathcal{N}_p\left(G\boldsymbol{\theta}_{k-1}(s_0)+(\Theta_k-G\Theta_{k-1})\boldsymbol{\lambda}(s_0),\sigma^2v_S(s_0)W\right).

Next, under the separable residual process

Cov⁡(Et(x,s),Et(x′,s′)∣σ2)=σ2CX(x,x′)ρ(s,s′),\operatorname{Cov}\left(\mathcal{E}_t(x,s),\mathcal{E}_t(x',s')\mid\sigma^2\right)=\sigma^2C_X(x,x')\rho(s,s'),

conditioning yt+(η)\boldsymbol{y}_t^+(\boldsymbol{\eta}) first on YtY_t (using So⊆SS_o\subseteq S, so r(s0)\boldsymbol{r}(s_0) restricted to SoS_o equals ro(s0)\boldsymbol{r}_o(s_0)) specifies μ~t+(η)\widetilde{\boldsymbol{\mu}}_t^+(\boldsymbol{\eta}) and Σ~t+(η)\widetilde{\Sigma}_t^+(\boldsymbol{\eta}) in (4) as

yt+(η)=[yt(η)yt(η,s0)]∣Yt,Θt,θt(s0),σ2,η∼NSo+1([μ~t(η)μ~tkrig(η,s0)],σ2[ct(η)Roct(η)ro(s0)ct(η)ro(s0)Tvt,0(s0)]),\boldsymbol{y}_t^+(\boldsymbol{\eta})= \begin{bmatrix} y_t(\boldsymbol{\eta})\\ y_t(\boldsymbol{\eta},s_0) \end{bmatrix} \mid Y_t,\Theta_t,\boldsymbol{\theta}_t(s_0),\sigma^2,\boldsymbol{\eta} \sim\mathcal{N}_{S_o+1}\left( \begin{bmatrix} \widetilde{\boldsymbol{\mu}}_t(\boldsymbol{\eta})\\ \widetilde{\mu}_t^{\mathrm{krig}}(\boldsymbol{\eta},s_0) \end{bmatrix}, \sigma^2 \begin{bmatrix} c_t(\boldsymbol{\eta})R_o & c_t(\boldsymbol{\eta})\boldsymbol{r}_o(s_0)\\ c_t(\boldsymbol{\eta})\boldsymbol{r}_o(s_0)^\mathsf{T} & v_{t,0}(s_0) \end{bmatrix} \right),

where Ro=R(So)R_o=R(S_o), vt,0(s0)=1−qt(η)r(s0)Tλ(s0)v_{t,0}(s_0)=1-q_t(\boldsymbol{\eta})\boldsymbol{r}(s_0)^\mathsf{T}\boldsymbol{\lambda}(s_0), and μ~tkrig(η,s0)=f~t(η,s0)Tθt(s0)+κt(η)T(Yt−FtΘt)λ(s0)\widetilde{\mu}_t^{\mathrm{krig}}(\boldsymbol{\eta},s_0)=\widetilde{\boldsymbol{f}}_t(\boldsymbol{\eta},s_0)^\mathsf{T}\boldsymbol{\theta}_t(s_0)+\boldsymbol{\kappa}_t(\boldsymbol{\eta})^\mathsf{T}(Y_t-F_t\Theta_t)\boldsymbol{\lambda}(s_0). Conditioning further on yt(η)y_t(\boldsymbol{\eta}) gives

yt(η,s0)∣yt(η),Yt,Θt,θt(s0),σ2,η∼N(μy,t(s0),σy,t2(s0))(8)y_t(\boldsymbol{\eta},s_0)\mid y_t(\boldsymbol{\eta}),Y_t,\Theta_t,\boldsymbol{\theta}_t(s_0),\sigma^2,\boldsymbol{\eta}\sim\mathcal{N}\left(\mu_{y,t}(s_0),\sigma^2_{y,t}(s_0)\right) \tag*{(8)}

where the mean at s0s_0 is μy,t(s0)=μ~tkrig(η,s0)+ro(s0)TRo−1(yt(η)−μ~t(η))\mu_{y,t}(s_0)=\widetilde{\mu}_t^{\mathrm{krig}}(\boldsymbol{\eta},s_0)+\boldsymbol{r}_o(s_0)^\mathsf{T}R_o^{-1}\left(y_t(\boldsymbol{\eta})-\widetilde{\boldsymbol{\mu}}_t(\boldsymbol{\eta})\right) and the variance is σy,t2(s0)=σ2(vt,0(s0)−ct(η)ro(s0)TRo−1ro(s0))\sigma^2_{y,t}(s_0)=\sigma^2\left(v_{t,0}(s_0)-c_t(\boldsymbol{\eta})\boldsymbol{r}_o(s_0)^\mathsf{T}R_o^{-1}\boldsymbol{r}_o(s_0)\right). Algorithm 1 describes the conditional spatial sampling of the emulated field yt(η,s0)y_t(\boldsymbol{\eta},s_0).

Conditional distribution of ut(s0)u_t(s_0).

From (2) and the Normal–Gamma factors in (4), the augmented spatial discrepancy evolves as a Gaussian-process random walk u0+∼NSo+1(m0z,+,τ02M0z,+)\boldsymbol{u}_0^+\sim\mathcal{N}_{S_o+1}\left(\boldsymbol{m}_0^{z,+},\tau_0^2M_0^{z,+}\right) with independent increments εku,+=uk+−uk−1+∣τk2∼ind.NSo+1(0,τk2U+)\boldsymbol{\varepsilon}_k^{u,+}=\boldsymbol{u}_k^+-\boldsymbol{u}_{k-1}^+\mid\tau_k^2\mathrel{\overset{\mathrm{ind.}}{\sim}}\mathcal{N}_{S_o+1}(0,\tau_k^2U^+) for k=1,…,Tk=1,\ldots,T. Conditioning on u0:T\boldsymbol{u}_{0:T} and τ2\tau^2, partitioning u0+\boldsymbol{u}_0^+ gives u0(s0)∣u0:T,τ2∼N(μu,0(s0),σu,02(s0))u_0(s_0)\mid\boldsymbol{u}_{0:T},\tau^2\sim\mathcal{N}\left(\mu_{u,0}(s_0),\sigma^2_{u,0}(s_0)\right) with mean μu,0(s0)=m0z(s0)+m0,oz(s0)⊤(Mz)−1(u0−m0z)\mu_{u,0}(s_0) = m_0^z(s_0) + m_{0,o}^z(s_0)^\top(M^z)^{-1}(u_0 - m^z_0) and variance σu,02(s0)=τ02(m0z(s0)−m0,oz(s0)⊤(Mz)−1m0,oz(s0))\sigma^2_{u,0}(s_0) = \tau_0^2\left(m_0^z(s_0) - m_{0,o}^z(s_0)^\top(M^z)^{-1}m_{0,o}^z(s_0)\right) (where μu,0(s0)=σu,02(s0)=0\mu_{u,0}(s_0) = \sigma^2_{u,0}(s_0) = 0 if u0(⋅)≡0u_0(\cdot) \equiv0 is fixed), while partitioning ϵku,+=((ϵku)⊤,ϵku(s0))⊤\epsilon_k^{u,+} = \left((\epsilon_k^u)^\top,\epsilon_k^u(s_0)\right)^\top implies

ϵku(s0)∣u0:T,τ2∼ind.N(γu(s0)⊤(uk−uk−1),τk2vu(s0))\epsilon_k^u(s_0) \mid u_{0:T},\tau^2 \mathrel{\overset{\mathrm{ind.}}{\sim}} \mathcal{N}\left(\gamma_u(s_0)^\top(u_k-u_{k-1}),\tau_k^2v_u(s_0)\right)

where γu(s0)=U−1c0(s0)∈RSo\gamma_u(s_0) = U^{-1}c_0(s_0) \in\mathbb{R}^{S_o} and vu(s0)=1−c0(s0)⊤γu(s0)v_u(s_0) = 1 - c_0(s_0)^\top\gamma_u(s_0). Writing ut(s0)=u0(s0)+∑k=1tϵku(s0)u_t(s_0) = u_0(s_0) + \sum_{k=1}^t \epsilon_k^u(s_0) and summing the conditionally independent normal terms, the kriging increments telescope across k=1,…,tk = 1,\ldots,t while the innovation variances accumulate:

ut(s0)∣u0:T,τ2∼N(μu,t(s0),σu,t2(s0)),(9)u_t(s_0) \mid u_{0:T},\tau^2 \sim\mathcal{N}\left(\mu_{u,t}(s_0),\sigma^2_{u,t}(s_0)\right), \tag*{(9)}

where the mean is μu,t(s0)=μu,0(s0)+γu(s0)⊤(ut−u0)\mu_{u,t}(s_0) = \mu_{u,0}(s_0) + \gamma_u(s_0)^\top(u_t-u_0) and variance σu,t2(s0)=σu,02(s0)+vu(s0)∑k=1tτk2\sigma^2_{u,t}(s_0) = \sigma^2_{u,0}(s_0) + v_u(s_0)\sum_{k=1}^t\tau_k^2. (If joint trajectories u0:T(s0)u_{0:T}(s_0) across all t=0,…,Tt = 0,\ldots,T are required rather than a single epoch tt, one draws u0(s0)u_0(s_0) first and accumulates uk(s0)=uk−1(s0)+ϵku(s0)u_k(s_0) = u_{k-1}(s_0) + \epsilon_k^u(s_0) sequentially for k=1,…,Tk = 1,\ldots,T.) Algorithm 2 describes conditional spatial sampling of the discrepancy process ut(s0)u_t(s_0).

Conditional distribution of zt(s0)z_t(s_0) and composition sampler.

From the final observation factor in (4), zt(s0)z_t(s_0) is conditionally independent of D\mathcal{D} and all remaining components of Ω\Omega given (η,yt(η,s0),ut(s0),τt2)(\eta,y_t(\eta,s_0),u_t(s_0),\tau_t^2), so

zt(s0)∣η,yt(η,s0),ut(s0),τt2∼N(yt(η,s0)+ut(s0),τt2).(10)z_t(s_0) \mid\eta,y_t(\eta,s_0),u_t(s_0),\tau_t^2 \sim\mathcal{N}\left(y_t(\eta,s_0)+u_t(s_0),\tau_t^2\right). \tag*{(10)}

Evaluating (5)–(10) across each posterior draw Ω(l)\Omega^{(l)} (l=1,…,Ll = 1,\ldots,L pooled over the MM emulator draws) yields draws from [zt(s0),yt(η,s0),ut(s0)∣D][z_t(s_0),y_t(\eta,s_0),u_t(s_0)\mid\mathcal{D}] via three univariate normal draws, separated into Algorithms 1–3:

  1. Draw yt(l)(η(l),s0)∼N(μy,t(l)(s0),σy,t2,(l)(s0))y_t^{(l)}(\eta^{(l)},s_0) \sim\mathcal{N}\left(\mu_{y,t}^{(l)}(s_0),\sigma_{y,t}^{2,(l)}(s_0)\right) from (7) or (8) (Algorithm 1).

  1. Independently draw ut(l)(s0)∼N(μu,t(l)(s0),σu,t2,(l)(s0))u_t^{(l)}(s_0) \sim\mathcal{N}\left(\mu_{u,t}^{(l)}(s_0),\sigma_{u,t}^{2,(l)}(s_0)\right) from (9) (Algorithm 2).

  1. Matching index ll across Algorithms 1 and 2, draw

zt(l)(s0)∼N(yt(l)(η(l),s0)+ut(l)(s0),τt2,(l))z_t^{(l)}(s_0) \sim\mathcal{N}\left(y_t^{(l)}(\eta^{(l)},s_0)+u_t^{(l)}(s_0),\tau_t^{2,(l)}\right)

from (10) (Algorithm 3).

Prediction accuracy for field measurements.

Figure 3 evaluates these predictions as implemented in the development version of spDBL on GitHub (calibration_predict() with sites or coords), in the 30 replicates of E3 with 100 training runs (10 emulator draws, 2 chains of 1,000 iterations). On the grid, 6 of the 36 sites of each replicate were left out of the calibration and predicted at all 26 times;

Predicted against true values of the field at held-out grid sites and off-grid points

Figure 3. Predicted against true values of the field yt(η,s0)+ut(s0)y_t(\eta,s_0)+u_t(s_0) at locations without field data, in the 30 replicates of E3 at all 26 times (posterior predictive medians; orange: true value outside the 95% predictive interval). Left: held-out grid sites; right: points between cell centres, with the bilinear field map.

Algorithm 2 Conditional Spatial Sampling of the Discrepancy Process ut(s0)u_t(s_0)

Input: Target site s0∉Sos_0 \notin\mathcal{S}_o, target epoch set T={t}\mathcal{T} = \{t\} or full horizon T={1,…,T}\mathcal{T} = \{1,\ldots,T\}, spatial correlation matrix U\mathbf{U} and cross-correlation vector c0(s0)\mathbf{c}_0(s_0), and posterior draws {u0:T(l),τ2,(l)}l=1L\left\{u_{0:T}^{(l)}, \tau^{2,(l)}\right\}_{l=1}^{L}.

Output: Conditional posterior predictive draws {uk(l)(s0):k∈T}l=1L\left\{u_k^{(l)}(s_0): k \in\mathcal{T}\right\}_{l=1}^{L}.

  1. Precompute γu(s0)←U−1c0(s0)\boldsymbol{\gamma}_u(s_0) \leftarrow\mathbf{U}^{-1}\mathbf{c}_0(s_0) and vu(s0)←1−c0(s0)Tγu(s0)v_u(s_0) \leftarrow1-\mathbf{c}_0(s_0)^{\mathsf{T}}\boldsymbol{\gamma}_u(s_0).

  2. if u0(⋅)u_0(\cdot) is random then

  3. &nbsp;&nbsp;&nbsp;&nbsp;Precompute γu,0(s0)←(M0z)−1m0,oz(s0)\boldsymbol{\gamma}_{u,0}(s_0) \leftarrow\left(\mathbf{M}_0^z\right)^{-1}\mathbf{m}_{0,o}^z(s_0) and vu,0(s0)←m00z(s0)−m0,oz(s0)Tγu,0(s0)v_{u,0}(s_0) \leftarrow m_{00}^z(s_0)-\mathbf{m}_{0,o}^z(s_0)^{\mathsf{T}}\boldsymbol{\gamma}_{u,0}(s_0).

  4. end if

  5. for l=1l=1 to LL do

  6. &nbsp;&nbsp;&nbsp;&nbsp;if u0(⋅)≡0u_0(\cdot)\equiv0 is fixed then

  7. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set μu,0(l)(s0)←0\mu_{u,0}^{(l)}(s_0)\leftarrow0 and σu,02,(l)(s0)←0\sigma_{u,0}^{2,(l)}(s_0)\leftarrow0.

  8. &nbsp;&nbsp;&nbsp;&nbsp;else

  9. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;μu,0(l)(s0)←m0z(s0)+γu,0(s0)T(u0(l)−m0z)\mu_{u,0}^{(l)}(s_0)\leftarrow m_0^z(s_0)+\boldsymbol{\gamma}_{u,0}(s_0)^{\mathsf{T}}\left(u_0^{(l)}-m_0^z\right), σu,02,(l)(s0)←τ02,(l)vu,0(s0)\quad\sigma_{u,0}^{2,(l)}(s_0)\leftarrow\tau_0^{2,(l)}v_{u,0}(s_0).

  10. &nbsp;&nbsp;&nbsp;&nbsp;end if

  11. &nbsp;&nbsp;&nbsp;&nbsp;if T={t}\mathcal{T}=\{t\} then ▹\triangleright Single-epoch marginal draw via (9)

  12. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;μu,t(l)(s0)←μu,0(l)(s0)+γu(s0)T(ut(l)−u0(l))\mu_{u,t}^{(l)}(s_0)\leftarrow\mu_{u,0}^{(l)}(s_0)+\boldsymbol{\gamma}_u(s_0)^{\mathsf{T}}\left(u_t^{(l)}-u_0^{(l)}\right), σu,t2,(l)(s0)←σu,02,(l)(s0)+vu(s0)∑k=1tτk2,(l)\quad\sigma_{u,t}^{2,(l)}(s_0)\leftarrow\sigma_{u,0}^{2,(l)}(s_0)+v_u(s_0)\sum_{k=1}^{t}\tau_k^{2,(l)}.

  13. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw ut(l)(s0)∼N(μu,t(l)(s0),σu,t2,(l)(s0))u_t^{(l)}(s_0)\sim\mathcal{N}\left(\mu_{u,t}^{(l)}(s_0),\sigma_{u,t}^{2,(l)}(s_0)\right).

  14. &nbsp;&nbsp;&nbsp;&nbsp;else ▹\triangleright Full-horizon trajectory across T={1,…,T}\mathcal{T}=\{1,\ldots,T\}

  15. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw u0(l)(s0)∼N(μu,0(l)(s0),σu,02,(l)(s0))u_0^{(l)}(s_0)\sim\mathcal{N}\left(\mu_{u,0}^{(l)}(s_0),\sigma_{u,0}^{2,(l)}(s_0)\right).

  16. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for k=1k=1 to TT do

  17. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw εku,(l)(s0)∼N(γu(s0)T(uk(l)−uk−1(l)),τk2,(l)vu(s0))\varepsilon_k^{u,(l)}(s_0)\sim\mathcal{N}\left(\boldsymbol{\gamma}_u(s_0)^{\mathsf{T}}\left(u_k^{(l)}-u_{k-1}^{(l)}\right),\tau_k^{2,(l)}v_u(s_0)\right) and set uk(l)(s0)←uk−1(l)(s0)+εku,(l)(s0)u_k^{(l)}(s_0)\leftarrow u_{k-1}^{(l)}(s_0)+\varepsilon_k^{u,(l)}(s_0).

  18. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end for

  19. &nbsp;&nbsp;&nbsp;&nbsp;end if

  20. end for

the emulated field is drawn as in (7), with the field covariance of the calibration, which adds the uncertainty of the predicted design row F(η)\mathbf{F}(\boldsymbol{\eta}) (§ 2). Off the grid, the truth was simulated on an 18×1818\times18 grid of the same domain, field data were observed at the 36 coarse cell centres, and 24 points per replicate between them were predicted. Because the emulator’s coefficients are shared by the sites of a block, spDBL does not impute θ0:t(s0)\theta_{0:t}(s_0) as in Case 2: it takes the emulated field at s0s_0 from the bilinear interpolation of the four surrounding cell centres and predicts the discrepancy at s0s_0 itself as in (9), from the covariance function behind U\mathbf{U}. The predictive medians had RMSE 0.87 on the grid and 0.86 off the grid, and the 95% intervals covered 94% and 90% of the true values yt(η,s0)+ut(s0)y_t(\boldsymbol{\eta},s_0)+u_t(s_0), against 26% and 20% for the calibrated emulator without the discrepancy. Off the grid, coverage was 94% at interior points and 76% within half a coarse cell of the domain’s edge, where the fine solution’s absorbing boundary lowers the field below what the coarse simulator

Algorithm 3 Posterior Predictive Composition Sampler for Field Observations zt(s0)z_t(s_0)

Input: Paired conditional draws {η(l),yk(l)(η(l),s0):k∈T}l=1L\left\{\eta^{(l)}, y_k^{(l)}(\eta^{(l)},s_0): k \in\mathcal{T}\right\}_{l=1}^{L} from Algorithm 1, {uk(l)(s0):k∈T}l=1L\left\{u_k^{(l)}(s_0): k \in\mathcal{T}\right\}_{l=1}^{L} from Algorithm 2, and posterior variance draws {τk2,(l):k∈T}l=1L\left\{\tau_k^{2,(l)}: k \in\mathcal{T}\right\}_{l=1}^{L}

Output: Posterior predictive draws {zk(l)(s0):k∈T}l=1L\left\{z_k^{(l)}(s_0): k \in\mathcal{T}\right\}_{l=1}^{L} from p(zk(s0)∣D)p\left(z_k(s_0) \mid\mathcal{D}\right).

  1. for l=1l = 1 to LL do

  2. &nbsp;&nbsp;&nbsp;&nbsp;for k∈Tk \in\mathcal{T} do

  3. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw zk(l)(s0)∼N(yk(l)(η(l),s0)+uk(l)(s0),τk2,(l))z_k^{(l)}(s_0) \sim\mathcal{N}\left(y_k^{(l)}(\eta^{(l)},s_0)+u_k^{(l)}(s_0),\tau_k^{2,(l)}\right) via (10).

  4. &nbsp;&nbsp;&nbsp;&nbsp;end for

  5. end for

produces. Scripts and results are in the repository’s benchmarks folder (results/e3/sites and results/e3/offgrid).

Analytical WAIC for Matrix-Normal Inverse-Wishart Models

The widely applicable information criterion (WAIC; Watanabe, [37]) estimates predictive accuracy from the log pointwise predictive density (lppd) and an effective number of parameters, here the posterior variance of the pointwise log likelihood (Gelman et al., [11]). For the conjugate matrix-normal inverse-Wishart (MNIW) regression both terms have closed forms, which compute_analytical_waic() evaluates without posterior simulation; compute_sample_waic() gives the Monte Carlo estimate from posterior draws. The derivation follows S. Banerjee’s development notes, from which both functions were adapted.

Model and posterior.

Let YY be an n×qn \times q response matrix with rows yiy_i and XX an n×pn \times p design matrix with rows xix_i, and let the rows be independent observations,

yi∣B,Σ∼ind.Nq(xiB,Σ),B∣Σ∼MNp×q(m0,M0,Σ),Σ∼IW(ν0,Ψ0),(11)y_i \mid B, \Sigma\mathrel{\overset{\mathrm{ind.}}{\sim}} \mathcal{N}_q(x_iB,\Sigma), \qquad B \mid\Sigma\sim\mathcal{MN}_{p \times q}(m_0,M_0,\Sigma), \qquad\Sigma\sim\mathcal{IW}(\nu_0,\Psi_0), \tag*{(11)}

where the IW(ν,Ψ)\mathcal{IW}(\nu,\Psi) density is proportional to ∣Σ∣−(ν+q+1)/2exp⁡{−tr⁡(ΨΣ−1)/2}|\Sigma|^{-(\nu+q+1)/2} \exp\{-\operatorname{tr}(\Psi\Sigma^{-1})/2\}. With D=(Y,X)\mathcal{D}=(Y,X), the posterior is B∣Σ,D∼MNp×q(mn,Mn,Σ)B \mid\Sigma,\mathcal{D} \sim\mathcal{MN}_{p \times q}(m_n,M_n,\Sigma) and Σ∣D∼IW(νn,Ψn)\Sigma\mid\mathcal{D} \sim\mathcal{IW}(\nu_n,\Psi_n), where

Mn−1=M0−1+XTX,mn=Mn(M0−1m0+XTY),νn=ν0+n,Ψn=Ψ0+YTY+m0TM0−1m0−mnTMn−1mn.\begin{aligned} M_n^{-1} &= M_0^{-1} + X^{\mathsf{T}}X, \qquad&m_n &= M_n(M_0^{-1}m_0 + X^{\mathsf{T}}Y),\\ \nu_n &= \nu_0+n, \qquad&\Psi_n &= \Psi_0 + Y^{\mathsf{T}}Y + m_0^{\mathsf{T}}M_0^{-1}m_0 - m_n^{\mathsf{T}}M_n^{-1}m_n. \end{aligned}

MNIW_R() returns them (Vbnew, Cnew, vnew, Snew) when its argument HH, the n×nn \times n row covariance of the errors, is InI_n, as for the independent rows here.

Posterior predictive density.

For m~\tilde{m} new rows Y~\widetilde{Y} with design X~\widetilde{X} and row covariance Ω\Omega, p(Y~∣B,Σ)=MNm~×q(Y~∣X~B,Ω,Σ)p(\widetilde{Y} \mid B,\Sigma)=\mathcal{MN}_{\tilde{m} \times q}(\widetilde{Y} \mid\widetilde{X}B,\Omega,\Sigma), and Bayes’ identity gives, for any (B,Σ)(B,\Sigma),

p(Y~∣D)=p(Y~∣B,Σ) p(B,Σ∣D)p(B,Σ∣D,Y~).p(\widetilde{Y} \mid\mathcal{D}) = \frac{p(\widetilde{Y} \mid B,\Sigma)\,p(B,\Sigma\mid\mathcal{D})}{p(B,\Sigma\mid\mathcal{D},\widetilde{Y})}.

Updating the posterior with Y~\widetilde{Y} keeps it MNIW, with (Mn∗)−1=Mn−1+X~TΩ−1X~(M_n^*)^{-1}=M_n^{-1}+\widetilde{X}^{\mathsf{T}}\Omega^{-1}\widetilde{X}, νn∗=νn+m~\nu_n^*=\nu_n+\tilde{m} and, by completing the square in BB and the Woodbury identity,

Ψn∗=Ψn+E~T(Ω+X~MnX~T)−1E~,E~=Y~−X~mn.\Psi_n^*=\Psi_n+\widetilde{E}^{\mathsf{T}}(\Omega+\widetilde{X}M_n\widetilde{X}^{\mathsf{T}})^{-1}\widetilde{E}, \qquad\widetilde{E}=\widetilde{Y}-\widetilde{X}m_n.

Evaluating the identity at the updated mean of BB, the exponential kernels and the powers of ∣Σ∣|\Sigma| cancel, and Sylvester’s determinant identity, ∣Ip+MnX~TΩ−1X~∣=∣Ω∣−1∣Ω+X~MnX~T∣|I_p+M_n\widetilde{X}^{\mathsf{T}}\Omega^{-1}\widetilde{X}|=|\Omega|^{-1}|\Omega+\widetilde{X}M_n\widetilde{X}^{\mathsf{T}}|, collects the determinants into the matrix-tt density

p(Y~∣D)=Γq{(νn+m~)/2}Γq(νn/2) πm~q/2∣Ω+X~MnX~T∣−q/2∣Ψn∣−m~/2×∣Iq+Ψn−1E~T(Ω+X~MnX~T)−1E~∣−(νn+m~)/2.(12)\begin{aligned} p(\widetilde{Y} \mid\mathcal{D})={}& \frac{\Gamma_q\{(\nu_n+\tilde{m})/2\}}{\Gamma_q(\nu_n/2)\,\pi^{\tilde{m}q/2}} |\Omega+\widetilde{X}M_n\widetilde{X}^{\mathsf{T}}|^{-q/2} |\Psi_n|^{-\tilde{m}/2}\\ &\times\left|I_q+\Psi_n^{-1}\widetilde{E}^{\mathsf{T}}(\Omega+\widetilde{X}M_n\widetilde{X}^{\mathsf{T}})^{-1}\widetilde{E}\right|^{-(\nu_n+\tilde{m})/2}. \tag*{(12)} \end{aligned}

where Γq\Gamma_q is the multivariate gamma function.

Log pointwise predictive density.

For one row (m~=1\widetilde{m}=1, X~=xi\widetilde{X}=x_i, Ω=1\Omega=1), write hi=xiMnxiTh_i=x_iM_nx_i^{\mathsf{T}}, ci=1+hic_i=1+h_i, ei=yi−ximne_i=y_i-x_im_n and di=eiΨn−1eiTd_i=e_i\Psi_n^{-1}e_i^{\mathsf{T}}. Since Γq{(νn+1)/2}/Γq(νn/2)=Γ{(νn+1)/2}/Γ{(νn−q+1)/2}\Gamma_q\{(\nu_n+1)/2\}/\Gamma_q(\nu_n/2)=\Gamma\{(\nu_n+1)/2\}/\Gamma\{(\nu_n-q+1)/2\}, (12) is then a qq-variate Student tt density with νn−q+1\nu_n-q+1 degrees of freedom, location ximnx_im_n and scale ciΨn/(νn−q+1)c_i\Psi_n/(\nu_n-q+1), and

lppd⁡=∑i=1n[log⁡Γ(νn+12)−log⁡Γ(νn−q+12)−q2log⁡π−q2log⁡ci−12log⁡∣Ψn∣−νn+12log⁡(1+dici)].(13)\operatorname{lppd}=\sum_{i=1}^{n}\left[\log\Gamma\left(\frac{\nu_n+1}{2}\right)-\log\Gamma\left(\frac{\nu_n-q+1}{2}\right)-\frac{q}{2}\log\pi-\frac{q}{2}\log c_i-\frac{1}{2}\log|\Psi_n|-\frac{\nu_n+1}{2}\log\left(1+\frac{d_i}{c_i}\right)\right]. \tag*{(13)}

WAIC penalty.

The penalty is

pWAIC=∑i=1nVar⁡B,Σ∣D{log⁡p(yi∣B,Σ)},p_{\mathrm{WAIC}}=\sum_{i=1}^{n}\operatorname{Var}_{B,\Sigma\mid D}\{\log p(y_i\mid B,\Sigma)\},

with log⁡p(yi∣B,Σ)=−q2log⁡(2π)−12A−12Bi\log p(y_i\mid B,\Sigma)=-\frac{q}{2}\log(2\pi)-\frac{1}{2}A-\frac{1}{2}B_i, A=log⁡∣Σ∣A=\log|\Sigma| and Bi=(yi−xiB)Σ−1(yi−xiB)TB_i=(y_i-x_iB)\Sigma^{-1}(y_i-x_iB)^{\mathsf{T}}, so that each term is {Var⁡(A)+Var⁡(Bi)+2Cov⁡(A,Bi)}/4\{\operatorname{Var}(A)+\operatorname{Var}(B_i)+2\operatorname{Cov}(A,B_i)\}/4. Given Σ\Sigma, yi−xiB∼Nq(ei,hiΣ)y_i-x_iB\sim\mathcal{N}_q(e_i,h_i\Sigma), so Bi/hiB_i/h_i is non-central χq2\chi_q^2 with non-centrality wi/hiw_i/h_i, where wi=eiΣ−1eiTw_i=e_i\Sigma^{-1}e_i^{\mathsf{T}}, and E(Bi∣Σ)=qhi+wi\mathbb{E}(B_i\mid\Sigma)=qh_i+w_i, Var⁡(Bi∣Σ)=2qhi2+4hiwi\operatorname{Var}(B_i\mid\Sigma)=2qh_i^2+4h_iw_i. Under Σ−1∣D∼Wq(νn,Ψn−1)\Sigma^{-1}\mid D\sim W_q(\nu_n,\Psi_n^{-1}), wi/di∼χνn2w_i/d_i\sim\chi_{\nu_n}^2, Var⁡(A)=∑j=1qψ1{(νn−j+1)/2}\operatorname{Var}(A)=\sum_{j=1}^{q}\psi_1\{(\nu_n-j+1)/2\} with ψ1\psi_1 the trigamma function, and Cov⁡(log⁡∣Σ−1∣,wi)=2di\operatorname{Cov}(\log|\Sigma^{-1}|,w_i)=2d_i. Because AA depends on Σ\Sigma alone, Cov⁡(A,Bi)=Cov⁡{A,E(Bi∣Σ)}=−2di\operatorname{Cov}(A,B_i)=\operatorname{Cov}\{A,\mathbb{E}(B_i\mid\Sigma)\}=-2d_i, and the law of total variance gives Var⁡(Bi)=2qhi2+4hiνndi+2νndi2\operatorname{Var}(B_i)=2qh_i^2+4h_i\nu_nd_i+2\nu_nd_i^2. Hence

pWAIC=14∑i=1n[∑j=1qψ1(νn−j+12)+2qhi2+4hiνndi+2νndi2−4di].(14)p_{\mathrm{WAIC}}=\frac{1}{4}\sum_{i=1}^{n}\left[\sum_{j=1}^{q}\psi_1\left(\frac{\nu_n-j+1}{2}\right)+2qh_i^2+4h_i\nu_nd_i+2\nu_nd_i^2-4d_i\right]. \tag*{(14)}

and WAIC=−2(lppd−pWAIC)\mathrm{WAIC}=-2(\mathrm{lppd}-p_{\mathrm{WAIC}}), lower WAIC indicating higher estimated predictive accuracy.

Implementation.

compute_analytical_waic(Y, X, Mn, mn, Psi_n, nu_n) evaluates (13) and (14) from Cholesky factors of MnM_n and Ψn\Psi_n: hih_i is the squared norm of xix_i times a factor of MnM_n, which keeps it non-negative, did_i the squared norm of the whitened residual, and log⁡(1+⋅)\log(1+\cdot) is computed with log1p(). It returns the pointwise and total lppd, pWAICp_{\mathrm{WAIC}}, expected log predictive density and WAIC; q=1q=1 is the normal–inverse-gamma case. compute_sample_waic() computes the same quantities from paired posterior draws of (B,Σ)(B,\Sigma), with a log-sum-exp lppd and sample variances (denominator S−1S-1, as in loo::waic()), and can return the S×nS\times n log-likelihood matrix for the loo package. The tests check the analytical scores against Monte Carlo estimates from independent MNIW draws and the sampled scores against loo’s aggregation, and vignette("model-comparison") compares covariate subsets. Each row of YY is one observation, so the formulas score models with independent rows; the emulator in (1), whose rows are correlated through VV, needs its own factorisation of the likelihood.

References

  1. [1]Sudipto Banerjee, Xiang Chen, Ian Frankenberg, and Daniel Zhou. Dynamic Bayesian learning for spatiotemporal mechanistic models. Journal of Machine Learning Research, 26(146):1–43, 2025. URL https://jmlr.org/papers/v26/22–0896.html.
  2. [2]Douglas Bates and Dirk Eddelbuettel. Fast and elegant numerical linear algebra using the RcppEigen package. Journal of Statistical Software, 52(5):1–24, 2013. doi: 10.18637/jss.v052.i05.DOI
  3. [3]Bob Carpenter, Andrew Gelman, Matthew D. Hoffman, Daniel Lee, Ben Goodrich, Michael Betancourt, Marcus Brubaker, Jiqiang Guo, Peter Li, and Allen Riddell. Stan: A probabilistic programming language. Journal of Statistical Software, 76(1):1–32, 2017. doi: 10.18637/jss.v076.i01.DOI
  4. [4]Christopher K. Carter and Robert Kohn. On Gibbs sampling for state space models. Biometrika, 81(3):541–553, 1994. doi: 10.1093/biomet/81.3.541.DOI
  5. [5]Stefano Conti and Anthony O’Hagan. Bayesian emulation of complex multi-output and dynamic computer models. Journal of Statistical Planning and Inference, 140(3):640–651, 2010. doi: 10.1016/j.jspi.2009.08.006.DOI
  6. [6]Garrett M. Dancik and Karin S. Dorman. mlegp: Statistical analysis for computer models of biological systems using R. Bioinformatics, 24(17):1966–1967, 2008. doi: 10.1093/bioinformatics/btn329.DOI
  7. [7]Andrew O. Finley, Sudipto Banerjee, and Alan E. Gelfand. spBayes for large univariate and multivariate point-referenced spatio-temporal data models. Journal of Statistical Software, 63(13):1–28, 2015. doi: 10.18637/jss.v063.i13.DOI
  8. [8]Devin Francom and Bruno Sansó. BASS: An R package for fitting and performing sensitivity analysis of Bayesian adaptive spline surfaces. Journal of Statistical Software, 94(8):1–36, 2020. doi: 10.18637/jss.v094.i08.DOI
  9. [9]Sylvia Frühwirth-Schnatter. Data augmentation and dynamic linear models. Journal of Time Series Analysis, 15(2):183–202, 1994. doi: 10.1111/j.1467–9892.1994.tb00184.x.
  10. [10]James Gattiker, Natalie Klein, Grant Hutchings, and Earl Lawrence. SEPIA: Simulation-Enabled Prediction, Inference, and Analysis, 2020. Version 1.1, https://doi.org/10.5281/zenodo.4048801.
  11. [11]Andrew Gelman, Jessica Hwang, and Aki Vehtari. Understanding predictive information criteria for Bayesian models. Statistics and Computing, 24(6):997–1016, 2014. doi: 10.1007/s11222-013-9416-2.DOI
  12. [12]Tilmann Gneiting and Adrian E. Raftery. Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477):359–378, 2007. doi: 10.1198/016214506000001437.DOI
  13. [13]Robert B. Gramacy. laGP: Large-scale spatial modeling via local approximate Gaussian processes in R. Journal of Statistical Software, 72(1):1–46, 2016. doi: 10.18637/jss.v072.i01.DOI
  14. [14]Mengyang Gu. RobustCalibration: Robust calibration of computer models in R. The R Journal, 15(4):84–105, 2023. doi: 10.32614/RJ-2023-085.DOI
  15. [15]Mengyang Gu and James O. Berger. Parallel partial Gaussian process emulation for computer models with massive output. The Annals of Applied Statistics, 10(3):1317–1347, 2016. doi: 10.1214/16-AOAS934.DOI
  16. [16]Mengyang Gu and Long Wang. Scaled Gaussian stochastic process for computer model calibration and prediction. SIAM/ASA Journal on Uncertainty Quantification, 6(4):1555–1583, 2018. doi: 10.1137/17M1159890.DOI
  17. [17]Mengyang Gu, Jesús Palomo, and James O. Berger. RobustGaSP: Robust Gaussian stochastic process emulation in R. The R Journal, 11(1):112–136, 2019. doi: 10.32614/RJ-2019-011.DOI
  18. [18]Mengyang Gu, Xinyi Fang, and Yizi Lin. FastGaSP: Fast and Exact Computation of Gaussian Stochastic Process, 2026. R package version 0.6.3, https://doi.org/10.32614/CRAN.package.FastGaSP.
  19. [19]Robin K. S. Hankin. Introducing BACCO, an R bundle for Bayesian analysis of computer code output. Journal of Statistical Software, 14(16):1–21, 2005. doi: 10.18637/jss.v014.i16.
  20. [20]Jouni Helske. KFAS: Exponential family state space models in R. Journal of Statistical Software, 78(10):1–39, 2017. doi: 10.18637/jss.v078.i10.DOI
  21. [21]Junoh Heo. dynemu: Emulation of Dynamic Simulators via One-Step-Ahead Approach, 2025. R package version 1.0.2, https://doi.org/10.32614/CRAN.package.dynemu.
  22. [22]Dave Higdon, James Gattiker, Brian Williams, and Maria Rightley. Computer model calibration using high-dimensional output. Journal of the American Statistical Association, 103(482):570–583, 2008. doi: 10.1198/016214507000000888.DOI
  23. [23]Matthew D. Hoffman and Andrew Gelman. The No-U-Turn sampler: Adaptively setting path lengths in Hamiltonian Monte Carlo. Journal of Machine Learning Research, 15(47):1593–1623, 2014. URL https://jmlr.org/papers/v15/hoffman14a.html.DOI
  24. [24]Marc C. Kennedy and Anthony O’Hagan. Bayesian calibration of computer models. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 63(3):425–464, 2001. doi: 10.1111/1467-9868.00294.DOI
  25. [25]Fei Liu and Mike West. A dynamic modelling strategy for Bayesian computer model emulation. Bayesian Analysis, 4(2):393–411, 2009. doi: 10.1214/09-BA415.DOI
  26. [26]Fei Liu, M. J. Bayarri, and James O. Berger. Modularization in Bayesian analysis, with emphasis on analysis of computer models. Bayesian Analysis, 4(1):119–150, 2009. doi: 10.1214/09-BA404.
  27. [27]Roman Olson, Won Chang, Klaus Keller, and Murali Haran. stilt: Separable Gaussian Process Interpolation (Emulation), 2025. R package version 1.3.1, https://CRAN.R-project.org/package=stilt.
  28. [28]Jesús Palomo, Rui Paulo, and Gonzalo García-Donato. SAVE: An R package for the statistical analysis of computer models. Journal of Statistical Software, 64(13):1–23, 2015. doi: 10.18637/jss.v064.i13.DOI
  29. [29]Soumyakanti Pan, Lu Zhang, Jonathan R. Bradley, and Sudipto Banerjee. Bayesian inference for spatial-temporal non-Gaussian data using predictive stacking. Bayesian Analysis, pages 1–27, 2025. doi: 10.1214/25-BA1582. Advance publication.DOI
  30. [30]Giovanni Petris. An R package for dynamic linear models. Journal of Statistical Software, 36(12):1–16, 2010. doi: 10.18637/jss.v036.i12.DOI
  31. [31]Matthew Plumlee, Özge Sürer, Stefan M. Wild, Moses Y-H. Chan, and Jared O’Neal. surmise Users Manual. NAISE, 2026. Version 1.0.0, https://surmise.readthedocs.io.
  32. [32]Martyn Plummer. Cuts in Bayesian graphical models. Statistics and Computing, 25(1):37–43, 2015. doi: 10.1007/s11222-014-9503-z.DOI
  33. [33]Karline Soetaert and Filip Meysman. Reactive transport in aquatic ecosystems: Rapid model prototyping in the open source software R. Environmental Modelling & Software, 32:49–60, 2012. doi: 10.1016/j.envsoft.2011.08.011.DOI
  34. [34]Karline Soetaert, Thomas Petzoldt, and R. Woodrow Setzer. Solving differential equations in R: Package deSolve. Journal of Statistical Software, 33(9):1–25, 2010. doi: 10.18637/jss.v033.i09.DOI
  35. [35]Andrew M. Stuart. Inverse problems: A Bayesian perspective. Acta Numerica, 19:451–559, 2010. doi: 10.1017/S0962492910000061.DOI
  36. [36]Aki Vehtari, Andrew Gelman, Daniel Simpson, Bob Carpenter, and Paul-Christian Bürkn­er. Rank-normalization, folding, and localization: An improved R̂ for assessing convergence of MCMC (with discussion). Bayesian Analysis, 16(2):667–718, 2021. doi: 10.1214/20-BA1221.DOI
  37. [37]Sumio Watanabe. Asymptotic equivalence of Bayes cross validation and widely applicable information criterion in singular learning theory. Journal of Machine Learning Research, 11:3571–3594, 2010. URL https://jmlr.org/papers/v11/watanabe10a.html.
  38. [38]Mike West and Jeff Harrison. Bayesian Forecasting and Dynamic Models. Springer, New York, 2nd edition, 1997. doi: 10.1007/b98971.DOI
  39. [39]Lu Zhang, Wenpin Tang, and Sudipto Banerjee. Bayesian geostatistics using predictive stacking. Journal of the American Statistical Association, 121(554):1549–1561, 2026. doi: 10.1080/01621459.2025.2566449.DOI

AI tools statement

No AI-use declaration is available for this version in Valency.

The available record does not establish whether AI systems or models contributed to this work.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

Code, data, proofs and workflows the authors linked for testing, review and reproduction. These links are part of this work’s metadata and are released under the same license as the rest of that metadata. Valency doesn’t host the files; each keeps the license set where it’s hosted.

Pick where to look, or just type