159
Approximative Bayesian inference Approximate Bayesian inference for latent Gaussian models avard Rue 1 Department of Mathematical Sciences NTNU, Norway December 4, 2009 1 With S.Martino/N.Chopin

Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Approximate Bayesian inference for latentGaussian models

Havard Rue1

Department of Mathematical SciencesNTNU, Norway

December 4, 2009

1With S.Martino/N.Chopin

Page 2: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Latent Gaussian models

Latent Gaussian models

Latent Gaussian models have often the following hierarchicalstructure

• Observed data y, yi |xi ∼ π(yi |xi ,θ)

• Latent Gaussian field x ∼ N (·,Σ(θ))

• Hyperparameters θ• variability• length/strength of dependence• parameters in the likelihood

π(x,θ | y) ∝ π(θ) π(x | θ)∏i∈I

π(yi | xi ,θ)

Page 3: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Latent Gaussian models

Latent Gaussian models

Latent Gaussian models have often the following hierarchicalstructure

• Observed data y, yi |xi ∼ π(yi |xi ,θ)

• Latent Gaussian field x ∼ N (·,Σ(θ))

• Hyperparameters θ• variability• length/strength of dependence• parameters in the likelihood

π(x,θ | y) ∝ π(θ) π(x | θ)∏i∈I

π(yi | xi ,θ)

Page 4: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Latent Gaussian models

Latent Gaussian models

Latent Gaussian models have often the following hierarchicalstructure

• Observed data y, yi |xi ∼ π(yi |xi ,θ)

• Latent Gaussian field x ∼ N (·,Σ(θ))

• Hyperparameters θ• variability• length/strength of dependence• parameters in the likelihood

π(x,θ | y) ∝ π(θ) π(x | θ)∏i∈I

π(yi | xi ,θ)

Page 5: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Latent Gaussian models

Latent Gaussian models

Latent Gaussian models have often the following hierarchicalstructure

• Observed data y, yi |xi ∼ π(yi |xi ,θ)

• Latent Gaussian field x ∼ N (·,Σ(θ))

• Hyperparameters θ• variability• length/strength of dependence• parameters in the likelihood

π(x,θ | y) ∝ π(θ) π(x | θ)∏i∈I

π(yi | xi ,θ)

Page 6: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Latent Gaussian models

Example: Generalised additive (mixed) models

g(µi ) =∑

j

fj(zji ) +∑k

βj zji + εi

where

• each fj(·), is a smooth (random) function

• βj is the linear effect of zj

Observations {yi} from an exponential family with mean {µi}

Page 7: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Latent Gaussian models

Examples

1D Smoothing count data, general spline smoothing,semi-parametric regression, GLM(M), GAM(M), etc

2D Disease mapping, log-Gaussian Cox-processes,model-based geostatistics, 1D-models with spatialeffect(s)

3D Time-series of images, spatio-temporal models.

Features

• Dimension of the latent Gaussian field, n, is large, 102 − 105,but often Markov.

• Dimension of the hyperparameters dim(θ) is small, 1− 5, say.

• Dimension of the data dim(y) might vary, but is oftennon-Gaussian.

Page 8: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Latent Gaussian models

Examples

1D Smoothing count data, general spline smoothing,semi-parametric regression, GLM(M), GAM(M), etc

2D Disease mapping, log-Gaussian Cox-processes,model-based geostatistics, 1D-models with spatialeffect(s)

3D Time-series of images, spatio-temporal models.

Features

• Dimension of the latent Gaussian field, n, is large, 102 − 105,but often Markov.

• Dimension of the hyperparameters dim(θ) is small, 1− 5, say.

• Dimension of the data dim(y) might vary, but is oftennon-Gaussian.

Page 9: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Latent Gaussian models

Examples

1D Smoothing count data, general spline smoothing,semi-parametric regression, GLM(M), GAM(M), etc

2D Disease mapping, log-Gaussian Cox-processes,model-based geostatistics, 1D-models with spatialeffect(s)

3D Time-series of images, spatio-temporal models.

Features

• Dimension of the latent Gaussian field, n, is large, 102 − 105,but often Markov.

• Dimension of the hyperparameters dim(θ) is small, 1− 5, say.

• Dimension of the data dim(y) might vary, but is oftennon-Gaussian.

Page 10: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Latent Gaussian models

Examples

1D Smoothing count data, general spline smoothing,semi-parametric regression, GLM(M), GAM(M), etc

2D Disease mapping, log-Gaussian Cox-processes,model-based geostatistics, 1D-models with spatialeffect(s)

3D Time-series of images, spatio-temporal models.

Features

• Dimension of the latent Gaussian field, n, is large, 102 − 105,but often Markov.

• Dimension of the hyperparameters dim(θ) is small, 1− 5, say.

• Dimension of the data dim(y) might vary, but is oftennon-Gaussian.

Page 11: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Latent Gaussian models

Examples

1D Smoothing count data, general spline smoothing,semi-parametric regression, GLM(M), GAM(M), etc

2D Disease mapping, log-Gaussian Cox-processes,model-based geostatistics, 1D-models with spatialeffect(s)

3D Time-series of images, spatio-temporal models.

Features

• Dimension of the latent Gaussian field, n, is large, 102 − 105,but often Markov.

• Dimension of the hyperparameters dim(θ) is small, 1− 5, say.

• Dimension of the data dim(y) might vary, but is oftennon-Gaussian.

Page 12: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Latent Gaussian models

Examples

1D Smoothing count data, general spline smoothing,semi-parametric regression, GLM(M), GAM(M), etc

2D Disease mapping, log-Gaussian Cox-processes,model-based geostatistics, 1D-models with spatialeffect(s)

3D Time-series of images, spatio-temporal models.

Features

• Dimension of the latent Gaussian field, n, is large, 102 − 105,but often Markov.

