1 of 87

Bayesian Uncertainty Quantification Methods

Better knowing what we don’t know

ASCSN

Pablo Giuliani

giulia27@msu.edu

2 of 87

What to get from today

Why Uncertainty Quantification?

How to do it?

Hands on examples

Seek statistics friends

UQ is a model

3 of 87

What to get from today

Why Uncertainty Quantification?

How to do it?

Hands on examples

Seek statistics friends

UQ is a model

Ask questions

4 of 87

Why Uncertainty Quantification?

3

Scattering

Proton Puzzle

2010

Muonic result

Electronic result

0.84 fm

~

0.88 fm

~

Spectroscopy

Reason 1

5 of 87

Why Uncertainty Quantification?

Scattering

Proton Puzzle

2010

Muonic result

Electronic result

0.84 fm

~

0.88 fm

~

Spectroscopy

0.84 fm

0.88 fm

Reason 1

6 of 87

Why Uncertainty Quantification?

4

Muonic result

Electronic result

0.84 fm

~

0.88 fm

~

Proton Radius Experiment

(PRad)

Muon Proton Scattering Experiment (MUSE)

Reason 1

7 of 87

Why Uncertainty Quantification?

4

Proton Radius Experiment

(PRad)

Muon Proton Scattering Experiment (MUSE)

Puzzle

Refinement?

Muonic result

Electronic result

0.84 fm

~

0.88 fm

~

What if in 2010…

Reason 1

8 of 87

Why Uncertainty Quantification?

5

Theory

friend

Exp.

friend

Neutrons

Protons

Reason 2

9 of 87

Why Uncertainty Quantification?

5

Theory

friend

Exp.

friend

Very expensive

experiment

Neutrons

Protons

Reason 2

10 of 87

Why Uncertainty Quantification?

5

Theory

friend

Exp.

friend

Maximum

Variability

(uncertainty)

Neutrons

Protons

Reason 2

11 of 87

Why Uncertainty Quantification?

5

Theory

friend

Exp.

friend

Neutrons

Protons

Maximum

Variability

(uncertainty)

1 interest

1 model

1 experiment

“easy”

Reason 2

12 of 87

Why Uncertainty Quantification?

6

Many interests

Reason 2

Figure adapted from A. Spyrou

Structure

Astrophysics

Symmetries

Applications

13 of 87

Why Uncertainty Quantification?

6

Many interests

Reason 2

Structure

Symmetries

Applications

r-process

Astrophysics

Lifetimes

Capture

rates

Masses

(Fission)

(β decay)

Figure adapted from A. Spyrou

14 of 87

Why Uncertainty Quantification?

6

Many interests

Reason 2

Structure

Symmetries

Applications

r-process

Astrophysics

Lifetimes

Capture

rates

Masses

(Fission)

(β decay)

Many models

UNEDF#

SV-min

FRDM#

HFB#

SkM*

Figure adapted from A. Spyrou

15 of 87

Why Uncertainty Quantification?

6

Many interests

Reason 2

Structure

Symmetries

Applications

r-process

Astrophysics

Lifetimes

Capture

rates

Masses

(Fission)

(β decay)

Many models

UNEDF#

SV-min

FRDM#

HFB#

Adapted from: The impact of individual

nuclear properties on r-process

nucleosynthesis, Mumpower et al,

(2016)

A

Abundances:

SkM*

Figure adapted from A. Spyrou

16 of 87

Why Uncertainty Quantification?

6

Many interests

Reason 2

Structure

Symmetries

Applications

r-process

Astrophysics

Lifetimes

Capture

rates

Masses

(Fission)

(β decay)

Many models

UNEDF#

SV-min

FRDM#

HFB#

Adapted from: The impact of individual

nuclear properties on r-process

nucleosynthesis, Mumpower et al,

(2016)

A

Abundances:

SkM*

Many experiments,

many nuclei

Figure adapted from A. Spyrou

17 of 87

Why Uncertainty Quantification?

6

Many interests

Reason 2

Structure

Symmetries

Applications

r-process

Astrophysics

Lifetimes

Capture

rates

Masses

(Fission)

(β decay)

Many models

UNEDF#

SV-min

FRDM#

HFB#

Adapted from: The impact of individual

nuclear properties on r-process

nucleosynthesis, Mumpower et al,

(2016)

A

Abundances:

SkM*

Many experiments,

many nuclei

Figure adapted from A. Spyrou

https://www.ligo.caltech.edu/image/ligo20160211a

Many observations

18 of 87

Why Uncertainty Quantification?

6

Reason 2

Structure

Symmetries

Applications

r-process

Astrophysics

Lifetimes

Capture

rates

Masses

(Fission)

(β decay)

UNEDF#

SV-min

FRDM#

HFB#

Adapted from: The impact of individual

nuclear properties on r-process

nucleosynthesis, Mumpower et al,

(2016)

A

Abundances:

SkM*

Figure adapted from A. Spyrou

https://www.ligo.caltech.edu/image/ligo20160211a

