[object Object]

by Dr Mikkel Lykkegaard

Updated 17 August 2023

Large Scale Uncertainty Quantification

Large Scale Uncertainty Quantification: UM-Bridge makes it easy!
[object Object]

In this article, I give a brief overview of one of my favourite software packages for Uncertainty Quantification of large-scale simulations, UM-Bridge. UM-Bridge makes it possible to easily deploy and interrogate large-scale simulations and to quantify the uncertainty of otherwise intractable numerical models. UM-Bridge provides large-scale UQ without tears.

Small But Significant

If any of you, dear readers, have ever tried to quantify the uncertainty of large-scale computer models, you will have known the pain of deploying the forward model and making it play nicely with your UQ software. Most UQ algorithms abstract the inner workings of a computer model into the conveniently compact

dobs=F(θ)+εd_{obs} = \mathcal F(\theta) + \varepsilon

where dobsd_{obs} are the observations, θ\theta are the model paramater, ε\varepsilon is the measurement noise, and F()\mathcal F(\cdot) is the ubiqutous forward operator. Depending on your UQ algorithm of choice, you may also require the gradient vJF(θ)v^\top \mathbf{J}_F(\theta), Jacobian action JF(θ)v\mathbf{J}_{\mathcal F}(\theta) v, and Hessian action HF(θ)v\mathbf{H}_{\mathcal F}(\theta)v.

While this looks deceivingly simple in this very compact form, the symbols can contain absolutely anything, from a simple linear model to solving the Navier-Stokes Equations. The symbols simply describe the processes that gave rise to the data, whatever those processes may be.

Most UQ algorithms require evaluating these symbols for different values of θ\theta many times. So many times that it cannot usually be done by hand, e.g. by changing the input files for the computer model manually and recording the output. Moreover, inverse UQ and adaptive UQ methods require a "ping-pong" interaction between the UQ software and the forward model, where the values of θ\theta cannot be determined in advance. Hence, the first step of UQ is often connecting the UQ software programmatically with the forward model, so that this process can be automated. And this is no easy task, requiring intricate knowledge of both the UQ software and the forward model. But what if I told you that there is an easy-to-use and scalable framwork that does most of this work for you? Enter UM-Bridge.

UM-Bridge

UM-Bridge is an open-source software framework that enables seamless integration between UQ software packages such as PyMC\texttt{PyMC}, emcee\texttt{emcee}, MUQ\texttt{MUQ}, QMCPy\texttt{QMCPy}, SGMK\texttt{SGMK}, and tinyDA\texttt{tinyDA} and any containerised modelling software, no matter which language either is written in. Additionally, UM-Bridge makes use of the latest technology to efficiently and automatically parallellise everything. You can even run your UQ software on a laptop, while the expensive simulations are running in the cloud.

This allows you to completely abstract away the deployment of the forward model and focus on UQ. Or, if you are a computer model developer, to simply containerise your model and hand it over to a UQ expert. This can lead to massive speed-ups in your UQ workflow. UM-Bridge provides a simple codification of the essential components of most UQ algorithms and a straightforward way to implement them. Once you have your UM-Bridge pipeline set up, you can easily swap out components. Is there a new version of your forward model? No problem, just update the container image! Want to try a different UQ algorithm or software? Just plug the forward model server into another UM-Bridge client!

Linus and Anne, the developers of UM-Bridge, have created comprehensive documentation, tutorials and an extensive benchmark library of various large-scale UQ examples, from a Tsunami source identification problem to a Tritium desorption inverse problem from fusion power materials science. These benchmarks can help you set up your own UM-Bridge pipeline, and you can have your UQ algorithm running with the UM-Bridge client in a matter of hours!

For more details see this (slightly more) technical blog post and this Journal of Open Source Software article.

digiLab ❤️ UM-Bridge

Here at digiLab, we use UM-Bridge as a natural part of our UQ workflow. The Tritium desorption benchmark was developed in-house in collaboration with the Advanced Computing division of the UK Atomic Energy Authority (UKAEA) as part of the organisation's efforts to build their internal UQ capacity. The forward model, which is built on the MOOSE Finite Element framework was already containerised when we began the collaboration, and it was a matter of hours before we could get cracking with the UQ.

We simply added the UM-Bridge server to the container, pulled up our favourite Quasi-Monte Carlo software, attached it to the UM-Bridge client and soon the results were rolling in. Just press play.

I love Uncertainty Quantification. But I don't love fiddling around with complex numerical solver routines. UM-Bridge takes the pain away from doing UQ with complex models. Thanks Linus and Anne for making this possible!

Dr Mikkel Lykkegaard
Principal Scientist, digiLab
Mikkel leads the Data Science team, creating bleeding edge tech to solve real engineering problems. His specialty is finding the right machine learning solutions for a specific engineering problem whether that's control, prediction, risk assessment or inference. When he's not cracking open a new dataset and analysing it, you'll find him camping in the wilds, bouldering and cooking.