• Dimension of the hyperparameters dim(θ) is small, 1− 5, say.

• Dimension of the data dim(y) might vary, but is oftennon-Gaussian.

Page 13: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Examples: 1D

Examples of latent Gaussian models: 1D

Page 14: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Examples: 1D

Longitudinal mixed effects model: Epil-example fromBUGS

Page 15: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Examples: 1D

Longitudinal mixed effects model: Epil-example fromBUGS

Page 16: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Examples: 1D

Longitudinal mixed effects model: Epil-example fromBUGS

Page 17: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Examples: 2D

Examples of latent Gaussian models: 2D

Disease mapping: Poisson data

Page 18: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Examples: 2D

Examples of latent Gaussian models: 2D

Joint disease mapping: Poisson data

Page 19: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Examples: 2D

Examples of latent Gaussian models: 2D

Spatial GLM with Binomial data

Page 20: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Examples: 2D

Examples of latent Gaussian models: 2D

0 20 40 60 80 100

020

4060

8010

0

x [m]

y [m

]

Log-Gaussian Cox-process; Oaks-data

Page 21: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Overview

Examples: 2D+

Examples of latent Gaussian models: 2D+

Spatial logit-model with semiparametric covariates

Page 22: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Latent Gaussian models: Characteristic features

Tasks

Tasks

Compute from

π(x,θ | y) ∝ π(θ) π(x | θ)∏i∈I

π(yi | xi )

the posterior marginals:

π(xi | y), for some or all i

and/orπ(θi | y), for some or all i

Page 23: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Latent Gaussian models: Characteristic features

Our approach

Our approach: Approximate Bayesian Inference

• Can we compute (approximate) marginals directly withoutusing MCMC?

• YES!

• Gain• Huge speedup & accuracy• The ability to treat latent Gaussian models properly ;-)

Page 24: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Latent Gaussian models: Characteristic features

Our approach

Our approach: Approximate Bayesian Inference

• Can we compute (approximate) marginals directly withoutusing MCMC?

• YES!

• Gain• Huge speedup & accuracy• The ability to treat latent Gaussian models properly ;-)

Page 25: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Latent Gaussian models: Characteristic features

Our approach

Our approach: Approximate Bayesian Inference

• Can we compute (approximate) marginals directly withoutusing MCMC?

• YES!

• Gain• Huge speedup & accuracy• The ability to treat latent Gaussian models properly ;-)

Page 26: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Latent Gaussian models: Characteristic features

Main ideas

Main ideas (I)

Main ideas are simple and based on the identity

π(z) =π(x , z)

π(x |z)leading to π(z) =

π(x , z)

π(x |z)

When π(x |z) is the Gaussian-approximation, this is theLaplace-approximation.

Page 27: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Latent Gaussian models: Characteristic features

Main ideas

Main ideas (I)

Main ideas are simple and based on the identity

π(z) =π(x , z)

π(x |z)leading to π(z) =

π(x , z)

π(x |z)

When π(x |z) is the Gaussian-approximation, this is theLaplace-approximation.

Page 28: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Latent Gaussian models: Characteristic features

Main ideas

Main ideas (II)

Construct the approximations to

1. π(θ|y)

2. π(xi |θ, y)

then we integrate

π(xi |y) =

∫π(θ|y) π(xi |θ, y) dθ

π(θj |y) =

∫π(θ|y) dθ−j

Page 29: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Latent Gaussian models: Characteristic features

Main ideas

Main ideas (II)

Construct the approximations to

1. π(θ|y)

2. π(xi |θ, y)

then we integrate

π(xi |y) =

∫π(θ|y) π(xi |θ, y) dθ

π(θj |y) =

∫π(θ|y) dθ−j

Page 30: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Latent Gaussian models: Characteristic features

Main ideas

Main ideas (II)

Construct the approximations to

1. π(θ|y)

2. π(xi |θ, y)

then we integrate

π(xi |y) =

∫π(θ|y) π(xi |θ, y) dθ

π(θj |y) =

∫π(θ|y) dθ−j

Page 31: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Gaussian Markov Random fields (GMRFs)

GMRFs: def

A Gaussian Markov random field (GMRF), x = (x1, . . . , xn)T , is anormal distributed random vector with additional Markovproperties

xi ⊥ xj | x−ij ⇐⇒ Qij = 0

where Q is the precision matrix (inverse covariance)

Sparse matrices gives fast computations!

Page 32: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The GMRF-approximation

The GMRF-approximation

π(x | y) ∝ exp

(−1

2xT Qx +

∑i

log π(yi |xi )

)

≈ exp

(−1

2(x− µ)T (Q + diag(ci ))(x− µ)

)= π(x|θ, y)

Constructed as follows:

• Locate the mode x∗

• Expand to second order

Markov and computational properties are preserved

Page 33: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The GMRF-approximation

The GMRF-approximation

π(x | y) ∝ exp

(−1

2xT Qx +

∑i

log π(yi |xi )

)

≈ exp

(−1

2(x− µ)T (Q + diag(ci ))(x− µ)

)= π(x|θ, y)

Constructed as follows:

• Locate the mode x∗

• Expand to second order

Markov and computational properties are preserved

Page 34: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Part I

Some more background: The Laplaceapproximation

Page 35: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Outline IBackground: The Laplace approximation

The Laplace-approximation for π(θ|y)The Laplace-approximation for π(xi |θ, y)

The Integrated nested Laplace-approximation (INLA)SummaryAssessing the error

ExamplesStochastic volatilityLongitudinal mixed effect modelLog-Gaussian Cox process

ExtensionsModel choiceAutomatic detection of “surprising” observations

Summary and discussionBonus

Page 36: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Outline IIHigh(er) number of hyperparametersParallel computing using OpenMPSpatial GLMs

