280 likes | 473 Views
Speeding up HMC with better integrators. A D Kennedy and M A Clark School of Physics & SUPA, The University of Edinburgh Boston University. Outline. Symmetric symplectic integrators in HMC Shadow Hamiltonians and Poisson brackets Tuning integrators using Poisson brackets
E N D
Speeding up HMC with better integrators A D Kennedy and M A Clark School of Physics & SUPA, The University of Edinburgh Boston University
Outline • Symmetric symplectic integrators in HMC • Shadow Hamiltonians and Poisson brackets • Tuning integrators using Poisson brackets • Hessian or Force-Gradient integrators • Symplectic integrators and Poisson brackets on Lie groups • Results for single-link updates A D Kennedy
We are interested in finding the classical trajectory in phase space of a system described by the Hamiltonian The idea of a symplectic integrator is to write the time evolution operator (Lie derivative) as Symplectic Integrators A D Kennedy
Define and so that Since the kinetic energy T is a function only of p and the potential energy S is a function only of q, it follows that the action of and may be evaluated trivially Symplectic Integrators A D Kennedy
If A and B belong to any (non-commutative) algebra then , where constructed from commutators of A and B (i.e., is in the Free Lie Algebra generated by A and B ) • More precisely, where and Symplectic Integrators Baker-Campbell-Hausdorff (BCH) formula A D Kennedy
Explicitly, the first few terms are • The following identity follows directly from the BCH formula Symplectic Integrators • In order to construct reversible integrators we use symmetric symplectic integrators A D Kennedy
Symplectic Integrators • From the BCH formula we find that the PQP symmetric symplectic integrator is given by • In addition to conserving energy to O (² ) such symmetric symplectic integrators are manifestly area preserving and reversible A D Kennedy
This may be obtained by replacing the commutators in the BCH expansion of with the Poisson bracket Shadow Hamiltonians For each symplectic integrator there exists a Hamiltonian H’ which is exactly conserved A D Kennedy
For the PQP integrator we have Conserved Hamiltonian A D Kennedy
Tuning HMC • For any (symmetric) symplectic integrator the conserved Hamiltonian is constructed from the same Poisson brackets • A procedure for tuning such integrators is • Measure the Poisson brackets during an HMC run • Optimize the integrator (number of pseudofermions, step-sizes, order of integration scheme, etc.) offline using these measured values • This can be done because the acceptance rate (and instabilities) are completely determined by δH = H’ - H A D Kennedy
Consider the PQPQP integrator The conserved Hamiltonian is thus Simple Example (Omelyan) Measure the “operators” and minimize the cost by adjusting the parameter α A D Kennedy
An interesting observation is that the Poisson bracket depends only of q We may therefore evaluate the integrator explicitly Hessian Integrators The force for this integrator involves second derivatives of the action Using this type of step we can construct very efficient Force-Gradient integrators A D Kennedy
Higher-Order Integrators • We can eliminate all the leading order Poisson brackets in the shadow Hamiltonian leaving errors of O (δτ2) • The coefficients of the higher-order Poisson brackets are much smaller than those from the Campostrini integrator A D Kennedy
Beyond Scalar Field Theory We need to extend the formalism beyond a scalar field theory Fermions are easy How do we extend all this fancy differential geometry formalism to gauge fields? A D Kennedy
Hamiltonian Mechanics Symplectic 2-form Hamiltonian vector field Equations of motion Poisson bracket Flat Manifold General Darboux theorem: All manifolds are locally flat A D Kennedy
The left invariant forms dual to the generators of a Lie algebra satisfy the Maurer-Cartan equations Maurer-Cartan Equations A D Kennedy
Fundamental 2-form We can invent any Classical Mechanics we want… So we may therefore define a closed symplectic 2-form which globally defines an invariant Poisson bracket by A D Kennedy
Define a vector field such that Hamiltonian Vector Field We may now follow the usual procedure to find the equations of motion: Introduce a Hamiltonian function (0-form) Hon the cotangent bundle (phase space) over the group manifold A D Kennedy
The classical trajectories are then the integral curves of h: Integral Curves A D Kennedy
Poisson Brackets Recall our Hamiltonian vector field For H(q,p) = T(p) + S(q) we have vector fields A D Kennedy
More Poisson Brackets We thus compute the lowest-order Poisson bracket and the Hamiltonian vector corresponding to it A D Kennedy
Even More Poisson Brackets A D Kennedy
Integrators A D Kennedy
Campostrini Integrator A D Kennedy
Hessian Integrators A D Kennedy
One-Link Results A D Kennedy
Scaling Behaviour A D Kennedy
Conclusions • We hope that very significant performance improvements can be obtained using Force-Gradient integrators • For fermions one extra inversion of the Dirac operator is required • Pure gauge force terms and Poisson brackets get quite complicated to program • Real-life speed-up factors will be measured really soon… A D Kennedy