Not so easy

Many models

Many interests

Many observations

Many experiments,

many nuclei

19 of 87

Why Uncertainty Quantification?

6

Reason 2

Structure

Symmetries

Applications

r-process

Astrophysics

Lifetimes

Capture

rates

Masses

(Fission)

(β decay)

UNEDF#

SV-min

FRDM#

HFB#

Adapted from: The impact of individual

nuclear properties on r-process

nucleosynthesis, Mumpower et al,

(2016)

A

Abundances:

SkM*

Figure adapted from A. Spyrou

https://www.ligo.caltech.edu/image/ligo20160211a

Many models

Many interests

Many observations

Many experiments,

many nuclei

Not so easy

20 of 87

Why Uncertainty Quantification?

7

Bonus reasons

Nov 14 – 16, 2022

21 of 87

Why Uncertainty Quantification?

7

Bonus reasons

Nov 14 – 16, 2022

22 of 87

Why Uncertainty Quantification?

7

Bonus reasons

Nov 14 – 16, 2022

23 of 87

Why Uncertainty Quantification?

7

Bonus reasons

Nov 14 – 16, 2022

24 of 87

Why Uncertainty Quantification?

8

How

25 of 87

Why Uncertainty Quantification?

8

How

Theory

friend

Exp.

friend

parameters

26 of 87

Why Uncertainty Quantification?

8

How

Theory

friend

Exp.

friend

parameters

27 of 87

Why Uncertainty Quantification?

8

How

Theory

friend

Exp.

friend

parameters

Bayesian statistics

1) Everything is a random variable

2) Need to model their distributions

and how they interact

28 of 87

Bayesian Formulation

Advantages

1) Assumptions are clearly stated

2) Allows for natural continuous learning

29 of 87

Bayesian Formulation

Posterior

Likelihood

Prior

Evidence

Advantages

1) Assumptions are clearly stated

2) Allows for natural continuous learning

30 of 87

Bayesian Formulation

Posterior

Likelihood

Prior

Evidence

(what we want)

(what we think we know)

(what we think happened)

(how much sense all makes)

Advantages

1) Assumptions are clearly stated

2) Allows for natural continuous learning

31 of 87

Bayesian Formulation

Posterior

Likelihood

Prior

Evidence

(what we want)

(what we think we know)

(what we think happened)

(how much sense all makes)

32 of 87

Bayesian Formulation

Posterior

Likelihood

Prior

Evidence

(what we want)

(what we think we know)

(what we think happened)

(how much sense all makes)

33 of 87

Bayesian Formulation

Posterior

Likelihood

Prior

Evidence

(what we want)

(what we think we know)

(what we think happened)

(how much sense all makes)

34 of 87

Bayesian Formulation

Posterior

Likelihood

Prior

Evidence

(what we want)

(what we think we know)

(what we think happened)

(how much sense all makes)

35 of 87

Typical day of Bayes

Theory

friend

Exp.

friend

Exp.

friend

36 of 87

Typical day of Bayes

Theory

friend

Exp.

friend

Bayes

friend

What is the previous knowledge?

Nuclear radius is around 3 fm

How much “around”?

Maybe 2.8 to 3.34?

Ok, will use skewed distributions for priors

37 of 87

Typical day of Bayes

Theory

friend

Exp.

friend

Bayes

friend

What is the previous knowledge?

Nuclear radius is around 3 fm

How much “around”?

Maybe 2.8 to 3.34?

Ok, will use skewed distributions for priors

How was the data taken?

We will use a likelihood model for each, and check the sensitivity to the x=2.3 data point

Two detectors, one precise for x<2 and one not so good for x>2. We don’t trust much the value at x=2.3

38 of 87

Typical day of Bayes

Theory

friend

Exp.

friend

Bayes

friend

Are there any other models besides

?

39 of 87

Typical day of Bayes

Theory

friend

Exp.

friend

Bayes

friend

Are there any other models besides

Nope, is the only one that it is consistent with the

?

Theory

Friend (2)

Yes, there are!

also explains the data

40 of 87

Typical day of Bayes

Theory

friend

Exp.

friend

Bayes

friend

Are there any other models besides

Nope, is the only one that it is consistent with the

?

Theory

Friend (2)

Yes, there are!

also explains the data

But fails at small angles,

everyone knows that

That’s ok, we can mix both respecting their expertise domains

41 of 87

Typical day of Bayes

Theory

friend

Exp.

friend

Bayes

friend

Are there any other models besides

Nope, is the only one that it is consistent with the

?

Theory

Friend (2)

Yes, there are!

also explains the data

But fails at small angles,

everyone knows that

That’s ok, we can mix both respecting their expertise domains

How long it takes to evaluate each model?

Between 2 to 3

hours per

Around a second

Ok, we will

need emulators

42 of 87

Typical day of Bayes

Theory

friend

Exp.

friend

Bayes

friend

Are there any other models besides

Nope, is the only one that it is consistent with the

?

Theory

Friend (2)

Yes, there are!

