Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.A cheap stand-in for an expensive model
Suppose one run of a simulation takes an hour, and you need ten thousand runs to find the best design or to see how uncertain the answer is. Instead, you run the simulation a few dozen times at carefully chosen settings and fit a fast model to those results: a surrogate. The surrogate answers in microseconds. The skill lies in choosing the settings, choosing the kind of surrogate, and checking how wrong it is before trusting it.
Surrogates are routine in aircraft and car design, oil and gas reservoir studies, nuclear safety analysis and climate model calibration, wherever each simulation run is expensive.
- 1. A surrogate model is…
- 2. Design of experiments decides…
- 3. Before using a surrogate, one must…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Steps: (1) define inputs, ranges and outputs; (2) choose a design of n runs; (3) run the expensive model; (4) fit surrogates; (5) validate; (6) use for optimisation, sensitivity analysis or uncertainty propagation; (7) add runs where the surrogate is weak, if needed.
- Designs: full grids grow as m^d; random sampling leaves gaps and clusters; Latin hypercube sampling (McKay et al., 1979) puts one point in each of n intervals of every input; Sobol and other low-discrepancy sequences fill space evenly.
- Surrogates: polynomial response surfaces (cheap, limited form), Gaussian processes or kriging (flexible, with error bars), radial basis functions, neural networks (many runs), and reduced-order models (J5-2 to J5-4).
- Validation: a held-out test set, k-fold or leave-one-out cross-validation; for Gaussian processes also check that predicted uncertainty covers the errors.
- Use: Monte Carlo through the surrogate for uncertainty propagation, Sobol indices for sensitivity, surrogate-based optimisation such as Bayesian optimisation.
- 1. A Latin hypercube places…
- 2. Leave-one-out cross-validation…
- 3. A Gaussian-process surrogate also gives…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.An expensive model and a design
Exercise 1.
- The ‘expensive’ model: range of a projectile launched at 30 m/s with quadratic drag, by RK4 until it lands; checked against v0² sin 2θ / g without drag.
- Inputs: launch angle 20–70° and drag coefficient 0–0.02 per metre, scaled to the unit square.
- Random and Latin hypercube designs, with a count of empty intervals.
Practice.
- Scale inputs to the unit cube and outputs to zero mean and unit variance before fitting.
- Use a space-filling design (Latin hypercube, Sobol); about 10 runs per input dimension is a common starting point for Gaussian processes.
- Keep a few runs out or use cross-validation; report errors relative to the output’s spread.
- Check the predictive uncertainty: the fraction of test points within ±2σ should be near 0.95.
- Tools: scikit-learn (GaussianProcessRegressor), SciPy (scipy.stats.qmc for Latin hypercube and Sobol), SMT (surrogate modelling toolbox), UQpy, OpenTURNS, GPyTorch.
import numpy as np
from scipy.stats import qmc
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussian_process.kernels import RBF, ConstantKernel
Z = qmc.LatinHypercube(d=2, seed=0).random(20) # design in the unit square
y = expensive_model(qmc.scale(Z, [20, 0.0], [70, 0.02])) # 20 expensive runs
gp = GaussianProcessRegressor(ConstantKernel() * RBF([0.3, 0.3]), normalize_y=True).fit(Z, y)
mean, std = gp.predict(Z_test, return_std=True) # validate before use- 1. Latin hypercube and Sobol designs are in…
- 2. Inputs are usually scaled to…
- 3. A calibrated ±2σ interval should contain about…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Why designs matter. A surrogate interpolates between runs, so its error is largest far from any run. Random points cluster and leave gaps: in Exercise 1, ten random points left 7 of 20 coordinate intervals empty, while the Latin hypercube left none.
Why model form matters. A quadratic response surface has 6 coefficients; once they are determined, more runs cannot fix its shape error. A Gaussian process assumes only smoothness, so its error keeps falling as runs are added, until the noise in the model output, here from the discrete landing time, limits it.
Results in the exercise. With 40 Latin hypercube runs, the relative RMSE was 0.04 for the quadratic, 0.01 for the cubic and 0.0008 for the GP; a random design gave 0.002 for the GP. With 20 runs, leave-one-out estimated the GP error as 0.006 against 0.005 measured on 2000 test points. The GP’s ±2σ band, however, held only 64% of the test points, not 95%: the error estimate from cross-validation was reliable, the GP’s own error bars were too narrow. Propagating θ ~ N(45°, 5°) and k ~ U(0.005, 0.015) through the 20-run GP gave a mean range of 55.8 m and a standard deviation of 6.07 m, against 55.8 m and 6.08 m from 20000 runs of the model.
- 1. The quadratic's error stopped falling because…
- 2. The GP's ±2σ band covered…
- 3. The 20-run GP reproduced the Monte Carlo mean and standard deviation…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.How many runs, which design and which surrogate are needed for an accurate, honestly validated stand-in for a simulation?
History.
- G. Box and K. Wilson (1951) introduced response surface methodology.
- D. Krige (1951) and G. Matheron (1963) developed kriging in geostatistics; J. Sacks, W. Welch, T. Mitchell and H. Wynn (1989) applied it to computer experiments.
- M. McKay, R. Beckman and W. Conover (1979) introduced Latin hypercube sampling.
- D. Jones, M. Schonlau and W. Welch (1998) introduced efficient global optimisation (Bayesian optimisation with kriging).
Exercise 2. Projectile range with drag; inputs angle 20–70° and k 0–0.02 m⁻¹. Test set: 2000 random inputs. Gaussian process: RBF kernel, length scale by maximum likelihood on a grid. Relative RMSE.
| runs | quadratic (LHS) | cubic (LHS) | GP (random) | GP (LHS) |
|---|---|---|---|---|
| 10 | 0.04 | 0.03 | 0.04 | 0.04 |
| 20 | 0.04 | 0.01 | 0.004 | 0.005 |
| 40 | 0.04 | 0.01 | 0.002 | 0.0008 |
- Polynomials hit a floor set by their form; the GP kept improving.
- The Latin hypercube helped at 40 runs (0.0008 against 0.002) but not at 20 for this seed.
- Cross-validation was honest (0.006 against 0.005); GP error bars were not (64% coverage).
- Seeds 1 and 2: GP with 40 LHS runs 0.001 and 0.001, random 0.002 and 0.004; quadratic 0.04; ±2σ coverage 0.83 and 0.7; Monte Carlo standard deviation 6.03 and 6.11 m from the GP against 6.05 and 6.08 m from the model.
Surrogates in practice
- Aerospace: kriging and RBF surrogates for wing and engine design optimisation.
- Energy: reservoir simulators and nuclear safety codes replaced by surrogates for uncertainty studies.
- Climate: Gaussian-process emulators of climate models for calibration and sensitivity (J8-3).
- Bayesian optimisation: tuning experiments, materials and machine-learning hyperparameters with GP surrogates.
References
- M. D. McKay, R. J. Beckman and W. J. Conover (1979). “A comparison of three methods for selecting values of input variables in the analysis of output from a computer code.” Technometrics.
- J. Sacks, W. J. Welch, T. J. Mitchell and H. P. Wynn (1989). “Design and analysis of computer experiments.” Statistical Science.
- D. R. Jones, M. Schonlau and W. J. Welch (1998). “Efficient global optimization of expensive black-box functions.” Journal of Global Optimization.
- A. I. J. Forrester, A. Sóbester and A. J. Keane (2008). Engineering Design via Surrogate Modelling. Wiley.
- C. E. Rasmussen and C. K. I. Williams (2006). Gaussian Processes for Machine Learning. MIT Press.