statistics

hamiltonian monte carlo

Markov chain sampling that uses gradients of the posterior to take long, well-aimed steps in many dimensions.
19 related articles

Description

Hamiltonian Monte Carlo (HMC) is a Markov chain Monte Carlo (MCMC) method for sampling from probability distributions, particularly those with many dimensions. Unlike simpler random-walk methods, HMC uses the gradient of the target distribution to propose moves that are far away from the current point, while still maintaining a high acceptance rate. This makes it highly efficient for exploring high-dimensional spaces, where random walks tend to wander slowly. HMC is a cornerstone of modern Bayesian computation, especially in fields like machine learning and statistical physics.

History

The method was introduced by Simon Duane, Anthony Kennedy, Brian Pendleton, and Duncan Roweth in 1987, building on earlier work in lattice gauge theory.

How it works

HMC interprets the target distribution as a potential energy function and introduces auxiliary 'momentum' variables. The system then evolves according to Hamiltonian dynamics, simulating a frictionless ball rolling on a landscape shaped by the negative log of the target distribution. After a simulated trajectory, the new position and momentum are accepted or rejected using a Metropolis step, which corrects for any discretization error. The key is that the dynamics are reversible and volume-preserving, so the algorithm converges to the correct distribution. The gradient guides the trajectory toward regions of high probability, allowing large jumps.

In practice

It is the default sampling algorithm in probabilistic programming languages like Stan and PyMC, used for fitting complex Bayesian models in social science, biology, and finance.

Fun fact

The 'Hamiltonian' in the name refers to William Rowan Hamilton's reformulation of classical mechanics, which the algorithm borrows to turn sampling into a physics simulation.

Concept graph →

Related articles · 19