also explains the data

But fails at small angles,

everyone knows that

That’s ok, we can mix both respecting their expertise domains

How long it takes to evaluate each model?

Between 2 to 3

hours per

Around a second

Ok, we will

need emulators

Someone said

emulators??

math friend

computer

friend

43 of 87

Typical day of Bayes

Theory

friend

Exp.

friend

Bayes

friend

Theory

Friend (2)

math friend

computer

friend

44 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

45 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Prior

(what we think

we know)

46 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Prior

(what we think

we know)

47 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Prior

(what we think

we know)

48 of 87

Practical example

Prior

(what we think

we know)

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

49 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Likelihood

(what we think happened)

50 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Likelihood

(what we think happened)

Data point :

51 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Likelihood

(what we think happened)

Data point :

52 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Likelihood

(what we think happened)

Data point :

53 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Likelihood

(what we think happened)

Data point :

54 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Likelihood

(what we think happened)

55 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Likelihood

(what we think happened)

56 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Likelihood

(what we think happened)

57 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Likelihood

(what we think happened)

58 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Likelihood

(what we think happened)

59 of 87

Practical example

Prior and likelihood building

Calculating new things

Sampling from posterior

and plotting it

From this

60 of 87

Practical example

Prior and likelihood building

Calculating new things

Sampling from posterior

and plotting it

We want this

From this

61 of 87

Practical example

Prior and likelihood building

Calculating new things

Sampling from posterior

and plotting it

Markov Chain Monte Carlo (MCMC)

Metropolis algorithm

1) Start somewhere

2) Propose new location and compute:

3) Pick “s” random between [0,1]

4) If

Move to

Stay in

5) Repeat 2-4 until you get tired

62 of 87

Practical example

Markov Chain Monte Carlo (MCMC)

Metropolis algorithm

1) Start somewhere

2) Propose new location and compute:

3) Pick “s” random between [0,1]

4) If

Move to

Stay in

5) Repeat 2-4 until you get tired

63 of 87

Practical example

Markov Chain Monte Carlo (MCMC)

Metropolis algorithm

1) Start somewhere

2) Propose new location and compute:

3) Pick “s” random between [0,1]

4) If

Move to

Stay in

5) Repeat 2-4 until you get tired

64 of 87

Practical example

Markov Chain Monte Carlo (MCMC)

Metropolis algorithm

1) Start somewhere

2) Propose new location and compute:

3) Pick “s” random between [0,1]

4) If

Move to

Stay in

5) Repeat 2-4 until you get tired

?

65 of 87

Practical example

Markov Chain Monte Carlo (MCMC)

Metropolis algorithm

1) Start somewhere

2) Propose new location and compute:

3) Pick “s” random between [0,1]

4) If

Move to

Stay in

5) Repeat 2-4 until you get tired

We move!

For this example, N ~

66 of 87

Practical example

Markov Chain Monte Carlo (MCMC)

Metropolis algorithm

1) Start somewhere

2) Propose new location and compute:

3) Pick “s” random between [0,1]

4) If

Move to

Stay in

5) Repeat 2-4 until you get tired

We move!

For this example, N ~

67 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Predict measurement here

Ruchi call Kyle please ☺

68 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Predict measurement here

69 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Predict measurement here

100,000

70 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Predict measurement here

100,000

1) Grab n values from list

2) Calculate the value for those

3) Make a histogram:

71 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Predict measurement here

100,000

1) Grab n values from list

2) Calculate the value for those

3) Make a histogram:

72 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Predict measurement here

100,000

High five!

73 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Predict measurement here

100,000

Credible band for f, not for y

74 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Predict measurement here

100,000

(for fixed )

75 of 87

Practical example

Prior and likelihood building

Sampling from posterior

and plotting it

Calculating new things

Predict measurement here

100,000

(for fixed )

76 of 87

Hand-on session time

https://github.com/ascsn/bayesianprimer

77 of 87

Hand-on session time

Emulator Challenge

Spectrum from Data

Convergence of Monte Carlo

Estimating the noise level

Experimental Design

Model Selection

The coffee problem

Difficulty

78 of 87

Hand-on session time

79 of 87

Hand-on session time

80 of 87

Hand-on session time

N= 1,000

N= 100,000

81 of 87

Hand-on session time

82 of 87

Hand-on session time

https://journals.aps.org/prc/abstract/10.1103/PhysRevC.94.034316

83 of 87

Hand-on session time

https://arxiv.org/abs/1812.05706

Parabola

Line

84 of 87

Hand-on session time

https://arxiv.org/abs/1812.05706

Parabola

Line

Pseudo –data analysis

are MEGA important

85 of 87

Hand-on session time

86 of 87

Hand-on session time

Emulator Challenge

Spectrum from Data

Convergence of Monte Carlo

Estimating the noise level

Experimental Design

Model Selection

The coffee problem

Difficulty

87 of 87

Further reading part

I will put interesting things here later....

Check

https://github.com/ascsn/bayesianprimer

in a couple of days