Page 37: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace approximation: The classic case

Compute and approximation to the integral∫exp(ng(x)) dx

where n is the parameter going to ∞.

Let x0 be the mode of g(x) and assume g(x0) = 0:

g(x) =1

2g ′′(x0)(x − x0)2 + · · · .

Page 38: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace approximation: The classic case

Compute and approximation to the integral∫exp(ng(x)) dx

where n is the parameter going to ∞.

Let x0 be the mode of g(x) and assume g(x0) = 0:

g(x) =1

2g ′′(x0)(x − x0)2 + · · · .

Page 39: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace approximation: The classic case...

Then ∫exp(ng(x)) dx =

√2π

n(−g ′′(x0))+ · · ·

• As n→∞, then the integrand gets more and more peaked.

• Error should tends to zero as n→∞• Detailed analysis gives

relative error(n) = 1 +O(1/n)

Page 40: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace approximation: The classic case...

Then ∫exp(ng(x)) dx =

√2π

n(−g ′′(x0))+ · · ·

• As n→∞, then the integrand gets more and more peaked.

• Error should tends to zero as n→∞• Detailed analysis gives

relative error(n) = 1 +O(1/n)

Page 41: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace approximation: The classic case...

Then ∫exp(ng(x)) dx =

√2π

n(−g ′′(x0))+ · · ·

• As n→∞, then the integrand gets more and more peaked.

• Error should tends to zero as n→∞• Detailed analysis gives

relative error(n) = 1 +O(1/n)

Page 42: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace approximation: The classic case...

Then ∫exp(ng(x)) dx =

√2π

n(−g ′′(x0))+ · · ·

• As n→∞, then the integrand gets more and more peaked.

• Error should tends to zero as n→∞• Detailed analysis gives

relative error(n) = 1 +O(1/n)

Page 43: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Extension I

gn(x) =1

n

n∑i=1

gi (x)

then the mode x0 depends on n as well.

Page 44: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Extension II

∫exp(ng(x)) dx

and x is multivariate, then∫exp(ng(x)) dx =

√(2π)n

n| −H|

where H is the hessian (matrix) at the mode

Hij =∂2

∂xi∂xjg(x)

∣∣∣∣∣x=x0

Page 45: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Extension II

∫exp(ng(x)) dx

and x is multivariate, then∫exp(ng(x)) dx =

√(2π)n

n| −H|

where H is the hessian (matrix) at the mode

Hij =∂2

∂xi∂xjg(x)

∣∣∣∣∣x=x0

Page 46: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Computing marginals

• Our main issue is to compute marginals

• We can use the Laplace-approximation for this issue as well

• A more “statistical” derivation might be appropriate

Page 47: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Computing marginals

• Our main issue is to compute marginals

• We can use the Laplace-approximation for this issue as well

• A more “statistical” derivation might be appropriate

Page 48: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Computing marginals

• Our main issue is to compute marginals

• We can use the Laplace-approximation for this issue as well

• A more “statistical” derivation might be appropriate

Page 49: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Computing marginals...

Consider the general problem

• θ is hyper-parameter with prior π(θ)

• x is latent with density π(x |θ)

• y is observed with likelihood π(y |x)

then

π(θ|y) =π(x , θ|y)

π(x |θ, y)

for any x!

Page 50: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Computing marginals...

Consider the general problem

• θ is hyper-parameter with prior π(θ)

• x is latent with density π(x |θ)

• y is observed with likelihood π(y |x)

then

π(θ|y) =π(x , θ|y)

π(x |θ, y)

for any x!

Page 51: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Computing marginals...

Consider the general problem

• θ is hyper-parameter with prior π(θ)

• x is latent with density π(x |θ)

• y is observed with likelihood π(y |x)

then

π(θ|y) =π(x , θ|y)

π(x |θ, y)

for any x!

Page 52: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Computing marginals...

Further,

π(θ|y) =π(x , θ|y)

π(x |θ, y)

∝ π(θ) π(x |θ) π(y |x)

π(x |θ, y)

≈ π(θ) π(x |θ) π(y |x)

πG (x |θ, y)

∣∣∣∣∣x=x∗(θ)

where πG (x |θ, y) is the Gaussian approximation of π(x |θ, y) andx∗(θ) is the mode.

Page 53: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Computing marginals...

Further,

π(θ|y) =π(x , θ|y)

π(x |θ, y)

∝ π(θ) π(x |θ) π(y |x)

π(x |θ, y)

≈ π(θ) π(x |θ) π(y |x)

πG (x |θ, y)

∣∣∣∣∣x=x∗(θ)

where πG (x |θ, y) is the Gaussian approximation of π(x |θ, y) andx∗(θ) is the mode.

Page 54: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Computing marginals...

Further,

π(θ|y) =π(x , θ|y)

π(x |θ, y)

∝ π(θ) π(x |θ) π(y |x)

π(x |θ, y)

≈ π(θ) π(x |θ) π(y |x)

πG (x |θ, y)

∣∣∣∣∣x=x∗(θ)

where πG (x |θ, y) is the Gaussian approximation of π(x |θ, y) andx∗(θ) is the mode.

Page 55: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Computing marginals...

Error:

With n repeated measurements of the same x, then theerror is

π(θ|y) = π(θ|y)(1 +O(n−3/2))

after renormalisation.

Relative error is a very nice property!

Page 56: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

Computing marginals...

Error:

With n repeated measurements of the same x, then theerror is

π(θ|y) = π(θ|y)(1 +O(n−3/2))

after renormalisation.

Relative error is a very nice property!

Page 57: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(θ|y)

The Laplace approximation

The Laplace approximation for π(θ|y) is

π(θ | y) =π(x, θ|y)

π(x|y,θ)(any x)

