exploring the connection between sampling problems in bayesian inference and statistical mechanics

32
Exploring the connection between sampling problems in Bayesian inference and statistical mechanics Andrew Pohorille NASA-Ames Research Center

Upload: ginny

Post on 20-Jan-2016

31 views

Category:

Documents


1 download

DESCRIPTION

Exploring the connection between sampling problems in Bayesian inference and statistical mechanics. Andrew Pohorille NASA-Ames Research Center. Outline. Enhanced sampling of pdfs Dynamical systems Stochastic kinetics. flat histograms multicanonical method Wang-Landau - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Exploring the connection between sampling problems in Bayesian inference and

statistical mechanics

Andrew Pohorille

NASA-Ames Research Center

Page 2: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Outline

• Enhanced sampling of pdfs

• Dynamical systems

• Stochastic kinetics

flat histogramsmulticanonical methodWang-Landautransition probability methodparallel tempering

Page 3: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Enhanced sampling techniques

Page 4: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Preliminariesdefine: variables x, , N a function U(x,,N) a probability:

marginalize x

define “free energy” or “thermodynamic potential”

partition function Q(x,,N)

energies areBoltzmann-distributed = 1/kT

Page 5: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

The problem:

What to do if

is difficult to estimate because we can’t get sufficient statistics for all of interest.

Page 6: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Flat histogram approach

pdf sampled uniformly for all , N

weight

Page 7: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Example:

original pdf

weighted pdf

marginalization

“canonical”partition function

1. get 2. get Q

Page 8: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

General MC sampling schemeinsertion

deletion

insertion

deletion

adjust weights

adjust free energy

free energy

Page 9: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Multicanonical method

bin count shift

normalization of

Berg and Neuhaus, Phys. Rev. Lett. 68, 9 (1992)

Page 10: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

The algorithm• Start with any weights (e.g. 1(N) = 0)

• Perform a short simulation and measure P(N; 1) as histogram

• Update weights according to

• Iterate until P(N; 1) is flat

or better

Page 11: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Typical example

Page 12: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Wang-Landau sampling

entropy

acceptance criterion

Wang and Landau, Phys. Rev. Lett. 86, 2050 (2001), Phys. Rev. E 64, 056101 (2001)

update constant

Example: estimate entropies for (discrete) states

Page 13: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

The algorithm

• Set entropies of all states to zero; set initial g

• Accept/reject according to the criterion:

• Always update the entropy estimate for the end state

• When the pdf is flat reduce g

Page 14: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Transition probability method

i j

K

IJ

Wang, Tay, Swendsen, Phys. Rev. Lett., 82 476 (1999)Fitzgerald et al. J. Stat. Phys. 98, 321 (1999)

Page 15: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

detailed balance

macroscopicdetailed balance

Page 16: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Parallel tempering

Page 17: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Dynamical systems

Page 18: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

The idea: the system evolves according to equations of motion (possibly Hamiltonian)

we need to assign masses to variables

Assumption -ergodicity

Page 19: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Advantages• No need to design sampling techniques

• Specialized methods for efficient sampling are available (Laio-Parrinello, Adaptive Biasing Force)

• No probabilistic sampling

• Possibly complications with assignment of masses

Disadvantages

Page 20: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Two formulations:

• Hamiltonian

• Lagrangian

Numerical, iterative solution of equations of motion (a trajectory)

Page 21: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Assignment of masses

• Masses too large - slow motions

• Masses too small - difficult integration of equations of motion

• Large separation of masses - adiabatic separation

Thermostats are availableLagrangian - e.g. Nose-HooverHamiltonian - Leimkuhler

Energy equipartition needs to be addressed

Page 22: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Adaptive Biasing Force

A = a

b ∂H()/∂ *d

*

Darve and Pohorile, J. Chem. Phys. 115:9169-9183 (2001).

force A

Page 23: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Summary

• A variety of techniques are available to sample efficiently rarely visited states.

• Adaptive methods are based on modifying sampling while building the solution.

• One can construct dynamical systems to seek the solution and efficient adaptive techniques are available. But one needs to do it carefully.

Page 24: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Stochastic kinetics

Page 25: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

The problem• {Xi} objects, i = 1,…N

• ni copies of each objects

• undergo r transformations

• With rates {k}, = 1,…r

• {k} are constant

• The process is Markovian (well-stirred reactor)

Assumptions

Page 26: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Example

7 objects5 transformations

Page 27: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Deterministic solution

concentrations

kinetics (differential equations)

steady state (algebraic equations)

Works well for large {ni} (fluctuations suppressed)

Page 28: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

A statistical alternative

generate trajectories

• which reaction occurs next?• when does it occur?

next reaction is at time

next reaction is at any time

any reaction at time

Page 29: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Direct method - Algorithm

• Initialization

• Calculate the propensities {ai}

• Choose (r.n.)

• Choose (r.n.)

• Update no. of molecules and reset tt+ • Go to step 2

Gillespie, J. Chem. Phys. 81, 2340 (1977)

Page 30: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

First reaction method -Algorithm• Initialization

• Calculate the propensities {ai}

• For each generate according to (r.n.)

• Choose reaction for which is the shortest

• Set =

• Update no. of molecules and reset tt+ • Go to step 2

Gillespie, J. Chem. Phys. 81, 2340 (1977)

Page 31: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Next reaction method

Complexity - O(log r)

Gibson and Bruck,J. Phys. Chem. A 1041876 (2000)

Page 32: Exploring the connection between sampling problems in Bayesian inference and statistical mechanics

Extensions

• k = k(t) (GB)

• Non-Markovian processes (GB)

• Stiff reactions (Eric van den Eijden)

• Enzymatic reactions (A.P.)