physical fluctuomatics 6th markov chain monte carlo methods

25
Physical Fluctuomatics (Tohoku University) 1 Physical Fluctuomatics 6th Markov chain Monte Carlo methods Kazuyuki Tanaka Graduate School of Information Sciences, Tohoku University [email protected] http://www.smapip.is.tohoku.ac.jp/~kazu/

Upload: conan-woodard

Post on 01-Jan-2016

31 views

Category:

Documents


3 download

DESCRIPTION

Physical Fluctuomatics 6th Markov chain Monte Carlo methods. Kazuyuki Tanaka Graduate School of Information Sciences, Tohoku University [email protected] http://www.smapip.is.tohoku.ac.jp/~kazu/. Horizon of Computation in Probabilistic Information Processing. - PowerPoint PPT Presentation

TRANSCRIPT

Physical Fluctuomatics (Tohoku University) 1

Physical Fluctuomatics6th Markov chain Monte Carlo methods

Kazuyuki TanakaGraduate School of Information Sciences, Tohoku University

[email protected]://www.smapip.is.tohoku.ac.jp/~kazu/

Physical Fluctuomatics (Tohoku University) 2

Horizon of Computation in Probabilistic Information Processing

Compensation of expressing uncertainty using probability and statistics

It must be calculated by taking account of both events with high probability and events with low probability.

Computational Complexity

It is expected to break throw the computational complexity by introducing approximation algorithms.

Physical Fluctuomatics (Tohoku University) 3

What is an important point in computational complexity?

How should we treat the calculation of the summation over 2N configuration?

FT, FT, FT,

21

1 2

,,,x x x

N

N

xxxf

}

}

}

;,,,

