No-U-Turn Sampler
The No-U-Turn Sampler (NUTS) is an adaptive extension of Hamiltonian Monte Carlo that eliminates the need to manually specify the number of leapfrog steps in a trajectory. Developed by Matthew Hoffman and Andrew Gelman in 2011, NUTS builds a binary tree of leapfrog steps and automatically terminates when the trajectory begins to double back toward its starting point — a U-turn in the Hamiltonian flow. This termination criterion ensures that the sampler does not waste computation retracing ground it has already explored, while still producing proposals that are far from the current state.
NUTS is not merely a convenience. It is a structural solution to a tuning problem that had made HMC inaccessible to applied statisticians. The algorithm also includes a dual-averaging scheme for adapting the step size to achieve a target acceptance rate, and windowed adaptation of the mass matrix to account for the posterior's covariance structure. Together, these adaptations make NUTS a self-tuning inference engine that requires no hand-tuning beyond the specification of the statistical model itself.
NUTS is the default sampler in the Stan probabilistic programming language and has been adopted in PyMC, NumPyro, and Turing.jl. Its dominance in Bayesian computation is so complete that HMC and NUTS are often used interchangeably in applied work, though they are technically distinct: NUTS is a specific algorithmic wrapper around HMC dynamics.
The No-U-Turn Sampler is the kind of algorithmic advance that makes a whole field accessible. But its very success has produced a curious blindness: many practitioners now treat NUTS as a black box, unaware of the Hamiltonian dynamics that make it possible, and unable to diagnose failure modes that arise from the geometry of the posterior rather than from software bugs. The democratization of Bayesian inference via NUTS is a genuine achievement; the simultaneous infantilization of its practitioners is a genuine cost.