Bayesian Uncertainty Quantification Methods
Better knowing what we don’t know
ASCSN
Pablo Giuliani
giulia27@msu.edu
What to get from today
Why Uncertainty Quantification?
How to do it?
Hands on examples
Seek statistics friends
UQ is a model
What to get from today
Why Uncertainty Quantification?
How to do it?
Hands on examples
Seek statistics friends
UQ is a model
Ask questions
Why Uncertainty Quantification?
3
Scattering
Proton Puzzle
2010
Muonic result
Electronic result
0.84 fm
~
0.88 fm
~
Spectroscopy
Reason 1
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
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
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
Why Uncertainty Quantification?
5
Theory
friend
Exp.
friend
Neutrons
Protons
Reason 2
Why Uncertainty Quantification?
5
Theory
friend
Exp.
friend
Very expensive
experiment
Neutrons
Protons
Reason 2
Why Uncertainty Quantification?
5
Theory
friend
Exp.
friend
Maximum
Variability
(uncertainty)
Neutrons
Protons
Reason 2
Why Uncertainty Quantification?
5
Theory
friend
Exp.
friend
Neutrons
Protons
Maximum
Variability
(uncertainty)
1 interest
1 model
1 experiment
“easy”
Reason 2
Why Uncertainty Quantification?
6
Many interests
Reason 2
Figure adapted from A. Spyrou
Structure
Astrophysics
Symmetries
Applications
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
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
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
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
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
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
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
Why Uncertainty Quantification?
7
Bonus reasons
Nov 14 – 16, 2022
Why Uncertainty Quantification?
7
Bonus reasons
Nov 14 – 16, 2022
Why Uncertainty Quantification?
7
Bonus reasons
Nov 14 – 16, 2022
…
Why Uncertainty Quantification?
7
Bonus reasons
Nov 14 – 16, 2022
…
Why Uncertainty Quantification?
8
How
Why Uncertainty Quantification?
8
How
Theory
friend
Exp.
friend
parameters
Why Uncertainty Quantification?
8
How
Theory
friend
Exp.
friend
parameters
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
Bayesian Formulation
Advantages
1) Assumptions are clearly stated
2) Allows for natural continuous learning
Bayesian Formulation
Posterior
Likelihood
Prior
Evidence
Advantages
1) Assumptions are clearly stated
2) Allows for natural continuous learning
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
Bayesian Formulation
Posterior
Likelihood
Prior
Evidence
(what we want)
(what we think we know)
(what we think happened)
(how much sense all makes)
Bayesian Formulation
Posterior
Likelihood
Prior
Evidence
(what we want)
(what we think we know)
(what we think happened)
(how much sense all makes)
Bayesian Formulation
Posterior
Likelihood
Prior
Evidence
(what we want)
(what we think we know)
(what we think happened)
(how much sense all makes)
Bayesian Formulation
Posterior
Likelihood
Prior
Evidence
(what we want)
(what we think we know)
(what we think happened)
(how much sense all makes)
Typical day of Bayes
Theory
friend
Exp.
friend
Exp.
friend
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
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
Typical day of Bayes
Theory
friend
Exp.
friend
Bayes
friend
Are there any other models besides
?
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
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
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
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
Typical day of Bayes
Theory
friend
Exp.
friend
Bayes
friend
Theory
Friend (2)
math friend
computer
friend
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Prior
(what we think
we know)
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Prior
(what we think
we know)
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Prior
(what we think
we know)
Practical example
Prior
(what we think
we know)
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Likelihood
(what we think happened)
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Likelihood
(what we think happened)
Data point :
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Likelihood
(what we think happened)
Data point :
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Likelihood
(what we think happened)
Data point :
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Likelihood
(what we think happened)
Data point :
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Likelihood
(what we think happened)
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Likelihood
(what we think happened)
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Likelihood
(what we think happened)
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Likelihood
(what we think happened)
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Likelihood
(what we think happened)
Practical example
Prior and likelihood building
Calculating new things
Sampling from posterior
and plotting it
From this
Practical example
Prior and likelihood building
Calculating new things
Sampling from posterior
and plotting it
We want this
From this
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
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
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
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
?
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 ~
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 ~
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Predict measurement here
Ruchi call Kyle please ☺
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Predict measurement here
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Predict measurement here
100,000
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:
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:
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Predict measurement here
100,000
High five!
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
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Predict measurement here
100,000
(for fixed )
Practical example
Prior and likelihood building
Sampling from posterior
and plotting it
Calculating new things
Predict measurement here
100,000
(for fixed )
Hand-on session time
https://github.com/ascsn/bayesianprimer
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
Hand-on session time
Hand-on session time
Hand-on session time
N= 1,000
N= 100,000
Hand-on session time
Hand-on session time
https://journals.aps.org/prc/abstract/10.1103/PhysRevC.94.034316
Hand-on session time
https://arxiv.org/abs/1812.05706
Parabola
Line
Hand-on session time
https://arxiv.org/abs/1812.05706
Parabola
Line
Pseudo –data analysis
are MEGA important
Hand-on session time
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
Further reading part
I will put interesting things here later....
Check
https://github.com/ascsn/bayesianprimer
in a couple of days