# Nonparametric Hamiltonian Monte Carlo

arXiv: https://arxiv.org/abs/2106.10238 · HTML: https://mlsanity.com/paper/2106.10238/

## Key facts

- Cited by 4 papers in the map (data through 14 Oct 2026).
- Builds on 17 of its 59 references that are in the map.
- First posted on arXiv 18 Jun 2021.

## Builds on (most cited first, 17 of 17)

- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Variational Inference: A Review for Statisticians](https://mlsanity.com/paper/1601.00670/) (2016)
- [Pyro: Deep Universal Probabilistic Programming](https://mlsanity.com/paper/1810.09538/) (2018)
- [Black Box Variational Inference](https://mlsanity.com/paper/1401.0118/) (2013)
- [A Conceptual Introduction to Hamiltonian Monte Carlo](https://mlsanity.com/paper/1701.02434/) (2017)
- [An Introduction to Probabilistic Programming](https://mlsanity.com/paper/1809.10756/) (2018)
- [Geometric integrators and the Hamiltonian Monte Carlo method](https://mlsanity.com/paper/1711.05337/) (2017)
- [A New Approach to Probabilistic Programming Inference](https://mlsanity.com/paper/1507.00996/) (2015)
- [Venture: a higher-order probabilistic programming platform with programmable inference](https://mlsanity.com/paper/1404.0099/) (2014)
- [A Lambda-Calculus Foundation for Universal Probabilistic Programming](https://mlsanity.com/paper/1512.08990/) (2015)
- [Divide, Conquer, and Combine: a New Inference Strategy for Probabilistic Programs with Stochastic Support](https://mlsanity.com/paper/1910.13324/) (2019)
- [Delayed Sampling and Automatic Rao-Blackwellization of Probabilistic Programs](https://mlsanity.com/paper/1708.07787/) (2017)
- [A Domain Theory for Statistical Probabilistic Programming](https://mlsanity.com/paper/1811.04196/) (2018)
- [Densities of Almost Surely Terminating Probabilistic Programs are Differentiable Almost Everywhere](https://mlsanity.com/paper/2004.03924/) (2020)
- [C3: Lightweight Incrementalized MCMC for Probabilistic Programs using Continuations and Callsite Caching](https://mlsanity.com/paper/1509.02151/) (2015)
- [LF-PPL: A Low-Level First Order Probabilistic Programming Language for Non-Differentiable Models](https://mlsanity.com/paper/1903.02482/) (2019)
- [Probabilistic programming for birth-death models of evolution using an alive particle filter with delayed sampling](https://mlsanity.com/paper/1907.04615/) (2019)

## Built on by (most cited first, 4 of 4)

- [Rethinking Variational Inference for Probabilistic Programs with Stochastic Support](https://mlsanity.com/paper/2311.00594/) (2023)
- [Guaranteed Bounds for Posterior Inference in Universal Probabilistic Programming](https://mlsanity.com/paper/2204.02948/) (2022)
- [Nonparametric Involutive Markov Chain Monte Carlo](https://mlsanity.com/paper/2211.01100/) (2022)
- [LazyHMC: Hamiltonian Monte Carlo Simulation for Lazy, Infinite Dimensional Probabilistic Programs](https://mlsanity.com/paper/2608.08588/) (2026)

## Abstract (arXiv)

Probabilistic programming uses programs to express generative models whose posterior probability is then computed by built-in inference engines. A challenging goal is to develop general purpose inference algorithms that work out-of-the-box for arbitrary programs in a universal probabilistic programming language (PPL). The densities defined by such programs, which may use stochastic branching and recursion, are (in general) nonparametric, in the sense that they correspond to models on an infinite-dimensional parameter space. However standard inference algorithms, such as the Hamiltonian Monte Carlo (HMC) algorithm, target distributions with a fixed number of parameters. This paper introduces the Nonparametric Hamiltonian Monte Carlo (NP-HMC) algorithm which generalises HMC to nonparametric models. Inputs to NP-HMC are a new class of measurable functions called "tree representable", which serve as a language-independent representation of the density functions of probabilistic programs in a universal PPL. We provide a correctness proof of NP-HMC, and empirically demonstrate significant performance improvements over existing approaches on several nonparametric examples.
