Bayesian parameter estimation in predictive engineering

Similar documents
Bayesian Inference and MCMC

The Metropolis-Hastings Algorithm. June 8, 2012

Principles of Bayesian Inference

Sequential Monte Carlo Samplers for Applications in High Dimensions

Probabilistic Machine Learning

Bayesian Methods and Uncertainty Quantification for Nonlinear Inverse Problems

Bayesian Estimation of DSGE Models 1 Chapter 3: A Crash Course in Bayesian Inference

Exercises Tutorial at ICASSP 2016 Learning Nonlinear Dynamical Models Using Particle Filters

Bayesian Inverse Problems

Eco517 Fall 2013 C. Sims MCMC. October 8, 2013

Density Estimation. Seungjin Choi

MCMC for big data. Geir Storvik. BigInsight lunch - May Geir Storvik MCMC for big data BigInsight lunch - May / 17

Bayesian Estimation with Sparse Grids

BAYESIAN METHODS FOR VARIABLE SELECTION WITH APPLICATIONS TO HIGH-DIMENSIONAL DATA

Markov chain Monte Carlo

CS-E3210 Machine Learning: Basic Principles

Bayesian Regression Linear and Logistic Regression

Lecture 13 Fundamentals of Bayesian Inference

Principles of Bayesian Inference

Principles of Bayesian Inference

Notes on pseudo-marginal methods, variational Bayes and ABC

Ergodicity in data assimilation methods

Metropolis Hastings. Rebecca C. Steorts Bayesian Methods and Modern Statistics: STA 360/601. Module 9

Markov Chain Monte Carlo

Learning the hyper-parameters. Luca Martino

Reminder of some Markov Chain properties:

Bagging During Markov Chain Monte Carlo for Smoother Predictions

Risk Estimation and Uncertainty Quantification by Markov Chain Monte Carlo Methods

Riemann Manifold Methods in Bayesian Statistics

Stochastic Collocation Methods for Polynomial Chaos: Analysis and Applications

New Insights into History Matching via Sequential Monte Carlo

David Giles Bayesian Econometrics

F denotes cumulative density. denotes probability density function; (.)

The University of Auckland Applied Mathematics Bayesian Methods for Inverse Problems : why and how Colin Fox Tiangang Cui, Mike O Sullivan (Auckland),

an introduction to bayesian inference

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Spatial Statistics with Image Analysis. Outline. A Statistical Approach. Johan Lindström 1. Lund October 6, 2016

Calibration of Stochastic Volatility Models using Particle Markov Chain Monte Carlo Methods

Bayes Nets: Sampling

Bayesian Linear Regression

MCMC Sampling for Bayesian Inference using L1-type Priors

Lecture : Probabilistic Machine Learning

Advanced uncertainty evaluation of climate models by Monte Carlo methods

Answers and expectations

Introduction to Bayesian Computation

CSC 2541: Bayesian Methods for Machine Learning

Monte Carlo in Bayesian Statistics

Bayesian Inference for DSGE Models. Lawrence J. Christiano

Seminar: Data Assimilation

(5) Multi-parameter models - Gibbs sampling. ST440/540: Applied Bayesian Analysis

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Assessing Regime Uncertainty Through Reversible Jump McMC

Markov Chain Monte Carlo, Numerical Integration

Variational Methods in Bayesian Deconvolution

STA 4273H: Statistical Machine Learning

Introduction to Systems Analysis and Decision Making Prepared by: Jakub Tomczak

Likelihood-free MCMC

Computational Perception. Bayesian Inference

MCMC algorithms for fitting Bayesian models

Data assimilation in high dimensions

Strong Lens Modeling (II): Statistical Methods

Bayesian room-acoustic modal analysis

Lecture 7 and 8: Markov Chain Monte Carlo

The Normal Linear Regression Model with Natural Conjugate Prior. March 7, 2016

MCMC notes by Mark Holder

Verification and Validation in Computational Engineering and Sciences

CPSC 540: Machine Learning

Nested Sampling. Brendon J. Brewer. brewer/ Department of Statistics The University of Auckland

Sequential Monte Carlo Methods (for DSGE Models)

Afternoon Meeting on Bayesian Computation 2018 University of Reading

An introduction to Sequential Monte Carlo

Markov Chain Monte Carlo methods

Sequential Monte Carlo and Particle Filtering. Frank Wood Gatsby, November 2007