Nuclear Theory2026-08-142 minarXiv:2608.14045express
Counting the Participants in a Nuclear Collision
When two heavy nuclei smash into each other at enormous speeds, they don't collide as whole objects like billiard balls. Only part of their matter comes into contact. How many nucleons (protons and neutrons) actually took part in the collision, and how many flew past, is not known in advance. All subsequent measurements depend on this number, but it cannot be observed directly.
Nuclear Theory2026-08-011 minarXiv:2608.00529express
Quantum Transformer for 600 Dimensions
In a noisy hall, an interpreter tries to catch every word, but rustles and echoes muddle the meaning. That's roughly how conventional computer methods handle complex quantum systems: the more particles and the stronger their correlations, the faster calculations drown in interference.
Mesoscale2026-07-262 minarXiv:2607.23498express
Knock, knock, who's there? Majorana
An interpreter gets distracted by every rustle in the hall, and a one-hour meeting stretches into two. That's roughly how scientists have spent years searching for special states in tiny electrical chains: they watched the total current but missed how the signal was corrupted by noise.
Galaxies2026-07-222 minarXiv:2607.20006express
How Dancing Galaxies Reveal Their Masses
Two galaxies (our Milky Way and its satellite, the Large Magellanic Cloud) slowly circle each other. Their gravitational pull stirs the distant outskirts of the Milky Way, like a pebble thrown into a pond makes the water ripple.
eess.SY2026-07-141 minarXiv:2607.12343express
How a Smart Algorithm Learns Not to Crash
A driver on a slippery road doesn't know exactly how the car will respond to the steering wheel, and learns on the go, leaving room for error. A smart control algorithm behaves in a similar way.
math.OC2026-07-141 minarXiv:2607.12775express
Smart Acceleration: Teaching the Power Grid to Think Faster
Power systems with solar panels and wind turbines are like a chess game: cloud cover and load changes are the opponent's moves, impossible to foresee. To maintain balance, operators used to run through dozens of scenarios (uncertainty) — that took too much time and computing power.
math.OC2026-07-131 minarXiv:2607.11306express
Mathematics finds the perfect plan to fight a pandemic
Mathematicians confirmed: the ideal response to a pandemic is the 'hammer and dance' strategy. First, a sharp lockdown smashes the wave of infections like a hammer blow. When hospitals empty, the dance begins — a cautious, step-by-step return to normal life.
Cosmology2026-07-083 minarXiv:2607.06959
Cosmic Tuning Fork: KLT-Net Neural Network Rewrites the Distance Ladder
Modern cosmology has hit a dissonant chord. Local measurements of the Hubble constant from supernovae and Cepheids give around 73 km/s/Mpc, while global constraints from the cosmic microwave background within the standard ΛCDM model point to 67 km/s/Mpc.
Mesoscale2026-06-282 minarXiv:2606.29281
Neural network unravels unequal quantum handshakes in nanographene
Quantum spin chains resemble a line of people passing along a secret handshake: each turns to a neighbor, and how firmly they clasp palms determines how the wave runs through the entire chain. In the ideal Heisenberg chain, quantum magnetism’s bedrock, all handshakes are equal.
High Energy2026-05-251 minarXiv:2605.25980express
Why Black Holes Dance Differently
Pairs of black holes dance in three different styles before merging. The first is a neat waltz: the objects swirl in the same direction, like partners facing the same way. Such pairs are born from binary stars and often have unequal masses. The second is chaotic disco: spins are scattered, masses nearly equal.
Cosmology2026-05-222 minarXiv:2605.23367express
How to Weigh the Universe with Color-Coded Tags
A census that only records the distance between houses misses a lot. You can tell where the cities are and where the villages are, but you can't distinguish a skyscraper from a single-family home. That's roughly how astronomers study the universe with the standard two-point correlation function: they count how many pairs of galaxies are separated by a given distance.
Cosmology2026-04-202 minarXiv:2604.17981express
The Universe in a Test Tube: How Tiny Slices of the Cosmos Replace Massive Simulations
The Universe is vast, and figuring out how galaxies and dark matter are distributed within it is no easy task. Usually, scientists run computer simulations that "play out" the evolution of entire regions of space billions of light-years across. But such calculations demand colossal resources and time.
HEP Theory2026-04-192 minarXiv:2604.17649express
How Spacetime Emerges from Quantum Ripples
A drop of cream falls into a cup of coffee, and within a minute, the entire drink turns beige. This mixing process can be quantified: how much "stirring" is needed to transform one distribution of particles into another? In mathematics, this approach is called optimal transport, and the measure of effort is the Wasserstein distance. The authors applied this idea to quantum systems.
Medical Physics2026-04-101 minarXiv:2604.09157express
Radiation therapy speeds up: dose in seconds
Prostate cancer radiation therapy requires precise calculation of the radiation dose at every point in the body. The classic Monte Carlo method simulates millions of particles and takes hours, while adapting the plan to daily anatomical changes needs seconds.
Instrumentation2026-03-041 minarXiv:2603.04535express
Neural Network Clears the Gravitational Lens from Ancient Light
Light born at the moment of the Big Bang has traveled to us for almost 14 billion years. But along the way, it passed through the gravitational fields of galaxies and clumps of dark matter, which bent its rays. To an observer, this looks like an image stretched and smudged by an old window pane.
HEP Experiment2026-02-101 minarXiv:2602.09354express
Higgs Under the Microscope: How Its Decays Are Caught
The Higgs boson lives an unimaginably short life — less than a billionth of a second. It cannot be caught directly, so physicists look at what remains after its decay: jets of particles, muons, neutrinos. But some information is lost if you consider only the explicit decay traces rather than the whole event.
Cosmology2026-01-061 minarXiv:2601.03347express
Disordered Systems2026-01-031 minarXiv:2601.01243express
Electricity in Disordered Materials: Electron Hopping
In disordered materials, such as organic semiconductors or inks made from two-dimensional materials, electrons don't move smoothly like water through a pipe. Instead, they hop from one spot to another, like a ball bouncing across a rough surface. This kind of motion is called hopping transport.
High Energy2026-01-011 minarXiv:2601.00500express
How to Catch a Pulsar That Spins Too Fast
A pulsar is a dead star that spins and emits radio pulses like a lighthouse. If a pulsar has a companion, they whirl around a common center of gravity.