Emulation

Hybrid modelling using machine learning to speed up dynamic models

The idea behind an emulator is that often we have a process that takes too long to calculate. In my world, this is often a model that takes too long to run, but it could be any other situation where you need a solution faster than you can compute. The idea behind an emulator is actually fairly similar to how our brains solve for something like catching a baseball. Our brain “could” theoretically try to solve for the motion of a baseball in order to catch it, but it’s actually a pretty spicy set of differential equations.

To catch a ball (left), would you prefer to solve the system of PDE's (middle), or solve it like our brain does?

Instead, our brain solves this a different way. We play catch and build up a database of where a baseball ends up from a set of initial conditions. Your brain then does a fancy guestimates based on this database and our observation of the ball. We can do something similar with computationally expensive model runs by building up a database of how the computationally expensive process behaves based on the inputs, and then use machine learning to predict what the model would say from any set of initial conditions.

From a set of inputs, we build an Emulator to rapidly predict what our simulator (or model) was solve.

The “Emulator” then can serve as a much faster replacement for you expensive computational process. This allows all kinds of exciting things that would normally be computationally prohibitive. An example emulator build to replace a computationally expensive coupled ADCIRC/SWAN (hydrodynamic + wave) model in order to allow probabalistic hazard analysis looks like this:

Emulator or simulator

For the experiment design, you run the expensive simulator at a set of design points (ideally chosen in a smart way to best sample variability across the input space). This produces a training dataset that you then use for building a machine learning model. For my work, I’ve used Gaussian Progress Regression, but you can insert you favorite machine learning algorithm here. Overall I’ve shown that, with a proper build, the emulation step introduces only a small amount of error (in general the physical model you are using has an order of magnitude larger error).

This workflow has a whole range of applications (I think most of us have come up against computational limits as a barrier to a science question). For me I’ve used this technique to model thousands of years of simulation to determine things like statistically robust 100-year RI water levels or probabalistic wave hindcasts under high input uncertainty.

Left, probabalistic 100-year return level water levels for Gray's Harbor Washington. Right: Probabalistic wave hindcast for Pichilemu, Chile.