Zig-Zag Monte Carlo. Delft University of Technology. Joris Bierkens February 7, 2017

Robust MCMC Sampling with Non-Gaussian and Hierarchical Priors

Multilevel Sequential 2 Monte Carlo for Bayesian Inverse Problems

Bayesian Phylogenetics:

State-Space Methods for Inferring Spike Trains from Calcium Imaging

High-dimensional Problems in Finance and Economics. Thomas M. Mertens

Markov Chain Monte Carlo Methods for Stochastic

Paul Karapanagiotidis ECO4060

Markov chain Monte Carlo methods in atmospheric remote sensing

Introduction to Probabilistic Machine Learning

Bayesian Estimation of DSGE Models

Stable Limit Laws for Marginal Probabilities from MCMC Streams: Acceleration of Convergence

DAG models and Markov Chain Monte Carlo methods a short overview

Bayesian Calibration of Simulators with Structured Discretization Uncertainty

Variational Scoring of Graphical Model Structures

Markov Chain Monte Carlo (MCMC)

Markov Chain Monte Carlo Inference. Siamak Ravanbakhsh Winter 2018

Sequential Monte Carlo Methods for Bayesian Computation

Introduction to Bayesian Inference

The Bayesian approach to inverse problems

Gaussian Process Approximations of Stochastic Differential Equations

Markov Chain Monte Carlo Methods for Stochastic Optimization

COMP90051 Statistical Machine Learning

Bayesian Model Comparison:

Bayesian Inference for DSGE Models. Lawrence J. Christiano

Bayesian Machine Learning

Particle Filtering Approaches for Dynamic Stochastic Optimization

Transcription:

Bayesian parameter estimation in predictive engineering Damon McDougall Institute for Computational Engineering and Sciences, UT Austin 14th August 2014 1/27

Motivation Understand physical phenomena Observations of phenomena Mathematical model of phenomena (includes some parameters that characterise behaviour) Numerical model approximating mathematical model Find parameters in a situation of interest Use the parameters to do something cool 2/27

Understanding errors Reality errors Validation Mathematical model errors Verification Numerical model 3/27

Setup Model (usually a PDE): G(u, θ) where u is the initial condition and θ are model paramaters. u: perhaps an initial condition θ: perhaps some interesting model parameters (diffusion, convection speed, permeability field, material properties) Observations: y j,k = u(x j, t k ) + η j,k, y = G(θ) + η, η N (0, σ 2 I ) η j,k i.i.d N (0, σ 2 ) Want: Why? P(θ y) P(y θ)p(θ) 4/27

Do we need Bayes theorem? Is Bayes theorem really necessary? We could minimise to get J(θ) = 1 2σ 2 G(θ) y 2 + 1 2λ 2 θ 2 θ = argmin θ J(θ) 5/27

Do we need Bayes theorem? 6/27

Do we need Bayes theorem? 7/27

