Reflection, Refraction, and Hamiltonian Monte Carlo
Hamiltonian Monte Carlo (HMC) is a successful approach for sampling from continuous densities. However, it has difficulty simulating Hamiltonian dynamics with non-smooth functions, leading to poor performance. This paper is motivated by the behavior of Hamiltonian dynamics in physical systems like optics. We introduce a modification of the Leapfrog discretization of Hamiltonian dynamics on piecewise continuous energies, where intersections of the trajectory with discontinuities are detected, and the momentum is reflected or refracted to compensate for the change in energy. We prove that this method preserves the correct stationary distribution when boundaries are affine. Experiments show that by reducing the number of rejected samples, this method improves on traditional HMC.
SUMMARY        Hamiltonian MCMC methods sample from a probability       distribution by treating its log as a "potential energy"       function over the state space, augmenting the space with extra       "momentum variables" and their associated "kinetic energy",       and evolving the state of the Markov process by integrating       the physical Hamiltonian equations of motion of the system.       Each step of the Markov chain is accomplished by numerically       integrating the Hamiltonian equations forward in time.       However, if the energy function is non-differentiable, the       integral is not well-defined.The rejection step that is used       to counteract numerical inaccuracies in the integration also       accounts for such non-differentiable regions, but at the cost       of slowing down the mixing rate of the Markov chain.This       paper suggests physically-inspired "reflections" and       "refractions" of the trajectory of the system that occur       whenever the state crosses a discontinuity in the energy       function.It applies to target distributions that are       differentiable everywhere except on the boundaries of certain       polytopes; the reflection or refraction occurs whenever the       trajectory of the system crosses such a boundary.        Whether a reflection or refraction occurs depends on if the       momentum component of the state is sufficient to "climb" the       gap in energy.The authors show that the necessary       volume-preservation properties are satisfied by these       reflection and refraction procedures, so that the Markov       chains converges to the required target distribution.        QUALITY        The presented modification to Hamiltonian MCMC is useful and       the case of piecewise-differentiable target distributions is       quite applicable in practice.It would, of course, be useful       to have boundaries that are not affine hyperplanes.        CLARITY        The algorithm, its motivation, and the proof of the volume       preservation property is clearly presented.Some more       (qualitative and/or quantitative) discussion about how the       reflections and refractions affect rejection rates would be       useful.        ORIGINALITY AND SIGNIFICANCE        The idea of applying physically-based reflection and       refraction to Hamiltonian MCMC methods appears to be novel and       useful.While the present work proves its correctness under       certain conditions, it is an interesting avenue of research to       extend it further.