≈ π(x, θ|y)

π(x|y,θ)

∣∣∣∣∣x=x∗(θ)

= π(θ|y) (1)

Page 58: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(θ|y)

Remarks

The Laplace approximation

π(θ|y)

turn out to be accurate: x|y,θ appears almost Gaussian in mostcases, as

• x is a priori Gaussian.

• y is typically not very informative.

• Observational model is usually ‘well-behaved’.

Note: π(θ|y) itself does not look Gaussian. Thus, a Gaussianapproximation of (θ, x) will be inaccurate.

Page 59: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(θ|y)

Remarks

The Laplace approximation

π(θ|y)

turn out to be accurate: x|y,θ appears almost Gaussian in mostcases, as

• x is a priori Gaussian.

• y is typically not very informative.

• Observational model is usually ‘well-behaved’.

Note: π(θ|y) itself does not look Gaussian. Thus, a Gaussianapproximation of (θ, x) will be inaccurate.

Page 60: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(θ|y)

Remarks

The Laplace approximation

π(θ|y)

turn out to be accurate: x|y,θ appears almost Gaussian in mostcases, as

• x is a priori Gaussian.

• y is typically not very informative.

• Observational model is usually ‘well-behaved’.

Note: π(θ|y) itself does not look Gaussian. Thus, a Gaussianapproximation of (θ, x) will be inaccurate.

Page 61: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(θ|y)

Remarks

The Laplace approximation

π(θ|y)

turn out to be accurate: x|y,θ appears almost Gaussian in mostcases, as

• x is a priori Gaussian.

• y is typically not very informative.

• Observational model is usually ‘well-behaved’.

Note: π(θ|y) itself does not look Gaussian. Thus, a Gaussianapproximation of (θ, x) will be inaccurate.

Page 62: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(θ|y)

Remarks

The Laplace approximation

π(θ|y)

turn out to be accurate: x|y,θ appears almost Gaussian in mostcases, as

• x is a priori Gaussian.

• y is typically not very informative.

• Observational model is usually ‘well-behaved’.

Note: π(θ|y) itself does not look Gaussian. Thus, a Gaussianapproximation of (θ, x) will be inaccurate.

Page 63: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(xi |θ, y)

Approximating π(xi |y,θ)

This task is more challenging, since

• dimension of x, n is large

• and there are potential n marginals to compute, or at leastO(n).

An obvious simple and fast alternative, is to use theGMRF-approximation

π(xi |θ, y) = N (xi ; µ(θ), σ2(θ))

Page 64: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(xi |θ, y)

Approximating π(xi |y,θ)

This task is more challenging, since

• dimension of x, n is large

• and there are potential n marginals to compute, or at leastO(n).

An obvious simple and fast alternative, is to use theGMRF-approximation

π(xi |θ, y) = N (xi ; µ(θ), σ2(θ))

Page 65: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(xi |θ, y)

Approximating π(xi |y,θ)

This task is more challenging, since

• dimension of x, n is large

• and there are potential n marginals to compute, or at leastO(n).

An obvious simple and fast alternative, is to use theGMRF-approximation

π(xi |θ, y) = N (xi ; µ(θ), σ2(θ))

Page 66: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(xi |θ, y)

Laplace approximation of π(xi |θ, y)

• The Laplace approximation:

π(xi | y,θ) ≈ π(x,θ|y)

π(x−i |xi , y,θ)

∣∣∣∣∣x−i=x∗−i (xi ,θ)

• Again, approximation is very good, as x−i |xi , θ is ‘almostGaussian’,

• but it is expensive. In order to get the n marginals:• perform n optimisations, and• n factorisations of n − 1× n − 1 matrices.

Can be solved.

Page 67: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(xi |θ, y)

Laplace approximation of π(xi |θ, y)

• The Laplace approximation:

π(xi | y,θ) ≈ π(x,θ|y)

π(x−i |xi , y,θ)

∣∣∣∣∣x−i=x∗−i (xi ,θ)

• Again, approximation is very good, as x−i |xi , θ is ‘almostGaussian’,

• but it is expensive. In order to get the n marginals:• perform n optimisations, and• n factorisations of n − 1× n − 1 matrices.

Can be solved.

Page 68: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(xi |θ, y)

Laplace approximation of π(xi |θ, y)

• The Laplace approximation:

π(xi | y,θ) ≈ π(x,θ|y)

π(x−i |xi , y,θ)

∣∣∣∣∣x−i=x∗−i (xi ,θ)

• Again, approximation is very good, as x−i |xi , θ is ‘almostGaussian’,

• but it is expensive. In order to get the n marginals:• perform n optimisations, and• n factorisations of n − 1× n − 1 matrices.

Can be solved.

Page 69: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(xi |θ, y)

Simplified Laplace Approximation

An series expansion of the LA for π(xi |θ, y):

• computational much faster: O(n log n) for each i

• correct the Gaussian approximation for error in shift andskewness

log π(xi |θ, y) = −1

2x2i + bxi +

1

6d x3

i + · · ·

• Fit a skew-Normal density

2φ(x)Φ(ax)

• sufficiently accurate for most applications

Page 70: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(xi |θ, y)

Simplified Laplace Approximation

An series expansion of the LA for π(xi |θ, y):

• computational much faster: O(n log n) for each i

• correct the Gaussian approximation for error in shift andskewness

log π(xi |θ, y) = −1

2x2i + bxi +

1

6d x3

i + · · ·

• Fit a skew-Normal density

2φ(x)Φ(ax)

• sufficiently accurate for most applications

Page 71: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(xi |θ, y)

Simplified Laplace Approximation

An series expansion of the LA for π(xi |θ, y):

• computational much faster: O(n log n) for each i

• correct the Gaussian approximation for error in shift andskewness

log π(xi |θ, y) = −1