F){or Tfor(

F){or Tfor(

F){or Tfor(

;0

21

2

1

L

N

xxxfaa

x

x

x

a

N fold loops

If it takes 1 second in the case of N=10, it takes 17 minutes in N=20, 12 days in N=30 and 34 years in N=40.

Markov Chain Monte Carlo MetodBelief Propagation Method

This Talk

Next Talk

Physical Fluctuomatics (Tohoku University)

4

Calculation of the ratio of the circumference of a circle to its diameter by using random

numbers (Monte Carlo Method)

1

1

-1

-1

0

Generate uniform random numbers a and b in the interval [-1,1] Count the number of points inside of the

unit circle after plotting points randomly

mm+1

a2+b2≤1

Yes

No

nn+1

n0 m0

2RS 1R n

mS

4

the ratio of the circumference of a circle to its diameter

Accuracy is improved as the number of trials increases

Physical Fluctuomatics (Tohoku University) 5

Law of Large Numbers

)( )(1

21 nXXXn

Y nn

Let us suppose that random variables X1,X2,...,Xn are identical and mutual independent random variables with average m. Then we have

Central Limit Theorem

)(1

21 nn XXXn

Y

tends to the Gauss distribution with average m and variance s2/n as n+.

We consider a sequence of independent, identical distributed random variables, {X1,X2,...,Xn}, with average m and variance s2. Then the distribution of the random variable

Physical Fluctuomatics (Tohoku University) 6

Calculation of the ratio of the circumference of a circle to its diameter by using random

numbers (Monte Carlo Method)

1

1

-1

-1

0

Count the number of points m inside of the unit circle after plotting points n randomly

2RS

1Rn

mS

4

the ratio of the circumference of a circle to its diameter

Accuracy is improved as the number of trials increases

From the central limit theorem, the sample average and the sample variance are 0 and 1/2n for n random points.The width of probability density function decreases by according to 1/n1/2 as the number of points, n, increases.

x- and y- coordinates of each random points is the average 0 and the variance ½.

Order of the error of the ratio of the circumference of a circle to its diameter is O(1/n1/2)

Physical Fluctuomatics (Tohoku University) 7

Integral Computation by Monte Carlo Method

1

1

-1

-1

0

Generate uniform random numbers a and b in the

interval [-1,1] Compute the value of f(x,y) at each point (x,y) after plotting points n

inside of the green region randomlymm + f(a,b)

nn+1

n0 m0

n

mI

4

1

1

1

1),( dxdyyxfI

Accuracy is O(1/n1/2)

Physical Fluctuomatics (Tohoku University) 8

Marginal Probability

Marginal Probability

1,0 1,0 1,0

2111

2 3

,,,x x x

L

L

xxxPxP

1,0 1,0 1,0

3212112

3 4

,,,,,x x x

L

L

xxxxPxxP

1,0 1,0 1,0

3213113

2 4

,,,,,x x x

L

L

xxxxPxxP

Physical Fluctuomatics (Tohoku University) 9

Important Point of Computations

||21 ,,, VxxxPP x

Computational time generating one random numbers should be order of |V|.

Can we make an algorithm to generate |V| random vectors (x1,x2,…,x|V|) which are independent of each other?

The random numbers should be according to

Physical Fluctuomatics (Tohoku University) 10

Fundamental Stochastic Process: Markov Process

),2,1 ;1,0( )()|()(1

01

txzPzxwxP

ztt

For any initial distribution P0(x),

Transition Probability w(x|y)≥0 (x,y=0,1)

)1(

)0(

)1|1()0|1(

)1|0()0|0(

)1(

)0(

1

1

t

t

t

t

P

P

ww

ww

P

P

Transition Matrix

10

z

xzw

Physical Fluctuomatics (Tohoku University) 11

Fundamental Stichastic Process: Markov Chain

1

0]1[

1

0]2[

1

0]1[0

1

0]1[1

])0[(])0[|]1[(])2[|]1[(])1[|(

])1[(])1[|()(

tz tz tz

tztt

zPzzwtztzwtzxw

tzPtzxwxP

)1(

)0(

)1(

)0(

0

0

P

PW

P

P t

t

t

1)( 0

01 1

UUW

)1(

)0(

0

01

)1(

)0(

0

01

P

PUU

P

Pt

t

t

Transition matrix can be diagonalized as

)1(

)0(

00

01

)1(

)0(lim

)1(

)0(

0

01

P

PUU

P

P

P

P

t

t

t

Limit Distribution

Physical Fluctuomatics (Tohoku University) 12

Fundamental Stochastic Process: Markov Process

1

0]1[1 ])1[(])1[|()(

tztt tzPtzxwxP

)1(

)0(

)1(

)0(

P

PW

P

P

1

0]1[

])1[(])1[|()(tz

tzPtzxwxP

Stationary Distribution or Equilibrium Distribution

)1(

)0(lim

)1(

)0(

t

t

t P

P

P

P

In the Markov process, if there exists one unique limiting distribution, it is an equilibrium distribution.

Even if there exists one equilibrium distribution, it is not always a limiting distribution.Example

2/1

2/1

)1(

)0(

P

PThe stationary distribution is

11

11

10

01

11

11

2

1

01

10W

Physical Fluctuomatics (Tohoku University) 13

Stationary Process and Detailed Balance in Markov Process

1

01 )(

ytt yPyxwxP

1

0y

yPyxwxP Stationary Distribution of Markov Process

P1(x), P2(x), P3(x),…: Markov Chain

)()( yPyxwxPxyw Detailed Balance

When the transition probability w(x|y) is chosen so as to satisfy the detailed balance, the Markov process provide us a stationary distribution P(x).

11

0

y

xywwhere

Physical Fluctuomatics (Tohoku University) 14

Markov Chain Monte Carlo Method

),3,2,1( )()( 1

tyPyxwxP

ytt

)()(lim xPxPtt

),,,()( 21 LxxxPxP

Let us consider a joint probability distribution P(x1,x2,…,xL)

T21 ),,,( Lxxxx

How to find the transition probability w(x|y) so as to satisfy

where

P1(x), P2(x), P3(x),…: Markov Process

Physical Fluctuomatics (Tohoku University) 15

Markov Chain Monte Carlo Method

They can be regarded as samples from the given probability distribution P(x).

For sufficient large , t x[t], x[2t], x[3t], …, x[Nt] are independent of each other

Randomly generated

Reject

How large number ? tt: relaxation time

]1[]1)2[(]1)1[(

]2[]2[]1[

][]2[]1[

NxNxNx

xxx

xxx

Accuracy O(1/t1/2)

1txtxw

1tx tx

Physical Fluctuomatics (Tohoku University) 16

N

nXnx

X X XL

N

XXXXPXP

L

1,

32111

11

2 3

1

,,,,

Markov Chain Monte Carlo Method

][]2)1[(]1)1[(

]2[]2[]1[

][]2[]1[

NxNxNx

xxx

xxx

Histgram

XiMarginal Probability Distribution

Physical Fluctuomatics (Tohoku University) 17

Lii

LiiiLiii xxxxxP

xxxxxxPxxxxxxP

,,,,,,

,,,,,,,,,,,,,

1121

11211121

Markov Chain Monte Carlo Method

Eji

jiijL xxxxxPxP},{

21 ),(),,,()(

E : Set of all the neighbouring pairs of nodes

V : Set of all the nodes

iz

LiiiLii xxzxxxPxxxxxP ,,,,,,,,,,,,, 11211121

Physical Fluctuomatics (Tohoku University) 18

Markov Chain Monte Carlo Method

Eji

jijiL xxxxxPxP},{

},{21 ),(),,,()(

ijxxP

xz

xx

xxxxxxP ji

z ijjiji

ijjiji

Liii

i

,

,

,,,,,, },{

},{

1121

Markov Random Field

E : Set of all the neighbouring pairs of nodes

∂i : Set of all the neighbouring nodes of the node i

),( EV),( EV

||VL

Physical Fluctuomatics (Tohoku University) 19

Markov Chain Monte Carlo Method

Vi

z ijjiji

ijjiji

iVkkkLL

i

xz

xx

xxxxxxxxw,

,

),(,,,,,,},{

},{

/2121

'xP'xxwxPxxw

'),( EV

ikxx kk

Eji

jijiL xxxxxPxP},{

},{21 ),(),,,()(

1txtxw

1tx tx

Physical Fluctuomatics (Tohoku University) 20

Markov Chain Monte Carlo Method

x

x’

xi = ○ or ●

V

V

True False

1txtxw

]1[ tx tx

Physical Fluctuomatics (Tohoku University) 21

Sampling by Markov Chain Monte Carlo Method

Disordered State Ordered State

Sampling by Markov Chain Monte Carlo Method

Near Critical Point of p

Small p Large p

p p

More is different.

Physical Fluctuomatics (Tohoku University) 22

Summary

Calculation of the ratio of the circumference of a circle to its diameter by using random numbers

Law of Large Numbers and Central Limit Theorem

Markov Chain Monte Carlo Method

Future Talks9th Belief propagation10th Probabilistic image processing by means of physical models 11th Bayesian network and belief propagation in statistical inference

Physical Fluctuomatics (Tohoku University) 23

Practice 8-1

x'

x'x'xx PwP

x'x'xxxx' PwPw

When the probability distribution P(x) and the transition probability w(x’|x) satisfy the detailed balance

1x

xxwwhere , prove that

Physical Fluctuomatics (Tohoku University) 24

Practice 8-2

21

12

3

1W

Let us consider that the transition matrix of the present stochastic process is given as

)1(

)0(

)1(

)0(

1

1

t

t

t

t

P

PW

P

P

)1(

)0(lim

)1(

)0(

t

t

t P

P

P

PFind the limit distribution defined by

, where

Physical Fluctuomatics (Tohoku University) 25

Practice 8-3

yL

xL

Example of generated random vector in the case of Q=2, a=2

L=Lx×Ly

Let us consider an undirected square grid graph with L=Lx×Ly nodes. The set of all the nodes is denoted by V={1,2,…,L} and the set of all the neighbouring pairs of nodes is denoted by E. A random variable Fi is assigned at each node i and takes every integer in the set {0,1,2,…,Q-1} . The joint probability distribution of the provability vector F=(F1,F2,…,FL)T is given as

Make a program which generate N mutual independent random vectors (f1,f2,…,fL)T randomly from the above joint probability distribution Pr{F1=f1,F2=f2,…,FL=fL} . For various values of positive numbers a, give numerical experiments.

EjijiLL ff

ZfFfFfF

},{

2

Prior2211 2

1exp

1,,,Pr

Example of generated random vector in the case of Q=256, a=0.0005