Do we need Bayes theorem? Bayesian methods involve estimating uncertainty (as well as mean). They re equivalent. Deterministic optimisation: J(θ) = 1 G(θ) y 2 + 1 2σ2 }{{} 2λ 2 θ 2 }{{} misfit regularisation Bayesian framework: ( exp( J(θ)) = exp 1 ) ( G(θ) y 2 exp 1 ) 2σ2 2λ }{{} 2 θ 2 }{{} likelihood prior = P(y θ)p(θ) P(θ y) 8/27

Method for solving Bayesian inverse problems Kalman filtering/smoothing methods Kalman filter (Kalman) Ensemble Kalman filter (Evensen) Variational methods 3D VAR (Lorenc) 4D VAR (Courtier, Talagrand, Lawless) Particle methods Particle filter (Doucet) Sampling methods Markov chain Monte Carlo (Metropolis, Hastings) This list is not exhaustive. The body of work is prodigious. 9/27

QUESO Nutshell: QUESO gives samples from P(θ y) (called MCMC) Library for Quantifying Uncertainty in Estimation, Simulation and Optimisation Born in 2008 as part of PECOS PSAAP programme Provides robust and scalable sampling algorithms for UQ in computational models Open source C++ MPI for communication Parallel chains, each chain can house several processes Dependencies are MPI, Boost and GSL. Other optional features exist https://github.com/libqueso/queso 10/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? 11/27

What does MCMC look like? E(θ y) 1 N N k=1 θ k 11/27

How to do MCMC? Sampling P(θ y) Idea: Construct {θ k } k=1 cleverly such that {θ k} k=1 i.i.d P(θ y) 1. Let θ j be the current state in the sequence and construct a proposal, z z = (1 β 2 ) 1 2 θj + βξ, some β (0, 1) 2. Define Φ( ) := 1 2σ 2 G( ) y 2 3. Compute α(θ j, z) = 1 exp(φ(θ j ) Φ(z)) 4. Let θ j+1 = { θ with probability α(θ j, z) θ j with probability 1 α(θ j, z) Take θ 1 to be a draw from P(θ) 12/27

How to do MCMC? Sampling P(θ y) Idea: Construct {θ k } k=1 cleverly such that {θ k} k=1 i.i.d P(θ y) 1. Let θ j be the current state in the sequence and construct a proposal, z z = (1 β 2 ) 1 2 θj + βξ, some β (0, 1) 2. Define Φ( ) := 1 2σ 2 G( ) y 2 3. Compute α(θ j, z) = 1 exp(φ(θ j ) Φ(z)) 4. Let θ j+1 = { θ with probability α(θ j, z) θ j with probability 1 α(θ j, z) Take θ 1 to be a draw from P(θ) 12/27

How to do MCMC? Sampling P(θ y) Idea: Construct {θ k } k=1 cleverly such that {θ k} k=1 i.i.d P(θ y) 1. Let θ j be the current state in the sequence and construct a proposal, z z = (1 β 2 ) 1 2 θj + βξ, some β (0, 1) 2. Define Φ( ) := 1 2σ 2 G( ) y 2 3. Compute α(θ j, z) = 1 exp(φ(θ j ) Φ(z)) 4. Let θ j+1 = { θ with probability α(θ j, z) θ j with probability 1 α(θ j, z) Take θ 1 to be a draw from P(θ) 12/27

How to do MCMC? Sampling P(θ y) Idea: Construct {θ k } k=1 cleverly such that {θ k} k=1 i.i.d P(θ y) 1. Let θ j be the current state in the sequence and construct a proposal, z z = (1 β 2 ) 1 2 θj + βξ, some β (0, 1) 2. Define Φ( ) := 1 2σ 2 G( ) y 2 3. Compute α(θ j, z) = 1 exp(φ(θ j ) Φ(z)) 4. Let θ j+1 = { θ with probability α(θ j, z) θ j with probability 1 α(θ j, z) Take θ 1 to be a draw from P(θ) 12/27

How to do MCMC? Sampling P(θ y) Idea: Construct {θ k } k=1 cleverly such that {θ k} k=1 i.i.d P(θ y) 1. Let θ j be the current state in the sequence. Make a draw ξ P(θ) and construct a proposal, z z = (1 β 2 ) 1 2 θj + βξ, some β (0, 1) 2. Define Φ( ) := 1 2σ 2 G( ) y 2 3. Compute α(θ j, z) = 1 exp(φ(θ j ) Φ(z)) 4. Let θ j+1 = { θ with probability α(θ j, z) θ j with probability 1 α(θ j, z) Take θ 1 to be a draw from P(θ) 12/27

How to do MCMC? Sampling P(θ y) Idea: Construct {θ k } k=1 cleverly such that {θ k} k=1 i.i.d P(θ y) 1. Let θ j be the current state in the sequence. Make a draw ξ P(θ) and construct a proposal, z z = (1 β 2 ) 1 2 θj + βξ, some β (0, 1) 2. Define Φ( ) := 1 2σ 2 G( ) y 2 3. Compute α(θ j, z) = 1 exp(φ(θ j ) Φ(z)) 4. Let θ j+1 = { θ with probability α(θ j, z) θ j with probability 1 α(θ j, z) Take θ 1 to be a draw from P(θ) 12/27

Why use QUESO? Other solutions are available, e.g. R, PyMC, emcee, MICA, Stan. QUESO solves the same problem, but: Has been designed to be used with large forward problems Has been used successfully with 5000+ cores Leverages parallel MCMC algorithms Supports for finite and infinite dimensional problems Statistical Application QUESO Forward Code 13/27

Why use QUESO? Chain 1 Chain 2 Chain 3 Node 1 Node 2 Node 3 Node 4 Node 5 Node 6 MCMC MCMC MCMC Node 1 Node 2 Node 3 Node 4 Node 5 Node 6 14/27

Example 1: convection-diffusion We are given a convection-diffusion model (uc) x (νc x ) x = s, x [0, 1], c(0) = c(1) = 0. Functions of x are: u, c and s. Constants are: ν (viscosity). The unkown is c, typically concentration. The underlying convection velocity is u. The forward problem: Given u and s, find c. 15/27

Example 1: convection-diffusion We are also given observations { (uc)x (νc x ) x = s, x [0, 1], model c(0) = c(1) = 0. observations { y j = c(x j ) + η j, η j i.i.d N (0, σ 2 ), y = G(u) + η, η N (0, σ 2 I ). The observations are of c. We wish to learn about u. We will use Bayes s theorem: P(u y) P(y u)p(u) True u = 1 cos(2πx) True s = 2π(1 cos(2πx)) cos(2πx) + 2π sin 2 (2πx) + 4π 2 ν sin(2πx) 16/27

Example 1: convection-diffusion How do we know we are solving the right PDE (G) to begin with? 10 0 10 2 10 4 10 6 10 8 10 10 L 2 error H 1 error order 1 order 2 2 1 2 3 2 5 2 7 2 9 2 11 2 13 2 15 Number of grid points Note: Use the MASA [1] library to verify your forward problem. [1] Malaya et al., MASA: a library for verification using manufactured and analytical solutions, Engineering with Computers (2012) 17/27

Example 1: convection-diffusion Recap Bayes s theorem, P(u y) P(y u)p(u). Remember, we don t know u but have observations and model: y = G(u) + η, η N (0, σ 2 I ). We also need a prior on u P(u) = N (0, ( ) α ). Aim is to get information from the posterior. 18/27

Example 1: convection-diffusion 1.2 1.0 0.8 0.6 0.4 0.2 u k L 2 1 k k i=0 u i L 2 0.0 0 200 400 600 800 1000 Hundreds of iterations (k) 19/27

Example 1: convection-diffusion 0.20 1 k 1 k i=0 (u i u i k ) 2 L 2 0.15 0.10 0.05 0.00 0 200 400 600 800 1000 Hundreds of iterations (k) 20/27

Example 1: convection-diffusion Suppose we got the source term wrong: s = 2π(1 cos(2πx)) cos(2πx) + 2π sin 2 (2πx) + 4π 2 ν sin(2πx) ŝ = 4π 2 ν sin(2πx) 500 400 300 200 100 0 100 200 300 400 0.0 0.2 0.4 0.6 0.8 1.0 s ŝ 21/27

Example 1: convection-diffusion 10 4 Without model error 3.0 With model error 2.4 Variance in u 1.8 1.2 0.6 0.0 0.0 0.2 0.4 0.6 0.8 1.0 PDE Domain 22/27

Example 1: convection-diffusion 10 3 + 6.282 4.0 3.5 3.0 2.5 x=1 dc k dx 2.0 1.5 1.0 Without model error 0.5 With model error Truth 0.0 0 200 400 600 800 1000 Hundreds of iterations (k) 23/27

Example 2: Teleseismic earthquake model G computes teleseismic earthquake wave phases P and SH θ are rupture constraint parameters θ = (slip magnitude, slip direction, start time, rise time) R 4 Posterior P(θ y) is a density on a four dimensional space Observations y are of the produced waveform, with noise y k = G k (θ) + η k, η k i.i.d N (0, σ 2 ) y = G(θ) + η, η N (0, σ 2 I ) Prior P(θ) is a uniform distribution on R 4 (improper) 24/27

Example 2: Kikuchi and Kanamori model 1.4 1.2 1.0 0.8 0.6 0.4 0.2 Truth Uncertainty Mean 0.25 0.20 0.15 0.10 0.05 0.0 5.0 5.5 6.0 6.5 7.0 7.5 Slip 1.8 1.6 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 Rise time 0.00 96 94 92 90 88 86 84 Rake 5 4 3 2 1 0 0.3 0.2 0.1 0.0 0.1 0.2 0.3 Start time 25/27

Summary Regularised optimisation Bayesian inversion Bayesian inversion is not scary Uncertainty quantification is crucial; prediction Wealth of methods; pick your poison My go-to is MCMC, but a different method may suit you better Predictive validation The role of experiments and their effect on prediction There is a framework for this (Moser, Oliver, Terejanu, Simmons) I ll be at SIAM CSE 26/27

Questions? 27/27