mix match hamiltonian monte carlo
play

Mix & Match Hamiltonian Monte Carlo Elena Akhmatskaya 1,2 and - PowerPoint PPT Presentation

Mix & Match Hamiltonian Monte Carlo Elena Akhmatskaya 1,2 and Tijana Radivojevi 1 1 BCAM - Basque Center for Applied Mathematics, Bilbao, Spain 2 IKERBASQUE, Basque Foundation for Science, Bilbao, Spain ICMAT Workshop: Mathematical


  1. Mix & Match Hamiltonian Monte Carlo Elena Akhmatskaya 1,2 and Tijana Radivojevi ć 1 1 BCAM - Basque Center for Applied Mathematics, Bilbao, Spain 2 IKERBASQUE, Basque Foundation for Science, Bilbao, Spain ICMAT Workshop: Mathematical Perspectives in Biology, Madrid February 3, 2016

  2. Outline • Introduction to hybrid Monte Carlo • Hamiltonian Monte Carlo • Mix & Match Hamiltonian Monte Carlo

  3. Hybrid Monte Carlo - overview ► The method has been introduced by S. Duane, et al. for lattice field theory simulations: Hybrid Monte Carlo, Phys. Lett. B 195 (1987) 216-222 ► Idea: to combine two basic simulation approaches for molecular simulations ü Deterministic: Molecular dynamics (MD) ¡ ¡ Numerically integrates Newton’s / Hamiltonian equations to predict time evolution of the simulated system ü Stochastic: Metropolis Hastings Markov Chain Monte Carlo (MHMC) Generates a random walk in the phase space of the system using a proposal density and includes a method for rejecting / accepting proposed moves ¡

  4. Hybrid Monte Carlo - rationale ¡ MD and MC are surprisingly complementary: where one method fails another succeeds ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ Useful Properties for Sampling Methods MC MD Allow for large moves between consecutive configurations ü Yes ✗ No ▶ A proposal is well defined ✗ No ü Yes ▶ Do not require gradients computation ü Yes ✗ No ▶ Free of discretization errors ü Yes ✗ No ▶ Provide dynamic information ✗ No ü Yes ▶ ✗ No ¡ Maintain temperature by construction ü Yes ▶

  5. Hybrid Monte Carlo - algorithmic summary Run MD trajectory at constant energy: ▶ ü Randomly assign momenta ü Numerically integrate Hamiltonian equations for a fixed number of steps d x = M -1 pd t; dp = −∇ x U ( x )d t Accept trajectory with Metropolis probability min 1 , exp( − β Δ H ) { } ▶ H := H H Δ − ≠ 0 (due to numerical errors) end start H ( x, p) = U ( x ) + 1 2 p T M -1 p - Hamiltonian X – position, p – momentum, U – potential energy, M – mass matrix , β - Boltzmann factor ρ canon ∝ exp( − β H ) Sample in constant temperature (canonical) ensemble ▶

  6. Hybrid Monte Carlo (HMC) - synopsis Purpose: Method: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ▶ Efficient sampling in molecular ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ MC ¡ ¡ simulations ü ¡MC ¡move ¡= ¡MD ¡ ▶ Reduced discretization error ▶ Rigorous temperature control What we got? What is next? ▶ Add more dynamical information ▶ HMC: bad MD but good Monte Carlo ▶ Improve acceptance rates for ü Moderate system size: large systems Performance degradation with system size and time step ▶ Extend to new applications ü Thermodynamic properties only: does not reproduce in full dynamics of the system

  7. Evolution of hybrid Monte Carlo methods MD Hybrid Monte Carlo + = HMC ( D’87 ) Atomistic MC molecular simulation Generalized HMC Shadow HMC Generalized SHMC GHMC ( H’91, KP’01 ) SHMC ( IH’04 ) GSHMC ( AR’08-15 ) ( less rejections ) ( more dynamics ) ( dynamics + sampling ) Meso-GHMC /GSHMC MTS-GHMC/ GSHMC ( AR’08-15 ) ( AR’08-15 ) Particle simulation Multi-scale simulation D’87 : Duane et. al, 1987; H’91 : Horowitz, 1991; KP’01 : Kennedy & Pendleton, 2001; IH’04 : Izaguirre & Hampton, 2004; AR’08-15 : Akhmatskaya & Reich, 2008-2015; N’93 : Neal, 1993

  8. Evolution of hybrid Monte Carlo methods MD Hybrid Monte Carlo Hamiltonian Monte Carlo + = HMC ( D’87 ) HMC ( N’93 ) Atomistic MC Statistical simulation molecular simulation Generalized HMC Shadow HMC Generalized SHMC GHMC ( H’91, KP’01 ) SHMC ( IH’04 ) GSHMC ( AR’08-15 ) ( less rejections ) ( more dynamics ) ( dynamics + sampling ) Meso-GHMC /GSHMC MTS-GHMC/ GSHMC ( AR’08-15 ) ( AR’08-15 ) Particle simulation Multi-scale simulation D’87 : Duane et. al, 1987; H’91 : Horowitz, 1991; KP’01 : Kennedy & Pendleton, 2001; IH’04 : Izaguirre & Hampton, 2004; AR’08-15 : Akhmatskaya & Reich, 2008-2015; N’93 : Neal, 1993

  9. Hamiltonian Monte Carlo - formulation ▶ For the target density π ( θ ) of position vector θ , momenta p conjugate to θ , and a ‘mass’ matrix M (a preconditioner) U ( θ ) = − log( π ( θ )) ü construct a potential function H ( θ ,p) = U ( θ ) + 1 2 p T M − 1 p ü and a Hamiltonian ▶ Obtain a proposal in the Markov chain by simulating Hamiltonian dynamics (HD) ▶ Perform sampling with respect to a canonical density π ( θ ,p) ∝ exp( − H ( θ ,p))

  10. Hamiltonian Monte Carlo - algorithm ( θ , p ) Complete Momentum Update (CMU) Hamiltonian Dynamics CMU Integrates for L steps the Hamiltonian equations using a symplectic numerical integrator with a time step h ¯ p ( ) = ψ τ θ , p ( ) , θ , ! p Generated proposal: ! τ = Lh ψ τ is the time-reversible symplectic map, Metropolis test " ( ) with θ , ! p probability ! α $ θ new , p new ( ) = ( θ 0 , p 0 # ( ) otherwise θ , p $ % { ( ) } α = min 1 , exp − Δ H ( ) − H θ , p ( ) ≠ 0 Δ H = H θ , ! p ( θ ) ! , p

  11. Hamiltonian Monte Carlo – synopsis Features Problem sizes: 10-10 4 against 10 3 -10 6 in molecular simulation ▶ All elements and parameters of the method do not have a physical meaning ▶ ü Dynamics is not important ✗ The choice of simulation parameters is purely heuristic Highly oscillatory Hamiltonian systems ▶ ✗ an appropriate choice of a numerical integrator is not obvious ✗ the randomized simulation parameters for HD are preferable Hierarchical/latent-variable models are common ▶ ✗ require tuning of multiple non-independent sets of simulation parameters Wish list Rational choice of simulation parameters ▶ Problem specific numerical integrators ▶ Improved acceptance rates ▶ Increased sampling efficiency ▶

  12. Evolution of Hamiltonian Monte Carlo methods HD Hamiltonian Monte Carlo + = HMC ( N’93 ) MC Statistical simulation Riemann manifold HMC Extra chance HMC RMHMC ( GC’11 ) XCGHMC (SDMDW’14, CSS’15 ) ( less rejections ) (strongly correlated target densities ) No-U-Turn Sampler NUTS ( HG’14 ) (tuned parameters) N’93 : Neal, 1993; GC’11 : Girolami & Calderhead, 2011; HG’14 : Hoffman & Gelma n, 201 4; SDMDW’14 : Sohl-Dickstein, Mudigonda and DeWeese , 2014 ; CSS’15 : Campos and Sanz-Serna, 2015; AR’16 : Akhmatskaya & Radivojevi ć , 2016

  13. Evolution of Hamiltonian Monte Carlo methods Mix&Match HMC HD Hamiltonian Monte Carlo + = MMHMC ( RA’16 ) HMC ( N’93 ) ( high dimensions, MC Statistical simulation enhanced sampling ) Riemann manifold HMC Extra chance HMC RMHMC ( GC’11 ) XCGHMC (SDMDW’14, CSS’15 ) ( less rejections ) (strongly correlated target densities ) No-U-Turn Sampler NUTS ( HG’14 ) (tuned parameters) N’93 : Neal, 1993; GC’11 : Girolami & Calderhead, 2011; HG’14 : Hoffman & Gelma n, 201 4; SDMDW’14 : Sohl-Dickstein, Mudigonda and DeWeese , 2014 ; CSS’15 : Campos and Sanz-Serna, 2015; RA’16 : Radivojevi ć & Akhmatskaya, 2016

  14. Preview I We introduce an alternative to Hamiltonian Monte Carlo (HMC) for ef fi cient sampling in statistical simulations I The new method called Mix & Match Hamiltonian Monte Carlo (MMHMC) has been inspired by Generalized Shadow Hybrid Monte Carlo (GSHMC ) by Akhmatskaya & Reich I MMHMC: 3 is generalized HMC that samples with modi fi ed Hamiltonians 3 offers computationally effective Metropolis test for momentum update 3 reduces potential negative effects of momentum fl ips 3 relies on the method- and system- speci fi c adaptive integration scheme and compatible modi fi ed Hamiltonians 3 outperforms in sampling ef fi ciency the advanced sampling techniques for computational statistics such as HMC and Riemann Manifold HMC 3 ef fi cient for sampling in multidimensional space

  15. Behind the scenes I 2008 – 2011: GSHMC was 3 introduced for sampling in molecular simulation 3 published : Akhmatskaya, Reich (2008), JCOMP, 227, 4934; Akhmatskaya, Bou-Rabee, Reich (2009), JCOMP, 228 (6), 2256 3 patented : GB patent (2009), US patent (2011) [ Fujitsu, Authors: Akhmatskaya, Reich ] 3 proved to be successful in simulations of complex molecular systems in Biology and Chemistry (6 publications) 7 No implementation and testing in statistical computation till 2015 7 Never been implemented in open source software due to patent restrictions Fujitsu granted the permission I November 2015 : Fujitsu issued the license giving a permission (i) to use the patented method in open source software (ii) to EA to implement and use know-how I Current status : GSHMC has been modi fi ed and adapted to statistical applications to give birth to MMHMC. Implemented in BCAM in-house software [ Radivojevi � , Akhmatskaya, preprint ]

  16. Success stories: Proteins Peptide toxin / bilayer system: GSHMC offers ~8x increase in sampling efficiency (from analysis of ACFs) compared to conventional molecular dynamics (MD) simulation C. L. Wee, M. S. P. Sansom, S. Reich, E. Akhmatskaya (2008), J. Phys. Chem. B,112, 5710.–5717

Recommend


More recommend