2x2i + bxi +

1

6d x3

i + · · ·

• Fit a skew-Normal density

2φ(x)Φ(ax)

• sufficiently accurate for most applications

Page 72: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Background: The Laplace approximation

The Laplace-approximation for π(xi |θ, y)

Simplified Laplace Approximation

An series expansion of the LA for π(xi |θ, y):

• computational much faster: O(n log n) for each i

• correct the Gaussian approximation for error in shift andskewness

log π(xi |θ, y) = −1

2x2i + bxi +

1

6d x3

i + · · ·

• Fit a skew-Normal density

2φ(x)Φ(ax)

• sufficiently accurate for most applications

Page 73: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

The integrated nested Laplace approximation (INLA) I

Step I Explore π(θ|y)• Locate the mode• Use the Hessian to construct new variables• Grid-search• Can be case-specific

Page 74: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

The integrated nested Laplace approximation (INLA) I

Step I Explore π(θ|y)• Locate the mode• Use the Hessian to construct new variables• Grid-search• Can be case-specific

Page 75: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

The integrated nested Laplace approximation (INLA) I

Step I Explore π(θ|y)• Locate the mode• Use the Hessian to construct new variables• Grid-search• Can be case-specific

Page 76: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

The integrated nested Laplace approximation (INLA) I

Step I Explore π(θ|y)• Locate the mode• Use the Hessian to construct new variables• Grid-search• Can be case-specific

Page 77: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

The integrated nested Laplace approximation (INLA) I

Step I Explore π(θ|y)• Locate the mode• Use the Hessian to construct new variables• Grid-search• Can be case-specific

Page 78: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

The integrated nested Laplace approximation (INLA) II

Step II For each θj

• For each i , evaluate the Laplace approximationfor selected values of xi

• Build a Skew-Normal or log-spline correctedGaussian

N (xi ; µi , σ2i )× exp(spline)

to represent the conditional marginal density.

Page 79: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

The integrated nested Laplace approximation (INLA) II

Step II For each θj

• For each i , evaluate the Laplace approximationfor selected values of xi

• Build a Skew-Normal or log-spline correctedGaussian

N (xi ; µi , σ2i )× exp(spline)

to represent the conditional marginal density.

Page 80: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

The integrated nested Laplace approximation (INLA) II

Step II For each θj

• For each i , evaluate the Laplace approximationfor selected values of xi

• Build a Skew-Normal or log-spline correctedGaussian

N (xi ; µi , σ2i )× exp(spline)

to represent the conditional marginal density.

Page 81: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

The integrated nested Laplace approximation (INLA) III

Step III Sum out θj

• For each i , sum out θ

π(xi | y) ∝∑

j

π(xi | y,θj)× π(θj | y)

• Build a log-spline corrected Gaussian

N (xi ; µi , σ2i )× exp(spline)

to represent π(xi | y).

Page 82: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

The integrated nested Laplace approximation (INLA) III

Step III Sum out θj

• For each i , sum out θ

π(xi | y) ∝∑

j

π(xi | y,θj)× π(θj | y)

• Build a log-spline corrected Gaussian

N (xi ; µi , σ2i )× exp(spline)

to represent π(xi | y).

Page 83: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

The integrated nested Laplace approximation (INLA) III

Step III Sum out θj

• For each i , sum out θ

π(xi | y) ∝∑

j

π(xi | y,θj)× π(θj | y)

• Build a log-spline corrected Gaussian

N (xi ; µi , σ2i )× exp(spline)

to represent π(xi | y).

Page 84: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

Computing posterior marginals for θj (I)

Main idea

• Use the integration-points and build an interpolant

• Use numerical integration on that interpolant

Page 85: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

Computing posterior marginals for θj (I)

Main idea

• Use the integration-points and build an interpolant

• Use numerical integration on that interpolant

Page 86: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

Computing posterior marginals for θj (II)

Practical approach (high accuracy)

• Rerun using a fine integration grid

• Possibly with no rotation

• Just sum up at grid points, then interpolate

Page 87: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

Computing posterior marginals for θj (II)

Practical approach (high accuracy)

• Rerun using a fine integration grid

• Possibly with no rotation

• Just sum up at grid points, then interpolate

Page 88: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

Computing posterior marginals for θj (II)

Practical approach (high accuracy)

• Rerun using a fine integration grid

• Possibly with no rotation

• Just sum up at grid points, then interpolate

Page 89: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

Computing posterior marginals for θj (II)

Practical approach (lower accuracy)

• Use the Gaussian approximation at the mode θ∗

• ...BUT, adjust the standard deviation in each direction

• Then use numerical integration

Page 90: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

Computing posterior marginals for θj (II)

Practical approach (lower accuracy)

• Use the Gaussian approximation at the mode θ∗

• ...BUT, adjust the standard deviation in each direction

• Then use numerical integration

Page 91: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

Computing posterior marginals for θj (II)

Practical approach (lower accuracy)

• Use the Gaussian approximation at the mode θ∗

• ...BUT, adjust the standard deviation in each direction

• Then use numerical integration

Page 92: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

−4 −2 0 2 4

0.0

0.2

0.4

0.6

0.8

1.0

x

dnor

m(x

)/dn

orm

(0)

Page 93: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Summary

Page 94: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Assessing the error

How can we assess the error in the approximations?

Tool 1: Compare a sequence of improved approximations

1. Gaussian approximation

2. Simplified Laplace

3. Laplace

Page 95: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Assessing the error

How can we assess the error in the approximations?

Tool 2: Estimate the error using Monte Carlo{πu(θ | y)

π(θ | y)

}−1

∝ EeπG[exp {r(x; θ, y)}]

where r() is the sum of the log-likelihood minus the second orderTaylor expansion.

Page 96: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

The Integrated nested Laplace-approximation (INLA)

