/manifold_lifting

Accompanying code for 'Manifold lifting: scaling MCMC to the vanishing noise regime'

Primary LanguageJupyter Notebook

Manifold lifting: scaling Markov chain Monte Carlo to the vanishing noise regime

DOI arXiv:1807.02356 DOI:10.1093/jrsssb/qkad023

Code accompanying the paper Manifold lifting: scaling Markov chain Monte Carlo to the vanishing noise regime.

Abstract: Standard Markov chain Monte Carlo methods struggle to explore distributions that concentrate in the neighbourhood of low-dimensional submanifolds. This pathology naturally occurs in Bayesian inference settings when there is a high signal-to-noise ratio in the observational data but the model is inherently over-parametrised or non-identifiable. In this paper, we propose a strategy that transforms the original sampling problem into the task of exploring a distribution supported on a manifold embedded in a higher-dimensional space; in contrast to the original posterior this lifted distribution remains diffuse in the limit of vanishing observation noise. We employ a constrained Hamiltonian Monte Carlo method, which exploits the geometry of this lifted distribution, to perform efficient approximate inference. We demonstrate in numerical experiments that, contrarily to competing approaches, the sampling efficiency of our proposed methodology does not degenerate as the target distribution to be explored concentrates near low-dimensional submanifolds.

Installation

The mlift package requires Python 3.9 or above. To install the mlift package and its dependencies into an existing Python environment run

pip install git+https://github.com/thiery-lab/manifold_lifting.git

The mlift.pde module and associated example model in mlift.example_models.poisson additionally require FEniCS (v2019.10) and scikit-sparse to be installed. Note that the fenics metapackage on PyPI does not install the required binary dependencies and so FEniCS should instead be separately installed by following one of the methods listed in the project's installation instructions.

Alternatively a conda environment man-lift containing the required dependencies to run all of the experiments (including the mlift package) can be created from the provided environment.yml file by running

conda env create -f environment.yml

Experiment scripts

A number of scripts for reproducing the numerical experiments used to produce the figures in the paper are provided in the scripts directory. To run these scripts the mlift package and its dependencies need to be installed in a local Python 3.9+ environment as described above. The default settings of the scripts assume they are run from the top-level directory of a clone of the repository. Pass a --help argument to any of the scripts to see a description of what the script does and the available environment variables for configuring the behaviour of the script.

Example notebook

For a complete example of applying the method described in the paper to perform inference in a two-dimensional example and accompanying explanatory notes see the Jupyter notebook linked below. The manifold MCMC methods in the Python package Mici are used for inference.

Two-dimensional_example.ipynb
Open non-interactive version with nbviewer Render with nbviewer
Open interactive version with Binder Launch with Binder
Open interactive version with Google Colab Open in Colab

Citation

To cite the paper the following bibtex entry can be used

@article{au2023manifold,
    author = {Au, Khai Xiang and Graham, Matthew M and Thiery, Alexandre H},
    title = "{Manifold lifting: scaling Markov chain Monte Carlo to the vanishing noise regime}",
    journal = {Journal of the Royal Statistical Society Series B: Statistical Methodology},
    volume = {85},
    number = {3},
    pages = {757-782},
    year = {2023},
    month = {04},
    issn = {1369-7412},
    doi = {10.1093/jrsssb/qkad023},
    url = {https://doi.org/10.1093/jrsssb/qkad023},
    eprint = {https://academic.oup.com/jrsssb/article-pdf/85/3/757/50859790/qkad023.pdf},
}