Acceptances and autocorrelations in hybrid Monte Carlo

Acceptances and autocorrelations in hybrid Monte Carlo

N~c]ear Fla)'~s B (Proc. S~pp; } ~0 ,!:]~@F#118-12~ 118 ACCEPTANCES AND AUTOCORRELATIONS IN HYBRID MONTE CARLO A . D . KENNEDY SCRt, Florida State ...

233KB Sizes 0 Downloads 91 Views

N~c]ear Fla)'~s B (Proc. S~pp; } ~0 ,!:]~@F#118-12~

118

ACCEPTANCES AND AUTOCORRELATIONS IN HYBRID MONTE CARLO A . D . KENNEDY

SCRt, Florida State Univers~y. Tallahassee,FL 32306-4052, USA Brian PENDLETON

Physics Department, Edinburgh UniverSe, Edinburgh EH9 3JZ, Scotland We ~ - ~ t the results of an analy~ stml~ of the Hyl~d Monte Carlo al~orltl~ for free 6ekl theory. We colculate the ~ rate aml aL~ocored*don func~m as a fraction of lutdce vobune, intelpmd~ ~ep by a ~udicious d ~ c e of awage t ~ u ~ 1.

le~. 2. ~m~grate ~,e f~kls a~l m o m ~

INTRODUCTION

in this pap~ we a~ress the question: "How much does Hybrid Mome CarloI redy cest.P We ¢akulate the HMC a ~ rate for free fidd theo1~ as a functi~ of the ~ step-size ~r and the l a U ~ ~)l.me V. O w resolt confinm and e~temls ~sm~ts ~ from Ipmmal aqpuneedLsaml ~,,~.pJe~ 3,4. Next wetum ourato te~tion ~o tbu a ~ func~on of the theo~ and p~esm~tam exlp~c~tderivation of the an~c~pated result that the average HMC trajectory len~h should be clms~ invem~ propo~io.a~ to the f~equencyof the ~ e i g e . ~ of ti~ sy~em.5

2.1. UncoupledOscillators We begin with a brid desaiption of the Qlculation of the acceptance rate for Langevin Monte Carlo simulations of a system of .N uncoupled o~cillators with frequencies ~ 6. Using field theory notation, the Hamiltonian for evolution in fictitious time r is /it

• -~(,r,-,-/2) = .j(0}-~#,(o),r.-/2 , M ~ ) = ÷.~(0)+=j(~p-)~,-

3. Accept d ~ .era fiekis :..d momenta mith proi~

~,ir~ r,-:,,.p.,~p(-6~]. The a__':cer_~ta.~rate is obtained by i,,tegratE~g equ~ib,i.m co.r-~..rationsoft i e fields ÷..~0) a,rxlmo-

m,.ta .~(0). The ~ d ~ m for L a ~

mob~b~y

~

Monte Carlo is th,,~

Pace = I f a,~,da~r e _ e , ~ , ) rain(l, e_ser)"

2- ACCEPTANCE RATE FOR FREE FIELDS

N 1 ~--.. = -- c°~~, j=l

d~.-o,#, o ~

(22) with

s~ = e ( ~ - ) - e ( 0 ) •" ~ Ib.,4..~r t 3 -- I~4, 2 212xe4 = 2-,j~4-- ~¢~ ~rr t--8 ~t'r~- (o~jpr 1 ~

- ~j~j.j~,

s

+

~1; ~ T8 2

~.

s"~

(2.1)

-

The LMC algorithm consists of the following steps: 1. Generate a new set of momenta ~.~ from their equilibrium distribution: _P(~r~(O)) oc

To evaluate the integral in equation (2.2) we perform an asymptotic expansion to generate a power series in 1IN which is valid for all 6r << N 7. To leading order we have6, 7. 8