Assessing the error

How can we assess the error in the approximations?

Tool 3: Estimate the “effective” number of parameters as definedin the Deviance Information Criteria:

pD(θ) = D(x; θ)− D(x; θ)

and compare this with the number of observations.

Low ratio is good.

This criteria has theoretical justification.

Page 97: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Stochastic volatility

Stochastic Volatility model

0 200 400 600 800 1000

−2

02

4

Log of the daily difference of the pound-dollar exchange rate fromOctober 1st, 1981, to June 28th, 1985.

Page 98: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Stochastic volatility

Stochastic Volatility model

Simple model

xt | x1, . . . , xt−1, τ, φ ∼ N (φxt−1, 1/τ)

where |φ| < 1 to ensure a stationary process.

Observations are taken to be

yt | x1, . . . , xt , µ ∼ N (0, exp(µ+ xt))

Page 99: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Stochastic volatility

Stochastic Volatility model

Simple model

xt | x1, . . . , xt−1, τ, φ ∼ N (φxt−1, 1/τ)

where |φ| < 1 to ensure a stationary process.

Observations are taken to be

yt | x1, . . . , xt , µ ∼ N (0, exp(µ+ xt))

Page 100: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Stochastic volatility

Results

Using just the first 50 data-points only, which makes the problemmuch harder.

Page 101: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Stochastic volatility

Results

−10 −5 0 5 10 15 20

0.00

0.02

0.04

0.06

0.08

0.10

ν = logit(2φ− 1)

Page 102: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Stochastic volatility

Results

0 2 4 6

0.00

0.05

0.10

0.15

0.20

0.25

0.30

log(κx)

Page 103: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Stochastic volatility

Using the full dataset

0 200 400 600 800 1000

−3−2

−10

12

x$V1

x$V2

Predictions for µ+ xt+k

Page 104: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Stochastic volatility

Student-tν

0 20 40 60 80 100

0.00

0.02

0.04

0.06

0.08

convert.dens(xx, yy, FUN = dof.trans)$x

conver

t.dens(

xx, yy

, FUN =

dof.tra

ns)$y

Posterior marginal for ν.

Page 105: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Longitudinal mixed effect model

Epil-example from Win/Open-BUGS

Page 106: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Longitudinal mixed effect model

Epil-example from Win/Open-BUGS

Page 107: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Longitudinal mixed effect model

Epil-example from Win/Open-BUGS

1.2 1.4 1.6 1.8 2.0

01

23

45

Marginals for a0

Page 108: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Longitudinal mixed effect model

Epil-example from Win/Open-BUGS

0 5 10 15

0.0

0.1

0.2

0.3

Marginals for τb1

Page 109: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Log-Gaussian Cox process

Log-Gaussian Cox process

0 40 80 120 160 200

020

4060

8010

0

Locations of trees of a particular type: Data comes from a50-hectare permanent tree plot which was established in 1980 inthe tropical moist forest of Barro Colorado Island in Gatun Lake incentral Panama.

Page 110: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Log-Gaussian Cox process

Log-Gaussian Cox process

0 50 100 150 200

020

4060

8010

0

Covariate: altitude

Page 111: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Log-Gaussian Cox process

Log-Gaussian Cox process

0 50 100 150 200

020

4060

8010

0

Covariate: norm of gradient

Page 112: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Log-Gaussian Cox process

Model

Model for log-density at each “pixel” in a 200× 100 lattice

ηi = β0 + β1c1i + β2c2i + ui + vi ,∑

i

ui = 0

The spatial term is an IGMRF

E(ui | u−i ) =1

20

(8◦ ◦ ◦ ◦ ◦◦ ◦ • ◦ ◦◦ • ◦ • ◦◦ ◦ • ◦ ◦◦ ◦ ◦ ◦ ◦

− 2◦ ◦ ◦ ◦ ◦◦ • ◦ • ◦◦ ◦ ◦ ◦ ◦◦ • ◦ • ◦◦ ◦ ◦ ◦ ◦

− 1◦ ◦ • ◦ ◦◦ ◦ ◦ ◦ ◦• ◦ ◦ ◦ •◦ ◦ ◦ ◦ ◦◦ ◦ • ◦ ◦

)Prec(ui | u−i ) = 20κu

Page 113: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Log-Gaussian Cox process

Model

Model for log-density at each “pixel” in a 200× 100 lattice

ηi = β0 + β1c1i + β2c2i + ui + vi ,∑

i

ui = 0

The spatial term is an IGMRF

E(ui | u−i ) =1

20

(8◦ ◦ ◦ ◦ ◦◦ ◦ • ◦ ◦◦ • ◦ • ◦◦ ◦ • ◦ ◦◦ ◦ ◦ ◦ ◦

− 2◦ ◦ ◦ ◦ ◦◦ • ◦ • ◦◦ ◦ ◦ ◦ ◦◦ • ◦ • ◦◦ ◦ ◦ ◦ ◦

− 1◦ ◦ • ◦ ◦◦ ◦ ◦ ◦ ◦• ◦ ◦ ◦ •◦ ◦ ◦ ◦ ◦◦ ◦ • ◦ ◦

)Prec(ui | u−i ) = 20κu

Page 114: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Log-Gaussian Cox process

Results

0 40 80 120 160 200

020

4060

8010

0

The posterior expectation of the spatial field

Page 115: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Log-Gaussian Cox process

Results

0 40 80 120 160 200

020

4060

8010

0

Locations with high KLD

Page 116: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Log-Gaussian Cox process

Results

−0.05 0.00 0.05 0.10 0.15 0.20 0.25

02

46

810

Effect of altitude

Page 117: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Examples

Log-Gaussian Cox process

Results

2 4 6 8 10 12

0.00

0.05

0.10

0.15

0.20

