Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.A cheap stand-in for an expensive simulator
A high-fidelity simulation of airflow, plasma or ocean currents can take hours on a supercomputer. A surrogate is a learned model that produces the next state in milliseconds. If you train it to minimise squared error, it learns the average of all the futures that could follow, and an average of many swirling futures is a blurred one. Run it forward step after step and the swirls fade away. A generative surrogate instead draws one plausible future at a time, with realistic detail, and many draws together show the uncertainty. The demo compares the blurred average with sampled futures of a noisy 1-D field.
Generative surrogates are used for fast detector simulation at the LHC, ensemble weather and climate emulation, turbulent-flow emulation for design loops and uncertainty quantification of re-entry and propulsion flows, where thousands of runs would be too expensive with the full solver.
- 1. A surrogate model replaces…
- 2. A surrogate trained with MSE predicts…
- 3. A generative surrogate outputs…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.Emulators, rollouts and what MSE does
- Setting: a simulator maps a state u_t (and parameters, forcings, boundary conditions) to u_(t+Δt). An emulator learns this map from simulation data, usually with a larger time step than the solver.
- Deterministic surrogates: CNNs and U-Nets, neural operators (Fourier neural operator, Li et al., 2021), graph networks (MeshGraphNets, Pfaff et al., 2021) trained with MSE. They predict E[u_(t+Δt) | u_t].
- Why the mean is not enough: if the dynamics are chaotic, or the state is a coarse view of unresolved processes, many futures are compatible with u_t. Their mean is smoother than any of them. MSE training also learns low frequencies first and under-weights small scales (spectral bias).
- Autoregressive rollout: the surrogate is applied to its own output. Errors compound, and a mean-predicting surrogate loses energy step after step, or becomes unstable when it is fed states it never saw in training.
- Generative surrogates: model p(u_(t+Δt) | u_t) and sample. Families include conditional GANs (stochastic parameterisation in Lorenz ’96, Gagne et al., 2020; CaloGAN for calorimeter showers, Paganini et al., 2018), conditional VAEs, normalizing flows (lattice field theory sampling, Albergo, Kanwar and Shanahan, 2019) and conditional diffusion or flow matching (PDE-Refiner, Lippe et al., 2023; DYffusion, Cachay et al., 2023; autoregressive conditional diffusion for turbulent flows, Kohl, Chen and Thuerey, 2023).
- Physics in the loop: enforce conservation (project onto constraints, predict fluxes), symmetries (equivariant networks) and boundary conditions. Train with noise injection or multi-step unrolled losses for stable rollouts.
- Evaluation: short-lead RMSE and CRPS, spread/skill ratio, energy spectra, long-run statistics (means, variances, extremes, autocorrelations) and rollout stability. Report the wall-clock speedup at matched accuracy.
- 1. A mean-predicting surrogate rolled out for many steps tends to…
- 2. PDE-Refiner (2023) is an example of…
- 3. Spectral bias means MSE training…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.Fitting and rolling out a surrogate
Exercise 1.
- One explicit step of a stochastic advection–diffusion simulator.
- A least-squares linear surrogate plus its residual covariance.
- A sampled step of the conditional Gaussian generative surrogate.
- Small-scale (gradient) energy of a field.
Practice.
- Split train, validation and test by trajectory, not by time step: neighbouring steps are highly correlated.
- Always roll out for long horizons during validation; one-step error hides drift and blow-ups.
- Train with unrolled multi-step losses or noise injection so the model sees its own errors.
- Compare energy spectra and long-run histograms with the simulator, not only RMSE.
- For ensembles, check spread/skill and CRPS; a single sample’s RMSE is about √2 times the mean’s for a calibrated model.
- Count the full cost: generating training data with the simulator is often the dominant expense.
import torch
# conditional diffusion surrogate: denoiser D(x_noisy, sigma, cond = u_t) predicts the next state u_(t+1)
def loss(D, u_t, u_next, sigma):
x = u_next + sigma * torch.randn_like(u_next)
return ((D(x, sigma, u_t) - u_next) ** 2).mean()
@torch.no_grad()
def rollout(sampler, D, u0, steps):
traj = [u0]
for _ in range(steps):
traj.append(sampler(lambda x, s: D(x, s, traj[-1]))) # one sampled future per step
return torch.stack(traj)- 1. Train/test splits for simulation data should be made by…
- 2. Validation of a surrogate should include…
- 3. For a calibrated generative surrogate, one sample's RMSE is about…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
The MSE optimum is the conditional mean. For any predictor f, E‖u’ − f(u)‖² = E‖u’ − E[u’|u]‖² + E‖E[u’|u] − f(u)‖², so the best deterministic surrogate is m(u) = E[u’|u]. Its output has variance Var(m(u)) = Var(u’) − E[Var(u’|u)], which is lower than the true variance whenever the future is uncertain.
Energy loss in rollouts. For a linear stochastic system u’ = u A + ε with Cov ε = Σ, the mean map is A and a rolled-out mean after L steps is u A^L. Each mode with damping |a| keeps a^(2L) of its energy, so deterministic rollouts decay to zero, while the true system keeps its stationary covariance C = Aᵀ C A + Σ.
Generative surrogates and noise structure. Sampling u’ = u A + ε with the right Σ reproduces C exactly. If Σ is replaced by its diagonal, the per-point variance is right but the spatial correlation is lost: the samples are too rough and the large scales are under-energised.
Ensemble statistics. For exact samples, the M-member ensemble mean has expected squared error (1 + 1/M) times that of the conditional mean, and spread/skill ≈ 1.
Exercise check. On seed 0 the one-step RMSE was 0.515 for the deterministic surrogate and 0.532 for the 16-member ensemble mean (ratio 1.033, theory 1.031). The fitted noise had neighbour correlation 0.44.
- 1. The MSE-optimal deterministic surrogate is…
- 2. A deterministic rollout of a damped mode keeps after L steps…
- 3. Replacing the noise covariance with its diagonal makes samples…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.Does a generative surrogate keep the physics that an MSE surrogate loses, and does its noise structure matter?
History.
- M. Paganini, L. de Oliveira and B. Nachman, “CaloGAN: simulating 3D high energy particle showers in multi-layer electromagnetic calorimeters with generative adversarial networks” (Phys. Rev. D, 2018).
- M. S. Albergo, G. Kanwar and P. E. Shanahan, “Flow-based generative models for Markov chain Monte Carlo in lattice field theory” (Phys. Rev. D, 2019).
- D. J. Gagne II, H. M. Christensen, A. C. Subramanian and A. H. Monahan, “Machine learning for stochastic parameterization: generative adversarial networks in the Lorenz ’96 model” (JAMES, 2020).
- P. Lippe, B. S. Veeling, P. Perdikaris, R. E. Turner and J. Brandstetter, “PDE-Refiner: achieving accurate long rollouts with neural PDE solvers” (NeurIPS 2023).
- G. Kohl, L.-W. Chen and N. Thuerey, “Benchmarking autoregressive conditional diffusion models for turbulent flow simulation” (2023).
Exercise 2.
- Simulator: u_t = 0.4 u_xx − 0.5 u_x − 0.05 u + 0.5 · white noise on a periodic grid of 32 points, explicit upwind scheme with dt = 0.5. One surrogate step = 8 simulator steps, so the noise is smoothed by diffusion and becomes spatially correlated.
- Data: 20 training trajectories of 200 steps after spin-up; 100 independent test trajectories of 100 steps.
- Surrogates: deterministic least-squares linear map W; generative u W + L z with the full residual covariance (Cholesky L); generative with a diagonal covariance (independent per-point noise). Ensembles of 16 members.
- Measures: RMSE at leads 1, 4 and 16; spread/skill; gradient-energy and variance ratios to the simulator’s climate after 100 steps.
| measure | seed 0 | seed 1 | seed 2 |
|---|---|---|---|
| RMSE lead 1: deterministic / ensemble mean | 0.515 / 0.532 | 0.523 / 0.548 | 0.531 / 0.549 |
| RMSE lead 16: deterministic / ensemble mean | 0.642 / 0.658 | 0.645 / 0.668 | 0.634 / 0.653 |
| spread/skill (full covariance), leads 1 / 4 / 16 | 0.977 / 0.987 / 0.991 | 0.960 / 0.961 / 0.963 | 0.963 / 0.940 / 0.989 |
| gradient-energy ratio, deterministic at lead 1 / 4 | 0.031 / 0.002 | 0.029 / 0.002 | 0.031 / 0.002 |
| gradient-energy ratio after 100 steps: full / diagonal | 1.029 / 1.788 | 1.008 / 1.751 | 1.008 / 1.783 |
| variance ratio after 100 steps: full / diagonal | 1.032 / 0.820 | 0.995 / 0.798 | 1.019 / 0.798 |
| neighbour correlation of fitted noise | 0.439 | 0.440 | 0.446 |
- RMSE favours the mean: the deterministic surrogate always had the lowest RMSE, as theory says. By lead 16 it was close to the climatological standard deviation (0.640), so most skill was gone.
- But it is not a simulator: after one step it kept only about 3% of the true small-scale energy and after 100 steps none (the field decayed to zero, gradient-energy ratio below 0.0005).
- The generative surrogate kept the climate: gradient energy and variance were within 3% of the simulator’s after 100 steps, and the ensemble was calibrated (spread/skill 0.94–0.99).
- Noise structure matters: independent per-point noise gave the right per-step variance but fields 75–79% too rough and with 18–20% too little total variance.
- Caveat: the toy system is linear and Gaussian, so a conditional Gaussian is the exact generative model. Turbulent flows need conditional diffusion or flow-matching networks, but the same checks apply.
Generative surrogates in AI, robotics and aerospace
- Particle physics: ATLAS uses GAN-based fast calorimeter simulation (FastCaloGAN within AtlFast3) to replace parts of the Geant4 detector simulation.
- Aerospace flows: conditional diffusion surrogates of airfoil and turbulent wake flows sample uncertainty for design and certification studies (for example Liu and Thuerey’s diffusion airfoil-flow models, 2024).
- Climate and weather: the same ideas scale to global emulators such as GenCast (H8-2).
- Lattice field theory: normalizing flows propose configurations for exact Monte Carlo.
References
- M. Paganini, L. de Oliveira and B. Nachman (2018). “CaloGAN.” Physical Review D 97, 014021.
- M. S. Albergo, G. Kanwar and P. E. Shanahan (2019). “Flow-based generative models for Markov chain Monte Carlo in lattice field theory.” Physical Review D 100, 034515.
- D. J. Gagne II, H. M. Christensen, A. C. Subramanian and A. H. Monahan (2020). “Machine learning for stochastic parameterization: generative adversarial networks in the Lorenz ’96 model.” JAMES 12.
- Z. Li et al. (2021). “Fourier neural operator for parametric partial differential equations.” ICLR.
- P. Lippe, B. S. Veeling, P. Perdikaris, R. E. Turner and J. Brandstetter (2023). “PDE-Refiner: achieving accurate long rollouts with neural PDE solvers.” NeurIPS.
- S. R. Cachay, B. Zhao, H. Joren and R. Yu (2023). “DYffusion: a dynamics-informed diffusion model for spatiotemporal forecasting.” NeurIPS.
- G. Kohl, L.-W. Chen and N. Thuerey (2023). “Benchmarking autoregressive conditional diffusion models for turbulent flow simulation.” arXiv preprint.