exp(-~(07). 0920-5632/91/$3.50 ~ Elsevier Science Publishers B.V. (North-Holland)

A+D+Kem+edy+ 1~. Pend/e+om/Acoept~ces aad aatocorretations ia h.vbrid MOate Carlo

2.2. Fme ~ "i'~--,~ry For ~ we c e m ~ a re~l free sceJ~r ~ J them'y b ooe d~n~umu~on.The Han-,ioe~an itmemu ~ ~ in 6 d i l ~ m time is Ar

T l ~ _.'~.z~zim d Pza: s mmz e~d~ W ~ d m . e d i~ F o = ~ ~ to " m i ~ sapace" udbe~ "-TI~ ~,meamm

k:

"

Cor~afie4~ the resultsfor the two ~scretL~.io~ we see tbat to keep a ~ acceptae~ rate re. qu~es ~r ,,,-N-z~ s for ~ amJ 5r o~ N -~/m for the ~:~er ~de~ akm~an. However, ~mce u~o ::> as tbe ~ o~der a ~ , e w i ~ ~ oa hq~e h m ~ e ~

Ammmg ~ Zhe Oee ~dd r e s ~ ~ e~r ~. tadvdy eo zr~e~em, d+e~ m~,efo, HiaC, ~is m,k~ ~wlex ~ ~s h,.'+ zo It,era on We~nt aay

~ ~ r . ~

2.4.

remdz+ co H I I ( ~ : l,n g ( . ~ ~ ~ m0me,ezem ~ +..1 d ~ 114emmfm~seep+ Om= qmm ~ee r ~ ! m e ~ k m m ~ m m ~ e k a ~dd tm~

Smme tlke ~ f w Fomier ~ , ~ l ~ m a e i m k mi~w, m can ~ abe n~suk fur mumbled ~ s c l a ~ ,reek ~ . 'The ~ o-.+;,,- ,el,e ~

,-~. d z~e ~ m s a d ZCm m ~ d

ah~ ~ a g i ~

maU~ ama ~

m ~gm-

~enptmmnalmmmsom~e4mmmemcz

= +2., ,=+2..;

-+

~

m ~ m ~ k l e ~a~e.

OiaBma~iq ~

":-

119

,, = ~ , ! ~ . T,./... ~

@1"

ash/+ oo. wilh Z~-------S're/N.l l e e m e t l k e ~

aid m

~H ~

0(+.').

lk~ 7.8

~ - l - m ~. In l~ghm d h m e u i m ~ m o M a m tJkemme res~ m~5 ~ qmmmiase spedral m m a..

2.3. H ~ - O , d ~ h,aap-,eH,Sd~a,~ O,e ~a

mmm~

a ~

dtbe 1

rorswhic5 a+eO(5"rh) 9. "Fhene~sdimmecom,prises a ~

step with ~

~., a '~sadmanr"

step o~s ~ -~y-~ ~ u e d by a n o t ~ ~ m r d step

z

Nj Illsi~ ~ke f~ee from speclmm ~ e leer

d dze e. To emme that the I ~ l m ~ l m d ~ m o ~ s the same d ~ as I ~ hal~m~ s ~ n~ 51" quires~ = ~ - - - ~ . The a l c d a t i o n o f the a c o ~ ~ance rate is m'aightformrd but ted~m. The IS

1 0 with o" ~ .~,~,~,r~+ . F o r t ~ e ~ e k l t h e m ~ o n an h~fln+te lattice we have +zo = 252-1-350m~-1-200m4-160ms + tOm s -I- m ~°.

For m ~ 0 and N --~ oo ~

cam e v a ~ t e ~hm¢

---- 2 -

3 4

Jo(4ro) + J2(4~o) - : J~-(~~- . . . .

A.D. Kennedy, B. Pend~eton/ Acceptances a~d autocorretations in ~ybr~d Monte Ca,r~o

120

....

I ....

I ....

I ' ' ' ' ij

turn space.

We shaN consider here onlX the I ~ 6T ~ O. The evolution of the field for c ~ d~am~

given by the solution of Newton's equations .98 Now ~ p p e ~ that t ~ n at* ~ a mom~ re~ at times 0 < % < --- _< r~_l < T= -~ ~'.

.96

l -

2

4 TO

6

B

Figure 1: H M C acceptance rate Pace as a function of trajectory length ~o for masslessfree fiekl theory ut R = 20 and ~ =0.2. The solid line is gi~m by the

=..-ay'ac, ~

of,~u=tlo= (~-~0) =ed (:~.zz).

As e)q)ected, w e f i r ~ t h a t we nllOlSt t,Jne ~ - (~ N - z / 4

to maintain a constant acceptance rate_ ~Jotethat although the acceptance rates for LMC and HMC havethe same functional forum,olin¢ cannot be obta~ed from ~ra in any simple way. For ~o = &r. ex~en~,~ equation (2.10) ~ , = the LMC result ( ~ We have checked the analytic result against numerical simulations of free field theory for a variety of values of N and ~-. F'q;ure 1 shows th~ results obtained on a lattice of 20 sites at ~ = 0.2. 3. AUTOCORRELATION FUNCTION Another important issue for HMC is the question of what trajectory length one should employ. In reference I we tuned the trajectory length ~o to coincide with one of the peaks of the acceptance rate. However, as we shall see, this may turn out to be far from optimal clue to an effect first pointed out by Mackenzie11. Let us define the autocorrelation function for the magnetisation

c ( , ) - ~3Y~(~(')~(°)) I:~=,(~(0))

:C~1(~(.)~(0)) =

"

Gemeralisin¢equatlo~ (3-2) to the case of m = ~ brajeclx~iesand ~,telprat~ ot~r eqmlibrknn ~stegm*.ion of the ~ ~ ( 0 ) and of the ~ mor~n~ ~r~(~) ~ tl~ a.tocorrdado, fun(ton

,

(3.1) Once again the properties of the Fourier transform allow us to perform the entire calculation in momen-

~ - z istl~ lengd~ of t ~ i ~ Jza~_-~t___~/. It is ~ to ~eneraise equadoo (33) to the ."~_ of m n d m UajectarT i m g t ~ tet Ps(s) be the p r o b ~ of ~ a tr~jectc~ of length s. The ~-

autoconelat~onfunction is then C(.)-~

~z f f ebz. .- ~ ds, Pn(sz) ... P,(~.) i

xC.(sz,.--, ~=) a(~- -- ~ al).

(3.4)

;-1

We can factorise this e x p ~ and dins sum the secies by taking the Laplace transform F(fl) = =

off dr C(,)e=p(-pr) 1 ~-, 1 [

1

(3.5) 1] (3.6)

where

~o= ~Pa(s) exp(--fls) cos(~s).

(3.7)

For ergodic processesthe autocarrelatlon function at large times will decay as C(,) ~ e x p ( - , / T )

(3.8)

where T is the exponential autocorrelation dine. Hence, from equation (3.5) we see that P(/~) will have a pole at R e ~ = -1/T and this will be the rightmost pole.

A_D. K ~ v .

,~p{-,/-,)/-, ,~ ~

B. Pe~dIem~ /Atr~eptaaces ~nd aatoco~tefatiou,~, i~ hybrid ~%fo~ie Caz/o

~

I,~ 0 , ~ - ~ .

12t

lattice with Hybrid Mcn~e Carlo is proportional to N ~/'. as has bee. ~ an',~:~ed. P ~ n ~ we can ume the averap t~ajedory lehigh ~n such a wsy that the system ~ v;.a a I p ~ c f ~ walk ~ t h ¢ ~ i ar~i¢~ a p o n c J ~ z = 1 and

r(p)~

We arei, u , ~ !

i , me dmm~ ~

~

of the l=im m a ~ ? We ~ a ~ m ~ t mlulafm~ ~

~ ~

m-

ACKIOWtEDG~EITS ADK m ~ k l Br,e to d m k M J Sek~ Ibr a t o d d qrm:mmn i E ~ ~ i d D I ~ to the m d ~ d s~r.t i m $. BJP m:,dd l i ~ to d m k ..~mm D~me f w ~ a d tJr~ UK SERC far f . m n c ~

~/(~,)

~

mme, t.

O,~ T = ~/*~,-

Lel ~ w w o m e l e t the ~ m i ~ ! ~ l i " ~ e~im~ . "i~ oml~er One To,~ ~ 1o lpme~ ate a ,ew i , d e l ~ d m t c ~ l f p ~ 6 ~ is ~.-.~;.~.-.'~

to T / ~ .

F=r mbT~ of the ~

i . ~

sd~ we nmst lurm e~..~rr ~ L At T = l f i , ~ . we o b t m

REFEREL~ES ]L S. Dram, A. D. I(,mml~ B. J. P e d l s m , aml

D. R m e ~ ~

2. u . ~ P~

Le~ ]l.~B (IgOr) 21fL

Pi~. p,.,. o ~ ( ~ )

z2~.

~ , . DU ( ~ )

4. S. G . p ~ ~ UUSck.F. KancU a.d B. ~ u ~

wmm w~th = = 1, ~ bei~ the om~adoa l e q ~ a~l ~ the

D u a l S , 12 A --",.~ar cak:ulatm for ~ bajecto~es (~a ~ ~r) yieldsthe vaJuez = 2 exped~ ~ x , a local a l ~ Hence the non-local update genorated by clam~cal dynamics over a ~ tra~*__-~3,

down. We can eae;Jyrepeat the above analysis for fixed leni~h trajectories Pe(s) = ~(~ -- To). We f~.d To

(3A2)

s. s. m , , ~ b u . Pkys.B'~'T IFS~I ( m s ) r~-. 6. H. C,m~r~ , a U. S.~.U,,~. L~m. R~,. OO (Zgm) 2"m. 7. A, D. Kemedy atoll B. J. P e m E e ~ in i ~

r'~ 8. A. D. Kenmdy. prepd~ F S U - S ~ 1 4 7 , FERmLAB-COUF4g/237-T. 9. M. ~

0~0) ?s3.

aad P. Ros~ NucL Phys. B329

10. M. ~ d z and A. GKksch. Phys. Rev. U,~: 53 {~989) 9. 11. P. Mackenzie. Phys. L e ~ B226 (1989) 369.

Now. if to .~ ~ r / w e for some w~. then T --> oo and

the system never equilibrates. 1~

4. CONCLUSIONS Our results show that the cost of simulating free field theory at fixed correlation length on an N-site

12. S. Duane. Pmo~c~lp of XX111 ~ i Co,fere,ce on HEP. (World Scie,tifi~ 1987). 551.