0.25

Effect of norm of the gradient

Page 118: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Extensions

Extensions

• Model choice/selection

• Automatic detection of “surprising” observations

Will not discuss

• High(er) number of hyperparameters

• Parallel computing using OpenMP

• Sensitivity Analysis

Page 119: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Extensions

Extensions

• Model choice/selection

• Automatic detection of “surprising” observations

Will not discuss

• High(er) number of hyperparameters

• Parallel computing using OpenMP

• Sensitivity Analysis

Page 120: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Extensions

Extensions

• Model choice/selection

• Automatic detection of “surprising” observations

Will not discuss

• High(er) number of hyperparameters

• Parallel computing using OpenMP

• Sensitivity Analysis

Page 121: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Extensions

Model choice

Model choice

Chose/compare various model is important but difficult

• Bayes factors (general available)

• Deviance information criterion (DIC) (hierarchical models)

Page 122: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Extensions

Model choice

Marginal likelihood

Marginal likelihood is the normalising constant for π(θ|y),

π(y) =

∫π(θ)π(x|θ)π(y|x, θ)

πG(x|θ, y)

∣∣∣∣∣x=x?(θ)

dθ. (2)

I many hierarchical GMRF models the prior is intrinsic/improper,so this is difficult to use.

Page 123: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Extensions

Model choice

Marginal likelihood

Marginal likelihood is the normalising constant for π(θ|y),

π(y) =

∫π(θ)π(x|θ)π(y|x, θ)

πG(x|θ, y)

∣∣∣∣∣x=x?(θ)

dθ. (2)

I many hierarchical GMRF models the prior is intrinsic/improper,so this is difficult to use.

Page 124: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Extensions

Model choice

Deviance Information Criteria

Based on the deviance

D(x; θ) = −2∑

i

log(yi | xi ,θ)

andDIC = 2×Mean (D(x; θ))− D(Mean(x); θ∗)

This is quite easy to compute

Page 125: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Extensions

Model choice

Bayesian Cross-validation

Easy to compute using the INLA-approach

π(yi | y−i ) =

∫θ

{∫xi

π(yi | xi ,θ) π(xi | y−i ,θ) dxi

}π(θ | y−i ) dθ

where

π(xi | y−i ,θ) ∝ π(xi |y,θ)

π(yi |xi ,θ)

Require a one-dimensional integral for each i and θ.

Page 126: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Extensions

Automatic detection of “surprising” observations

Automatic detection of “surprising” observations

ComputeProb(ynew

i ≤ yi | y−i )

Look for unusual large or small values

Page 127: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Summary and discussion

Summary and discussion

• Latent Gaussian models are an important class of models witha wide range of applications!

• The integrated nested Laplace-approximations worksextremely well, way beyond my expectations!!!• Obtain in practice “exact” results• Relative error only• Computationally FAST even for large n• Take advantage of multicore architecture using OpenMP

• Extensions• Compare models (DIC/Bayes factors)• Cross-validation and “surprising” observations• High(er) number of hyperparameters• Sensitivity analysis

Page 128: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Summary and discussion

Summary and discussion

• Latent Gaussian models are an important class of models witha wide range of applications!

• The integrated nested Laplace-approximations worksextremely well, way beyond my expectations!!!• Obtain in practice “exact” results• Relative error only• Computationally FAST even for large n• Take advantage of multicore architecture using OpenMP

• Extensions• Compare models (DIC/Bayes factors)• Cross-validation and “surprising” observations• High(er) number of hyperparameters• Sensitivity analysis

Page 129: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Summary and discussion

Summary and discussion

• Latent Gaussian models are an important class of models witha wide range of applications!

• The integrated nested Laplace-approximations worksextremely well, way beyond my expectations!!!• Obtain in practice “exact” results• Relative error only• Computationally FAST even for large n• Take advantage of multicore architecture using OpenMP

• Extensions• Compare models (DIC/Bayes factors)• Cross-validation and “surprising” observations• High(er) number of hyperparameters• Sensitivity analysis

Page 130: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

High(er) number of hyperparameters

High(er) number of hyperparameters

Numerical (grid) integration is costly and costs at least

3dim(θ)

Need another approach for “high-dimensional” hyperparameters.

Page 131: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

High(er) number of hyperparameters

Borrow ideas from experimental design...

www.wikipedia.org: In statistics, a central compositedesign is an experimental design, useful in responsesurface methodology, for building a second order(quadratic) model for the response variable withoutneeding to use a complete three-level factorialexperiment.

Page 132: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

High(er) number of hyperparameters

Idea

Page 133: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

High(er) number of hyperparameters

Number of integration points

Dimension #Int.pts CCD #Int.pts GRID: 3dim

2 9 83 15 274 25 645 27 1256 45 2167 79 3438 81 5129 147 729

10 149 100014 285 274418 549 583222 1069 10648

Page 134: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

High(er) number of hyperparameters

Experience so far

• Works quite well

• The integration problems is well-behaved.

Page 135: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

Parallel computing using OpenMP

Why?

• Speed (primary)

• Ability to run larger models (secondary)

Why are so few doing this?

• (Seemingly) difficult

• Better to wait more than to code more

• Lack of local parallel machines.

Page 136: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

Parallel computing using OpenMP

Why?

• Speed (primary)

• Ability to run larger models (secondary)

Why are so few doing this?

• (Seemingly) difficult

• Better to wait more than to code more

• Lack of local parallel machines.

Page 137: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

Result

The Gain/Pain-ratio is simply to low!

But there is hope, due to

• new trends in computing

• including parallel tools into mainstream compilers

Page 138: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

Result

The Gain/Pain-ratio is simply to low!

But there is hope, due to

• new trends in computing

• including parallel tools into mainstream compilers

Page 139: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

Trends in computing

