https://github.com/acerbilab/normalizing-flow-regression
Normalizing Flow Regression for Bayesian Inference with Offline Likelihood Evaluations
https://github.com/acerbilab/normalizing-flow-regression
approximate-inference bayesian-inference normalizing-flows surrogate-models
Last synced: 21 days ago
JSON representation
Normalizing Flow Regression for Bayesian Inference with Offline Likelihood Evaluations
- Host: GitHub
- URL: https://github.com/acerbilab/normalizing-flow-regression
- Owner: acerbilab
- Created: 2025-04-07T07:38:06.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-04-22T11:56:27.000Z (11 months ago)
- Last Synced: 2025-10-30T21:24:30.667Z (5 months ago)
- Topics: approximate-inference, bayesian-inference, normalizing-flows, surrogate-models
- Language: Jupyter Notebook
- Homepage: https://acerbilab.github.io/normalizing-flow-regression/
- Size: 8.44 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Normalizing Flow Regression
This repository provides the implementation and code used in the AABI 2025 (proceedings track) article *Normalizing Flow Regression for Bayesian Inference with Offline Likelihood Evaluations* (Li et al., 2025).
- See the paper [web page](https://acerbilab.github.io/normalizing-flow-regression/) for more information.
- The full paper is available [on arXiv](https://arxiv.org/abs/2504.11554) and as [Markdown files](https://github.com/acerbilab/normalizing-flow-regression/tree/main/docs/paper).
## Overview
Bayesian inference with computationally expensive likelihood evaluations remains a significant challenge in many scientific domains. We propose normalizing flow regression (NFR), a novel offline inference method for approximating posterior distributions. Unlike traditional surrogate approaches that require additional sampling or inference steps, NFR directly yields a tractable posterior approximation through regression on existing log-density evaluations.
## Set up
```bash
conda env create -f environment.yml
conda activate nfr
# install kernel for jupyter notebook
python -m ipykernel install --user --name nfr
```
See `demo.ipynb` for an example of using NFR.
## Citation
To appear in 7th Symposium on Advances in Approximate Bayesian Inference (AABI 2025, proceedings track).
> Li, C., Huggins, B., Mikkola, P., & Acerbi, L. (2025). Normalizing Flow Regression for Bayesian Inference with Offline Likelihood Evaluations. In 7th Symposium on Advances in Approximate Bayesian Inference.
### BibTeX
```bibtex
@inproceedings{liNormalizingFlowRegression2025,
title = {Normalizing Flow Regression for {{Bayesian}} Inference with Offline Likelihood Evaluations},
booktitle = {Proceedings of the 7th Symposium on Advances in Approximate Bayesian Inference},
author = {Li, Chengkun and Huggins, Bobby and Mikkola, Petrus and Acerbi, Luigi},
year = 2025,
month = apr,
series = {Proceedings of Machine Learning Research},
volume = {289},
pages = {91--130},
publisher = {PMLR}
}
```
## Acknowledgements
This repository includes code adapted from the `nflows` library: https://github.com/bayesiains/nflows, originally developed by Conor Durkan, Artur Bekasov, Iain Murray, and George Papamakarios.
We have modified `nflows/transforms/autoregressive.py` such that:
- When neural network parameters are zeros, the flow becomes the identity transform.
- The scale and shift transformation is constrained to a specified range.