Once upon a time, chip makers made computer chips faster everyyear by increasing their processing speeds. But lately, themicroprocessor industry has run into some fundamental limits tothose speeds.

Page 140: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

Trends in computing

The latest solution: Design chips with multiple processor cores.

Page 141: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

Trends in computing

The result: Today’s big-brained chips that can do more processingthan ever before, if the software is modified to take advantage oftheir design.

Page 142: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

Parallel machines are now everywhere...

Page 143: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

How to make use of multicore machines?

May 13, 2007: GCC 4.2 Release Series

OpenMP is now supported for the C, C++and Fortran compilers.

Page 144: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

OpenMP: coding

• Easy way to parallelize code

• Start with a serial version

• Parallel parts of the code when you have time

• Will still run on a serial machine

• Very little interference with the code itself, mainly compilerdirectives

Page 145: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

OpenMP: running

• Just run the program and the run-time environment will takecare of the rest.

• This includes how many CPU’s that are used at the time.

• This will change during the execution of the program.

Page 146: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

Example from GMRFLib

#pragma omp p a r a l l e l f o r p r i v a t e ( i )f o r ( i = 0 ; i < n ; i++) {

GMRFLib 2order approx (NULL , &bb [ i ] , &cc [ i ] , d [ i ] ,mode [ i ] , i ,mode , l og lFunc , l o g l Fun c a r g ,&( b l o ckupda t e pa r−>s t e p l e n ) ) ;

cc [ i ] = MAX(0 . 0 , cc [ i ] ) ;}

Page 147: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Parallel computing using OpenMP

GMRFLib

• INLA-routines make quite good use of OpenMP

• and so does the inla-program.

Page 148: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Spatial GLMs (w/S.Martino/J.Eidsvik)

Model

• Stationary Gaussian field on a torus

• non-Gaussian observations

• n is huge: n = 5122 or n = 10242

• number of observations, m, is small, a few hundred.

Solve using

• INLA, but the computational tools are now very different• Exploit the block Toeplitz structure using DFTs• and simply rank-m correct for the observations using soft

constraints.

Page 149: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Spatial GLMs (w/S.Martino/J.Eidsvik)

Model

• Stationary Gaussian field on a torus

• non-Gaussian observations

• n is huge: n = 5122 or n = 10242

• number of observations, m, is small, a few hundred.

Solve using

• INLA, but the computational tools are now very different• Exploit the block Toeplitz structure using DFTs• and simply rank-m correct for the observations using soft

constraints.

Page 150: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Spatial GLMs (w/S.Martino/J.Eidsvik)

Model

• Stationary Gaussian field on a torus

• non-Gaussian observations

• n is huge: n = 5122 or n = 10242

• number of observations, m, is small, a few hundred.

Solve using

• INLA, but the computational tools are now very different• Exploit the block Toeplitz structure using DFTs• and simply rank-m correct for the observations using soft

constraints.

Page 151: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Spatial GLMs (w/S.Martino/J.Eidsvik)

Model

• Stationary Gaussian field on a torus

• non-Gaussian observations

• n is huge: n = 5122 or n = 10242

• number of observations, m, is small, a few hundred.

Solve using

• INLA, but the computational tools are now very different• Exploit the block Toeplitz structure using DFTs• and simply rank-m correct for the observations using soft

constraints.

Page 152: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Spatial GLMs (w/S.Martino/J.Eidsvik)

Model

• Stationary Gaussian field on a torus

• non-Gaussian observations

• n is huge: n = 5122 or n = 10242

• number of observations, m, is small, a few hundred.

Solve using

• INLA, but the computational tools are now very different• Exploit the block Toeplitz structure using DFTs• and simply rank-m correct for the observations using soft

constraints.

Page 153: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Example: Rongelap data

−6000 −5000 −4000 −3000 −2000 −1000 0

−4000

−3500

−3000

−2500

−2000

−1500

−1000

−500

0

500

Rongelap Island with 157 measurement locations

East (m)

Nor

th (

m)

Page 154: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Example: Rongelap data, results

Marginal predictions.

East (m)

Nor

th (

m)

−6000 −5000 −4000 −3000 −2000 −1000 0

−4000

−3500

−3000

−2500

−2000

−1500

−1000

−500

0

500

−1

−0.5

0

0.5

1

1.5

2

2.5

Page 155: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Example: Rongelap data, results

Marginal predicted standard deviations.

East (m)

Nor

th (

m)

−6000 −5000 −4000 −3000 −2000 −1000 0

−4000

−3500

−3000

−2500

−2000

−1500

−1000

−500

0

500

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

0.55

Page 156: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Spatial GLMs: Summary

• Main interest is to predict unobserved sites

• Gaussian approximations seems sufficient

• they are O(m)-times faster to compute...

• Can also use GMRFs for large m using GMRF-proxies forGaussian fields

Page 157: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Spatial GLMs: Summary

• Main interest is to predict unobserved sites

• Gaussian approximations seems sufficient

• they are O(m)-times faster to compute...

• Can also use GMRFs for large m using GMRF-proxies forGaussian fields

Page 158: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Spatial GLMs: Summary

• Main interest is to predict unobserved sites

• Gaussian approximations seems sufficient

• they are O(m)-times faster to compute...

• Can also use GMRFs for large m using GMRF-proxies forGaussian fields

Page 159: Approximate Bayesian inference for latent Gaussian models · 3D Time-series of images, spatio-temporal models. Features Dimension of the latent Gaussian eld, n, is large, 102 105,

Approximative Bayesian inference

Bonus

Spatial GLMs

Spatial GLMs: Summary

• Main interest is to predict unobserved sites

• Gaussian approximations seems sufficient

• they are O(m)-times faster to compute...

• Can also use GMRFs for large m using GMRF-proxies forGaussian fields